PDF 未生成但我没有看到错误!

PDF 未生成但我没有看到错误!

我在添加 png 图像和连字符时遇到了很多麻烦,突然间,我添加了以下 tkiz 方案,当我添加最新的部分时,我开始得到一堆 Underfull vbox 和 Overfull xbox/hbox,我解决了它(或者我认为)但是当我添加方案的后半部分时,我的 pdf 不再生成了..我尝试将 tikz 图片分成图形并在它们之间强制使用 \pagebreak 和其他东西,但到目前为止没有任何效果...我同时添加了 tikz 方案(这似乎是问题所在)和我在最后得到的输出。

代码:

\begin{figure}
\centering
\begin{tikzpicture}
\node [fill=white, draw=black, name=force_operator, shape=rectangle, text width=1.5cm,text centered, minimum width = 1.5cm, font=\footnotesize] at (0,0) {Operator's Force};
\node [fill=black!20, draw=black, name=sum1, shape=circle, inner sep=2pt, right=0.75cm of force_operator, minimum size= 0.5cm, font=\footnotesize] {+};
\node [fill=blue!20, draw=black, name=model_master, shape=rectangle, text width=2cm, text centered, font=\footnotesize, right=0.5 of sum1] {$\frac{1}{m\cdot{s} + b}$};
\node [fill=blue!20, draw=black, name=delay1, shape=rectangle, text width=1cm, text centered, font=\footnotesize, right=1.5cm of model_master] {$e^{-2s\tau}$};
\node [fill=blue!20, draw=black, name=simplification_slave, shape=rectangle, text width=4cm, text centered, font=\footnotesize, right=0.5cm of delay1] {$\frac{B\cdot{s} + K {m\cdot{s^2} + (B+b)\cdot{s} + K}$};
\node [fill=white, draw=white, name=a, right=0.5cm of simplification_slave]{};
\node [fill=blue!20, draw=black, name=master_controller, shape=rectangle, text width=2cm, text centered, font=\footnotesize, below=1cm of model_master]  {$\frac{B\cdot{s} + K}{s}$};
\node [fill=black!20, draw=black, name=sum4, shape=circle, inner sep=2pt, right=0.5cm of master_controller, minimum size= 0.5cm, font=\footnotesize] {$+$};

\draw[->] (force_operator) -- node[above, font=\footnotesize]{$F_h$}(sum1);
\draw[->] (sum1) -- node[above, font=\footnotesize]{}(model_master);
\draw[->] (model_master) -- node[above, font=\footnotesize, name=c]{$V_m$}(delay1);
\draw[->] (delay1)  -- node[above, font=\footnotesize]{}(simplification_slave);
\draw[-] (simplification_slave) -- node[above, font=\footnotesize]{}(a.center);
\draw[-] (a.center)     |- node[above, font=\footnotesize]{}(sum4);
\draw[->] (sum4)    -- node[above, font=\footnotesize]{}(master_controller);
\draw[->] (master_controller) -| node[left, pos=0.95] {\footnotesize{$-$}} node[left, font=\footnotesize]{$F_m$}(sum1);
\draw[->] (c) -- (sum4);
\end{tikzpicture}
\end{figure}

\pagebreak[4]

\begin{figure}
\centering
\begin{tikzpicture}
\node [fill=white, draw=black, name=force_operator, shape=rectangle, text width=1.5cm, text centered, minimum width = 1.5cm, font=\footnotesize] at (0,0) {Operator's Force};
\node [fill=black!20, draw=black, name=sum1, shape=circle, inner sep=2pt, right=0.75cm of force_operator, minimum size= 0.5cm, font=\footnotesize] {+};
\node [fill=blue!20, draw=black, name=model_master, shape=rectangle, text width=2cm, text centered, font=\footnotesize, right=0.5 of sum1] {$\frac{1}{m\cdot{s} + b}$};
\node [fill=blue!20, draw=black, name=simplification, shape=rectangle, text width=2cm, text centered, font=\footnotesize, right=1cm of model_master] {};%$\frac{m\cdot{s^2} + (B+b)\cdot{s} + K + (B\cdot{s} +K)\cdot{\exp{-2s\tau}}}{m\cdot{s^2} + (B+b)\cdot{s} + K}$};
\node [fill=white, draw=white, name=a, right=0.5cm of simplification{};
\node [fill=blue!20, draw=black, name=master_controller, shape=rectangle, text width=2cm, text centered, font=\footnotesize, below=1cm of model_master]  {$\frac{B\cdot{s} + K}{s}$};

\draw[->] (force_operator)  -- node[above, font=\footnotesize]{$F_h$}(sum1);
\draw[->] (sum1)        -- node[above, font=\footnotesize]{}(model_master);
\draw[->] (model_master)    -- (simplification);
\draw[-] (simplification)   -- (a.center);
\draw[->] (a.center) |- node[above, font=\footnotesize]{}(master_controller);
\draw[->] (master_controller)   -| node[left, font=\footnotesize]{$F_m$}(sum1);
\end{tikzpicture}
\end{figure}

输出结果:

(...)

LaTeX 警告:第 28 页上的参考“eq:B_for_critically_damped_no_delay”在输入行 223 上未定义。

LaTeX 警告:第 28 页上的参考“eq:B_for_critically_damped_no_delay”在输入行 223 上未定义。

段落 230-232 行的 \hbox 过满(103.13486pt 太宽)[] [] [28] [29])(./chapters/Related_Work/2.1.3.The_Effect_of_Delay.tex

LaTeX 警告:参考第 30 页上的“fig:pos_pos_sym_delay”在输入行 5 上未定义。

LaTeX 警告:参考第 30 页上的“fig:pos_force_delay”在输入行 5 上未定义。

段落第 40-41 行的 \hbox 过满(宽了 2.18416pt)[][]

LaTeX 警告:第 30 页上的引用“”在输入行 77 上未定义。

LaTeX 警告:第 30 页上的引用“”在输入行 77 上未定义。

\output 处于活动状态时,发生 \vbox 未满(不良率 10000)[30]

答案1

这是你想要的吗?

 \documentclass{article}
 \usepackage{tikz}
 \begin{document}
 \begin{center}
 \begin{tikzpicture}[auto, node distance=3cm]
 \tikzstyle{block}=[draw, rectangle, text width=1.5cm, text centered, minimum width =  
 1.5cm, font=\footnotesize, minimum height=2em, minimum width=4em]
 \tikzstyle{sum}=[draw, circle, inner sep=2pt, right of= force_operator, minimum 
 size=0.5cm, font=\footnotesize]
 \node [block, name=force_operator ] at (0,0) {Operator's Force};
 \node [sum,fill=black!20, draw=black, name=sum1]   {+};
 \node [block, fill=blue!20, name=model_master, right  of = sum1] {$\frac{1} 
 {m\cdot{s} + b}$};
 \node [block, fill=blue!20, name=delay1, shape=rectangle, text width=1cm, text
 centered, font=\footnotesize, right of= model_master] {$e^{-2s\tau}$};
 \node [fill=blue!20, draw=black, name=simplification_slave, shape=rectangle, text
 width=3cm, text centered, font=\footnotesize, right of =delay1]
 {$\frac{B\cdot{s} + K {m\cdot{s^2} + (B+b)\cdot{s} + K}}{x}$};
 \node [fill=white, draw=white, name=a, right of = simplification_slave]{};
 \node [block, fill=blue!20, name=master_controller, below of = model_master]   
 {$\frac{B\cdot{s} + K}{s}$};
 \node [sum,fill=black!20, draw=black, name=sum4, right of = master_controller, node 
 distance=0.79cm] {$+$};
 \draw[->] (force_operator) -- node[above, font=\footnotesize]{$F_h$}(sum1);
 \draw[->] (sum1) -- node[above, font=\footnotesize]{}(model_master);
 \draw[->] (model_master) -- node[above, font=\footnotesize, name=c]{$V_m$}(delay1);
 \draw[->] (delay1)  -- node[above, font=\footnotesize]{}(simplification_slave);
 \draw[-] (simplification_slave) -- node[above, font=\footnotesize]{}(a.center);
 \draw[-] (a.center)  |- node[above, font=\footnotesize]{}(sum4);
 \draw[->] (sum4) -- node[above, font=\footnotesize]{}(master_controller);
 \draw[->] (master_controller) -| node[left, pos=0.95] {\footnotesize{$-$}}
  node[left, font=\footnotesize]{$F_m$}(sum1);
 \draw[->] (c) -- (sum4);
 \end{tikzpicture}
 \end{center}

 \begin{center}
 \begin{tikzpicture}[auto, node distance=3cm]
 \tikzstyle{block}=[draw, rectangle, text width=1.5cm, text centered, minimum width =    
 1.5cm, font=\footnotesize, minimum height=2em, minimum width=4em]
 \tikzstyle{sum}=[circle, inner sep=2pt, right of= force_operator, minimum size= 
 0.5cm, font=\footnotesize]
 \node [block, fill=white, name=force_operator, ] at (0,0) {Operator's Force};
 \node [sum, fill=black!20, draw=black, name=sum1] {+};
 \node [block, fill=blue!20, name=model_master,  right of = sum1] {$\frac{1}
 {m\cdot{s} + b}$};
 \node [fill=blue!20, draw=black, name=simplification, shape=rectangle, text
 width=4.5cm, node distance=5cm, text centered, font=\footnotesize, right of = 
 model_master] {$\frac{m\cdot{s^2} + (B+b)\cdot{s} + K + (B\cdot{s}  
 +K)\cdot{\exp{-2s\tau}}}{m\cdot{s^2} + (B+b)\cdot{s} + K}$};
 \node [fill=white, name=a, right of= simplification{};
 \node [block, fill=blue!20,  name=master_controller, below of = model_master]  
 {$\frac{B\cdot{s} + K}{s}$};
 \draw[->] (force_operator)  -- node[above, font=\footnotesize]{$F_h$}(sum1);
 \draw[->] (sum1) -- node[above, font=\footnotesize]{}(model_master);
 \draw[->] (model_master)  -- (simplification);
 \draw[-] (simplification) -- (a.center);
 \draw[->] (a.center) |- node[above, font=\footnotesize]{}(master_controller);
 \draw[->] (master_controller) -| node[left, font=\footnotesize]{$F_m$}(sum1);
 \end{tikzpicture}
 \end{center}
 \end{document}

评论:

  1. 主要错误发生在语法“right of = some block”,但您使用了 right = xxcm of some block。

  2. 由于这些块都相似/相同,您可以使用 \tikzstyle={...} 来定义它,如定义的“块”和“总和”所示。但是,如果实际块大于定义的块,则在选项中添加所需的尺寸。(我留了一行供您检查。)

  3. 在第一个图中,我猜缺少一个分母,而是用 x 来代替。

  4. 一旦您理解了语法,您就可以修改它们以满足您的需要。

  5. 没有必要把它们放在图形环境中。

附有一张图片 在此处输入图片描述

相关内容