0

I am having a lot of trouble adding png images and also with hyphenations, All of a suddent I was adding the following tkiz scheme and when I add the lattest part I started getting a bunch of Underfull vbox and Overfull xbox/hbox, I worked around it (or I thingk) but then as I said when I added the second half of the scheme my pdf is not generated anymore.. I have tried splitting the tikz pictures into to figures and force a \pagebreak in between and other stuff but so far nothing... I am adding both the tikz scheme which seems to be the problem and the output I get at the very end.

CODE:

\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}

AND THE OUTPUT:

(...)

LaTeX Warning: Reference `eq:B_for_critically_damped_no_delay' on page 28 undef ined on input line 223.

LaTeX Warning: Reference `eq:B_for_critically_damped_no_delay' on page 28 undef ined on input line 223.

Overfull \hbox (103.13486pt too wide) in paragraph at lines 230--232 [] [] [28] [29]) (./chapters/Related_Work/2.1.3.The_Effect_of_Delay.tex

LaTeX Warning: Reference `fig:pos_pos_sym_delay' on page 30 undefined on input line 5.

LaTeX Warning: Reference `fig:pos_force_delay' on page 30 undefined on input li ne 5.

Overfull \hbox (2.18416pt too wide) in paragraph at lines 40--41 [][]

LaTeX Warning: Reference `' on page 30 undefined on input line 77.

LaTeX Warning: Reference `' on page 30 undefined on input line 77.

Underfull \vbox (badness 10000) has occurred while \output is active [30]

1
  • 2
    Could you provide a complete MWE (including documentclass...)? One guess: If you have only floats (figure) without any other text you get roblems. Just try to add a ~.
    – knut
    Aug 23, 2013 at 22:33

1 Answer 1

1

Is this what you want?

 \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}

Comments:

  1. The main errors occur at syntax "right of = some block", but you used right = xxcm of some block.

  2. Since the the blocks are all similar/alike you could use \tikzstyle={...} to define it as shown by the defined "block" and "sum". However, if the actual block is larger than the defined block then add the needed dimensions in the option. (I leave one line there for you to check.)

  3. In the first diagram, I guess a denominator is missing, where an x is used instead.

  4. Once you understand the syntax, you can modify them to suit your need.

  5. It is not necessary putting them in figure environment.

An image is attached enter image description here

4
  • Hi @Jesse, thanks for your answer, just a couple of things. 1. You suggest using right= of some_block, but what I want to do is control the distance between each block, that's why I used "right of=xxcm of some_block" How can I do what I intend without causing an error, I mean, if I put right= of some_block I am not controlling the actual spacing right? At most I do "\begin{tikzpicture}[auto, node distance=3cm]" as you stated, but what if I don't want the same separation in all blocks? 2.I am avoiding to use defined blocks as I am trying to learn how tikz works from the groud up. 3. My bad.
    – viterbi
    Aug 24, 2013 at 9:48
  • 4. I putted them in figure environment to be able to put captions and labels, the truth I am not sure anymore why I started duing this, but I think it was because of this and also because this way I get them to be shown in the list of figures right?
    – viterbi
    Aug 24, 2013 at 9:50
  • OMG @Jesse I think I found a critical error I had made where I have \node [fill=white, draw=white, name=a, right=0.5cm of simplification{}; I am missing a closing "]"!!!!
    – viterbi
    Aug 24, 2013 at 10:01
  • Hi, I hope the critical error you found would help. Honestly, the syntax I mentioned is what I learned from internet when I first met tikz and used it ever since (and it worked out fine on your case because your code right = xx cm of ... does produce errors on my PC). Use tikzstyle will make code tidy and easy to debug for less noises when block diagram is complex. I use node distance=xx cm/in to control distance which can be added, when needed, in [options] (also, blocks are nodes by definition.)
    – Jesse
    Aug 24, 2013 at 11:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .