Hi all,
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
General ⇒ \input{} command
NEW: TikZ book now 40% off at Amazon.com for a short time.

\input{} command
Hi,
we need to see how exactly did you made those modifications. Please provide a minimal working example showing the undesired behaviour.
we need to see how exactly did you made those modifications. Please provide a minimal working example showing the undesired behaviour.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Hi again,
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
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 155 times
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Hi again,
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
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
You use \Section commands in your document (note capital S) and \section in your inputed file. TeX command names are case sensitive, so these are two different commands. The first one is not a standard LaTeX command so it must be defined somewhere in your document or in the class you use (note that the standard \section command could also be redefined somewhere).
Cheers,
Tomek
Cheers,
Tomek
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Hi,
Thank you. I will check if this affects anything.
Cheers
Thank you. I will check if this affects anything.
Cheers
-
- Posts: 5
- Joined: Wed Dec 03, 2008 12:52 am
Re: \input{} command
Hi agin,
Just tested it, and it works
Been so used to type \section{}, so I overlooked the \Section{} completely. Thank you for the help
Cheers,
Christian
Just tested it, and it works

Cheers,
Christian