typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 58 forks source link

math is not aligned center when exporting HTML without style if using \tag{} #3056

Closed YohnWang closed 4 years ago

YohnWang commented 4 years ago

Hello, when I write math like

$$
e=\lim_{n \rightarrow \infty}(1+\frac{1}{n})^n \tag{1.2}
$$

if I export HTML without style[using SVG] ,then math is not aligned center when I open the HTML file. And without \tag,the math is aligned. I don't know how to solve this problem. Thanks.

yxs commented 4 years ago

Why do you need HTML file? want to view formulas on the web?

YohnWang commented 4 years ago

Why do you need HTML file? want to view formulas on the web?

I only want to build my blog supporting LATEX math,there are some conflicts between kramdown and typora,so first I tried to export HTML by typora ,but I found this problem. Now I solve these conflicts with mathjax3 .

yxs commented 4 years ago

@YohnWang

Here are some suggestions for you

I recommend using the rstudio math parser, which adjusts line wrapping based on mathjax 2.7

mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML

What you need to do is wrap your mathematical formula in blackquote

# math block
`$$
mathematical formula
$$`

# inline math
`$mathematical formula$`

Based on this project, you can improve your blog. Google the relevant articles of Yihui Xie, you can get some more details.

If you just record it for yourself, ‎Nutstore is a free and fast solution.

abnerlee commented 4 years ago

CSS is required to do alignment, HTML without style won't include styles (CSSs).