0

I just started using GitLab, and to avoid having the math and the code in different places, I would like to use the GitLab wiki to "store" the math. Writing the equation would be simpler if I had katex macros or definitions available. However, they appear to not be working.

I've tried all the examples in the Katex docs [https://katex.org/docs/supported.html#macros], making changes where necessary, but they do not work (i.e. do not render properly).

Example 1 (from the katex docs):

```math
\def\foo{x^2} \foo + \foo
```

is rendered as :

\def\foox2\foo+\foo

and not as x^2+x^2. My institution has version 11.3.3 installed.

slozano
  • 3
  • 4
  • What version of GitLab, and can you tell (perhaps from HTML source) what version of KaTeX that is using? – MvG Jan 30 '19 at 21:12
  • @MvG The site help says the installed version is 11.3.3, which was released in October 2018 – slozano Jan 31 '19 at 18:24

1 Answers1

0

\def was added in 0.10.0-beta but gitlab appears to be using katex 0.8.3 on v11.3.3.

There is an open issue for upgrading to 0.10.0 (https://gitlab.com/gitlab-org/gitlab-ce/issues/56507) for the same reason you are interested in.

SpencerPark
  • 3,298
  • 1
  • 15
  • 27