Hello,
I'm having a problem with the \include and \input commands. I have something like...
\include{file1}
\include{file2}
\include{file3}
where file2 has only the following...
\section{Background}
some text
\subsection{something}
some text
\subsubsection{something}
some text
\subsection{something}
some text
And I get errors saying "1.21 missing $ inserted."
If I cut the contents of file2 and paste them in the main document, these compile errors don't show up. I'm not changing them at all. The \input{file2} still has the compile errors. Has anyone else had this problem?
General ⇒ error from \input{} but not from same code in main file
-
- Posts: 2
- Joined: Tue Feb 22, 2011 1:30 am
error from \input{} but not from same code in main file
Last edited by kaneofawesome on Tue Feb 22, 2011 8:46 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 2
- Joined: Tue Feb 22, 2011 1:30 am
Re: error from \input{} but not from same code in main file
found the problem...
my filenames had underscores in them. That's why latex gave me "missing $" errors.
my filenames had underscores in them. That's why latex gave me "missing $" errors.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
error from \input{} but not from same code in main file
Then please mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules (to be read before posting).kaneofawesome wrote:found the problem […]
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10