Improving the support of LaTeX equations in Typst output #11075
oliviermeslin
started this conversation in
Feature Requests
Replies: 2 comments 1 reply
-
You should be able to do that with a LUA filter targeting equation in the AST. Note that adding a dependency is not something to be done lightly especially from a project that is very young (Typst). Edit: see @cderv's comment with an experimental extension showing the above idea: #11075 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I wanted to see how easy it would be to integrate with mitex using an extension. Here is an experiment you can use and contribute to improve |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
TL;DR: I wonder whether it would be possible to include the
mitex
Typst package in Quarto (or in Pandoc) to make it easier to produce a website and a Typst pdf from the same Quarto files.Context
I'm working on a Quarto project, and I'd like to produce two outputs: a website and a pdf produced by Typst. There are many equations in this project, written using the LaTeX syntax. I can easily include them in the Typst document using the
mitex
package, but then the qmd files cannot be used directly to produce the website. Some workarounds usingwhen-format
might be possible, but they would be detrimental to the readibility of the qmd files and would likely result in code duplication.Here is a MWE of my current source code for the Typst output:
Feature request
I would like to produce a Typst document with LaTeX-style equations without having to encapsulate them explicitly in the proper
#mitex()
or#mi()
environments in the qmd files. This way, the same qmd files could be used to produce the pdf and the website.Based on this discussion, I think that a solution could consist in adding a Lua filter in the Quarto Typst support (or in Pandoc), so that LaTeX-style equations would invisibly be encapsulated using
mitex
when output format is Typst. Maybe this feature request concerns Pandoc more than Quarto, let me know if you think so.Beta Was this translation helpful? Give feedback.
All reactions