diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-08 23:07:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-08 23:07:52 +0000 |
commit | b7fa91e9e7a5170359bd088603d82c36334b95fa (patch) | |
tree | bd1a1a08af41f099a0df3434b02d9c7ce7e9a591 /Master/texmf-dist/source/latex/hyperref | |
parent | 2f4b454ae76e5151ecb060ba24f829d1234cd737 (diff) |
hyperref (8nov12)
git-svn-id: svn://tug.org/texlive/trunk@28213 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/hyperref')
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/doc/manual.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/doc/options.tex | 3 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/hyperref/hyperref.dtx | 196 |
3 files changed, 180 insertions, 25 deletions
diff --git a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex index 788a17e3e70..3a3bcda86cf 100644 --- a/Master/texmf-dist/source/latex/hyperref/doc/manual.tex +++ b/Master/texmf-dist/source/latex/hyperref/doc/manual.tex @@ -14,7 +14,7 @@ % * Heiko Oberdiek, 2006-2012. % -\def\mydate{July 2012} +\def\mydate{November 2012} \RequirePackage{ifpdf} \ifpdf % We are running pdfTeX in pdf mode @@ -737,7 +737,7 @@ pdfdisplaydoctitle & boolean & false & display document title instead of file name in title bar\\ pdfduplex & text & empty & paper handling option for print dialog\\ pdffitwindow & boolean & false & resize document window to fit document size \\ -pdflang & text & empty & PDF language identifier (RFC 3066)\\ +pdflang & text & relax & PDF language identifier (RFC 3066)\\ pdfmenubar & boolean & true & make PDF viewer's menu bar visible \\ pdfnewwindow & boolean & false & make links that open another PDF file start a new window \\ pdfnonfullscreenpagemode @@ -908,7 +908,7 @@ pdffitwindow & \textit{false} & resize document window to fit docu pdfhighlight & \textit{/I} & set highlighting of PDF links \\ pdfinfo & \textit{empty} & alternative interface for setting document information\\ pdfkeywords & \textit{empty} & text for PDF Keywords field \\ -pdflang & \textit{empty} & PDF language identifier (RFC 3066) \\ +pdflang & \textit{relax} & PDF language identifier (RFC 3066) \\ pdfmark & \textit{false} & an alias for \textsf{dvips} \\ pdfmenubar & \textit{true} & make PDF viewer's menu bar visible \\ pdfnewwindow & \textit{false} & make links that open another PDF \\ diff --git a/Master/texmf-dist/source/latex/hyperref/doc/options.tex b/Master/texmf-dist/source/latex/hyperref/doc/options.tex index 78e37d38775..d3e9d64d379 100644 --- a/Master/texmf-dist/source/latex/hyperref/doc/options.tex +++ b/Master/texmf-dist/source/latex/hyperref/doc/options.tex @@ -18,6 +18,7 @@ \author{Sebastian Rahtz, Heiko Oberdiek et al.} \date{July 28th 2012}% HO \newcommand{\optempty}{{\rmfamily\textit{empty}}} +\newcommand{\optrelax}{{\rmfamily\textit{relax}}} \newcommand*{\for}[1]{{\rmfamily(#1)}} \begin{document} \maketitle @@ -83,7 +84,7 @@ pdffitwindow &resize document window to fit document size&false\\ pdfhighlight &set highlighting of PDF links& /I\\ pdfinfo & alternative interface for document information & \optempty\\ pdfkeywords &text for PDF Keywords field&\optempty\\ -pdflang &PDF language identifier (RFC 3066)&\optempty\\ +pdflang &PDF language identifier (RFC 3066)&\optrelax\\ pdfmenubar &make PDF viewer's menu bar visible&true\\ pdfnewwindow &make links that open another PDF file start a new window&false\\ pdfnonfullscreenpagemode &page mode setting on exiting full-screen mode&\optempty\\ diff --git a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx index 9bfdd062030..abcba9f722f 100644 --- a/Master/texmf-dist/source/latex/hyperref/hyperref.dtx +++ b/Master/texmf-dist/source/latex/hyperref/hyperref.dtx @@ -45,7 +45,7 @@ %<puvnenc>\ProvidesFile{puvnenc.def} %<puarenc>\ProvidesFile{puarenc.def} %<psdextra>\ProvidesFile{psdextra.def} -%<!none> [2012/10/31 v6.83l % +%<!none> [2012/11/06 v6.83m % %<package> Hypertext links for LaTeX] %<nohyperref> Dummy hyperref (SR)] %<driver> Hyperref documentation driver file] @@ -147,7 +147,7 @@ \end{document} %</driver> % \fi -% \CheckSum{39643} +% \CheckSum{39761} % % \MakeShortVerb{|} % \StopEventually{} @@ -706,9 +706,9 @@ % % \begin{macrocode} \ltx@IfUndefined{pdfmatch}{% - \let\Hy@Match\ltx@gobblefour + \def\Hy@Match#1#2#3#4#5{}% }{% - \def\Hy@Match#1#2{% + \def\Hy@Match#1#2#3{% \begingroup \edef\^{\ltx@backslashchar\string^}% \edef\.{\ltx@backslashchar.}% @@ -724,7 +724,7 @@ \edef\}{\ltx@rightbracechar}% \edef\\{\ltx@backslashchar\ltx@backslashchar}% \let\ \ltx@space - \ifcase\pdfmatch{#2}{#1} % + \ifcase\pdfmatch#2{#3}{#1} % \endgroup \expandafter\ltx@secondoftwo \or @@ -733,7 +733,7 @@ \else \Hy@Warning{% Internal error: Wrong pattern!\MessageBreak - --> #2 <--\MessageBreak + --> #3 <--\MessageBreak Pattern check ignored% }% \endgroup @@ -5489,10 +5489,14 @@ \define@key{Hyp}{driverfallback}{% \ifHy@DviMode \def\HyOpt@DriverFallback{#1}% - \Hy@Match\HyOpt@DriverFallback{% + \Hy@Match\HyOpt@DriverFallback{}{% ^(|dvipdfm|dvipdfmx|dvips|dvipsone|dviwindo|hypertex|ps2pdf|% latex2html|tex4ht)$% }{}{% + \Hy@Warning{% + Invalid driver `#1' for option\MessageBreak + `driverfallback'% + }% \let\HyOpt@DriverFallback\ltx@empty }% \fi @@ -6245,7 +6249,7 @@ \let\@pdfpageduration\relax \define@key{Hyp}{pdfpageduration}{% \def\@pdfpageduration{#1}% - \Hy@Match\@pdfpageduration{% + \Hy@Match\@pdfpageduration{}{% ^(|[0-9]+\.?[0-9]*|[0-9]*\.?[0-9]+)$% }{}{% \Hy@Warning{% @@ -6331,7 +6335,7 @@ \define@key{Hyp}{pdfborder}{% \let\Hy@temp\@pdfborder \def\@pdfborder{#1}% - \Hy@Match\@pdfborder{% + \Hy@Match\@pdfborder{}{% ^\HyPat@NonNegativeReal/ % \HyPat@NonNegativeReal/ % \HyPat@NonNegativeReal/% @@ -6348,7 +6352,7 @@ \define@key{Hyp}{pdfborderstyle}{% \let\Hy@temp\@pdfborderstyle \def\@pdfborderstyle{#1}% - \Hy@Match\@pdfborderstyle{% + \Hy@Match\@pdfborderstyle{}{% ^% ( */Type */Border% | */W +\HyPat@NonNegativeReal/% @@ -6718,7 +6722,7 @@ \else \hypercalcbpdef\@pdfremotestartview{#1}% \edef\@pdfremotestartview{\@pdfremotestartview}% - \Hy@Match\@pdfremotestartview{% + \Hy@Match\@pdfremotestartview{}{% ^(XYZ -?(null|\HyPat@NonNegativeReal/) % -?(null|\HyPat@NonNegativeReal/) % (null|\HyPat@NonNegativeReal/)|% @@ -6788,7 +6792,130 @@ \do{TwoPageRight}{PDF 1.5}% } \define@key{Hyp}{pdflang}{% - \def\@pdflang{#1}% + \edef\@pdflang{#1}% + \def\Hy@temp{\relax}% + \ifx\@pdflang\Hy@temp + \let\@pdflang\relax + \fi + \ifx\@pdflang\relax + \else + \ifx\@pdflang\ltx@empty + \else +% \end{macrocode} +% Test according to ABNF of RFC 3066. +% \begin{macrocode} + \Hy@Match\@pdflang{icase}{% + ^% + [a-z]{1,8}% + (-[a-z0-9]{1,8})*% + $% + }{% +% \end{macrocode} +% Test according to ABNF of RFC 5646. +% \begin{macrocode} + \Hy@Match\@pdflang{icase}{% + ^% + (% + % langtag + (% language + [a-z]{2,3}% + ([a-z]{3}(-[a-z]{3}){0,2})?% extlang + |[a-z]{4}% reserved for future use + |[a-z]{5,8}% registered language subtag + )% + (-[a-z]{4})?% script + (-([a-z]{2}|[0-9]{3}))?% region + (-([a-z]{5,8}|[0-9][a-z0-9]{3}))*% variant + (-[0-9a-wyz](-[a-z0-9]{2,8})+)*% extension + (-x(-[a-z0-9]{1,8})+)?% privateuse + % privateuse + |x-([a-z0-9]{1,8})+% + % grandfathered/irregular + |en-GB-oed% + |i-(ami|bnn|default|enochian|hak|klingon|lux|% + mingo|navajo|pwn|tao|tay|tsu)% + |sgn-(BE-FR|BE-NL|CH-DE)% + % grandfathered/regular + |art-lojban% + |cel-gaulish% + |no-(bok|nyn)% + |zh-(guoyu|hakka|min|min-nan|xiang)% + )% + $% + }{% +% \end{macrocode} +% Test for unique extensions. +% \begin{macrocode} + \Hy@Match{-\@pdflang}{icase}{-[a-wyz0-9]-}{% + \Hy@Match\@pdflang{icase}{^x-}{}{% + % remove privateuse + \edef\Hy@temp{-\@pdflang}% + \Hy@Match\Hy@temp{icase}{% + ^% + (% + (-[a-wyz0-9]|-[a-z0-9]{2,8})*% + )% + -x-% + }{% + \edef\Hy@temp{% + \expandafter\strip@prefix\pdflastmatch1% + }% + }{}% + \Hy@Match\Hy@temp{icase}{% + (-[a-wyz0-9]-).*\ltx@backslashchar1% + }{% + \Hy@Warning{% + Invalid language identifier `#1'\MessageBreak + for option `pdflang', because it violates\MessageBreak + well-formedness defined in RFC 4646\MessageBreak + by duplicate singleton subtags% + }% + \let\@pdflang\relax + }{}% + }% + }{}% +% \end{macrocode} +% User-assigned country codes are forbidden in language tags (RFC 3066). +% \begin{macrocode} + \ifx\@pdflang\relax + \else + \Hy@Match\@pdflang{icase}{% + ^% + [a-zA-Z]{2}-% + (% + aa|AA|% + [qQ][m-zM-Z]|% + [xX][a-zA-Z]|% + zz|ZZ% + )% + (-|$)% + }{% + \Hy@Warning{% + Invalid language identifier `#1'\MessageBreak + for option `pdflang' because of invalid country code% + \MessageBreak + in second subtag (RFC 3066)% + }% + \let\@pdflang\relax + }{}% + \fi + }{% + \Hy@Warning{% + Invalid language identifier `#1'\MessageBreak + for option `pdflang', because it violates\MessageBreak + well-formedness defined in RFC 5646% + }% + \let\@pdflang\relax + }% + }{% + \Hy@Warning{% + Invalid language identifier `#1'\MessageBreak + for option `pdflang' (RFC 3066)% + }% + \let\@pdflang\relax + }% + \fi + \fi } \define@key{Hyp}{pdfpagelabels}[true]{% \Hy@boolkey{pdfpagelabels}{#1}% @@ -6820,7 +6947,7 @@ \def\@pdfremotestartview{/Fit} \def\@pdfstartpage{1} \let\@pdfprintpagerange\ltx@empty -\let\@pdflang\ltx@empty +\let\@pdflang\relax \let\PDF@SetupDoc\@empty \let\PDF@FinishDoc\@empty \let\phantomsection\@empty @@ -7753,7 +7880,7 @@ \edef\Hy@href@nextactionraw{#1}% \ifx\Hy@href@nextactionraw\@empty \else - \Hy@Match\Hy@href@nextactionraw{% + \Hy@Match\Hy@href@nextactionraw{}{% ^(\HyPat@ObjRef/|<<.*/S[ /].+>>|% \[( ?\HyPat@ObjRef/|<<.*/S[ /].+>>)+ ?])$% }{}{% @@ -9202,7 +9329,7 @@ \define@key{Field}{borderstyle}{% \let\Hy@temp\Fld@borderstyle \def\Fld@borderstyle{#1}% - \Hy@Match\Fld@borderstyle{% + \Hy@Match\Fld@borderstyle{}{% ^[SDBIU]$% }{}{% \Hy@Warning{% @@ -12595,13 +12722,25 @@ \else \ifx\\#3\\% \ifx\Hy@temp@A\HyInd@ParenRight + \HyInd@DefKey{#1}% + \ltx@IfUndefined{HyInd@(\HyInd@key)}{% + \let\Hy@temp\ltx@empty + }{% + \expandafter\let\expandafter\Hy@temp + \csname HyInd@(\HyInd@key)\endcsname + }% \protected@write\@indexfile{}{% - \string\indexentry{#1|#2}{\thepage}% + \string\indexentry{#1|#2\Hy@temp}{\thepage}% }% \else \protected@write\@indexfile{}{% \string\indexentry{#1|#2hyperpage}{\thepage}% }% + \HyInd@DefKey{#1}% + \expandafter + \gdef\csname HyInd@(\HyInd@key)\endcsname{% + hyperpage% + }% \fi \else \protected@write\@indexfile{}{% @@ -12609,9 +12748,24 @@ #1|#2hyperindexformat{/#3}% }{\thepage}% }% + \ifx\Hy@temp@A\HyInd@ParenLeft + \HyInd@DefKey{#1}% + \expandafter + \gdef\csname HyInd@(\HyInd@key)\endcsname{% + hyperindexformat{/#3}% + }% + \fi \fi \fi }% + \def\HyInd@DefKey#1{% + \begingroup + \let\protect\@unexpandable@protect + \edef\Hy@temp{#1}% + \ltx@onelevel@sanitize\Hy@temp + \global\let\HyInd@key\Hy@temp + \endgroup + }% \fi }% \fi @@ -13876,7 +14030,7 @@ /ViewerPreferences<<\Hy@temp>>% \fi \Hy@UseNameKey{PageLayout}\@pdfpagelayout - \ifx\@pdflang\@empty + \ifx\@pdflang\relax \else /Lang(\@pdflang)% \fi @@ -14628,7 +14782,7 @@ /ViewerPreferences<<\Hy@temp>>% \fi \Hy@UseNameKey{PageLayout}\@pdfpagelayout - \ifx\@pdflang\@empty + \ifx\@pdflang\relax \else /Lang(\@pdflang)% \fi @@ -15120,7 +15274,7 @@ /ViewerPreferences<<\Hy@temp>>% \fi \Hy@UseNameKey{PageLayout}\@pdfpagelayout - \ifx\@pdflang\@empty + \ifx\@pdflang\relax \else /Lang(\@pdflang)% \fi @@ -16395,7 +16549,7 @@ /ViewerPreferences<<\Hy@temp>>% \fi \Hy@UseNameKey{PageLayout}\@pdfpagelayout - \ifx\@pdflang\@empty + \ifx\@pdflang\relax \else /Lang(\@pdflang)% \fi @@ -17538,7 +17692,7 @@ /ViewerPreferences<<\Hy@temp>>% \fi \Hy@UseNameKey{PageLayout}\@pdfpagelayout - \ifx\@pdflang\@empty + \ifx\@pdflang\relax \else /Lang(\@pdflang)% \fi |