jkuczm / mmacells

Mathematica cells in TeX
63 stars 18 forks source link

Some Mathematica built-ins are "known" (black) but not all. #34

Closed SPPearce closed 5 years ago

SPPearce commented 7 years ago

Currently some Mathematica commands are known, such as Sin, Cos, Exp etc. These will therefore show as black, as in Mathematica. However, it only seems to be a subset of the possible commands, as slightly more obscure functions such as PolarPlot are not included.

I don't see where the already known commands are defined, in order to be able to add more. I can add them to each individual mmacells call as defined=..., but a way to specify them upfront would be good.

jkuczm commented 7 years ago

mmacells uses Mathematica keywords provided by listings package. As can be seen on page 62 of Lan­guage “drivers” de­tails, newest keywords come from Mathematica version 5.2.

On the level of mmacells you can globally add defined symbols using moredefined key in \mmaSet. For example:

\mmaSet{moredefined={Authentication,CloudDeploy,PolarPlot}}

will globally add Authentication, CloudDeploy, and PolarPlot to list of defined symbols.

SPPearce commented 7 years ago

Thank you, that makes sense. Although it doesn't have Clear, which was introduced in version 1. I've emailed a list of updated keywords to the listings package maintainer, and will add them globally as you've shown how to do.