Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass{article}
- \usepackage{mathpartir}
- \begin{document}
- \newcommand{\testa}{
- This is the intended use:
- \begin{mathpar}
- \inferrule*{
- 1\\
- 2
- }{
- 3
- }
- \end{mathpar}
- }
- \newcommand{\testb}{
- % LaTeX Error: \begin{mathpar} on input line 68 ended by \end{lines}. [\testb]
- But (because the code is generated), I have an environment in the rule:
- \newenvironment{lines}{}{}
- \begin{mathpar}
- \inferrule*{
- \begin{lines}
- 1\\
- 2
- \end{lines}
- }{
- 3
- }
- \end{mathpar}
- }
- \newcommand{\testc}{
- If \textbackslash\textbackslash is renamed \textbackslash{}plop, it works (or well, the output isn't what is expected but I know how to fix it and at least it compiles):
- \newcommand{\plop}{\\\relax}
- \newenvironment{lines}{}{}
- \begin{mathpar}
- \inferrule*{
- \begin{lines}
- 1\plop
- 2
- \end{lines}
- }{
- 3
- }
- \end{mathpar}
- }
- \newcommand{\testd}{
- % LaTeX Error: \begin{mathpar} on input line 70 ended by \end{lines}. [\testd]
- And it's not the \textbackslash{}relax that fixes it:
- \newenvironment{lines}{}{}
- \begin{mathpar}
- \inferrule*{
- \begin{lines}
- 1\\\relax
- 2
- \end{lines}
- }{
- 3
- }
- \end{mathpar}
- }
- % Line 66
- %\testa
- \testb
- %\testc
- %\testd
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement