🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #11840

[Q] behavior of \input

#11840
From: Gregoire Malandain
Date: Wed, 21 Feb 1996 00:00
66 lines
2003 bytes
This question seems to be related to a previous (comp.text.tex #77843,
thanks to David Carlisle for his answer). I want to have the
beginning and the end of a table in two differents files.

If I try the following with foo1.tex and foo2.tex

%%%%%% begin of foo1.tex
\documentclass{article}

\begin{document}

\begin{tabular}{|c|c|c|} \hline
A & B & C \\ \hline \hline
1 & 2 & 3 \\ \hline
%%%%%% end of foo1.tex

%%%%%% begin of foo2.tex
\input{essai_header}
\end{tabular}

\end{document}
%%%%%% end of foo2.tex

The output generated by `latex foo2` is the expected one:

 -------------
 | A | B | C |
 -------------
 | 1 | 2 | 3 |
 -------------

but if I try the following with foo3.tex and foo4.tex

%%%%%% begin of foo3.tex
\documentclass{article}

\begin{document}

\begin{tabular}{|c|c|c|} \hline
A & B & C \\ \hline \hline
1 & 2 & 3 \\ \hline% (this comment is to make sure to have nothing before \input)
\input{foo4}
%%%%%% end of foo3.tex

%%%%%% begin of foo4.tex
\end{tabular}

\end{document}
%%%%%% end of foo4.tex

The output generated by `latex foo3` is the following:

 -------------
 | A | B | C |
 -------------
 | 1 | 2 | 3 |
 -------------
 |   |

It seems to me that \input produces some extra stuff (before \end{tabular})
which is interpreted as the contents of a new row. Am I right, or have I done
something wrong ?

Thank you in advance for any help

Gregoire
Technical Details
Message-ID: <4genip$ga5@news-sop.inria.fr>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f9e16,93b62a0c6065a799,start
X-Google-Attributes: gidf9e16,public
X-Google-Thread: 10ee61,93b62a0c6065a799,start
X-Google-Attributes: gid10ee61,public
From: greg@cajal.inria.fr (Gregoire Malandain)
Subject: [Q] behavior of \input
Date: 1996/02/21
Message-ID: <4genip$ga5@news-sop.inria.fr>
X-Deja-AN: 140385023
distribution: world
content-type: text/plain; charset=iso-8859-1
organization: INRIA, Sophia-Antipolis (Fr)
mime-version: 1.0
newsgroups: comp.text.tex,fr.comp.text.tex