Skip to content

Commit

Permalink
Merge pull request modelica#3034 from HansOlsson/UseTT
Browse files Browse the repository at this point in the history
Ensure that Modelica code in HTML is teletype!
  • Loading branch information
HansOlsson committed Nov 19, 2021
2 parents 2434249 + 9c446ba commit 682ef04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mlsshared.sty
Expand Up @@ -13,7 +13,11 @@
% white background due to anti-aliasing and similar effects.
% Warning: Note that changing to a font with different width -- especially a wider one -- means
% that existing manual line breaks are potentially becoming out of place.
% Finally, don't use newtexttt in listings in the LaTeXML build, see:
% - https://github.com/brucemiller/LaTeXML/issues/1713
\ifpdf
\usepackage{newtxtt}
\fi

\usepackage{listings}
\usepackage{color}
Expand Down Expand Up @@ -185,7 +189,7 @@
breaklines=true, % automatic line breaking only at white-space
keepspaces, % don't remove space such as those after closing parenthesis
captionpos=b, % sets the caption-position to bottom
commentstyle=\color{commentcolor}\sffamily, % comment style
commentstyle=\color{commentcolor}\sffamily\small, % For the LaTeXML build this is smaller than for 'basicstyle', need due to sans serif font.
keywordstyle=\color{red}, % Unused keyword style in bright red to make it easy to detect and fix.
keywordstyle=[1]\color{keywordcolor1},
keywordstyle=[2]\color{keywordcolor1}\bfseries,
Expand Down
6 changes: 6 additions & 0 deletions preamble.tex
Expand Up @@ -150,7 +150,13 @@
\usepackage[nameinlink,noabbrev]{cleveref}
\fi

% There seems to be some major issue with using this as a package in LaTeXML messing up font in listing
% See https://github.com/brucemiller/LaTeXML/issues/1713
\ifpdf
\usepackage{mlsshared}
\else
\include{mlsshared.sty}
\fi

\ifpdf
% This is the preferred load order for listings and cleveref, so that cleveref is aware of listings, see above.
Expand Down

0 comments on commit 682ef04

Please sign in to comment.