mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-01 13:15:51 +00:00
rather than evaluating it when the `\newtheorem` command is encountered. It may include macros only defined later. Closes #11608.
55 lines
1.2 KiB
Markdown
55 lines
1.2 KiB
Markdown
```
|
|
% pandoc -f latex -t plain
|
|
\documentclass[english]{article}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{amsthm}
|
|
\theoremstyle{plain}
|
|
\newtheorem{thm}{\protect\theoremname}
|
|
\newtheorem{prop}[thm]{\protect\propositionname}
|
|
\usepackage{babel}
|
|
\providecommand{\propositionname}{Proposition}
|
|
\providecommand{\theoremname}{Theorem}
|
|
|
|
\begin{document}
|
|
\begin{thm}
|
|
first theorem
|
|
\end{thm}
|
|
\begin{prop}
|
|
first proposition
|
|
\end{prop}
|
|
|
|
\end{document}
|
|
<div class="thm">
|
|
<p><strong>Theorem 1</strong>. <em>first theorem</em></p>
|
|
</div>
|
|
<div class="prop">
|
|
<p><strong>Proposition 2</strong>. <em>first proposition</em></p>
|
|
</div>
|
|
jgm@Johns-MacBook-Air:~/src/pandoc % `make binpath` -f latex -t plain
|
|
\documentclass[english]{article}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{amsthm}
|
|
\theoremstyle{plain}
|
|
\newtheorem{thm}{\protect\theoremname}
|
|
\newtheorem{prop}[thm]{\protect\propositionname}
|
|
\usepackage{babel}
|
|
\providecommand{\propositionname}{Proposition}
|
|
\providecommand{\theoremname}{Theorem}
|
|
|
|
\begin{document}
|
|
\begin{thm}
|
|
first theorem
|
|
\end{thm}
|
|
\begin{prop}
|
|
first proposition
|
|
\end{prop}
|
|
|
|
\end{document}
|
|
^D
|
|
Theorem 1. first theorem
|
|
|
|
Proposition 2. first proposition
|
|
```
|