Dne čtvrtek 20. října 2022 v 10:06:23 UTC+2 uživatel Bastien Dumont napsal:
I don't understand either the rationale for \pandocSpace and \pandocLinebreak. Since Markdown and TeX agree on handling simple line breaks and repeated spaces like single spaces, in what cases would it be useful?

I was going to give an example of a Word document with the text Hello␣␣␣world! and show that it would produce the output Hello \pandocSpace{}\pandocSpace{}\pandocSpace{}world!, which would allow us to preserve the repeated spaces. Howover, running pandoc -i example.docx -t pandoc-to-markdown.lua produces Hello\pandocSpace{}world! as the output. This indicates that not only Markdown and TeX fold repeated spaces, but Pandoc's AST in general does. In that case, it seems reasonable to replace \pandocSpace{} with  and \pandocLineBreak{} with  in the TeX output as John also suggested.

Thanks to the package xkeyval, the key-value argument could be handled quite easily in all formats that include Plain TeX.

The xkeyval package is one option. I am partial to the expl3 programming language from the LaTeX3 project, which provides many programming extensions to TeX, including key--value interfaces (see the l3keys module in the LaTeX3 Interface Documentation). However, some would call the syntax of expl3 arcane.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a7d769e7-083c-4cb9-a9a2-b5a21b62c8f0n%40googlegroups.com.