Skip to content

Commit

Permalink
Don't have math with nested textit/texttt, because crappy MathJax doe…
Browse files Browse the repository at this point in the history
…s not support it.

See mathjax/MathJax#243 and mathjax/MathJax#1758
  • Loading branch information
Eelis committed Jun 20, 2017
1 parent 1cd4256 commit b04a409
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions source/lib-intro.tex
Expand Up @@ -601,18 +601,18 @@
The enumerated type \tcode{\placeholder{enumerated}} can be written:

\begin{codeblock}
enum @\placeholder{enumerated}@ { @$\tcode{\placeholder{V}}_{0}$@, @$\tcode{\placeholder{V}}_{1}$@, @$\tcode{\placeholder{V}}_{2}$@, @$\tcode{\placeholder{V}}_{3}$@, ..... };
enum @\placeholder{enumerated}@ { @\tcode{\placeholder{V}}$_{0}$@, @\tcode{\placeholder{V}}$_{1}$@, @\tcode{\placeholder{V}}$_{2}$@, @\tcode{\placeholder{V}}$_{3}$@, ..... };

inline const @$\tcode{\placeholder{enumerated C}}_{0}$@(@$\tcode{\placeholder{V}}_{0}$@);
inline const @$\tcode{\placeholder{enumerated C}}_{1}$@(@$\tcode{\placeholder{V}}_{1}$@);
inline const @$\tcode{\placeholder{enumerated C}}_{2}$@(@$\tcode{\placeholder{V}}_{2}$@);
inline const @$\tcode{\placeholder{enumerated C}}_{3}$@(@$\tcode{\placeholder{V}}_{3}$@);
inline const @\tcode{\placeholder{enumerated C}}$_{0}$@(@\tcode{\placeholder{V}}$_{0}$@);
inline const @\tcode{\placeholder{enumerated C}}$_{1}$@(@\tcode{\placeholder{V}}$_{1}$@);
inline const @\tcode{\placeholder{enumerated C}}$_{2}$@(@\tcode{\placeholder{V}}$_{2}$@);
inline const @\tcode{\placeholder{enumerated C}}$_{3}$@(@\tcode{\placeholder{V}}$_{3}$@);
.....
\end{codeblock}

\pnum
Here, the names $\tcode{\placeholder{C}}_0$,
$\tcode{\placeholder{C}}_1$, etc.\ represent
Here, the names \tcode{\placeholder{C}}$_0$,
\tcode{\placeholder{C}}$_1$, etc.\ represent
\term{enumerated elements}
for this particular enumerated type.
\indextext{type!enumerated}%
Expand All @@ -637,13 +637,13 @@
// For exposition only.
// \tcode{int_type} is an integral type capable of representing all values of the bitmask type.
enum @\placeholder{bitmask}@ : int_type {
@$\tcode{\placeholder{V}}_{0}$@ = 1 << 0, @$\tcode{\placeholder{V}}_{1}$@ = 1 << 1, @$\tcode{\placeholder{V}}_{2}$@ = 1 << 2, @$\tcode{\placeholder{V}}_{3}$@ = 1 << 3, .....
@\tcode{\placeholder{V}}$_{0}$@ = 1 << 0, @\tcode{\placeholder{V}}$_{1}$@ = 1 << 1, @\tcode{\placeholder{V}}$_{2}$@ = 1 << 2, @\tcode{\placeholder{V}}$_{3}$@ = 1 << 3, .....
};

inline constexpr @$\tcode{\placeholder{bitmask C}}_{0}$@(@$\tcode{\placeholder{V}}_{0}{}$@);
inline constexpr @$\tcode{\placeholder{bitmask C}}_{1}$@(@$\tcode{\placeholder{V}}_{1}{}$@);
inline constexpr @$\tcode{\placeholder{bitmask C}}_{2}$@(@$\tcode{\placeholder{V}}_{2}{}$@);
inline constexpr @$\tcode{\placeholder{bitmask C}}_{3}$@(@$\tcode{\placeholder{V}}_{3}{}$@);
inline constexpr @\tcode{\placeholder{bitmask C}}$_{0}$@(@\tcode{\placeholder{V}}$_{0}{}$@);
inline constexpr @\tcode{\placeholder{bitmask C}}$_{1}$@(@\tcode{\placeholder{V}}$_{1}{}$@);
inline constexpr @\tcode{\placeholder{bitmask C}}$_{2}$@(@\tcode{\placeholder{V}}$_{2}{}$@);
inline constexpr @\tcode{\placeholder{bitmask C}}$_{3}$@(@\tcode{\placeholder{V}}$_{3}{}$@);
.....

constexpr @\placeholder{bitmask}{}@ operator&(@\placeholder{bitmask}{}@ X, @\placeholder{bitmask}{}@ Y) {
Expand Down Expand Up @@ -673,13 +673,13 @@
\end{codeblock}

\pnum
Here, the names $\tcode{\placeholder{C}}_0$,
$\tcode{\placeholder{C}}_1$, etc.\ represent
Here, the names \tcode{\placeholder{C}}$_0$,
\tcode{\placeholder{C}}$_1$, etc.\ represent
\term{bitmask elements}
for this particular bitmask type.
\indextext{type!bitmask}%
All such elements have distinct, nonzero values such that, for any pair $\tcode{\placeholder{C}}_i$
and $\tcode{\placeholder{C}}_j$ where $i \neq j$, \tcode{$\placeholder{C}_i$ \& $\placeholder{C}_i$} is nonzero and
All such elements have distinct, nonzero values such that, for any pair \tcode{\placeholder{C}}$_i$
and \tcode{\placeholder{C}}$_j$ where $i \neq j$, \tcode{\placeholder{C}$_i$ \& \placeholder{C}$_i$} is nonzero and
\tcode{$\placeholder{C}_i$ \& $\placeholder{C}_j$} is zero.
\indextext{bitmask!empty}%
Additionally, the value \tcode{0} is used to represent an \term{empty bitmask}, in which no
Expand Down

0 comments on commit b04a409

Please sign in to comment.