Reputation: 83
I am using Jupyter Notebook 6.2.0 and having an issue with LaTeX in Markdown tables. When I create a table that contains math typeset in LaTeX, the Notebook (sometimes!) renders the table so that the table spans the entire width of the Notebook. I attach a screenshot of a minimal example.
In the first example, the top row is a simple x in math model. The top row of the table is left-justified and the next row is right-justified creating a table that spans the Notebook and table elements that don’t align.
In the second example, without x in math mode, the table renders as expected.
This behavior is new; affecting tables that I’ve created that previously rendered properly. The problem isn't consistent either. Some tables with LaTeX that I've made do in fact render properly.
I would appreciate advice for a work-around or where to post this issue so that it can be resolved.
Thanks!
Upvotes: 2
Views: 2901
Reputation: 21
One possible way to workaround is to add one row with empty latex display mode.
| $x$ |
| --- |
| 0 |
| $$$$ |
Upvotes: 2
Reputation: 6337
It makes a difference if you use one or two $
-signs.
This will not expand, because it will activate the display mode for math, which is always centered
|$$x$$|
|-|
|0|
while this will activate the inline code.
|$x$|
|-|
|0|
Example Output
Upvotes: 3
Reputation: 8962
For a workaround, use display mode for the math:
| $$x$$ |
| :---- |
| 0 |
Upvotes: 2