Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandoc ignores \newtoggle, \toggletrue, \iftoggle, etc. in Latex Input #3853

Closed
dangrec opened this issue Aug 18, 2017 · 2 comments
Closed

Comments

@dangrec
Copy link

dangrec commented Aug 18, 2017

pandoc 1.19.2.1

A latex file as follows

\documentclass{article}
\begin{document}
\newtoggle{ebook}
\toggletrue{ebook}
\iftoggle{ebook}{
text
}{
%not ebook
}
more
\end{document}

put through pandoc as follows:
pandoc -f latex test.tex -t native -o test.atx

produces file test.atx as follows:

[Para [Str "more"]]

So it appears Pandoc does not support the whole conditional concept of "toggle". Is there a supported method of latex conditionals in Pandoc?
Thanks!

@jgm
Copy link
Owner

jgm commented Aug 18, 2017 via email

@jgm jgm closed this as completed in bfbdfa6 Aug 18, 2017
@corbolais
Copy link

Hello,

Just added a comment to commit bfbdfa6.

It's about the \toggle -- as it is implemented in pandoc right now -- being on a per-file scope.

This fails when using a LaTeX document w/ multiple input source files that make use of the \toggle.

It would be appreciated having the \toggle feature supported in a global manner. Just set up the \toggle in the main LaTeX file and handle the \toggletrue as needed and wherever needed.

Thanks for your help.
C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants