0

I have an issue with the table in Jupyter notebooks expanding to fill the entire cell. I searched for some solution but couldn't.

I decided to use the table in this answer to check if it would also print the wrong way. Here's the table with the first column headings changed:

|link| $a_i$  | $\alpha_i$   | $d_i$  | Tag   |
|---:|:-------------|:-----------|:------|:------|
| 1 | Sentence: 1  | They       | PRP   | O     |
| 2 | Sentence: 1  | marched    | VBD   | O     |

This is the layout I get with the sufficiently small widths and it is what I want.

correct layout

The issue arises when I switch from Tag to $\theta_i$

|link| $a_i$  | $\alpha_i$   | $d_i$  | $\theta_i$  |
|---:|:-------------|:-----------|:------|:------|
| 1 | Sentence: 1  | They       | PRP   | O     |
| 2 | Sentence: 1  | marched    | VBD   | O     |

The table expands to the entire length of the cell. There's a moment where I get the small size after running the markdown cell but this is fleeting and the cell switches its rendering to filling the entire cell.

table that fills entire cell

Is there something that I missing? I could create a table in Excel/Word and take a screenshot but this has me scratching my head.

heretoinfinity
  • 1,528
  • 3
  • 14
  • 33

1 Answers1

1

I have no idea why, but changing $...$ to $$...$$ seems to fix the issue for me.

Mansur
  • 182
  • 2
  • 8