testingisdocumenting / znai

Build functional, maintainable, beautiful User Guides with markdown and Znai plugins. Instant pages navigation. Local search. Multiple integrations to work with Python, Java, C++, OpenAPI, etc. Transform "getting started" sections into slideshow for your workshops. Manage multiple documentations with self-deployed znai hub.
https://testingisdocumenting.org/znai
Apache License 2.0
250 stars 13 forks source link

Latex in tables #1221

Open hjstein opened 3 months ago

hjstein commented 3 months ago

The table documentation (https://testingisdocumenting.org/znai/layout/tables) says I can use markdown within the table. But when I try to do that using Latex in the heading, as in something like:

| `:latex: {src: "x"}` | `:latex: {src: "f(x)"}` |
| ---                  | ---                     |
| 3.0                  | 5.0                     |

I get a parse error:

java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "java.util.Map.get(Object)" is null
MykolaGolubyev commented 3 months ago

Hello! thank you for reporting this issue

I don't think tables support markdown in the header. Let me know If this is something that you will benefit from and I will try to investigate how to make it happen.

hjstein commented 3 months ago

It's not critical, but it's nice to have for a couple of reasons:

  1. Like I did, people might try to use it. If they do, they get a confusing parse error & it takes a lot of work to narrow down exactly where it's coming from and why.
  2. When writing documentation for computational code and math is in the text, if you have a table with values for the math, you'd like to use the same column headings. In my case, I'm talking about $\Delta x^2$ and $h \Delta x^2$, so when showing a table of values, I'd like to use the same notation in the table headings.