Jonathan-LeRoux / IguanaTex

A PowerPoint add-in allowing you to insert LaTeX equations into PowerPoint presentations on Windows and Mac
http://www.jonathanleroux.org/software/iguanatex/
Other
790 stars 57 forks source link

chinese character can't show #51

Closed leewi9 closed 4 months ago

leewi9 commented 1 year ago
\documentclass{article}
\usepackage{amsmath}
\usepackage{CJK}
\pagestyle{empty}

\begin{document}

\begin{CJK}{UTF8}{gbsn}

$$
\displaystyle
u_n(x)=
\begin{cases}
1& \text{[0,1]上的有理数} \\
0& \text{[0,1]上的无理数}
\end{cases}
$$

\end{CJK}

\end{document}

but generated picture only shows [0,1]

the chinese character following doesn't show

Jonathan-LeRoux commented 1 year ago

Does this compile outside of IguanaTex?

leewi9 commented 1 year ago

@Jonathan-LeRoux Thanks for the reply, It is inside the IguanaTex, by clicking "New Latex Display" and edit the content, then click "Generate"

Jonathan-LeRoux commented 1 year ago

I meant to ask whether the same code could compile outside of IguanaTex. I suggest checking the Debug box and see what kind of message you get. You can also try running the same commands on the command line, in the Temp folder. I assume some fonts are missing.

shengrihui commented 4 months ago

I've encountered a similar issue. However, after switching the LaTeX engine to xelatex, the error no longer occurs. Nevertheless, it still doesn't generate Chinese characters. @leewi9 请问你解决这个问题了吗?

Jonathan-LeRoux commented 4 months ago

My guess is that some fonts may be missing. I suggest trying to check the Debug box and see what happens. Also, please confirm that you do get the Chinese characters when compiling the same code outside IguanaTeX, just using your normal LaTeX editor on the same machine.

shengrihui commented 4 months ago

I solved the problem using this method. I installed various packages and used \documentclass[UTF8]{ctexart}.

Jonathan-LeRoux commented 4 months ago

Thanks for the update and the link! I'll close this issue.