以下文件:
\documentclass[]{article}
\usepackage{tikz}
\usepackage{tikzscale}
\usetikzlibrary{trees}
\usetikzlibrary{calc}
\begin{document}
\tikzset{
block/.style = {draw, fill=white, rectangle,
minimum height=3em, minimum width=3em},
tmp/.style = {coordinate},
sum/.style= {draw, fill=white, circle, node distance=1cm},
input/.style = {coordinate},
output/.style= {coordinate},
pinstyle/.style = {pin edge={to-,thin,black}}
}
\usetikzlibrary{shapes,arrows,positioning,calc}
\begin{figure}[ht]
\begin{tikzpicture}[auto, node distance=2cm,>=latex',every node/.style={transform shape}]
\tikzstyle{every node}=[font=\large]
\node [input, name=rinput] (rinput) {};
\node [sum, right of=rinput] (sum1) {-};
\draw [->] (rinput) -- node{$\beta_c$} (sum1);
\end{tikzpicture}
\end{figure}
\end{document}
运行良好。现在,我有一个类书的父文档和一个子文档(/subfile)。如果我将上图代码(无论是直接还是使用子文件)放在父文档中,它都可以正常工作。如果我将其放在子文档中,它会给我错误:
Package pgf Error: Arrow end type ``latex''' unknown. ...tex',every node/.style={transform shape}]
Package pgf Error: Arrow end type ``latex''' unknown. ...tex',every node/.style={transform shape}]
Package pgf Error: Arrow end type ``latex''' unknown. ...tex',every node/.style={transform shape}]
Package pgf Error: Arrow end type ``latex''' unknown. ...tex',every node/.style={transform shape}]
Package pgf Error: Arrow end type ``tikze@>>@latex''' unknown. ...tex',every node/.style={transform shape}]
Package pgf Error: Arrow end type ``tikze@>@latex''' unknown. \draw [->]
Cannot patch \document,(auxhook) using \AtBeginDocument instead.
Unused global option(s): [english].
Overfull \hbox (13.70734pt too wide) in paragraph
Token not allowed in a PDF string (Unicode):(hyperref) removing `\textenglish'
Token not allowed in a PDF string (Unicode):(hyperref) removing `math shift'
Token not allowed in a PDF string (Unicode):(hyperref) removing `\phi'
Token not allowed in a PDF string (Unicode):(hyperref) removing `math shift'
Font shape `EU1/SimplifiedArabic(0)/m/sl' undefined(Font) using `EU1/SimplifiedArabic(0)/m/n' instead
\headheight is too small (12.0pt): Make it at least 13.9141pt.
Token not allowed in a PDF string (Unicode):(hyperref) removing `\textenglish'
Token not allowed in a PDF string (Unicode):(hyperref) removing `math shift'
Token not allowed in a PDF string (Unicode):(hyperref) removing `\chi'
Token not allowed in a PDF string (Unicode):(hyperref) removing `math shift'
Underfull \vbox (badness 1895) has occurred while \output is active []
\headheight is too small (12.0pt): Make it at least 13.9141pt.
Token not allowed in a PDF string (Unicode):(hyperref) removing `\textenglish'
Token not allowed in a PDF string (Unicode):(hyperref) removing `math shift'
Token not allowed in a PDF string (Unicode):(hyperref) removing `\beta'
Token not allowed in a PDF string (Unicode):(hyperref) removing `math shift'
\headheight is too small (12.0pt): Make it at least 13.9141pt.
\headheight is too small (12.0pt): Make it at least 13.9141pt.
Some font shapes were not available, defaults substituted.
答案1
我们不知道您使用的是哪种subfile
(standalone
,subfiles
?)但您的示例显示了main file
前言和child file
前言之间可能存在一些差异。事实上,看起来shapes
,arrows
和positioning
库仅在编译子文档时加载。如果您将它们包含在main
前言中,您将解决问题。