CellStyleImportRules

CellStyleImportRules

is an option for NotebookImport specifying how to import cells with given cell style names.

Details

  • CellStyleImportRules{style1form1,style2form2,} specifies that, for cells of style stylei, formi should be used when importing the cell.
  • The following may be given for formi:
  • "Boxes"first argument of low-level cell expression
    "Cell"complete low-level cell expression
    "Expression"cell converted to an expression
    "HeldExpression"cell converted to a held expression
    "HeldInterpretedCell"cell converted to a held TextCell or ExpressionCell
    "Hyperlinks"list of hyperlinks in the cell
    "InactiveExpression"cell converted to an inactive expression
    "InputText"cell contents as given by Copy As Input Text
    "InterpretedCell"cell converted to a TextCell or ExpressionCell
    "Text"cell contents as given by Copy As Plain Text
  • The setting CellStyleImportRulesAutomatic is equivalent to the following mappings:
  • "Title""Text"
    "Chapter"
  • "Text"
  • "Subchapter"
  • "Text"
  • "Section"
  • "Text"
  • "Subsection"
  • "Text"
  • "Subsubsection"
  • "Text"
  • "Text"
  • "Text"
  • "Code""Cell"
    "Input""HeldExpression"
    "Output""Expression"
    "Message""Text"
    "Print""Print"
  • Other styles are given in "Boxes" form.

Examples

Basic Examples  (1)

Specify different forms for different cell styles:

Wolfram Research (2023), CellStyleImportRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CellStyleImportRules.html.

Text

Wolfram Research (2023), CellStyleImportRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CellStyleImportRules.html.

CMS

Wolfram Language. 2023. "CellStyleImportRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CellStyleImportRules.html.

APA

Wolfram Language. (2023). CellStyleImportRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CellStyleImportRules.html

BibTeX

@misc{reference.wolfram_2024_cellstyleimportrules, author="Wolfram Research", title="{CellStyleImportRules}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/CellStyleImportRules.html}", note=[Accessed: 27-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_cellstyleimportrules, organization={Wolfram Research}, title={CellStyleImportRules}, year={2023}, url={https://reference.wolfram.com/language/ref/CellStyleImportRules.html}, note=[Accessed: 27-April-2024 ]}