File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 202
202
keepspaces, % don't remove space such as those after closing parenthesis
203
203
upquote=true, % Don't turn apostrophe/backtick into single quotation marks.
204
204
captionpos=b, % sets the caption-position to bottom
205
- commentstyle=\color {commentcolor}\sffamily ,
205
+ commentstyle=\color {commentcolor}\sffamilyifhtml ,
206
206
keywordstyle=\color {red}, % Unused keyword style in bright red to make it easy to detect and fix.
207
207
keywordstyle=[1]\color {keywordcolor1},
208
208
keywordstyle=[2]\color {keywordcolor1}\bfseries ,
Original file line number Diff line number Diff line change 143
143
\let\smallifpdf\normalsize
144
144
\fi
145
145
146
+ % Comments in listings looks better and more distinct from the actual code if set in a variable-width sans-serif font.
147
+ % However, just changing font family doesn't work for pdf.
148
+ % Hence, we make a different choice of font depending on the target format.
149
+ \ifpdf
150
+ \let\sffamilyifhtml\relax
151
+ \else
152
+ \let\sffamilyifhtml\sffamily
153
+ \fi
154
+
146
155
\ifpdf
147
156
% Don't load cleveref yet.
148
157
\else
You can’t perform that action at this time.
0 commit comments