1

I'm trying to debug my thesis and found this warning in the error log:

Package hyperref Warning: Difference (2) between bookmark levels is greater (hyperref) than one, level fixed on input line 161.

This points towards my main file that only has 73 lines (comments included). I'm using the \inputcommand to import the various chapters and files. I'm using TexMaker.

I found this thread Difference between bookmark levels greater than one - what does this mean? explaining the warning and how to solve it, but I can't manage to locate the problem because of this inconsistency in line numbering. Can anybody help?

  • Use the option --file-line-error when compiling then the log will also tell the file name. – Ulrike Fischer Aug 3 '18 at 18:25
  • the log file shows which file is involved, by showing (foo.tex when foo.tex is opened and ) when it is closed so you can check matching (...) to see the file, or using the command line option Ulrike mentioned can be easier. – David Carlisle Aug 3 '18 at 18:31
  • Welcome to TeX.SX! – Cragfelt Aug 3 '18 at 18:48
  • @UlrikeFischer actually not in this case, as it is a latex warning using \linenumber not an error. – David Carlisle Aug 3 '18 at 18:50
  • @DavidCarlisle oh yes, I shouldn't have concentrated so much on the title of the question. But it is still hot here ;-) – Ulrike Fischer Aug 3 '18 at 19:38
2

If you modify the example in the linked question so it looks like

\documentclass{article}
\usepackage[bookmarksopen]{hyperref}% http://ctan.org/pkg/hyperref
\setcounter{tocdepth}{4}% Show up to level 4 (\paragraph) in ToC (and bookmarks)
\begin{document}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\paragraph{A paragraph}
\subparagraph{A subparagraph}
\input{sc2.tex}
\end{document}

where sc2.tex is

\section{A section}
\subsection{A subsection}
%\subsubsection{A subsubsection}% Left out \subsubsection
\paragraph{A paragraph}
\subparagraph{A subparagraph}

then the terminal and log shows the error as

(./main.out) (./main.out) (./sc2.tex

Package hyperref Warning: Difference (2) between bookmark levels is greater 
(hyperref)                than one, level fixed on input line 5.

where (main.out) shows the file main.out has been read completely but (./sc2.tex with no matching ) shows that that file is opened but not fully read, so the line number in any error or warning in that section relates to sc2.tex.

  • @SebastianoGenna answered questions are not closed (otherwise the answers would not be available to later readers), they can be "accepted" but only you can do that:-) – David Carlisle Aug 6 '18 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.