Closed bpj closed 7 years ago
I have to think about a different way to specify the output format that is more flexible than builtin macros.
I use \ifdef
when I have some specific needs (e.g. to generate the github README).
Yes I see. I use !ifdef
currently too.
Now that Pandoc supports several ways of generating a PDF there are actually four different scenarios involving production of PDF and/or HTML:
I have found that there are situations where the
-html
and-pdf
formats don't suffice, namely when you want to generate HTML and PDF from the same source and haven't yet decided which means of PDF generation to use. HTML for wkhtmltopdf and HTML for the web may require different content, e.g. you may want to include a form in the web version but not in the PDF version. For that reason I wonder if you might consider adding-latex
and-context
formats so that one can differentiate between the four possibilities in a uniform way? (You of course already can use!ifdef(latex)()
if you want!) While it's true that the same person would probably not consider both LaTeX and ConTeXt at the same time, so that a-tex
format would suffice it is probably wise to not make any rash assumptions in that area, and what's more important an explicit!latex(...)
or!context()
makes the source clearer (and FWIW there is a long-standing issue to add a plain TeX writer opened by jgm himself: jgm/pandoc#1541)