vuepress / vuepress-plugin-mathjax

:page_with_curl: Use TeX in VuePress.
https://vuepress.github.io/plugins/mathjax.html
MIT License
32 stars 10 forks source link

Formulas inside tables are not parsed #3

Closed songololo closed 5 years ago

songololo commented 5 years ago

Firstly, a huge thanks for creating this plugin.

The only bug I've run into so far is that formulas inside markdown tables are not parsed.

e.g. this doesn't work:

| key | formula | notes |
|-----|---------|-------|
| node_density | $$\sum_{j\neq{i}} w_{j}$$ | The default $w=1$ reduces...
shigma commented 5 years ago

Currently, you should always use single $ to display inline TeX.

songololo commented 5 years ago

Within the table cells I'd like the display-style (larger and centred), hence the use of the display style.

Here is an example (the example page currently uses mathjax loaded from CDN, you might need to scroll down a little bit to see the table).

chuxubank commented 5 years ago

@songololo You can use $\displaystyle\sum_{j\neq{i}} w_{j}$ to get larger display, but not centered... Try this

| key          |               formula                | notes                        |
| ------------ | :----------------------------------: | ---------------------------- |
| node_density | $\displaystyle\sum_{j\neq{i}} w_{j}$ | The default $w=1$ reduces... |
songololo commented 5 years ago

I noticed that including an invisible character after the math content would cause the maths to be parsed successfully.

But I see that the issue now appears fixed in v1.1.0? (Seems to work on dev).

shigma commented 5 years ago

I noticed that including an invisible character after the math content would cause the maths to be parsed successfully.

But I see that the issue now appears fixed in v1.1.0? (Seems to work on dev).

Do you mean #2?

songololo commented 5 years ago

No, sorry, I meant it works when running vuepress dev (and it also worked with vuepress build) with version v1.1.0.

Originally, I couldn't get inline or display style maths to render in markdown tables.

shigma commented 5 years ago

@songololo Can you check out whether this issue was fixed?

songololo commented 5 years ago

@Shigma yes it is working, thanks!