mitex-rs/mitex

Problems reproducing example

DenisLohvynov opened this issue · 2 comments

I copied the example from the README and pasted it to the web app. The code, which is below.

#import "@preview/mitex:0.1.0": *

#assert.eq(mitex-convert("\alpha x"), "alpha  x ")

Write inline equations like #mi("x") or #mi[y].

Also block equations (this case is from #text(blue.lighten(20%), link("https://katex.org/")[katex.org])):

#mitex(`
  \newcommand{\f}[2]{#1f(#2)}
  \f\relax{x} = \int_{-\infty}^\infty
    \f\hat\xi\,e^{2 \pi i \xi x}
    \,d\xi
`)

After trying to compile it I got "Plugin errored with error: error unknown command \f". Am I doing something wrong or is the library in the preview repository doesn't support the feature yet?

This is because the version that supports macros haven't be released yet, so you can try

#mitex(`
  f(x) = \int_{-\infty}^\infty
    \hat f(\xi)\,e^{2 \pi i \xi x}
    \,d\xi
`)

I see, thanks.