Skip to content

Commit

Permalink
Apply \smallifpdf after \ttfamily
Browse files Browse the repository at this point in the history
This way, it becomes possible to both modify the default size of \ttfamily itself, and then possibly override this with \smallifpdf.

For the current teletype font we don't need this, but it has turned out to be useful in the evaluation of some other candidates.
  • Loading branch information
henrikt-ma committed Mar 28, 2021
1 parent 0f3bf09 commit f9857e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mlsshared.sty
Expand Up @@ -34,7 +34,7 @@
% Note that Integer is both a predefined type and a function; we cannot treat them differently.
% Another solution would be to remove this completely.
\lstdefinelanguage{modelica}{% Language for use with the lstlisting environment.
basicstyle=\upshape\smallifpdf\ttfamily, % Font size for displayed code listings.
basicstyle=\upshape\ttfamily\smallifpdf, % Font size for displayed code listings.
alsoletter={},
% otherkeywords={-, =, +, [, ], (, ), \{, \}, :, *, !},%
morekeywords=[1]{}, % blue Keywords
Expand Down Expand Up @@ -76,7 +76,7 @@

% Note: within only a keyword in grammar
\lstdefinelanguage{grammar}{%
basicstyle=\upshape\smallifpdf\ttfamily, % size of fonts used for the code
basicstyle=\upshape\ttfamily\smallifpdf, % size of fonts used for the code
alsoletter={},
alsodigit={-},
breaklines=true,
Expand All @@ -94,7 +94,7 @@

% Duplicate this definition here to avoid issue
\lstdefinelanguage{FORTRAN77}{% Define custom language to avoid collision with predefined [77]Fortran.
basicstyle=\upshape\smallifpdf\ttfamily, % size of fonts used for the code
basicstyle=\upshape\ttfamily\smallifpdf, % size of fonts used for the code
morekeywords=[1]{%
ASSIGN,BACKSPACE,CALL,CHARACTER,%
CLOSE,COMMON,COMPLEX,CONTINUE,DATA,DIMENSION,DO,DOUBLE,%
Expand Down Expand Up @@ -123,7 +123,7 @@
}[keywords,comments,strings]

\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
basicstyle=\upshape\ttfamily\smallifpdf, % size of fonts used for the code
morekeywords=[1]{%
auto,break,case,char,const,continue,default,do,double,%
else,enum,extern,float,for,goto,if,int,long,register,return,%
Expand Down

0 comments on commit f9857e9

Please sign in to comment.