typora / typora-issues

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

lose my content when exporting to PDF #4439

Closed yfzhao20 closed 3 years ago

yfzhao20 commented 3 years ago

I lose almost all my content when I export my markdown file to PDF. just like that:

image

but if I export it to HTML, there is nothing wrong:

image

I have user-define style( file attached). I don't know why I lose my content, maybe because the font?(I use Latin modern roman)

and nothing goes wrong when I use default theme to export.

here is part of my file:

#### Elliptical polarized light

if putting any $A,B,\phi $ in it, you will get elliptical P-light.

==Any $A,B,\phi $ except those above==.

$\boldsymbol{E}=\begin{bmatrix}
      A \\
      Be^{i\phi } \\
\end{bmatrix}$, and the real part is : $\begin{cases}
    E_H=A\cos(wt)\\
    E_V=B\cos(wt-\phi )
\end{cases}$. We can draw the picture just like before.

$\color{teal}{\bf{▶ Ex. 1}}$ $\boldsymbol{E_0}=\begin{bmatrix}
      2 \\
      e^{i(-\frac{2}{3}\pi )} \\
\end{bmatrix}$<img align="right" src="4.偏振.assets\2021-05-21-20-09-20.png" style="zoom:35%;" />

We can define the amplitude and draw a $2\times 1$ box. From $\phi =-\frac{2}{3}\pi$, we know how it rotates($\circlearrowright$,because $\phi <0$ and $E_V$ is leading) and the long-axis diraction($\searrow$, because $|\phi |>\frac{\pi}{2}$). Also you can know $\theta$ in the figure, <u>but you should prove in your hw. </u>

So the take-home message is: 

- $A,B,\phi$ completely define p-state
- specific condition: linear of circular p-lignt
- more general: elliptical
- Jone's vector(and later we will write $\boldsymbol{E}$ as $|E\rang$)

my css theme: https://github.com/yfzhao20/Typora-markdown/blob/main/css/latex-notebook.css

abnerlee commented 3 years ago

Version, OS?

In my test, the sample content can be exported to PDF using built-in themes, could you confirm?

yfzhao20 commented 3 years ago

version: from 0.9.9x to 0.10.11, so I think it is not related to version.

os: win10 21H2.

device: lenovo laptop xiaoxin15

I have confirmed that the problem still exists. I guess: maybe the size of the file is too large (more that 6k words) and I will test smaller files tomorrow.

Or maybe there are some bugs in my css, because I can export with build-in style, too.

abnerlee commented 3 years ago

Or maybe there are some bugs in my css, because I can export with build-in style, too.

It seems so, but I can also export using your css.

You could also try export to HTML, then print in Chrome, see how it goes. For "@font-face", also better to set "unicode-range", or else it may require to load too many fonts.

yfzhao20 commented 3 years ago

I think my file is too large😂 Here I will attach my full file: https://github.com/yfzhao20/physics-notebook/tree/main/general-physics-II

When the total number of words is about 1500, nothing goes wrong; but when it reach 4000, the bug will appear🤔

abnerlee commented 3 years ago

what about 0.11.5? seems OK in my test

yfzhao20 commented 3 years ago

It seems good now! Thanks🎉🎉🎉