This has probably been asked before, but how can I make hyperref
play nicely on articles (using the KOMA scrartcl
class) that have Parts but no Chapters? It complains with:
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 90.
The bookmarks get messed up, with the next section becoming "promoted" to one level up. Interestingly enough, this doesn't occur using the stock article
class.
% vim: ft=tex tw=0
% arara: lualatex: { synctex: true, shell: true }
% arara: lualatex: { synctex: true, shell: true }
\documentclass{scrartcl}
\usepackage{scrlayer-scrpage}
\usepackage[math]{blindtext}
\title{A minimum working example}
\usepackage{hyperref}
\hypersetup{
pdfauthor={Robbie Smith},
pdftitle={A minimum working example},
pdfcreator={An infinite number of gremlins hitting random keys on typewriters...},
pdfpagemode=UseOutlines,
colorlinks=false,
hypertexnames=false,
hidelinks}
\usepackage[all]{hypcap}
\begin{document}
\maketitle
\tableofcontents
\clearpage
\part{Design and Testing}
\section{Objective}
\blindtext
\section{Summary}
\label{sec:summary}
\blindtext
\section{Geometric design}
\label{sec:geometry}
\blindtext
\subsection{Final geometic design}
\label{ssec:geo:final}
The final geometric design is provided in the table below. Formulae references
are to the calculations in the above sections.
\blindtext
\section{Fabrication}
\label{sec:fabrication}
\blindtext
\section{Testing}
\label{sec:testing}
\blindtext
\section{Proposed improvements}
\label{sec:improvements}
\blindtext
\section{Conclusions}
\label{sec:conclusions}
\blindtext
\appendix
\setcounter{table}{0}
\setcounter{figure}{0}
\renewcommand*{\thetable}{\thesection.\arabic{table}}
\renewcommand*{\thefigure}{\thesection.\arabic{figure}}
\part{Preliminary Designs}
\label{part:preliminary-designs}
The preliminary designs were developed prior to building and testing.
\section{First Iteration}
\blindtext
\subsection{Something something}
\blindtext
\section{Second Iteration}
\blindtext
\section{Third Iteration}
\blindtext
\end{document}
The log for compiling with lualatex
via latexmk
is included below:
$ latexmk mwe.tex
Latexmk: This is Latexmk, John Collins, 17 Jan. 2018, version: 4.55.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': Rules & subrules not known to be previously run:
pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'lualatex --synctex=1 --shell-escape -recorder "mwe.tex"'
------------
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
system commands enabled.
(./mwe.tex
LaTeX2e <2018-04-01> patch level 3
(using write cache: /opt/texlive/2018/texmf-var/luatex-cache/generic)(using rea
d cache: /opt/texlive/2018/texmf-var/luatex-cache/generic /home/faraday/.config
/texlive/2018/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.104 seconds
Babel <3.20> and hyphenation patterns for 1 language(s) loaded.
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2018/03/30 v3.25 KOMA-Script document class (article)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/opt/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo(load luc: /
opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc
)) (/opt/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlayer.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/blindtext/blindtext.sty
(/opt/texlive/2018/texmf-dist/tex/latex/tools/xspace.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/hyperref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
(/opt/texlive/2018/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
(/opt/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/opt/texlive/2018/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/opt/texlive/2018/texmf-dist/tex/latex/url/url.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/hluatex.def
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/hypcap.sty) (./mwe.aux)
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))(load lu
c: /opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmsans10-regular.
luc)(load luc: /opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmsan
s10-bold.luc)(load luc: /opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/
otl/lmroman12-regular.luc)
LaTeX Warning: No \author given.
(load luc: /opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmromansl
ant10-regular.luc) [1{/opt/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdfte
x.map}]
part I.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 33.
[2] [3]
part II.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 86.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 90.
[4] [5] (./mwe.aux)
Package rerunfilecheck Warning: File `mwe.out' has changed.
(rerunfilecheck) Rerun to get outlines right
(rerunfilecheck) or use package `bookmark'.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
)
380 words of node memory still in use:
2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 50 glue_spec, 3 attribute_lis
t, 1 write nodes
avail lists: 2:260,3:85,4:5,5:181,6:37,7:3890,8:37,9:154,10:4,11:314
</opt/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf></
opt/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf></op
t/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmsans10-bold.otf>
Output written on mwe.pdf (5 pages, 21070 bytes).
SyncTeX written on mwe.synctex.gz.
Transcript written on mwe.log.
=== TeX engine is 'LuaTeX'
Latexmk: References changed.
Latexmk: References changed.
Latexmk: Log file says output to 'mwe.pdf'
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'mwe.aux'
------------
Run number 2 of rule 'pdflatex'
------------
------------
Running 'lualatex --synctex=1 --shell-escape -recorder "mwe.tex"'
------------
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
system commands enabled.
(./mwe.tex
LaTeX2e <2018-04-01> patch level 3
(using write cache: /opt/texlive/2018/texmf-var/luatex-cache/generic)(using rea
d cache: /opt/texlive/2018/texmf-var/luatex-cache/generic /home/faraday/.config
/texlive/2018/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.103 seconds
Babel <3.20> and hyphenation patterns for 1 language(s) loaded.
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2018/03/30 v3.25 KOMA-Script document class (article)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/opt/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo(load luc: /
opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc
)) (/opt/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlayer.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/blindtext/blindtext.sty
(/opt/texlive/2018/texmf-dist/tex/latex/tools/xspace.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/hyperref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
(/opt/texlive/2018/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
(/opt/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/opt/texlive/2018/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/opt/texlive/2018/texmf-dist/tex/latex/url/url.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/hluatex.def
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/hypcap.sty) (./mwe.aux)
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./mwe.out) (./mwe.out)(load luc: /opt/texlive/2018/texmf-var/luatex-cache/gene
ric/fonts/otl/lmsans10-regular.luc)(load luc: /opt/texlive/2018/texmf-var/luate
x-cache/generic/fonts/otl/lmsans10-bold.luc)(load luc: /opt/texlive/2018/texmf-
var/luatex-cache/generic/fonts/otl/lmroman12-regular.luc)
LaTeX Warning: No \author given.
(./mwe.toc)(load luc: /opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/ot
l/lmromanslant10-regular.luc) [1{/opt/texlive/2018/texmf-var/fonts/map/pdftex/u
pdmap/pdftex.map}]
part I.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 33.
[2] [3]
part II.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 86.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 90.
[4] [5] (./mwe.aux))
400 words of node memory still in use:
2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 54 glue_spec, 3 attribute_lis
t, 1 write nodes
avail lists: 2:563,3:140,4:5,5:181,6:58,7:3894,8:49,9:203,10:4,11:314
</opt/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf></
opt/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf></op
t/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmsans10-bold.otf>
Output written on mwe.pdf (5 pages, 23032 bytes).
SyncTeX written on mwe.synctex.gz.
Transcript written on mwe.log.
=== TeX engine is 'LuaTeX'
Latexmk: Log file says output to 'mwe.pdf'
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
Changed files, or newly in use since previous run(s):
'mwe.aux'
'mwe.out'
'mwe.toc'
------------
Run number 3 of rule 'pdflatex'
------------
------------
Running 'lualatex --synctex=1 --shell-escape -recorder "mwe.tex"'
------------
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
system commands enabled.
(./mwe.tex
LaTeX2e <2018-04-01> patch level 3
(using write cache: /opt/texlive/2018/texmf-var/luatex-cache/generic)(using rea
d cache: /opt/texlive/2018/texmf-var/luatex-cache/generic /home/faraday/.config
/texlive/2018/texmf-var/luatex-cache/generic)
luaotfload | main : initialization completed in 0.096 seconds
Babel <3.20> and hyphenation patterns for 1 language(s) loaded.
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2018/03/30 v3.25 KOMA-Script document class (article)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrkbase.sty
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrbase.sty
(/opt/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlfile.sty)))
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/tocbasic.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrsize11pt.clo(load luc: /
opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/otl/lmroman10-regular.luc
)) (/opt/texlive/2018/texmf-dist/tex/latex/koma-script/typearea.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlayer-scrpage.sty
(/opt/texlive/2018/texmf-dist/tex/latex/koma-script/scrlayer.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/blindtext/blindtext.sty
(/opt/texlive/2018/texmf-dist/tex/latex/tools/xspace.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/hyperref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
(/opt/texlive/2018/texmf-dist/scripts/oberdiek/oberdiek.luatex.lua)))
(/opt/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/auxhook.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/opt/texlive/2018/texmf-dist/tex/latex/latexconfig/hyperref.cfg)
(/opt/texlive/2018/texmf-dist/tex/latex/url/url.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/hluatex.def
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/opt/texlive/2018/texmf-dist/tex/latex/oberdiek/hypcap.sty) (./mwe.aux)
(/opt/texlive/2018/texmf-dist/tex/latex/hyperref/nameref.sty
(/opt/texlive/2018/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))
(./mwe.out) (./mwe.out)(load luc: /opt/texlive/2018/texmf-var/luatex-cache/gene
ric/fonts/otl/lmsans10-regular.luc)(load luc: /opt/texlive/2018/texmf-var/luate
x-cache/generic/fonts/otl/lmsans10-bold.luc)(load luc: /opt/texlive/2018/texmf-
var/luatex-cache/generic/fonts/otl/lmroman12-regular.luc)
LaTeX Warning: No \author given.
(./mwe.toc)(load luc: /opt/texlive/2018/texmf-var/luatex-cache/generic/fonts/ot
l/lmromanslant10-regular.luc) [1{/opt/texlive/2018/texmf-var/fonts/map/pdftex/u
pdmap/pdftex.map}]
part I.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 33.
[2] [3]
part II.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 86.
Package hyperref Warning: Difference (2) between bookmark levels is greater
(hyperref) than one, level fixed on input line 90.
[4] [5] (./mwe.aux))
400 words of node memory still in use:
2 hlist, 1 vlist, 1 rule, 2 glue, 3 attribute, 54 glue_spec, 3 attribute_lis
t, 1 write nodes
avail lists: 2:563,3:140,4:5,5:181,6:58,7:3894,8:49,9:203,10:4,11:314
</opt/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf></
opt/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmroman12-regular.otf></op
t/texlive/2018/texmf-dist/fonts/opentype/public/lm/lmsans10-bold.otf>
Output written on mwe.pdf (5 pages, 23032 bytes).
SyncTeX written on mwe.synctex.gz.
Transcript written on mwe.log.
=== TeX engine is 'LuaTeX'
Latexmk: Log file says output to 'mwe.pdf'
Latexmk: All targets (mwe.pdf) are up-to-date