Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LaTex: how does the include-command work?

Tags:

include

latex

I supposed the include-command copy-pastes code in the compilation, it is wrong because the code stopped working. Please, see the middle part in the code. I only copy-pasted the code to the file and added the include-command.

$ cat results/frames.tex
10.31 & 8.50 &  7.40 \\
10.34 & 8.53 &  7.81 \\
8.22 & 8.62 &  7.78 \\
10.16 & 8.53 &  7.44 \\
10.41 & 8.38 &  7.63 \\
10.38 & 8.57 &  8.03 \\
10.13 & 8.66 &  7.41 \\
8.50 & 8.60 &  7.15 \\
10.41 & 8.63 &  7.21 \\
8.53 & 8.53 &  7.12 \\

Latex code, see the middle part

\begin{table}
        \begin{tabular}{ | l | m | r |}
        \hline
        $t$ / s & $d_{1}$ / s & $d_{2}$ / s \\
        $\Delta h = 0,01 s$ & $\Delta d = 0,01 s$ & $\Delta d = 0,01 s$ \\
        \hline
        % I JUST COPIED THE CODE from here to the file, included.
        % It stopped working, why?
        \include{results/frames.tex}
        \hline
        $\pi (\frac{d_{1}}{2} - \frac{d_{2}}{2})$ & $2 \pi R h$ & $2 \pi r h$ \\
        \hline
        \end{tabular}
\end{table}
like image 353
hhh Avatar asked Apr 11 '10 20:04

hhh


1 Answers

Use \input instead of \include, that will work.

\include additionally performs a \clearpage command which will not work in the context of a table.

like image 152
Konrad Rudolph Avatar answered Sep 21 '22 14:09

Konrad Rudolph