Skip to content

Commit

Permalink
Make sure our language definitions for listings are actually being used
Browse files Browse the repository at this point in the history
While this wasn't a problem for our 'FORTRAN77', our definition of 'C' was actually completely ignored in favor of some predefined dialect of C.
  • Loading branch information
henrikt-ma committed Dec 28, 2020
1 parent b8150d2 commit 6a4fa40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mlsshared.sty
Expand Up @@ -99,7 +99,7 @@
}[keywords,comments,strings]

% Duplicate this definition here to avoid issue
\lstdefinelanguage{FORTRAN77}{%
\lstdefinelanguage{FORTRAN77}{% Define custom language to avoid collision with predefined [77]Fortran.
basicstyle=\upshape\smallifpdf\ttfamily, % size of fonts used for the code
morekeywords={%
ASSIGN,BACKSPACE,CALL,CHARACTER,%
Expand Down Expand Up @@ -128,7 +128,7 @@
morestring=[d]'
}[keywords,comments,strings]

\lstdefinelanguage{C}{%
\lstdefinelanguage[MLS]{C}{% Define new dialect to avoid collision with predefined dialects of C.
basicstyle=\upshape\smallifpdf\ttfamily, % size of fonts used for the code
morekeywords={%
auto,break,case,char,const,continue,default,do,double,%
Expand Down Expand Up @@ -165,6 +165,7 @@
showstringspaces=false,
frame=lrtb,
belowskip=0pt,
defaultdialect=[MLS]C,
}

% Misc math
Expand Down

0 comments on commit 6a4fa40

Please sign in to comment.