LaTeX template: Set default listings language for lua, assembler.
Otherwise we get an error when trying to compile code with lua or assembler code. To change the default dialect (currenty 5.3 for lua and x86masm for assembler), you can use `--include-in-header` to inject something like \lstset{defaultdialect=[5.2]Lua} Closes #5227.
This commit is contained in:
parent
7012782b79
commit
7ccaa77797
2 changed files with 4 additions and 0 deletions
|
@ -231,6 +231,8 @@ $endif$
|
|||
$if(listings)$
|
||||
\usepackage{listings}
|
||||
\newcommand{\passthrough}[1]{#1}
|
||||
\lstset{defaultdialect=[5.3]Lua}
|
||||
\lstset{defaultdialect=[x86masm]Assembler}
|
||||
$endif$
|
||||
$if(lhs)$
|
||||
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
\urlstyle{same} % don't use monospace font for urls
|
||||
\usepackage{listings}
|
||||
\newcommand{\passthrough}[1]{#1}
|
||||
\lstset{defaultdialect=[5.3]Lua}
|
||||
\lstset{defaultdialect=[x86masm]Assembler}
|
||||
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
||||
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
||||
\providecommand{\tightlist}{%
|
||||
|
|
Loading…
Add table
Reference in a new issue