为什么以下代码编译失败?
\documentclass[tikz]{standalone}
\begin{document}
\tikzset{every path/.style={line width=0.66em}}
\begin{tabular}{ll}
$<$ 1 hour & \tikz \draw (0,0) -- (2.874cm,0) node[anchor=west] {28.74\%};
\end{tabular}
\end{document}
答案1
选项tikz
会为找到的standalone
所有 生成一个页面,因为它还启用了该选项。为此,它将装箱并丢弃此类环境之外的所有内容。它不打算在 内使用。我建议放弃该选项并手动加载包。tikzpicture
multi
\tikz
tabular
tikz
tikz
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\tikzset{every path/.style={line width=0.66em}}
\begin{tabular}{ll}
$<$ 1 hour & \tikz \draw (0,0) -- (2.874cm,0) node[anchor=west] {28.74\%};
\end{tabular}
\end{document}