diff options
Diffstat (limited to 'macros/jptex/latex/pxbase/pxbasenc.def')
-rw-r--r-- | macros/jptex/latex/pxbase/pxbasenc.def | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/macros/jptex/latex/pxbase/pxbasenc.def b/macros/jptex/latex/pxbase/pxbasenc.def index df54e082bf..0877b55be4 100644 --- a/macros/jptex/latex/pxbase/pxbasenc.def +++ b/macros/jptex/latex/pxbase/pxbasenc.def @@ -4,7 +4,7 @@ %% file declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesFile{pxbasenc.def}[2021/05/31 v1.3 PX encoding library] +\ProvidesFile{pxbasenc.def}[2023/02/25 v1.4 PX encoding library] \def\pxec@pkgname{PXbase} % bundle name %% code guards @@ -495,20 +495,29 @@ % \UTF & \CID require the current encoding to be the standard one, thus % they won't work well along with packages that change Japanese encoding % (pxfontenc, pxbabel, etc.). This patch resolves this problem. -\providecommand*\pxBDHookEncSwitchOTF{\pxec@bdhook@encswotf@do} -\@onlypreamble\pxec@bdhook@encswotf@do -\def\pxec@bdhook@encswotf@do{% - \AtBeginDocument{% +\@onlypreamble\pxBDHookEncSwitchOTF +\providecommand*\pxBDHookEncSwitchOTF{% + \global\let\pxBDHookEncSwitchOTF\@empty % nullify + \AtBeginDocument{\pxec@encswotf@do}} +\@onlypreamble\pxEncSwitchOTF +\providecommand*\pxEncSwitchOTF{% + \pxec@encswotf@do} +\@onlypreamble\pxec@encswotf@do +\def\pxec@encswotf@do{% + \let\pxec@JYn\@undefined \@ifpackageloaded{otf}{\let\pxec@JYn\otf@JYn}{}% \@ifpackageloaded{utf}{\let\pxec@JYn\utf@JYn}{}% \ifx\pxec@JYn\@undefined\else + \let\pxec@encswotf@do\relax % hook at the \set@character invocation, so that encoding will % be forced to be the standard one \long\def\set@character{% \long, as the original is \afterassignment\pxec@put@character\@tempcnta}% \def\pxec@put@character{\kanjiencoding{\pxec@JYn}\put@character}% + \long\def\set@character@{% + \afterassignment\pxec@put@character@\@tempcnta}% + \def\pxec@put@character@{\kanjiencoding{\pxec@JYn}\put@character@}% \fi}% - \let\pxBDHookEncSwitchOTF\@empty}% nullify %--------------------------------------- all done \pxec@restore@codes |