From b7c959ab679d0c4d215d107e70832ba79a6e7c76 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Jun 2021 20:05:04 +0000 Subject: pxjahyper (7jun21) git-svn-id: svn://tug.org/texlive/trunk@59508 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/platex/pxjahyper/pxjahyper-ajm.def | 2 +- .../tex/platex/pxjahyper/pxjahyper-enc.sty | 2 +- .../tex/platex/pxjahyper/pxjahyper-uni.def | 2 +- .../texmf-dist/tex/platex/pxjahyper/pxjahyper.sty | 209 ++++++++++----------- 4 files changed, 106 insertions(+), 109 deletions(-) (limited to 'Master/texmf-dist/tex/platex') diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def index 976439c0ffa..cb8cbd28af4 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-ajm.def @@ -11,7 +11,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesFile{pxjahyper-ajm.def}[2021/05/29 v0.9b] +\ProvidesFile{pxjahyper-ajm.def}[2021/06/06 v0.9c] %% avoid multiple loading \csname pxjahyperajmLoaded\endcsname diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty index fc33bc6fa36..f51dc75e783 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-enc.sty @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper-enc}[2021/05/29 v0.9b] +\ProvidesPackage{pxjahyper-enc}[2021/06/06 v0.9c] \def\pxhe@pkgname{pxjahyper-enc} \providecommand{\bxDebug}[1]{} diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def index 54671ca1909..c05b0369f7d 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper-uni.def @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesFile{pxjahyper-uni.def}[2021/05/29 v0.9b] +\ProvidesFile{pxjahyper-uni.def}[2021/06/06 v0.9c] \providecommand{\bxDebug}[1]{} %--------------------------------------- environment check diff --git a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty index f23d94a2231..486792b8d7e 100644 --- a/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty +++ b/Master/texmf-dist/tex/platex/pxjahyper/pxjahyper.sty @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper}[2021/05/29 v0.9b] +\ProvidesPackage{pxjahyper}[2021/06/06 v0.9c] \def\pxhy@pkgname{pxjahyper} \providecommand{\bxDebug}[1]{} @@ -384,6 +384,59 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \def\pxhy@if@opt@b#1#2]{#1{#2}} \fi +%--------------------------------------- Load bxjatoucs + +%% \pxhy@bxjatoucs@failure +% Holds the reason message if bxjatoucs is unavailable; +% otherwise equals to \relax. +\@onlypreamble\pxhy@bxjatoucs@failure +\let\pxhy@bxjatoucs@failure\relax + +%% \pxhy@try@load@bxjatoucs +% Tries to load bxjatoucs. If it failed, then it sets the reason +% message to \pxhy@bxjatoucs@failure. +\@onlypreamble\pxhy@try@load@bxjatoucs +\def\pxhy@try@load@bxjatoucs{% + \global\let\pxhy@try@load@bxjatoucs\relax + \ifpxhy@etoolbox + % load bxjatoucs in "check mode" + \IfFileExists{bxjatoucs.sty}{% + \let\bxjatoucsCheckAvail=t + \RequirePackage{bxjatoucs}[] + \undef\bxjatoucsCheckAvail + }{} + % and judge availability + \ifundef\bxjaCidToUcs{% + \def\pxhy@bxjatoucs@failure{% + package 'bxjatoucs' is unavailable% + }% + }{} + \else\ifpxhy@etex + \def\pxhy@bxjatoucs@failure{% + package 'etoolbox' is unavailable% + } + \else + \def\pxhy@bxjatoucs@failure{% + e-TeX extension is unavailable% + } + \fi\fi +} + +\@tempswafalse +\ifpxhy@uptex\else\ifpxhy@hy@unicode + \pxhy@try@load@bxjatoucs + \ifx\pxhy@bxjatoucs@failure\relax\else + \@tempswatrue + \fi +\fi\fi +\if@tempswa + \PackageError\pxhy@pkgname + {The hyperref 'unicode' mode is not supported\MessageBreak + because \pxhy@bxjatoucs@failure}% + {\pxhy@eh@fatal}% + \expandafter\endinput +\fi + %--------------------------------------- Output 'tounicode' special \ifpxhy@tounicode @@ -711,35 +764,11 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% %--------------------------------------- Support for 'otfcid' \ifpxhy@otfcid -%% \pxhy@otfcid@disabled -% Holds the message if otfcid/otfmacros is unavailable; -% otherwise equals to \relax. -\@onlypreamble\pxhy@otfcid@disabled -\let\pxhy@otfcid@disabled\relax -\ifpxhy@etoolbox - % check if bxjatoucs is available - \IfFileExists{bxjatoucs.sty}{% - \let\bxjatoucsCheckAvail=t - \RequirePackage{bxjatoucs}[] - \undef\bxjatoucsCheckAvail - }{} - \ifundef\bxjaCidToUcs{% - \def\pxhy@otfcid@disabled{% - package 'bxjatoucs' is unavailable% - }% - }{} -\else\ifpxhy@etex - \def\pxhy@otfcid@disabled{% - package 'etoolbox' is unavailable% - } -\else - \def\pxhy@otfcid@disabled{% - e-TeX extension is unavailable% - } -\fi\fi +%% packages +\pxhy@try@load@bxjatoucs %% annihilate the ajmacros's own pdfstring process -\ifpxhy@otfmacros\ifx\pxhy@otfcid@disabled\relax +\ifpxhy@otfmacros\ifx\pxhy@bxjatoucs@failure\relax \let\ajRedefine@ajCommands\relax \fi\fi @@ -773,14 +802,14 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \@onlypreamble\pxhy@dispatch@otfcid \def\pxhy@dispatch@otfcid{% \global\let\pxhy@dispatch@otfcid\relax - \ifx\pxhy@otfcid@disabled\relax % available! + \ifx\pxhy@bxjatoucs@failure\relax % available! \pdfstringdefDisableCommands{% \let\CID\pxhy@CID }% \else \PackageWarningNoLine\pxhy@pkgname {Option 'otfcid'/'otfmacros' is disabled, because\MessageBreak - \pxhy@otfcid@disabled}% + \pxhy@bxjatoucs@failure}% \pxhy@otfcidfalse \fi } @@ -789,7 +818,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \@onlypreamble\pxhy@dispatch@otfmacros \def\pxhy@dispatch@otfmacros{% \global\let\pxhy@dispatch@otfmacros\relax - \ifx\pxhy@otfcid@disabled\relax % available! + \ifx\pxhy@bxjatoucs@failure\relax % available! \let\ajRedefine@ajCommands\relax \chardef\pxhy@tmp@orgcc=\catcode`\@ \makeatletter @@ -989,7 +1018,7 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \pxDeclarePdfTextCommand{\textcent}{2171}{00A2} \pxDeclarePdfTextCommand{\textsterling}{2172}{00A3} \pxDeclarePdfTextCommand{\textcurrency}{}{00A4} -\pxDeclarePdfTextCommand{\textyen}{}{00A5} +\pxDeclarePdfTextCommand{\textyen}{216F}{00A5} \pxDeclarePdfTextCommand{\textbrokenbar}{}{00A6} \pxDeclarePdfTextCommand{\textsection}{2178}{00A7} \pxDeclarePdfTextCommand{\textasciidieresis}{212F}{00A8} @@ -1089,27 +1118,19 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% %% %%[B] Aliases to [A]. -%\pxDeclarePdfTextCommand{\copyright}{}{00A9} \pxDeclarePdfTextCommand{\textflqq}{}{00AB} -\pxDeclarePdfTextCommand{\flqq}{}{00AB} \pxDeclarePdfTextCommand{\textneg}{224C}{00AC} \pxDeclarePdfTextCommand{\textpm}{215E}{00B1} \pxDeclarePdfTextCommand{\textcdot}{}{00B7} \pxDeclarePdfTextCommand{\textfrqq}{}{00BB} -\pxDeclarePdfTextCommand{\frqq}{}{00BB} \pxDeclarePdfTextCommand{\texttimes}{215F}{00D7} \pxDeclarePdfTextCommand{\textdiv}{2160}{00F7} \pxDeclarePdfTextCommand{\textgrq}{2146}{2018} \pxDeclarePdfTextCommand{\textglq}{}{201A} -\pxDeclarePdfTextCommand{\textquotesinglbase}{}{201A} \pxDeclarePdfTextCommand{\textgrqq}{2148}{201C} -\pxDeclarePdfTextCommand{\crqq}{2148}{201C} \pxDeclarePdfTextCommand{\textglqq}{}{201E} -\pxDeclarePdfTextCommand{\clqq}{}{201E} -\pxDeclarePdfTextCommand{\textquotedblbase}{}{201E} \pxDeclarePdfTextCommand{\textflq}{}{2039} \pxDeclarePdfTextCommand{\textfrq}{}{203A} -\pxDeclarePdfTextCommand{\textEuro}{}{20AC} \pxDeclarePdfTextCommand{\guillemetleft}{}{00AB} \pxDeclarePdfTextCommand{\guillemetright}{}{00BB} %% @@ -1328,77 +1349,53 @@ pxhy@textcmd = \ifpxhy@textcmd true\else false\fi^^J% \fi % %%%%%%%%%%%%%%%%%%%% done +\ifpxhy@textcmd %<*textcmd> + + %% \pxhy@disable@tc@commands + \def\pxhy@disable@tc@commands{% + \let\yen\textyen + \let\copyright\textcopyright + \let\flqq\textflqq + \let\frqq\textfrqq + \let\textquotesinglbase\quotesinglbase + \let\crqq\textglqq + \let\clqq\textgrqq + \let\textquotedblbase\quotedblbase + \let\textEuro\texteuro + } + %% register to 'disable' list + \ltx@GlobalPrependToMacro\pdfstringdefPreHook{\pxhy@disable@tc@commands} + + \ifpxhy@hy@unicode %<*unicode> + + %% supplementary definitions + \def\pxhy@next#1#2{% + \expandafter\ifx\csname PU\string#1\endcsname\relax + \DeclareTextCommand{#1}{PU}{#2}\fi} + \pxhy@next{\guillemetleft}{\80\253}%00AB + \pxhy@next{\guillemetright}{\80\273}%00BB + \pxhy@next{\textborn}{\9046\005}%2605 + \pxhy@next{\textfinalsigma}{\83\302}%03C2 + \pxhy@next{\textxgeq}{\9042\145}%2265 + \pxhy@next{\textxleq}{\9042\144}%2264 + + \fi % +\fi % + %--------------------------------------- Enable hyperref unicode \ifpxhy@hy@unicode -%% check the current meaning -\def\pxhy@tmpa#1{\@backslashchar 000#1} -\ifx\HyPsd@Char\pxhy@tmpa -\PackageInfo\pxhy@pkgname - {The setup for hyperref 'unicode' is applied.\@gobbletwo} - -%% The following code is taken from hyperref.sty. -%%%%BEGIN - \def\HyPsd@Char#1{% - \ifnum`#1<128 % - \@backslashchar 000#1% - \else - \ifnum`#1<65536 % - \expandafter\HyPsd@CharTwoByte\number`#1!% - \else - \expandafter\expandafter\expandafter\HyPsd@CharSurrogate - \intcalcSub{`#1}{65536}!% - \fi - \fi - }% - \def\HyPsd@CharTwoByte#1!{% - \expandafter\expandafter\expandafter\HyPsd@CharOctByte - \IntCalcDiv#1!256!!% - \expandafter\expandafter\expandafter\HyPsd@CharOctByte - \IntCalcMod#1!256!!% - }% - \def\HyPsd@CharOctByte#1!{% - \@backslashchar - \IntCalcDiv#1!64!% - \intcalcDiv{\IntCalcMod#1!64!}{8}% - \IntCalcMod#1!8!% - }% - \def\HyPsd@CharSurrogate#1!{% - \@backslashchar 33% - \IntCalcDiv#1!262144!% - \expandafter\expandafter\expandafter\HyPsd@CharOctByte - \intcalcDiv{\IntCalcMod#1!262144!}{1024}!% - \@backslashchar 33% - \expandafter\expandafter\expandafter\IntCalcAdd - \intcalcDiv{\IntCalcMod#1!1024!}{256}!4!% - \expandafter\expandafter\expandafter\HyPsd@CharOctByte - \IntCalcMod#1!256!!% - }% -%%%%END +%% load the submodule +\input{pxjahyper-uni.def} +\ifx t\pxHyperrefUnicodePatched + \PackageInfo\pxhy@pkgname + {The setup for hyperref 'unicode' is applied.\@gobbletwo} +\else + \PackageInfo\pxhy@pkgname + {The setup for hyperref 'unicode' is NOT applied!\MessageBreak + The package might not work properly.\@gobbletwo} \fi -\ifpxhy@uptex\else %<*pTeX> - \RequirePackage{bxjatoucs}[] - \def\HyPsd@Char#1{% - \ifnum`#1<128 % - \@backslashchar 000#1% - \else\ifnum`#1<256 % - \expandafter\HyPsd@CharTwoByte\number`#1!% - \else - \expandafter\HyPsd@CharTwoByte\number\pxhy@to@ucs{`#1}!% - \fi\fi - }% - \def\pxhy@to@ucs#1{"FFFD} - \ifnum\jis"2121="8140 % sjis - \let\pxhy@to@ucs\bxjaSjisToUcs - \else\ifnum\jis"2121="A1A1 % euc - \let\pxhy@to@ucs\bxjaEucToUcs - \fi\fi -\fi % - -%% disable the verification of bxjscls -\let\jsCheckHyperrefUnicode\@empty - \fi %--------------------------------------- 'jacommentline' \ifpxhy@jacommentline -- cgit v1.2.3