olsak / OpTeX

OpTeX - LuaTeX format with extended Plain TeX macros
http://petr.olsak.net/optex/
35 stars 14 forks source link

\hisyntax does not work in \slides #43

Closed robertbachmann closed 3 years ago

robertbachmann commented 3 years ago

The following code produces an error message with OpTeX v1.01 and OpTeX v1.01+

% !TeX program = optex
\slides

\begtt \hisyntax{C}
int main() {
  return 0; // minimal C prog.
}
\endtt

\bye

Error: ! You can't use `macro parameter character #' in vertical mode.

olsak commented 3 years ago

Fixed, thank you for reporting.

robertbachmann commented 3 years ago

Tested

\slides
\slideshow

\begtt \hisyntax{C}
int main() {
  return 0; // minimal C prog.
}
\endtt

\pg+

\begtt \hisyntax{python}
# 
@x
def hello():
    return "x" + 1 # xxx
\endtt

\pg+

\begtt \hisyntax{html}
<b class='x'>x</b> <!-- x -->
\endtt

\bye