Replies: 1 comment
-
I can't think of any way to achieve that with pandoc -- sorry. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use
pandoc
to convert a typst document I wrote to LaTeX. Ideally I want the resulting LaTeX code to be "human-friendly", as in, I intend to keep working on the produced LaTeX document (mostly editing, but I may need to add substantial new content), discarding the typst source after the conversion as no longer relevant.Is there a way to tell
pandoc
to treat certain typst commands as black boxes, just converting the syntax instead of substituting the definition? An example: I want the typst fragmentto be translated into
Here the typst source uses the
ctheorems
package and defines the#theorem
command using the functions exported from that package, but I explicitly don't want pandoc to look deep into what "theorem" means and how it is defined (I'm not 100% sure thatpandoc
can actually do that), I want the tautological translation. Similarly, my typst code uses many math commands likeDbcoh
that I would like to be translated just into\Dbcoh
regardless of what the definition is.Judging by what I understand the
pandoc
philosophy to be, this is probably not possible, but maybe there is a way?P.S. To be honest, I have already solved my current problem by writing a python script that performs a bunch of regular expression substitutions to convert my typst code to, like, 98% correct LaTeX code and manually fixed all remaining issues, but this only worked because I treat typst purely as a level of syntax sugar on top of LaTeX and adhere to the same writing style. I would like a more robust solution.
Beta Was this translation helpful? Give feedback.
All reactions