From 05037353bdc803b50295e0866fb9d789a12e1de9 Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Thu, 12 Oct 2017 02:23:48 -0400 Subject: [PATCH] scribble.tex: add phantomsections Add `\phantomsection`s to the "*starx" macros so the generated sections are valid link targets for hyperref. Note that `\phantomsection` is provided by the `hyperref` package, which is currently loaded by the `\packageHyperref` macro at the top of `scribble-lib/scribble/scribble.tex`. --- scribble-lib/scribble/scribble.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scribble-lib/scribble/scribble.tex b/scribble-lib/scribble/scribble.tex index d5c30ec8..30ae3d36 100644 --- a/scribble-lib/scribble/scribble.tex +++ b/scribble-lib/scribble/scribble.tex @@ -340,10 +340,10 @@ \newcommand{\Ssubsubsubsubsectionstar}[1]{\Ssubsubsubsectionstar{#1}} % "starx" means unnumbered but in ToC: -\newcommand{\Spartstarx}[2]{\Spartstar{#2}\addcontentsline{toc}{part}{#1}} -\newcommand{\Ssectionstarx}[2]{\Ssectionstar{#2}\addcontentsline{toc}{section}{#1}} -\newcommand{\Ssubsectionstarx}[2]{\Ssubsectionstar{#2}\addcontentsline{toc}{subsection}{#1}} -\newcommand{\Ssubsubsectionstarx}[2]{\Ssubsubsectionstar{#2}\addcontentsline{toc}{subsubsection}{#1}} +\newcommand{\Spartstarx}[2]{\Spartstar{#2}\phantomsection\addcontentsline{toc}{part}{#1}} +\newcommand{\Ssectionstarx}[2]{\Ssectionstar{#2}\phantomsection\addcontentsline{toc}{section}{#1}} +\newcommand{\Ssubsectionstarx}[2]{\Ssubsectionstar{#2}\phantomsection\addcontentsline{toc}{subsection}{#1}} +\newcommand{\Ssubsubsectionstarx}[2]{\Ssubsubsectionstar{#2}\phantomsection\addcontentsline{toc}{subsubsection}{#1}} \newcommand{\Ssubsubsubsectionstarx}[2]{\Ssubsubsubsectionstar{#2}} \newcommand{\Ssubsubsubsubsectionstarx}[2]{\Ssubsubsubsubsectionstar{#2}}