File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 257
257
% Our usual abbreviation for 'listings'. Comments are in
258
258
% italics. Arbitrary TeX commands can be used if they're
259
259
% surrounded by @ signs.
260
- \lstnewenvironment {codeblock}
261
- {
260
+ \newcommand {\CodeBlockSetup }{
262
261
\lstset {escapechar=@}
263
262
\renewcommand {\tcode }[1]{\textup {\CodeStylex {##1}}}
264
263
\renewcommand {\techterm }[1]{\textit {\CodeStylex {##1} }}
265
264
\renewcommand {\term }[1]{\textit {##1 }}
266
265
\renewcommand {\grammarterm }[1]{\textit {##1 }}
267
266
}
268
- {
269
- }
267
+ \lstnewenvironment {codeblock}{\CodeBlockSetup }{}
268
+
269
+ % A code block in which single-quotes are digit separators
270
+ % rather than character literals.
271
+ \lstnewenvironment {codeblockdigitsep}{
272
+ \CodeBlockSetup
273
+ \lstset {deletestring=[b]{'}}
274
+ }{}
270
275
271
276
% Permit use of '@' inside codeblock blocks (don't ask)
272
277
\makeatletter
Original file line number Diff line number Diff line change 10276
10276
10277
10277
\rSec 2[ratio.syn]{Header \tcode {<ratio>} synopsis}
10278
10278
10279
- \begin {codeblock }
10279
+ \begin {codeblockdigitsep }
10280
10280
namespace std {
10281
10281
// \ref {ratio.ratio }, class template \tcode {ratio}
10282
10282
template <intmax_t N, intmax_t D = 1> class ratio;
10317
10317
typedef ratio< 1'000'000'000'000'000'000'000, 1> zetta; // \seebelow
10318
10318
typedef ratio<1'000'000'000'000'000'000'000'000, 1> yotta; // \seebelow
10319
10319
}
10320
- \end {codeblock }
10320
+ \end {codeblockdigitsep }
10321
10321
10322
10322
\rSec 2[ratio.ratio]{Class template \tcode {ratio}}
10323
10323
You can’t perform that action at this time.
0 commit comments