LaTex: how does include-command work?

I assumed that include-command copies the code to compilation, this is wrong because the code stops working. Please see the middle part of the code. I just copied the code to a 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 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 rh$ \\ \hline \end{tabular} \end{table} 
+6
include latex
source share
2 answers

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

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

+11
source share

Try with \input , \include old and very limited.

-one
source share

All Articles