When compiling my LaTeX file, I received this warning message. Though I got the PDF file, I still want to know why this warning comes and how to fix it.

It occurs in this line.

\paragraph{Plane stress} Plane state of stress, a.k.a. plane stress, is a state of stress in which\[\sigma_{33}=\sigma_{31}=\sigma_{32}=0.\]

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

The question may be seemed dummy to some TeX experts, but as a newbie here, I really don't know how it comes.

I attempt to write two subsubsections, but without numbering them. So I choose the command \paragraph. Is there any work-arounds?

  • I'm guessing you made a paragraph division without making a subsection first? \part, \chapter, \section, \subsection, \paragraph, \subparagraph -- Reference – Mike Renfro Apr 19 '12 at 14:15
  • 2
    Perhaps you have a \paragraph without a \subsubsection; only a \subsection. Since the PDF bookmarks tend to show a hierarchy, they follow the sectional depths via a structured indentation. Without all the proper in-between sectional structures, the bookmarks have to be "fixed" for the missing levels. That's just a guess, since I don't have an MWE to play with. – Werner Apr 19 '12 at 14:16
  • @Werner you are right. But I don't want to use \subsubsection. It makes the structure to cumbersome. – newbie Apr 19 '12 at 14:19
  • 1
    And if you're using \paragraph as a shorthand for "give me a block of text with a run-in header instead of a displayed one", then perhaps using titlesec to redefine \subsubsection that way would be a solution. – Mike Renfro Apr 19 '12 at 16:30

This happens when you skip a level in the sectioning commands while still requesting to maintain an equivalent bookmark hierarchy. The following MWE reproduces the problem:

enter image description here

\usepackage[bookmarksopen]{hyperref}% http://ctan.org/pkg/hyperref
\setcounter{tocdepth}{4}% Show up to level 4 (\paragraph) in ToC (and bookmarks)
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}
\paragraph{A paragraph}
\subparagraph{A subparagraph}
\section{A section}
\subsection{A subsection}
%\subsubsection{A subsubsection}% Left out \subsubsection
\paragraph{A paragraph}
\subparagraph{A subparagraph}

Note how the second \paragraph is at the same level as the preceding \subsubsection level.

To circumvent this warning, don't skip elements of the sectional hierarchy. Rather redefine them to suit your formatting needs. Specific to your example, using \subsubsection* (the starred variant of \subsubsection) would leave the titles unnumbered - similar to that of \paragraph. However, there are other ways (either manually, or via a package like titlesec, say).

Alternatively, loading the bookmark package overrides this warning.

  • 3
    You could also circumvent this situation by setting tocdepth to a value lower than 4, e. g., \setcounter{tocdepth}{3}. This will prevent paragraphs from showing up in the list of bookmarks and, thus, will also make the warnings go away. – ilpssun Apr 20 '12 at 6:34

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.