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

Raw LaTeX: latex commands with multiple parameters not supported #2592

Closed
randomizedthinking opened this issue Dec 16, 2015 · 3 comments
Closed

Comments

@randomizedthinking
Copy link

I would like to define some latex commands to complement the description power of markdown. Given their natures, these commands usually take more than one parameter. Under the current pandoc implementation, only the first parameter is passed to the command, and the rest parameters are treated as markdown instead. For instance,

\mylatexcmd{a}{b}{c} ==> \mylatexcmd{a} \{b\}\{c\}

The curly braces are escaped in the generated tex file.

Is it possible that pandoc adds support to the construction of consecutive parameters, and simply pass them to latex? It is uncommon to have constructions in the normal markdown text.

@jgm
Copy link
Owner

jgm commented Dec 16, 2015

+++ randomizedthinking [Dec 16 15 14:13 ]:

Is it possible that pandoc adds support to the construction of
consecutive parameters, and simply pass them to latex? It is uncommon
to have constructions in the normal markdown text

That sounds like a reasonable request to me.

@jgm
Copy link
Owner

jgm commented Dec 17, 2015 via email

@randomizedthinking
Copy link
Author

It won't work for parameters spanning over multiple lines.

% echo -e "\mylatexcmd{a}\n{b}{c}" | pandoc -t latex
\mylatexcmd{a} {b}{c}

My example at first is not precise... sorry. Do you think keeping parsing
the text over multiple lines is reasonable?

Thanks!

On Wed, Dec 16, 2015 at 5:30 PM, John MacFarlane notifications@github.com
wrote:

Wait! What version of pandoc are you using?
Recent versions allow indefinitely many parameters:

% pandoc -t latex
\mylatexcmd{a}{b}{c}
^D
\mylatexcmd{a}{b}{c}

So you probably just need to upgrade.


Reply to this email directly or view it on GitHub
#2592 (comment).

@jgm jgm closed this as completed in 35e0544 Dec 22, 2015
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

2 participants