81eadfd99a
- Improve parsing of `\def` macros. We previously set "verbatim mode" even for parsing the initial `\def`; this caused problems for things like ``` \def\foo{\def\bar{BAR}} \foo \bar ``` - Implement `\newif`. - Add tests.
55 lines
454 B
Markdown
55 lines
454 B
Markdown
```
|
|
% pandoc -f latex -t plain
|
|
\iftrue
|
|
should print
|
|
\iftrue
|
|
should print
|
|
\else
|
|
should not print
|
|
\fi
|
|
\else
|
|
should not print
|
|
\fi
|
|
|
|
\iffalse
|
|
should not print
|
|
\else
|
|
\iftrue
|
|
should print
|
|
\else
|
|
should not print
|
|
\fi
|
|
\fi
|
|
|
|
\newif\ifepub
|
|
|
|
\ifepub
|
|
should not print
|
|
\fi
|
|
|
|
\epubtrue
|
|
|
|
\ifepub
|
|
should print
|
|
\else
|
|
should not print
|
|
\fi
|
|
|
|
\epubfalse
|
|
|
|
\ifepub
|
|
should not print
|
|
\else
|
|
should print
|
|
\fi
|
|
^D
|
|
should print
|
|
|
|
should print
|
|
|
|
should print
|
|
|
|
should print
|
|
|
|
should print
|
|
```
|