diff options
Diffstat (limited to 'exercisesheets.sty')
| -rw-r--r-- | exercisesheets.sty | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/exercisesheets.sty b/exercisesheets.sty index b5a81c7..1f5330c 100644 --- a/exercisesheets.sty +++ b/exercisesheets.sty @@ -357,10 +357,16 @@ \renewcommand{\thepage}{\arabic{page}}%changed for every sheet \setcounter{secnumdepth}{-1} -% make PDF destinations unique: \AfterPackage*{hyperref}{% - \def\theHsection{\arabic{part}.\arabic{section}}% - \def\theHpage{\arabic{part}-\arabic{page}}% + % make PDF destinations unique: + \def\theHsection{\arabic{sheetid}.\arabic{section}}% + \def\theHpage{\arabic{sheetid}-\arabic{page}}% + % + % open bookmarks when typesetting a single sheet + \AtEndPreamble{% + \exsh@checkrange{0}% + \ifexsh@singularrange\hypersetup{bookmarksopen}\fi + }% } % automatic title selection @@ -391,8 +397,10 @@ \title{\exsh@title} \fi } +\newcounter{sheetid}% only used to disambiguate hyperref labels \newenvironment{sheet}[1][]{% \clearpage + \stepcounter{sheetid}% \pgfkeys{exsh,every sheet,#1}% \ifthenelse{\equal{}{\pgfkeysvalueof{/exsh/title}}}{% \numdef\exsh@tmp{\value{part}+1}% |
