diff --git a/preamble.tex b/preamble.tex index a77a5b7b1..c30020d65 100644 --- a/preamble.tex +++ b/preamble.tex @@ -227,6 +227,12 @@ basicstyle=\upshape\ttfamily, % Font size for inline code snippets. } +% Special dialect of Modelica to use when there are URLs appearing outside string literals, to avoid the part +% starting with '//' being treated as comment. +\lstdefinelanguage[nocomment]{modelica}[short]{modelica}{% + commentstyle=\upshape\ttfamily, % Camouflage comments as workaround for not being able to remove rest-of-line comment recognition. +} + % Note: within only a keyword in grammar \lstdefinelanguage{grammar}{% basicstyle=\upshape\smallifpdf\ttfamily, % size of fonts used for the code