General ⇒ \input{} command
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
\input{} command
I have a question concerning the \input{} command.
When I wish to include a subfile, called example.tex in my main file, and the subfile looks something like this,
%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Example}
Text..........
\subsection{Another example}
Text.....
%%%%%%%%%%%%%%%%%%%%%%%%%
and I have defined how I want my section headers and subsection headers to look, in the preamble. Why does the \input{} seem to override the preamble?
What I mean is that the \section{} in the main file, yields one result, while \section{} in the subfile yields another result?
How can I work around this problem?
Any help would be highly appreciated.
Cheers,
Christian
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
\input{} command
we need to see how exactly did you made those modifications. Please provide a minimal working example showing the undesired behaviour.
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Of course. I have attached a *.zip file with the files I am using.
I use a template created by another person, and all the declarations are defined in the cls-file.
When I write \input{test.tex} in the sample3.tex file, and compile it, you can see the result in section 1.2 where the header occurs larger than the other section headers.
I realize that it is a bit problematic when I haven´t written the code myself, but I want to know why it does not work. I´m wondering if the \input command overrides the declarations in the cls-file, and if I was to write the code myself, I will get the same problem.
Cheers
Chrisitan
- Attachments
-
- test.zip
- (98.75 KiB) Downloaded 163 times
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Sorry that the code is not a minimal working sample. I just realized that it is a bit big.
I don´t have any smaler however, and I don´t know enough to make it smaler I´m afraid.
Hope someone can help however

Cheers
\input{} command
Cheers,
Tomek
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Thank you. I will check if this affects anything.
Cheers
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Just tested it, and it works

Cheers,
Christian