diff options
Diffstat (limited to 'exercisesheets-beamer.sty')
| -rw-r--r-- | exercisesheets-beamer.sty | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/exercisesheets-beamer.sty b/exercisesheets-beamer.sty index 6688624..4ba3690 100644 --- a/exercisesheets-beamer.sty +++ b/exercisesheets-beamer.sty @@ -1353,6 +1353,8 @@ \ifluatex \usepackage{luacode} + +%change only some catcodes to \begingroup \catcode`!=0 \catcode`\@=11 @@ -1363,13 +1365,14 @@ \catcode`>=2 \catcode`\~=11 \catcode`\\=11 -%% Exoanded, when \catcode`\^^M=12 holds -!global!long!def!@start@Lexercise@Helper#1\end{Lexercise}< % +%% Expanded, when \catcode`\^^M=12 holds +!global!long!def!exsh@start@Lexercise@#1\end{Lexercise}< % !directlua<exsh_cur_exercise=exercise ({#1})> % - !endgroup!end<Lexercise>!par % + !endgroup!end<Lexercise>% > !endgroup -\def\startLexercise{ + +\def\exsh@lua@catcodesBG{ \begingroup \catcode`!=12 \catcode`\$=12 @@ -1384,10 +1387,13 @@ \catcode`\@=11 \catcode`\%=12 \catcode`\^^I=12 -\catcode`\^^J=12\catcode`\^^M=12\catcode`\\=11\endlinechar-1\@start@Lexercise@Helper} +\catcode`\^^J=12\catcode`\^^M=12\catcode`\\=11\endlinechar-1} + +\def\exsh@start@Lexercise{% + \exsh@lua@catcodesBG\exsh@start@Lexercise@} \newenvironment{Lexercise}{% - \startLexercise% + \exsh@start@Lexercise% }{% \directlua{tex.print(exsh_cur_exercise)} } |
