Operating system
Windows
Joplin version
3.2.12
Sync target
File system
Editor
Markdown Editor
What issue do you have?
I made a table with LaTeX formulas, but the LaTeX formulas in the table cannot be rendered properly。
Windows
3.2.12
File system
Markdown Editor
I made a table with LaTeX formulas, but the LaTeX formulas in the table cannot be rendered properly。
could you please share your latex code
Hello, I found that the formulas in the table cannot be rendered properly, such as the content in the following blockquote (excluding blockquote symbols):
下表列出了一些PID类型,并进行了简单介绍以及优劣对比等。请注意,并非所有PID类型均存在于此表中。除此之外,不同的文献中对于这些种类的称呼也肯呢个略有区别。
| PID种类 | 介绍 | 原理 | 优势 | 劣势 | 应用场景 |
| --------------- | ------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------ | -------------------------------- | -------------------------------- |
| **位置式PID** | 直接计算控制量 \( u(t) \) | $$ u(t) = K_p e(t) + K_i \int e(t) dt + K_d \frac{d e(t)}{dt} $$ | 直观,易于理解和调整 | 误差积累,容易超调 | 温度控制、压力控制、电机控制 |
it looks like this:
Formulas outside of blockquote can be displayed normally,such as the content in the following blockquote (excluding blockquote symbols):
位置式PID控制器的数学公式通常表示为:
$$
u(t) = K_p e(t) + K_i \int_0^t e(\tau) d\tau + K_d \frac{d e(t)}{dt}
$$
In addition, I found that due to the inability of the formulas in blockquote to parse properly, the entire table was also drawn incorrectly. Draw the table in Typora or Obsidian as shown in the following figure:
But in Joplin, it is drawn as shown in the following figure:
It can be seen that the number of columns in the table is incorrect. I suspect this is due to the content in the Latex formula (such as |)
Both Joplin in Windows and Android have this error, and I think it may be a bug
Does using single $
s instead of $$
s work here?
Unfortunately, using a single $
is also not feasible
There is a big issue with how Joplin treats the LaTeX equations and I think it should be changed. If you put a space after the beginning $
or before the final $
, it's not gonna treat it as a math display. So in your example
下表列出了一些PID类型,并进行了简单介绍以及优劣对比等。请注意,并非所有PID类型均存在于此表中。除此之外,不同的文献中对于这些种类的称呼也肯呢个略有区别。
| PID种类 | 介绍 | 原理 | 优势 | 劣势 | 应用场景 |
| --------------- | ------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------ | -------------------------------- | -------------------------------- |
| **位置式PID** | 直接计算控制量 $u(t)$ | $u(t) = K_p e(t) + K_i \int e(t) dt + K_d \frac{d e(t)}{dt}$ | 直观,易于理解和调整 | 误差积累,容易超调 | 温度控制、压力控制、电机控制 |
actually should work, note no spaces after/before $
sign. But it definitely should be changed so that the math inside the dollar signs is trimmed, what do you guys think?
Thank you for your guidance! After replacing $u(t)$
with $u(t)$
(Remove spaces),it indeed displays normally! However, some formulas still have some abnormalities in use. I hope that these bugs can be fixed in the future:)
@mechanist , can you share those formulas for the future reference?
also I can see another difficulty now implementing those features: When I paste something in WYSIWYG editor and then I come back to the mirror editor, it replaces my [ some text here ]
with \[ some text here \]
and it shouldn't be interpreted as KaTeX. It has to be considered improving LaTeX support.
PID算法详解.md (27.1 KB)
Hello, I have uploaded the markdown file I'm using. I didn't notice the issue you mentioned before. I've only been using markdown syntax for a short time, but I believe the problem can be solved. The development team of Joplin is very strong!