Here is an other illustration of the 50:50 strategy I suggested. It's a simple example, and your trouble will probably on a similar level, in a comparable place.
The keys here are:
- follow a systematic process
- until the point, where you know where to look for what
- correct it and continue
Needless (?) to say, you should do the following on a copy of your files ..., just in case ...
Iteration 1 - knowing nothing
Let's assume you have a file like this, and let's pretend we don't spot the error right away.
\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\newcommand\strange[0]{\includegraphics[scale=.3]{example-images} }
\begin{document}
\section{Just a section}
\lipsum[1]
\includegraphics[scale=.3]{example-image}
\section{\strange{hello world} }
\lipsum[5]
\end{document}
A compile yields
![error1](https://cdn.statically.io/img/i.sstatic.net/oTioCMOA.png)
Though it hints to line 14, we might not be able to understand the problem, as there is no image at line 14 ...:
! LaTeX Error: File `example-images' not found.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.14 \section{\strange{hello world} }
I could not locate the file with any of these extensions: ...
Iteration 2 - where is it, roughly? (split 50:50)
Let's continue pretending we are blind enough to overlook the obvious. Let's comment out the lower part, which compiles:
\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\newcommand\strange[0]{\includegraphics[scale=.3]{example-images} }
\begin{document}
\section{Just a section}
\lipsum[1]
% \includegraphics[scale=.3]{example-image}
%
% \section{\strange{hello world} }
% \lipsum[5]
Is the problem here? Let's check the opposite, i.e. "the other 50%":
\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\newcommand\strange[0]{\includegraphics[scale=.3]{example-images} }
\begin{document}
% \section{Just a section}
% \lipsum[1]
\includegraphics[scale=.3]{example-image}
\section{\strange{hello world} }
\lipsum[5]
\end{document}
This fails, so the problem must be somewhere here.
Iteration 3 - closer look at lower half (split 50:50)
With the previous hint in mind, and line 14 back again, let's try this half (of the previous half):
Compiles:
\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\newcommand\strange[0]{\includegraphics[scale=.3]{example-images} }
\begin{document}
% \section{Just a section}
% \lipsum[1]
\includegraphics[scale=.3]{example-image}
% \section{\strange{hello world} }
\lipsum[5]
\end{document}
Proof: dosen't compile
\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\newcommand\strange[0]{\includegraphics[scale=.3]{example-images} }
\begin{document}
% \section{Just a section}
% \lipsum[1]
% \includegraphics[scale=.3]{example-image}
\section{\strange{hello world} }
% \lipsum[5]
\end{document}
Iteration 4 - what's in a line? (split 50:50)
Now, we no longer can run away from the fact that this line bears something strange: \section{\strange{hello world} }
How to narrow it down? Make it discardeble: 50:50 on the next lower level.
This fails (with the rest as above)
\section{
\strange{hello world}
}
while this compiles:
\section{
% \strange{hello world}
}
Iteration 5 - time of focused analysis and enlightment
Ok, let's have a close look at this strange macro. Who defined it? Me myself? Ok:
\newcommand\strange[0]{\includegraphics[scale=.3]{example-images}
Either repeating reformating and compile as with the section, or rereading the error message again, sooner or later you'll wonder:
- who defined example-images ?
- answer: nobody
- it's true, that package
graphicx
provides an example-image
(at least)
- but it doesn't provide
example-image
s
So, was it a typo?
Proof
Ok, let's try the changed filename ... and it compiles.
\documentclass[10pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\newcommand\strange[0]{\includegraphics[scale=.3]{example-image} }
\begin{document}
\section{Just a section}
\lipsum[1]
\includegraphics[scale=.3]{example-image}
\section{
\strange{hello world}
}
\lipsum[5]
\end{document}
![result](https://cdn.statically.io/img/i.sstatic.net/MBnu5xMp.png)
\includepdf
inside the argument of a\section
command. But this wouldn't make any sense … You should indeed try to break-down your document to a minimal working example and add the resulting code to your question. And if the error is inside theaux
ortoc
file, you have to delete them after every reduction step.\includepdf
may be around line 36 of your.tex
file (though it could be a different file if you're using several).