我已将我的问题简化为一个最小的工作示例。此代码段不会显示任何文本:
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<svg viewBox="-361.65944 -228.02199 723.31888 284.92749 ">
<text >
<g fill="#000">
<g stroke="none">
<tspan font-family="cmr" font-size="17">Render</tspan>
<tspan font-family="cmr" font-size="17">Process</tspan>
</g>
</g>
</text>
</svg>
现在,如果我注释掉这两个g
标签,则会显示文本:
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<svg viewBox="-361.65944 -228.02199 723.31888 284.92749 ">
<text >
<!-- <g fill="#000"> -->
<!-- <g stroke="none"> -->
<tspan font-family="cmr" font-size="17">Render</tspan>
<tspan font-family="cmr" font-size="17">Process</tspan>
<!-- </g> -->
<!-- </g> -->
</text>
</svg>
为什么会发生?我正在通过htlatex
以下 tikz 文档生成 svg:
\documentclass[tikz]{standalone}
\def\pgfsysdriver{pgfsys-tex4ht.def}
\usepackage{tikz}
\usepackage{anyfontsize}
\usetikzlibrary{shapes, positioning}
\begin{document}
\begin{tikzpicture}[
main/.style={rounded corners, fill=blue!15, align=center, inner sep=10, text width=6cm, minimum height=4cm, font={\fontsize{50 pt}{40 pt}\selectfont}},
render/.style={rounded corners, fill=red!15, align=center, inner sep=6, text width=5cm, minimum height=3.5cm, font={\fontsize{40 pt}{40 pt}\selectfont}},
]
\node[main] (main) {Main Process};
\node[render] [below=of main, xshift=10cm, yshift=-1.5cm] (render1) {Render Process};
\node[render] [below=of main, xshift=3.2cm, yshift=-1.5cm] (render2) {Render Process};
\node[render] [below=of main, xshift=-3.2cm, yshift=-1.5cm] (render3) {...};
\node[render] [below=of main, xshift=-10cm, yshift=-1.5cm] (render4) {Render Process};
\draw [->] (main) -- (render1.north);
\draw [->] (main) -- (render2.north);
\draw [->] (main) -- (render3.north);
\draw [->] (main) -- (render4.north);
\end{tikzpicture}
\end{document}
我不知道这里发生了什么。我真的很感激任何形式的意见!