question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Matrix rendering broken

See original GitHub issue

Whilst migrating my blog to hugo I came across an issue with Katex where matrices are not being rendered properly in the HTML produced by hugo.

Take for example the following matrix defintion:

$$ X = \left[\begin{array} {rrr} 3.381563 & 3.389113 
4.527875 & 5.854178 
2.655682 & 4.411995 
\vdots & \vdots \end{array}\right] $$

When I paste it to the Katex playground it renders just fine, which makes me think there is something else funky at play.

See the following js error in the Chrome console and the result of the rendering:

screen shot 2019-01-11 at 19 02 25

I suspect some this might be some strange CSS issue as the rendered HTML looks like this:

screen shot 2019-01-11 at 19 05 30

Which does not seem right at all. Could someone give me some pointers as to how to fix this if possible?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
milosgajdoscommented, Jan 12, 2019

Major breakthrough \o/

Escaping the \\ solves the problem:

$$ \left[\begin{array} {rrr} 3.381563 & 3.389113 \\\\ 4.527875 & 5.854178 \\\\ 2.655682 & 4.411995 \\\\ \vdots & \vdots \end{array}\right] $$

I suspect now we’ve gone full circle to what @edemaine was suggesting to have a look at: https://gohugo.io/content-management/formats/#issues-with-markdown

I suspect if I modify the code which uses katex and add the displayMath math “hack” mentioned in hugo documentation I should be fine.

1reaction
milosgajdoscommented, Jan 12, 2019

Thanks @edemaine, I will keep digging. Seems like some random parser shenanigans. I will close this issue now and should I figure out solution I’ll pop in and let you know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Matrix rendering broken · Issue #239 · halogenica/beautifulhugo ...
Whilst migrating my blog to hugo I came across an issue which I original thought was related to Katex: matrices are not being...
Read more >
New Matrix Region rendering funcitonality broken??? [Archive ...
View Full Version : New Matrix Region rendering funcitonality broken??? ... Shouldn't there only be two files that render? Instead, it renders all...
Read more >
Text rendering broken on my machine when using sf::Shape - SFML
Quote ---Which seems a bit odd, that the texture thinks it has to set the matrix mode to GL_MODELVIEW, but the RenderTarget itself...
Read more >
Why does translation matrix not affect rendering of 3d model in ...
You are using Homogenious Coordinates to represent the vertices of your model. So the W component must be 1. When you load your...
Read more >
The Matrix Holiday Update 2022 - Matrix.org
Since then, work has been split three ways: firstly, ... that clients which understand the custom event type will render them appropriately, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found