You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using manim to build Maths videos, and I need to write Chinese with inline fomulae. I find out that manim uses dvisvgm -n XXXX.xdv to generate svg's for videos. It does not support outputs without the option -n. Whether or not manim uses other methods to solve this problem, I think this is still a bug in dvisvgm
The text was updated successfully, but these errors were encountered:
rehnertz
changed the title
Incorrect position of Chinese with XeLaTeX
Incorrect position of Chinese with XeLaTeX in TexLive
Mar 31, 2023
It seems the mis-alignment only occurs with CJK fonts and the content in CJK fonts is vertically centered on some axis (perhaps the normal baseline), character by character.
% !TeX TS-program = xelatex\documentclass{standalone}
\usepackage{fontspec}
\font\1="FandolHei"
\font\2="Latin Modern Mono"
\begin{document}
\parbox{\linewidth}{
Hello {\fontspec{FandolHei}FandolHei} World {\1FandolHei} \\
Hello {\fontspec{Latin Modern Mono}LM Mono} World {\2LM Mono}
}
\end{document}
With the following LaTeX code
The output pdf of xelatex is correct:
However, when transforming xdv to svg, i.e.
the Chinese characters are shifted:
TexLive2023 on Windodws 11.
The text was updated successfully, but these errors were encountered: