jkuczm / mmacells

Mathematica cells in TeX
63 stars 18 forks source link

mmaInlineCell without a preceding mmaCell doesn't work. #32

Closed SPPearce closed 7 years ago

SPPearce commented 7 years ago

Hi,

If I try to call \mmaInlineCell before a mmaCell environment I get the following error: Missing \endcsname inserted.\unhbox ...l: \mmaInlineCell[]{Code}{Module[{a=5}, a]}

Minimal TeX code:

\documentclass[12pt]{article} \usepackage{mmacells}

\begin{document} %\begin{mmaCell}[functionlocal=y]{Code} % Integrate[y,{y,0,1}] %\end{mmaCell}

Inline cell: \mmaInlineCell[]{Code}{Module[{a=5}, a]}.

\end{document}

jkuczm commented 7 years ago

Thanks for reporting it.

It seems there's a problem with listings language initialization, after executing \FV@FormattingPrep command from fancyvrb.

As a workaround add {\lstset{language=[base]Mathematica}} right below \usepackage{mmacells}.

jkuczm commented 7 years ago

Should be fixed in version 0.3.2.

SPPearce commented 7 years ago

Thanks, that fixed it, I'll check the new build. Nice package.