Skip to content

Commit

Permalink
Initialize Mathematica language
Browse files Browse the repository at this point in the history
Language initialization can cause error when done after executing
`\FV@FormattingPrep` command from `fancyvrb` package. This can happen
inside `\mmaInlineCell`, if it's used without previous language
initialization.

Proper initialization happens e.g. inside `mmaCell` environment so it's
easy to miss this problem.

To fix it, we simply initialize language inside package.
  • Loading branch information
jkuczm committed Jan 3, 2017
1 parent a28e13b commit 7d7062d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mmacells.sty
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,12 @@
morekeywords={_},
keywordsprefix=_, % Blank... patterns with head
}[keywords,comments,strings,fancyvrb]
% Use newly defined Mathematica language to make sure everything is properly
% initialized. \lstset sets options only inside current group,
% delimited by braces, so this has no effect besides initialization.
{\lstset{language=[base]Mathematica}}
\lstdefinestyle{MathematicaFrontEnd}{
showstringspaces=false,
columns=fullflexible,
Expand Down

0 comments on commit 7d7062d

Please sign in to comment.