From 8c6ca435b3bc584eb3efe8e52417fb989e677789 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 14 Feb 2021 03:00:50 +0000 Subject: CTAN sync 202102140300 --- language/japanese/pxjahyper/LICENSE | 2 +- language/japanese/pxjahyper/README-ja.md | 4 + language/japanese/pxjahyper/README.md | 1 + language/japanese/pxjahyper/pxjahyper-ajm.def | 4 +- language/japanese/pxjahyper/pxjahyper-enc.sty | 4 +- language/japanese/pxjahyper/pxjahyper.pdf | Bin 116641 -> 116383 bytes language/japanese/pxjahyper/pxjahyper.sty | 141 ++++++++++++++------------ language/japanese/pxjahyper/pxjahyper.tex | 4 +- 8 files changed, 89 insertions(+), 71 deletions(-) (limited to 'language/japanese/pxjahyper') diff --git a/language/japanese/pxjahyper/LICENSE b/language/japanese/pxjahyper/LICENSE index 5ff0288550..58cd49d31d 100644 --- a/language/japanese/pxjahyper/LICENSE +++ b/language/japanese/pxjahyper/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2012-2020 Takayuki YATO (aka. "ZR") +Copyright (c) 2012-2021 Takayuki YATO (aka. "ZR") Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/language/japanese/pxjahyper/README-ja.md b/language/japanese/pxjahyper/README-ja.md index f9126c84ed..6466183123 100644 --- a/language/japanese/pxjahyper/README-ja.md +++ b/language/japanese/pxjahyper/README-ja.md @@ -70,6 +70,10 @@ pxjahyper-enc パッケージ ー 文字コード設定 更新履歴 -------- + * Version 0.7 〈2021/02/13〉 + - 「upLaTeX での hyperref の `unicode` 指定への対応」を正式サポート + の扱いとする。一部の正常動作しなかった機能についても対応させる。 + * Version 0.6a 〈2020/10/10〉 - pxjahyper-enc:`dvips` 指定時はエラーでなく警告を出す。 diff --git a/language/japanese/pxjahyper/README.md b/language/japanese/pxjahyper/README.md index 476d97749e..e0fcf3072d 100644 --- a/language/japanese/pxjahyper/README.md +++ b/language/japanese/pxjahyper/README.md @@ -52,6 +52,7 @@ the PDF strings in the output DVI file. Revision History ---------------- + * Version 0.7 〈2021/02/13〉 * Version 0.6a 〈2020/10/10〉 * Version 0.6 〈2020/10/05〉 * Version 0.5b 〈2020/10/04〉 diff --git a/language/japanese/pxjahyper/pxjahyper-ajm.def b/language/japanese/pxjahyper/pxjahyper-ajm.def index b4b00f5d79..ff6683c71c 100644 --- a/language/japanese/pxjahyper/pxjahyper-ajm.def +++ b/language/japanese/pxjahyper/pxjahyper-ajm.def @@ -1,7 +1,7 @@ %% %% This is file 'pxjahyper-ajm.def'. %% -%% Copyright (c) 2012-2020 Takayuki YATO (aka. "ZR") +%% Copyright (c) 2012-2021 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r %% @@ -11,7 +11,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesFile{pxjahyper-ajm.def}[2020/10/10 v0.6] +\ProvidesFile{pxjahyper-ajm.def}[2021/02/13 v0.7] %% avoid multiple loading \csname pxjahyperajmLoaded\endcsname diff --git a/language/japanese/pxjahyper/pxjahyper-enc.sty b/language/japanese/pxjahyper/pxjahyper-enc.sty index 3b9583a766..b8724de638 100644 --- a/language/japanese/pxjahyper/pxjahyper-enc.sty +++ b/language/japanese/pxjahyper/pxjahyper-enc.sty @@ -1,7 +1,7 @@ %% %% This is file 'pxjahyper-enc.sty'. %% -%% Copyright (c) 2012-2020 Takayuki YATO (aka. "ZR") +%% Copyright (c) 2012-2021 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r %% @@ -10,7 +10,7 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper-enc}[2020/10/10 v0.6a] +\ProvidesPackage{pxjahyper-enc}[2021/02/13 v0.7] \def\pxhe@pkgname{pxjahyper-enc} \providecommand{\bxDebug}[1]{} diff --git a/language/japanese/pxjahyper/pxjahyper.pdf b/language/japanese/pxjahyper/pxjahyper.pdf index 74f354527f..a4ce575c7f 100644 Binary files a/language/japanese/pxjahyper/pxjahyper.pdf and b/language/japanese/pxjahyper/pxjahyper.pdf differ diff --git a/language/japanese/pxjahyper/pxjahyper.sty b/language/japanese/pxjahyper/pxjahyper.sty index 9a89a338ef..f7a8699dc4 100644 --- a/language/japanese/pxjahyper/pxjahyper.sty +++ b/language/japanese/pxjahyper/pxjahyper.sty @@ -1,7 +1,7 @@ %% %% This is file 'pxjahyper.sty'. %% -%% Copyright (c) 2012-2020 Takayuki YATO (aka. "ZR") +%% Copyright (c) 2012-2021 Takayuki YATO (aka. "ZR") %% GitHub: https://github.com/zr-tex8r %% Twitter: @zr_tex8r %% @@ -10,34 +10,32 @@ %% package declaration \NeedsTeXFormat{pLaTeX2e} -\ProvidesPackage{pxjahyper}[2020/10/10 v0.6a] +\ProvidesPackage{pxjahyper}[2021/02/13 v0.7] +\def\pxhy@pkgname{pxjahyper} +\providecommand{\bxDebug}[1]{} + +%--------------------------------------- Preparations %% error messages -\def\pxhy@pkgname{pxjahyper} -\def\pxhy@warn{\PackageWarningNoLine\pxhy@pkgname} \def\pxhy@error{\PackageError\pxhy@pkgname} -\@onlypreamble\pxhy@fatal -\def\pxhy@fatal#1#2{% - \PackageError\pxhy@pkgname - {#1}% - {#2Package loading is aborted right now.}% +\@onlypreamble\pxhy@eh@fatal +\def\pxhy@eh@fatal{% + Package loading is aborted right now.\MessageBreak\@ehc } -\providecommand{\bxDebug}[1]{} %% packages \RequirePackage{ltxcmds}[2011/08/22]% v1.21 -%% globals +%% variables \newif\ifpxhy@ptex \newif\ifpxhy@uptex \newif\ifpxhy@etex \newif\ifpxhy@etoolbox \newif\ifpxhy@new@hook@system -\let\pxhy@jcode\@undefined \newif\ifpxhy@tounicode \newif\ifpxhy@zerox \newif\ifpxhy@bigcode -\let\pxhy@bigcode\relax +\let\pxhy@bigcode@given\relax \chardef\pxhy@driver@none=0 \chardef\pxhy@driver@dvipdfmx=1 \let\pxhy@driver\@undefined @@ -76,11 +74,13 @@ \DeclareOption{noout2uni}{% \pxhy@zeroxfalse } +\pxhy@bigcodetrue \DeclareOption{bigcode}{% - \let\pxhy@bigcode=t% + \pxhy@bigcodetrue + \let\pxhy@bigcode@given=t } \DeclareOption{nobigcode}{% - \let\pxhy@bigcode=f% + \pxhy@bigcodefalse } \DeclareOption{jacommentline}{% \pxhy@jacommentlinetrue @@ -119,7 +119,8 @@ %% The hyperref package must be loaded in advance. \@ifpackageloaded{hyperref}{}{%else - \pxhy@fatal{'hyperref' not yet loaded}{}% + \pxhy@error{Package 'hyperref' is not yet loaded} + {\pxhy@eh@fatal}% \endinput } @@ -136,8 +137,8 @@ \fi \ifnum0\ifpxhy@hy@unicode1\fi\if@tempswa1\fi=1 \PackageError\pxhy@pkgname - {You must not change the encoding setting (e.g.\MessageBreak - 'unicode) of hyperref after pxjahyper is loaded}% + {You must not change the encoding setting of hyperref\MessageBreak + (e.g. 'unicode') after pxjahyper is loaded}% {\@ehc}% \fi } @@ -166,47 +167,31 @@ \pxhy@check\kanjiskip{\pxhy@ptextrue} \pxhy@check\forcecjktoken{\pxhy@uptextrue} \ifpxhy@ptex\else - \pxhy@fatal{Unknown engine used!!!}{} + \pxhy@error{Unknown engine used}% + {\pxhy@eh@fatal} \expandafter\endinput \fi %% Check for the new hook system. \@ifl@t@r\fmtversion{2020/10/01}{\pxhy@new@hook@systemtrue}{} -%% Check the internal jcode. -\ifnum \jis"2121="8140 - \let\pxhy@jcode=s\relax -\else\ifnum\jis"2121="A1A1 - \let\pxhy@jcode=e\relax -\else\ifnum\jis"2121="3000 - \let\pxhy@jcode=u\relax -\fi\fi\fi -\ifx\pxhy@jcode\@undefined - \pxhy@fatal{Unknown internal kanji code!!!}{} - \expandafter\endinput -\fi - %% adjustment % upTeX not in unicode is not seen as upTeX. -\if u\pxhy@jcode\else +\ifnum\jis"2121="3000 \else \pxhy@uptexfalse \fi % out2uni cannot be used with upTeX. \ifpxhy@uptex \ifpxhy@zerox - \pxhy@warn{out2uni is invalid in upTeX} + \PackageWarningNoLine\pxhy@pkgname + {out2uni is invalid in upTeX} \pxhy@zeroxfalse \fi\fi % bigcode cannot be used without upTeX. -\if t\pxhy@bigcode - \ifpxhy@uptex - \pxhy@bigcodetrue - \else - \pxhy@warn{bigcode is invalid without upTeX} - \fi -\else\if f\pxhy@bigcode -\else - \ifpxhy@uptex - \pxhy@bigcodetrue +\ifpxhy@bigcode \ifpxhy@uptex\else + \pxhy@bigcodefalse + \ifx t\pxhy@bigcode@given + \PackageWarningNoLine\pxhy@pkgname + {bigcode is invalid without upTeX} \fi \fi\fi % out2uni disables tounicode. @@ -215,7 +200,10 @@ \fi % hyperref 'unicode' is allowed only on upLaTeX. \ifnum0\ifpxhy@hy@unicode\ifpxhy@uptex\else1\fi\fi>\z@ - \pxhy@fatal{hyperref 'unicode' mode is not supported}{}% + \PackageError\pxhy@pkgname + {The hyperref 'unicode' mode is not supported\MessageBreak + on the pTeX engine}% + {\pxhy@eh@fatal}% \expandafter\endinput \fi % otfmacros forces use of otfcid. @@ -238,7 +226,8 @@ pxhy@uptex = \ifpxhy@uptex true\else false\fi^^J% pxhy@etex = \ifpxhy@etex true\else false\fi^^J% pxhy@etoolbox = \ifpxhy@etoolbox true\else false\fi^^J% pxhy@new@hook@system = \ifpxhy@new@hook@system true\else false\fi^^J% -pxhy@jcode = \meaning\pxhy@jcode^^J% +ifpxhy@hy@unicode = \ifpxhy@hy@unicode true\else false\fi^^J% +pxhy@bigcode = \ifpxhy@bigcode true\else false\fi^^J% pxhy@tounicode = \ifpxhy@tounicode true\else false\fi^^J% pxhy@zerox = \ifpxhy@zerox true\else false\fi^^J% pxhy@driver = \the\pxhy@driver^^J% @@ -248,10 +237,10 @@ pxhy@driver = \the\pxhy@driver^^J% %% unique tokens \def\pxhy@end{\pxhy@end@} +\def\pxhy@mt{\pxhy@mt@} \let\pxhy@mk\indent % unexpandable %% \pxhy@begin@dvi@hook{} -%% \pxhy@begin@dvi@enc@hook{} \ifpxhy@new@hook@system \def\pxhy@begin@dvi@hook#1{% \AddToHook{shipout/firstpage}{#1}% @@ -351,10 +340,15 @@ pxhy@driver = \the\pxhy@driver^^J% %--------------------------------------- Hooks to pdfstringdef +%% constants \def\pxhy@uc@REPL{FFFD} \def\pxhy@uc@XNAC{FDD1} % not-a-char codepoint used as marker + +%% variables +\let\pxhy@str\relax + +%% \pxhy@burst-`>... \let\pxhy@burst\romannumeral -\let\pxhy@nxend\indent %% \pxhy@uchex{} % The entity of the code-value input function. If the input @@ -362,19 +356,19 @@ pxhy@driver = \the\pxhy@driver^^J% % \pxhy@uchex@res in 4-6 digits; otherwise passes FFFD to % \pxhy@uchex@res. \def\pxhy@uchex#1{% - \expandafter\pxhy@uchex@a\pxhy@burst-`>#1\pxhy@nxend + \expandafter\pxhy@uchex@a\pxhy@burst-`>#1\pxhy@mk } \edef\pxhy@uchex@err{% \noexpand\pxhy@uchex@res{\pxhy@uc@REPL}% } -\def\pxhy@uchex@a#1#2\pxhy@nxend{% +\def\pxhy@uchex@a#1#2\pxhy@mk{% \ifnum2<"1#1 - \expandafter\pxhy@uchex@b\romannumeral-"#1#2\pxhy@nxend{#1#2}% + \expandafter\pxhy@uchex@b\romannumeral-"#1#2\pxhy@mk{#1#2}% \else \pxhy@uchex@err \fi } -\def\pxhy@uchex@b#1\pxhy@nxend#2{% - \ifx\pxhy@empty#1\pxhy@empty +\def\pxhy@uchex@b#1\pxhy@mk#2{% + \ifx\pxhy@mt#1\pxhy@mt \ifnum"#2>"10FFFF \pxhy@uchex@err \else\ifnum"#2>"FFF @@ -408,6 +402,15 @@ pxhy@driver = \the\pxhy@driver^^J% \let\UTFT\pxhy@uchex } + \ifpxhy@hy@unicode %<*unicode> + + %% \pxhy@uchex@res + \def\pxhy@uchex@res#1{% + \unichar{"#1}% + } + + \else % + %BEGIN-- in the following block #1 means the marker \def\pxhy@next#1{% #1=marker %% \pxhy@uchex@res @@ -422,7 +425,7 @@ pxhy@driver = \the\pxhy@driver^^J% \pxhy@posthook@b##1% }% \def\pxhy@posthook@a##1#1##2\pxhy@end{% - \ifx\pxhy@empty##2\pxhy@empty + \ifx\pxhy@mt##2\pxhy@mt \expandafter\@gobbletwo \fi }% @@ -432,7 +435,7 @@ pxhy@driver = \the\pxhy@driver^^J% \global\let##1=\pxhy@str }% \def\pxhy@posthook@c##1#1##2>{% - \ifx\pxhy@empty##2\pxhy@empty + \ifx\pxhy@mt##2\pxhy@mt \edef\pxhy@str{\pxhy@str##1}% \else \pxhy@get@jchar{"##2}% @@ -456,6 +459,8 @@ pxhy@driver = \the\pxhy@driver^^J% \pxhy@next \endgroup + \fi % + \else\ifpxhy@zerox %<*!upTeX> %% \pxhy@uchex@res @@ -565,13 +570,18 @@ pxhy@driver = \the\pxhy@driver^^J% \fi %--------------------------------------- Redefine text commands for PD1 +%% \pxhy@pdfenc +\edef\pxhy@pdfenc{% + \ifpxhy@hy@unicode PU\else PD1\fi +} + \ifnum\pxhy@driver=\pxhy@driver@dvipdfmx %<*dvipdfmx> %%<+> \pxDeclarePdfTextCommand{\CS}{}{} \@onlypreamble\pxDeclarePdfTextCommand \newcommand*\pxDeclarePdfTextCommand[3]{% \pxhy@decl@pdf@tc{#2}{#3}% - {\DeclareTextCommand{#1}{PD1}}% + {\DeclareTextCommand{#1}{\pxhy@pdfenc}}% {\pxhy@revoke@pdf@tc{#1}}% } @@ -579,7 +589,7 @@ pxhy@driver = \the\pxhy@driver^^J% \@onlypreamble\pxDeclarePdfTextComposite \newcommand*\pxDeclarePdfTextComposite[4]{% \pxhy@decl@pdf@tc{#3}{#4}% - {\DeclareTextCompositeCommand{#1}{PD1}{#2}}% + {\DeclareTextCompositeCommand{#1}{\pxhy@pdfenc}{#2}}% {\pxhy@revoke@pdf@tcc{#1}{#2}}% } @@ -595,8 +605,8 @@ pxhy@driver = \the\pxhy@driver^^J% %% \pxhy@revoke@pdf@tc \@onlypreamble\pxhy@revoke@pdf@tc \def\pxhy@revoke@pdf@tc#1{% - \expandafter\let\csname PD1\string#1\endcsname\@undefined - \pxhy@make@txtcmd\pxhy@tmpa{PD1}#1% + \expandafter\let\csname\pxhy@pdfenc\string#1\endcsname\@undefined + \pxhy@make@txtcmd\pxhy@tmpa{\pxhy@pdfenc}#1% \ifx#1\pxhy@tmpa \pxhy@make@txtcmd#1?#1% \fi @@ -612,8 +622,8 @@ pxhy@driver = \the\pxhy@driver^^J% %% \pxhy@revoke@pdf@tcc \@onlypreamble\pxhy@revoke@pdf@tc \def\pxhy@revoke@pdf@tcc#1#2{% - \expandafter\let\csname\string\PD1\string#1-\string#2% - \endcsname\@undefined + \expandafter\let\csname\@backslashchar\pxhy@pdfenc + \string#1-\string#2\endcsname\@undefined } %% \pxhy@decl@pdf@tc @@ -663,6 +673,7 @@ pxhy@driver = \the\pxhy@driver^^J% \fi % %%%%%%%%%%%%%%%%%%%% the definitions +\ifpxhy@hy@unicode\else % % JIS X 0213 does not distinguish the following pairs: % - circumflex(U+02C6) and asciicircum(U+005E) @@ -831,7 +842,7 @@ pxhy@driver = \the\pxhy@driver^^J% \pxDeclarePdfTextCommand{\th}{}{00FE} \pxDeclarePdfTextComposite{\"}{y}{}{00FF} \pxDeclarePdfTextCommand{\textcelsius}{216E}{2103} -%%%%%%%% +%% %%[B] Aliases to [A]. %\pxDeclarePdfTextCommand{\copyright}{}{00A9} @@ -1070,12 +1081,14 @@ pxhy@driver = \the\pxhy@driver^^J% \fi \fi +\fi % +%%%%%%%%%%%%%%%%%%%% done + %--------------------------------------- Enable hyperref unicode \ifpxhy@hy@unicode \PackageInfo\pxhy@pkgname - {The setup for hyperref 'unicode' is applied.\MessageBreak - (Note that this feature is experimental.)\@gobbletwo} + {The setup for hyperref 'unicode' is applied.\@gobbletwo} %% The following code is taken from hyperref.sty. %%%%BEGIN diff --git a/language/japanese/pxjahyper/pxjahyper.tex b/language/japanese/pxjahyper/pxjahyper.tex index 87b782970b..4c121b1438 100644 --- a/language/japanese/pxjahyper/pxjahyper.tex +++ b/language/japanese/pxjahyper/pxjahyper.tex @@ -6,8 +6,8 @@ \MakeShortVerb{\|} \usepackage{bxtexlogo} \bxtexlogoimport{*} -\newcommand{\PkgVersion}{0.6a} -\newcommand{\PkgDate}{2020/10/10} +\newcommand{\PkgVersion}{0.7} +\newcommand{\PkgDate}{2021/02/13} \newcommand{\Pkg}[1]{\textsf{#1}} \newcommand{\Meta}[1]{$\langle$\mbox{}#1\mbox{}$\rangle$} \newcommand{\Note}{\par\noindent ※} -- cgit v1.2.3