Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

17
  • 1
    $\begingroup$ @Casimir If you're ok with simple line breaks provided by listings package you can use morelst={breaklines=true} option. As to smarter line breaking, adding a "Processor" using Leonid's CodeFormatter is somewhere on my long TODO list. $\endgroup$ Commented Nov 8, 2017 at 13:07
  • 1
    $\begingroup$ @Casimir You can decrease value of leftmargin option. There's also labelsep option controlling distance separating cell label from code. $\endgroup$ Commented Nov 8, 2017 at 16:01
  • 1
    $\begingroup$ @Casimir As to indentation inside environment in $\TeX$ code, you can remove it using fancyvrbs gobble option. By default CellsToTeX uses 2 spaces to indent contents of mmaCell environment, this is controlled by "Indentation" option of mmaCellProcessor. $\TeX$ command setting morefv={gobble=2} option should be automatically set by CellsToTeXPreamble function, but you can also change it manually. $\endgroup$ Commented Nov 8, 2017 at 16:08
  • 1
    $\begingroup$ @Casimir Currently no referencing mechanism is built into mmacells. The point of numbering cells was to accurately reproduce Mathematica session with its cell indices. Since Input and following Output cells share cell index, and since you can embed multiple Mathematica sessions inside one $\TeX$ document, "raw" cell index counter is not good candidate to be referenceable. So currently you need some other referencable counter, in issue 36 I show how to "hook up" to listings labeling mechanism. $\endgroup$ Commented Nov 13, 2017 at 12:34
  • 1
    $\begingroup$ @Casimir I've added example of references that automatically use cell labels as reference text. Not sure if something like that is what you're after. $\endgroup$ Commented Nov 14, 2017 at 0:01