diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/hyperref/hpdftex.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/hyperref/hpdftex.def | 388 |
1 files changed, 279 insertions, 109 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperref/hpdftex.def b/Master/texmf-dist/tex/latex/hyperref/hpdftex.def index 22f7c945945..54c3a9b005d 100644 --- a/Master/texmf-dist/tex/latex/hyperref/hpdftex.def +++ b/Master/texmf-dist/tex/latex/hyperref/hpdftex.def @@ -7,7 +7,6 @@ %% hyperref.dtx (with options: `pdftex,pdfform,outlines') %% %% File: hyperref.dtx Copyright 1995-2001 Sebastian Rahtz, -%% RCS: $Id: hyperref.dtx 6.71 2000/10/04 rahtz Exp rahtz $ %% %% This file is part of the `Hyperref Bundle'. %% ------------------------------------------- @@ -23,7 +22,7 @@ %% given in the file `manifest.txt'. %% \ProvidesFile{hpdftex.def} - [2003/11/30 v6.74m + [2006/08/16 v6.75c Hyperref driver for pdfTeX] \let\Hy@PutCatalog\pdfcatalog \ifHy@pagelabels @@ -36,6 +35,55 @@ } \AtEndDocument{\clearpage\HyPL@SetPageLabels} \fi +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfescapestring\endcsname\relax + \begingroup + \catcode`\|=0 % + \@makeother\\% + |@firstofone{|endgroup + |def|Hy@pstringdef#1#2{% + |edef#1{#2}% + |@onelevel@sanitize#1% + |edef#1{|expandafter|Hy@ExchangeBackslash#1\|@nil}% + |edef#1{|expandafter|Hy@ExchangeLeftParenthesis#1(|@nil}% + |edef#1{|expandafter|Hy@ExchangeRightParenthesis#1)|@nil}% + }% + |def|Hy@ExchangeBackslash#1\#2|@nil{% + #1% + |ifx|\#2|\% + |else + \\% + |Hy@ReturnAfterFi{% + |Hy@ExchangeBackslash#2|@nil + }% + |fi + }% + } + \def\Hy@ExchangeLeftParenthesis#1(#2\@nil{% + #1% + \ifx\\#2\\% + \else + \@backslashchar(% + \Hy@ReturnAfterFi{% + \Hy@ExchangeLeftParenthesis#2\@nil + }% + \fi + } + \def\Hy@ExchangeRightParenthesis#1)#2\@nil{% + #1% + \ifx\\#2\\% + \else + \@backslashchar)% + \Hy@ReturnAfterFi{% + \Hy@ExchangeRightParenthesis#2\@nil + }% + \fi + } +\else + \def\Hy@pstringdef#1#2{% + \edef#1{\pdfescapestring{#2}}% + }% +\fi \def\setpdflinkmargin#1{\pdflinkmargin#1} \ifx\pdfstartlink\@undefined% less than version 14 \let\pdfstartlink\pdfannotlink @@ -52,26 +100,34 @@ \typeout{pdftex: define anchor at line \the\inputlineno: #1}% \fi \Hy@SaveLastskip - \pdfdest name {#1}\@pdfview + \Hy@pstringdef\Hy@pstringDest{#1}% + \Hy@DestName\Hy@pstringDest\@pdfview \Hy@RestoreLastskip } \let\pdf@endanchor\@empty +\def\Hy@DestName#1#2{% + \pdfdest name{#1}#2\relax +} \providecommand\@pdfborder{0 0 1} +\providecommand*\@pdfborderstyle{} \def\Hy@undefinedname{UNDEFINED} \def\find@pdflink#1#2{% \leavevmode \protected@edef\Hy@testname{#2}% \ifx\Hy@testname\@empty \let\Hy@testname\Hy@undefinedname + \else + \Hy@pstringdef\Hy@testname\Hy@testname \fi - \pdfstartlink - attr{% - /Border[\@pdfborder]% - /H\@pdfhighlight - /C[\CurrentBorderColor]% - }% - goto name {\Hy@testname}% - \Hy@colorlink{\csname @#1color\endcsname}% + \Hy@StartlinkName{% + \Hy@setpdfborder + /H\@pdfhighlight + /C[\CurrentBorderColor]% + }\Hy@testname + \expandafter\Hy@colorlink\csname @#1color\endcsname +} +\def\Hy@StartlinkName#1#2{% + \pdfstartlink attr{#1}goto name{#2}\relax } \def\close@pdflink{\Hy@endcolorlink\pdfendlink} \def\hyper@anchor#1{\new@pdflink{#1}\anchor@spot\pdf@endanchor} @@ -87,12 +143,13 @@ } \def\CurrentBorderColor{\@linkbordercolor} \def\hyper@linkurl#1#2{% - \bgroup + \begingroup + \Hy@pstringdef\Hy@pstringURI{#2}% \hyper@chars \leavevmode \pdfstartlink attr{% - /Border[\@pdfborder]% + \Hy@setpdfborder /H\@pdfhighlight /C[\@urlbordercolor]% }% @@ -101,88 +158,106 @@ /A<<% /Type/Action% /S/URI% - /URI(#2)% + /URI(\Hy@pstringURI)% >>% }% - \Hy@colorlink{\@urlcolor}#1% + \relax + \Hy@colorlink\@urlcolor#1% \close@pdflink - \egroup + \endgroup } \def\hyper@linkfile#1#2#3{% anchor text, filename, linkname - \bgroup + \begingroup + \Hy@pstringdef\Hy@pstringF{#2}% + \Hy@pstringdef\Hy@pstringD{#3}% \leavevmode \pdfstartlink attr{% - /Border[\@pdfborder]% + \Hy@setpdfborder /H\@pdfhighlight /C[\@filebordercolor]% }% user {% /Subtype/Link% /A<<% - /F(#2)% + /F(\Hy@pstringF)% /S/GoToR% - \ifHy@newwindow /NewWindow true \fi + \ifHy@newwindow /NewWindow true\fi \ifx\\#3\\% /D[0 \@pdfstartview]% \else - /D(#3)% + /D(\Hy@pstringD)% \fi >>% }% - \Hy@colorlink{\@filecolor}#1% + \relax + \Hy@colorlink\@filecolor#1% \close@pdflink - \egroup + \endgroup } \def\@hyper@launch run:#1\\#2#3{% filename, anchor text linkname - \bgroup + \begingroup + \Hy@pstringdef\Hy@pstringF{#1}% + \Hy@pstringdef\Hy@pstringP{#3}% \leavevmode \pdfstartlink attr{% - /Border[\@pdfborder]% + \Hy@setpdfborder /H\@pdfhighlight /C[\@runbordercolor]% }% user {% /Subtype/Link% /A<<% - /F(#1)% + /F(\Hy@pstringF)% /S/Launch% - \ifHy@newwindow /NewWindow true \fi + \ifHy@newwindow /NewWindow true\fi \ifx\\#3\\% \else - /Win<</P(#3)/F(#1)>>% + /Win<</P(\Hy@pstringP)/F(\Hy@pstringF)>>% \fi >>% }% - \Hy@colorlink{\@filecolor}#2% + \relax + \Hy@colorlink\@filecolor#2% \close@pdflink - \egroup + \endgroup } -\def\@pdfproducer{pdfTeX} -\ifx\eTeXversion\@undefined -\else - \ifx\eTeXversion\relax +\ifx\@pdfproducer\relax + \def\@pdfproducer{pdfTeX} + \ifx\eTeXversion\@undefined \else - \ifnum\eTeXversion>0 % - \def\@pdfproducer{pdfeTeX} + \ifx\eTeXversion\relax + \else + \ifnum\eTeXversion>0 % + \def\@pdfproducer{pdfeTeX} + \fi \fi \fi -\fi -\ifx\pdftexversion\@undefined -\else - \ifnum\pdftexversion<100 % - \edef\@pdfproducer{% - \@pdfproducer - \the\pdftexversion.\pdftexrevision - } + \ifx\pdftexversion\@undefined \else - \edef\@pdfproducer{% - \@pdfproducer-% - \expandafter\@car\the\pdftexversion\@empty\@nil.% - \expandafter\@cdr\the\pdftexversion\@empty\@nil - \pdftexrevision - } + \ifnum\pdftexversion<100 % + \edef\@pdfproducer{% + \@pdfproducer + \the\pdftexversion.\pdftexrevision + } + \else + \ifnum\pdftexversion<130 % + \edef\@pdfproducer{% + \@pdfproducer-% + \expandafter\@car\the\pdftexversion\@empty\@nil.% + \expandafter\@cdr\the\pdftexversion\@empty\@nil + \pdftexrevision + } + \else + \edef\@pdfproducer{% + \@pdfproducer-% + \expandafter\@car\the\pdftexversion\@empty\@nil.% + \expandafter\@cdr\the\pdftexversion\@empty\@nil.% + \pdftexrevision + }% + \fi + \fi \fi \fi \def\PDF@SetupDoc{% @@ -199,11 +274,12 @@ }% \process@me \fi + \Hy@pstringdef\Hy@pstringB{\@baseurl}% \pdfcatalog{% - /PageMode \@pdfpagemode + /PageMode\@pdfpagemode \ifx\@baseurl\@empty \else - /URI<</Base(\@baseurl)>> + /URI<</Base(\Hy@pstringB)>>% \fi }% \ifx\@pdfstartview\@empty @@ -229,7 +305,7 @@ \fi \ifx\pdf@pagelayout\@empty \else - /PageLayout/\pdf@pagelayout\space + /PageLayout/\pdf@pagelayout \fi }% } @@ -240,13 +316,26 @@ /Title(\@pdftitle)% /Subject(\@pdfsubject)% /Creator(\@pdfcreator)% - /Producer(\@pdfproducer)% + \ifx\@pdfcreationdate\@empty + \else + /CreationDate(\@pdfcreationdate)% + \fi + \ifx\@pdfmoddate\@empty + \else + /ModDate(\@pdfmoddate)% + \fi + \ifx\@pdfproducer\relax + \else + /Producer(\@pdfproducer)% + \fi /Keywords(\@pdfkeywords)% }% \Hy@DisableOption{pdfauthor}% \Hy@DisableOption{pdftitle}% \Hy@DisableOption{pdfsubject}% \Hy@DisableOption{pdfcreator}% + \Hy@DisableOption{pdfcreationdate}% + \Hy@DisableOption{pdfmoddate}% \Hy@DisableOption{pdfproducer}% \Hy@DisableOption{pdfkeywords}% } @@ -376,22 +465,22 @@ \leavevmode \pdfstartlink attr{% - /Border [\@pdfborder] - /H \@pdfhighlight\space - /C [\@menubordercolor]% + \Hy@setpdfborder + /H \@pdfhighlight + /C[\@menubordercolor]% }% user{ /Subtype /Link - /A << - /S /Named /N /#1 - >> + /A<<% + /S/Named/N/#1% + >>% }% - \Hy@colorlink{\@menucolor}#2\close@pdflink + \relax + \Hy@colorlink\@menucolor#2\close@pdflink } \def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum \typeout{Sorry, pdftex does not support FORM gauges}% } -\RequirePackage{pifont}% \def\MakeFieldObject#1#2{\sbox0{#1}% \immediate\pdfxform0 % \expandafter\edef\csname #2Object\endcsname{% @@ -408,7 +497,16 @@ \pdfrefobj\OBJ@acroform \fi \pdfcatalog{/AcroForm \OBJ@acroform\space 0 R}% - \MakeFieldObject{\ding{123}}{Ding}% + \MakeFieldObject{% + \begingroup + \fontfamily{pzd}% + \fontencoding{U}% + \fontseries{m}% + \fontshape{n}% + \selectfont + \char123 % + \endgroup + }{Ding}% \MakeFieldObject{\fbox{\textcolor{yellow}{\textsf{Submit}}}}{Submit}% \MakeFieldObject{\fbox{\textcolor{yellow}{\textsf{SubmitP}}}}{SubmitP}% } @@ -434,8 +532,10 @@ \ifFld@hidden\def\Fld@width{1sp}\fi \ifx\Fld@value\@empty\def\Fld@value{\Fld@default}\fi \LayoutTextField{#2}{% - \pdfstartlink user {\PDFForm@Text}% - \MakeTextField{\Fld@width}{\Fld@height}\pdfendlink}% + \Hy@escapeform\PDFForm@Text + \pdfstartlink user {\PDFForm@Text}\relax + \MakeTextField{\Fld@width}{\Fld@height}\pdfendlink + }% \egroup } \def\@ChoiceMenu[#1]#2#3{% parameters, label, choices @@ -487,6 +587,7 @@ \Hy@StepCount\Fld@listcount \@currDisplay\space \leavevmode + \Hy@escapeform\PDFForm@Radio \pdfstartlink user {% \PDFForm@Radio /AP << @@ -495,6 +596,7 @@ >> >> }% + \relax \MakeRadioField{\Fld@width}{\Fld@height}\pdfendlink \space% deliberate space between radio buttons }% @@ -511,7 +613,8 @@ }\@processme }% \leavevmode - \pdfstartlink user {\PDFForm@List}% + \Hy@escapeform\PDFForm@List + \pdfstartlink user {\PDFForm@List}\relax \MakeChoiceField{\Fld@width}{\Fld@height}% \pdfendlink } @@ -523,7 +626,8 @@ \ifFld@hidden\def\Fld@width{1sp}\fi \LayoutPushButtonField{% \leavevmode - \pdfstartlink user {\PDFForm@Push}% + \Hy@escapeform\PDFForm@Push + \pdfstartlink user {\PDFForm@Push}\relax \MakeButtonField{#2}% \pdfendlink }% @@ -538,10 +642,12 @@ \setkeys{Field}{#1}% \ifFld@hidden\def\Fld@width{1sp}\fi \leavevmode + \Hy@escapeform\PDFForm@Submit \pdfstartlink user {% \PDFForm@Submit /AP << /N \SubmitObject\space /D \SubmitPObject >> }% + \relax \MakeButtonField{#2}% \pdfendlink \egroup @@ -555,7 +661,8 @@ \setkeys{Field}{#1}% \ifFld@hidden\def\Fld@width{1sp}\fi \leavevmode - \pdfstartlink user {\PDFForm@Reset}% + \Hy@escapeform\PDFForm@Reset + \pdfstartlink user {\PDFForm@Reset}\relax \MakeButtonField{#2}% \pdfendlink \egroup @@ -570,7 +677,8 @@ \setkeys{Field}{#1}% \ifFld@hidden\def\Fld@width{1sp}\fi \LayoutCheckField{#2}{% - \pdfstartlink user {\PDFForm@Check}% + \Hy@escapeform\PDFForm@Check + \pdfstartlink user {\PDFForm@Check}\relax \MakeCheckField{\Fld@width}{\Fld@height}% \pdfendlink }% @@ -627,10 +735,51 @@ >> } \edef\OBJ@acroform{\the\pdflastobj} +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfescapestring\endcsname\relax + \let\Hy@escapestring\@firstofone + \def\Hy@escapeform#1{% + \ifHy@escapeform + \def\Hy@escapestring##1{% + \noexpand\Hy@escapestring{\noexpand##1}% + }% + \edef\Hy@temp{#1}% + \expandafter\Hy@@escapeform\Hy@temp\Hy@escapestring{}\@nil + \def\Hy@escapestring##1{% + \@ifundefined{Hy@esc@\string##1}{% + ##1% + \ThisShouldNotHappen + }{% + \csname Hy@esc@\string##1\endcsname + }% + }% + \else + \let\Hy@escapestring\@firstofone + \fi + }% + \def\Hy@@escapeform#1\Hy@escapestring#2#3\@nil{% + \ifx\\#3\\% + \else + \expandafter\Hy@pstringdef\csname Hy@esc@\string#2\endcsname{#2}% + \Hy@ReturnAfterFi{% + \Hy@@escapeform#3\@nil + }% + \fi + }% +\else + \def\Hy@escapeform#1{% + \ifHy@escapeform + \let\Hy@escapestring\pdfescapestring + \else + \let\Hy@escapestring\@firstofone + \fi + }% + \Hy@escapeform{}% +\fi \def\PDFForm@Check{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /Q \Fld@align\space /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >> /MK << @@ -639,7 +788,7 @@ \else /BG [\Fld@bcolor] \fi - /CA (\Fld@cbsymbol) + /CA (\Hy@escapestring{\Fld@cbsymbol}) >> /DA (/ZaDb \strip@pt\Fld@charsize\space Tf \Fld@color\space rg) /FT /Btn @@ -649,7 +798,7 @@ \def\PDFForm@Push{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /FT /Btn /Ff 65540 /H /P @@ -657,56 +806,56 @@ /MK << /BC [\Fld@bordercolor] >> - /A << /S /JavaScript /JS (\Fld@onclick;) >> + /A << /S /JavaScript /JS (\Hy@escapestring{\Fld@onclick}) >> } \def\Fld@additionalactions{% /AA << \ifx\Fld@keystroke@code\@empty \else - /K << /S /JavaScript /JS (\Fld@keystroke@code) >> + /K << /S /JavaScript /JS (\Hy@escapestring{\Fld@keystroke@code}) >> \fi \ifx\Fld@format@code\@empty \else - /F << /S /JavaScript /JS (\Fld@format@code) >> + /F << /S /JavaScript /JS (\Hy@escapestring{\Fld@format@code}) >> \fi \ifx\Fld@validate@code\@empty \else - /V << /S /JavaScript /JS (\Fld@validate@code) >> + /V << /S /JavaScript /JS (\Hy@escapestring{\Fld@validate@code}) >> \fi \ifx\Fld@calculate@code\@empty \else - /C << /S /JavaScript /JS (\Fld@calculate@code) >> + /C << /S /JavaScript /JS (\Hy@escapestring{\Fld@calculate@code}) >> \fi \ifx\Fld@onfocus@code\@empty \else - /Fo << /S /JavaScript /JS (\Fld@onfocus@code) >> + /Fo << /S /JavaScript /JS (\Hy@escapestring{\Fld@onfocus@code}) >> \fi \ifx\Fld@onblur@code\@empty \else - /Bl << /S /JavaScript /JS (\Fld@onblur@code) >> + /Bl << /S /JavaScript /JS (\Hy@escapestring{\Fld@onblur@code}) >> \fi \ifx\Fld@onmousedown@code\@empty \else - /D << /S /JavaScript /JS (\Fld@onmousedown@code) >> + /D << /S /JavaScript /JS (\Hy@escapestring{\Fld@onmousedown@code}) >> \fi \ifx\Fld@onmouseup@code\@empty \else - /U << /S /JavaScript /JS (\Fld@onmouseup@code) >> + /U << /S /JavaScript /JS (\Hy@escapestring{\Fld@onmouseup@code}) >> \fi \ifx\Fld@onenter@code\@empty \else - /E << /S /JavaScript /JS (\Fld@onenter@code) >> + /E << /S /JavaScript /JS (\Hy@escapestring{\Fld@onenter@code}) >> \fi \ifx\Fld@onexit@code\@empty \else - /X << /S /JavaScript /JS (\Fld@onexit@code) >> + /X << /S /JavaScript /JS (\Hy@escapestring{\Fld@onexit@code}) >> \fi >> } \def\PDFForm@List{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /FT /Ch /Q \Fld@align\space /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >> @@ -719,14 +868,14 @@ >> /DA (/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg ) /Opt [\the\Choice@toks] - /DV (\Fld@default) + /DV (\Hy@escapestring{\Fld@default}) \Fld@additionalactions \Fld@flags } \def\PDFForm@Radio{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /FT /Btn /Ff 49152 /H /P @@ -750,7 +899,7 @@ \def\PDFForm@Text{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /Q \Fld@align\space /FT /Tx /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >> @@ -762,8 +911,8 @@ \fi >> /DA (/Helv \strip@pt\Fld@charsize\space Tf \Fld@color\space rg ) - /DV (\Fld@default) - /V (\Fld@value) + /DV (\Hy@escapestring{\Fld@default}) + /V (\Hy@escapestring{\Fld@value}) \Fld@additionalactions \ifFld@multiline \ifFld@readonly /Ff 4097 \else /Ff 4096 \fi @@ -779,7 +928,7 @@ \def\PDFForm@Submit{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /FT /Btn /Ff 65540 /H /P @@ -791,7 +940,7 @@ /S /SubmitForm /F << /FS /URL - /F (\Form@action) + /F (\Hy@escapestring{\Form@action}) >> \ifForm@html /Flags 4 \fi >> @@ -799,7 +948,7 @@ \def\PDFForm@Reset{% /Subtype /Widget \ifFld@hidden /F 6 \else /F 4 \fi - /T (\Fld@name) + /T (\Hy@escapestring{\Fld@name}) /FT /Btn /H /P /DA (/Helv \strip@pt\Fld@charsize\space Tf 0 0 1 rg) @@ -810,11 +959,10 @@ /BS << /W \Fld@borderwidth\space /S /\Fld@borderstyle\space >> /A << /S /ResetForm >> } -\newwrite\@outlinefile \def\Hy@writebookmark#1#2#3#4#5{% section number, text, label, level, file \ifx\WriteBookmarks\relax% \else - \ifnum#4>\c@tocdepth + \ifnum#4>\Hy@bookmarksdepth\relax \else \@@writetorep{#1}{#2}{#3}{#4}{#5}% \fi @@ -862,11 +1010,13 @@ \let\numberline\@gobble \fi \pdfstringdef\Hy@tempa{#2}% - \protected@write\@outlinefile{}{% - \protect\BOOKMARK - [\Hy@level][\@bookmarkopenstatus{\Hy@level}]{#3}% - {\Hy@tempa}{\Hy@tempb}% - }% + \if@filesw + \protected@write\@outlinefile{}{% + \protect\BOOKMARK + [\Hy@level][\@bookmarkopenstatus{\Hy@level}]{#3}% + {\Hy@tempa}{\Hy@tempb}% + }% + \fi \fi \endgroup } @@ -902,26 +1052,33 @@ \fi \def\@@BOOKMARK[##1][##2]##3##4##5{% \def\Hy@temp{##4}% - \pdfoutline goto - name{##3}% - count ##2\check@bm@number{##3}{% - \expandafter\strip@prefix\meaning\Hy@temp - }% + \Hy@pstringdef\Hy@pstringName{##3}% + \Hy@OutlineName{}\Hy@pstringName{% + ##2\check@bm@number{##3}% + }{% + \expandafter\strip@prefix\meaning\Hy@temp + }% }% {% \def\WriteBookmarks{0}% \InputIfFileExists{\jobname.out}{}{}% }% %{\escapechar\m@ne\InputIfFileExists{\jobname.out}{}{}}% - \ifx\WriteBookmarks\relax\else - \if@filesw\immediate\openout\@outlinefile=\jobname.out - \ifHy@typexml - \immediate\write\@outlinefile{<relaxxml>\relax}% - \fi + \ifx\WriteBookmarks\relax + \else + \if@filesw + \newwrite\@outlinefile + \immediate\openout\@outlinefile=\jobname.out + \ifHy@typexml + \immediate\write\@outlinefile{<relaxxml>\relax}% + \fi \fi \fi \endgroup } +\def\Hy@OutlineName#1#2#3#4{% + \pdfoutline goto name{#2}count#3{#4}% +} \def\check@bm@number#1{% \expandafter\ifx\csname B_#1\endcsname\relax 0% @@ -976,6 +1133,19 @@ \Hy@org@chapter }% } +\let\H@old@part\@part +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname chapter\endcsname\relax + \let\Hy@secnum@part\z@ +\else + \let\Hy@secnum@part\m@ne +\fi +\def\@part{% + \ifnum\Hy@secnum@part>\c@secnumdepth + \phantomsection + \fi + \H@old@part +} \let\H@old@spart\@spart \def\@spart#1{% \H@old@spart{#1}% |