pandoc/test/command/5635.md
John MacFarlane 1784161946 LaTeX reader: Properly handle \providecommand and environment...
They are now ignored if the corresponding command or environment
is already defined.

Closes #5635.
2019-07-13 15:51:33 -07:00

23 lines
312 B
Markdown

```
% pandoc -f latex -t plain
\providecommand{\test}{foo}
\providecommand{\test}{bar}
The value is: \test
^D
The value is: foo
```
```
% pandoc -f latex -t plain
\provideenvironment{test}{startfoo}{stopfoo}
\provideenvironment{test}{startbar}{stopbar}
\begin{test}
Hi
\end{test}
^D
startfoo Hi stopfoo
```