mitex-rs/mitex

feature request to support raw macro or \texttt{} translation in mitex

Closed this issue · 2 comments

For example,

#import "@preview/mitex:0.2.1": *
#mitext(`
        The torus geometry paratermized with fluxes $phi_1,phi_2$ can be described with the struct:
        ```julia
        struct Torus_Sample
            L1::Float64
            τ::ComplexF64
            Ns::Int64
            mag_trans_units::Vector{ComplexF64}
            phase_twists_over_2π::Vector{Float64} # fluxes (ϕ1,ϕ2)
        end
        ```
        where we introduce the *minimal* quantized intervals of the sample along two oblique directions $(\delta L_1,\delta L_2)=(\frac{L_1}{N_s},\frac{L_1\tau}{N_s})$, such that each thin rectangular is pierced with just *one* quantum flux
        \begin{equation*}
            \delta L_1\times L_2 = 2\pi\ell^2,\quad \delta L_2\times L_1 = 2\pi\ell^2.
        \end{equation*}
`)

does not render at all.

I encounter this problem because I am transferring my academical notes from markdown (very long and hundreds of huge equations, so rendering slow in markdown) to typst (which is really fast).

Maybe #raw() macro support can be added for pair of `...` and ```...```, which is not the keyword in latex so should work out without any ambiguities.

``` isn't a latex syntax, and we shouldn't consider adding support for this markdown syntax? You might consider using \iftypst.

But the actual problem here is that ``` conflicts with the ` of #mitex(`, which is already a limitation of the typst syntax.

I understand, thx.