From 7d7062ddaceabcd1af1e2c54ae31d21d770451c5 Mon Sep 17 00:00:00 2001 From: jkuczm Date: Tue, 3 Jan 2017 18:55:57 +0100 Subject: [PATCH] Initialize Mathematica language 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. --- mmacells.sty | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mmacells.sty b/mmacells.sty index 07cd441..ce09ed2 100644 --- a/mmacells.sty +++ b/mmacells.sty @@ -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,