diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/oberdiek/accsupp.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/oberdiek/accsupp.sty | 100 |
1 files changed, 68 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/oberdiek/accsupp.sty b/Master/texmf-dist/tex/latex/oberdiek/accsupp.sty index 14d38a33f10..a26caed005b 100644 --- a/Master/texmf-dist/tex/latex/oberdiek/accsupp.sty +++ b/Master/texmf-dist/tex/latex/oberdiek/accsupp.sty @@ -26,33 +26,54 @@ %% and the derived files %% accsupp.sty, accsupp.pdf, accsupp.ins, accsupp.drv, %% accsupp-pdftex.def, accsupp-dvipdfm.def, accsupp-dvips.def, -%% accsupp-example.tex. +%% accsupp-example1.tex, accsupp-example2.tex, +%% accsupp-test1.tex. %% +\begingroup + \catcode123 1 % { + \catcode125 2 % } + \def\x{\endgroup + \expandafter\edef\csname ACCSUPP@AtEnd\endcsname{% + \catcode35 \the\catcode35\relax + \catcode64 \the\catcode64\relax + \catcode123 \the\catcode123\relax + \catcode125 \the\catcode125\relax + }% + }% +\x +\catcode35 6 % # +\catcode64 11 % @ +\catcode123 1 % { +\catcode125 2 % } +\def\TMP@EnsureCode#1#2{% + \edef\ACCSUPP@AtEnd{% + \ACCSUPP@AtEnd + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\TMP@EnsureCode{10}{12}% ^^J +\TMP@EnsureCode{33}{12}% ! +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{42}{12}% * +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{60}{12}% < +\TMP@EnsureCode{61}{12}% = +\TMP@EnsureCode{62}{12}% > +\TMP@EnsureCode{94}{7}% ^ (superscript) +\TMP@EnsureCode{96}{12}% ` +\TMP@EnsureCode{254}{12}% ^^fe +\TMP@EnsureCode{255}{12}% ^^ff +\g@addto@macro\ACCSUPP@AtEnd{\endinput} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{accsupp}% - [2007/03/21 v0.1 Accessibility support by marked content (HO)]% -\edef\ACCSUPP@end{% - \catcode39 \the\catcode39 % ' - \catcode40 \the\catcode40 % ( - \catcode41 \the\catcode41 % ) - \catcode60 \the\catcode60 % < - \catcode61 \the\catcode61 % = - \catcode62 \the\catcode62 % > - \catcode94 \the\catcode94 % ^ - \catcode96 \the\catcode96 % ` - \catcode254 \the\catcode254 % ^^FE - \catcode255 \the\catcode255 % ^^FF -} -\@makeother\( -\@makeother\) -\@makeother\' -\@makeother\< -\@makeother\= -\@makeother\> -\catcode94 = 7 % -\@makeother\` -\@makeother\^^fe -\@makeother\^^ff + [2007/11/14 v0.2 Accessibility support by marked content (HO)] \RequirePackage{pdfescape}[2007/02/25] \RequirePackage{ifpdf} \RequirePackage{ifxetex} @@ -65,11 +86,11 @@ \@dblarg\ACCSUPP@@DefineDriverKey } \def\ACCSUPP@@DefineDriverKey[#1]#2{% - \define@key{ActTxt}{#2}[]{% + \define@key{ACCSUPP}{#2}[]{% \def\ACCSUPP@driver{#1}% }% \g@addto@macro\ACCSUPP@DisableOptions{% - \DisableKeyvalOption{ActTxt}{#2}% + \DisableKeyvalOption{ACCSUPP}{#2}% }% } \let\ACCSUPP@DisableOptions\@empty @@ -79,6 +100,7 @@ \ACCSUPP@DefineDriverKey{dvipdfm} \ACCSUPP@DefineDriverKey[dvipdfm]{dvipdfmx} \ACCSUPP@DefineDriverKey[dvipdfm]{xetex} +\let\ACCSUPP@driver\relax \InputIfFileExists{accsupp.cfg}{}{} \providecommand*{\ActualTextDriverDefault}{dvips} \ifpdf @@ -87,7 +109,9 @@ \ifxetex \def\ACCSUPP@driver{dvipdfm}% \else - \let\ACCSUPP@driver\BookmarkDriverDefault + \ifx\ACCSUPP@driver\relax + \let\ACCSUPP@driver\ActualTextDriverDefault + \fi \fi \fi \ProcessKeyvalOptions* @@ -107,7 +131,7 @@ Wrong driver, pdfTeX is not running in PDF mode.\MessageBreak Package loading is aborted% }\@ehc - \expandafter\expandafter\expandafter\endinput + \expandafter\expandafter\expandafter\ACCSUPP@AtEnd \fi \def\ACCSUPP@temp{dvipdfm}% \ifxetex @@ -121,12 +145,19 @@ \fi \fi \fi +\ifx\ACCSUPP@driver\relax + \PackageError{accsupp}{% + Missing driver option.\MessageBreak + Package loading is aborted% + }\@ehc + \expandafter\ACCSUPP@AtEnd +\fi \InputIfFileExists{accsupp-\ACCSUPP@driver.def}{}{% \PackageError{accsupp}{% Unsupported driver `\ACCSUPP@driver'.\MessageBreak Package loading is aborted% }\@ehc - \endinput + \ACCSUPP@AtEnd } \DeclareBoolOption{unicode} \DeclareStringOption[page]{pdfliteral} @@ -223,7 +254,7 @@ }% } \def\ACCSUPP@method@pdfstringdef#1{% - \ifActText@unicode + \ifACCSUPP@unicode \@ifundefined{hypersetup}{}{% \hypersetup{unicode}% }% @@ -234,11 +265,16 @@ }\@ehc \let\ACCSUPP@temp\@empty }{% - \pdfstringdef\ACCSUPP@temp#1% + \begingroup + \setbox0=\hbox{% + \pdfstringdef\ACCSUPP@temp#1% + \global\let\ACCSUPP@temp\ACCSUPP@temp + }% + \endgroup }% \edef#1{(\ACCSUPP@temp)}% } -\ACCSUPP@end +\ACCSUPP@AtEnd \endinput %% %% End of file `accsupp.sty'. |