Support » Plugin: KaTeX » Rendering issue with big brackets

  • Resolved derfuchs98

    (@derfuchs98)


    Dear Thomas,

    thank you so much for supporting the KaTex Plugin. It is a great help in teaching math from a distance these days.

    I came across a small issue whith KaTex rendering big brackets embracing the matrix environment like this:
    [latex] \vec{v}=\left( \begin{matrix}0{,}75 \\ -2{,}5 \\ {-1}\end{matrix} \right) [/latex]

    Apparently the upper part of the brackets is being rendered too tall. The issue comes up both in inline and display mode: See inline mode right below the image.

    KaTex: Latest version
    Theme: Koji by Anders Noren, latest version
    Custom CSS: /* won’t have any impact to the rendering issue */
    .katex svg { max-width: none;} /* required to render vector arrow correctly */
    .katex-eq {font-size: 93%;} /* match font size with theme */

    Thank you and take care

    Jürgen

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas Churchman

    (@beskhue)

    Dear Jürgen,

    Thank you for your kind words.

    I’m seeing the same issue. The problem is upstream: it’s also present when inputting the expression on https://katex.org/

    I found there is already an issue report (https://github.com/KaTeX/KaTeX/issues/2198), and a potential fix (https://github.com/KaTeX/KaTeX/pull/2234).

    We’ll have to wait for a new KaTeX release, which unfortunately might take a few months still. I’ll mark this issue as resolved as there isn’t much this plugin can do about it at this moment, but do keep an eye on new releases.

    In general a plugin like WP QuickLaTeX would have better rendering as it uses actual LaTeX, but it has its own cons (it’s slower and relies on remote servers or a local LaTeX install).

    Take care, and I’m wishing you good luck with the distance education!

    P.S. .katex svg { max-width: none;} should not be necessary, so something in the CSS is probably globally styling svg.

    Thanks Thomas for your quick reply. We’ll have to wait for teh KaTex release. I really like the KaTex approach and the issue isn’t so bad at all.

    PS: The CSS is required for the Koji theme only.

    BTW, may be you can help me with one more problem: I use the custom CSS .katex-eq {font-size: 93%;} to match KaTex font size with the themes font. However, when KaTex is embedded in an accordion structure the font-size turns back to normal. Can you tell me how I can set the font size that it is going to be adjusted in all structures?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.