summaryrefslogtreecommitdiff
path: root/macros/jptex/latex/pxchfon/pxchfon.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-19 03:00:44 +0000
committerNorbert Preining <norbert@preining.info>2023-08-19 03:00:44 +0000
commita953fdb33424be714f17f4d46f05712637bd0c3a (patch)
treecad35adb9f1560fd9555526b38e0bf16fdacd83b /macros/jptex/latex/pxchfon/pxchfon.sty
parent0585a72dae13da024145995031edb2a1cf21dece (diff)
CTAN sync 202308190300
Diffstat (limited to 'macros/jptex/latex/pxchfon/pxchfon.sty')
-rw-r--r--macros/jptex/latex/pxchfon/pxchfon.sty42
1 files changed, 40 insertions, 2 deletions
diff --git a/macros/jptex/latex/pxchfon/pxchfon.sty b/macros/jptex/latex/pxchfon/pxchfon.sty
index 8c94cb3ab6..8ba5fce6b3 100644
--- a/macros/jptex/latex/pxchfon/pxchfon.sty
+++ b/macros/jptex/latex/pxchfon/pxchfon.sty
@@ -10,7 +10,7 @@
%% package declaration
\NeedsTeXFormat{pLaTeX2e}
-\ProvidesPackage{pxchfon}[2023/02/22 v1.9a]
+\ProvidesPackage{pxchfon}[2023/08/18 v1.9b]
\def\pxcz@pkgname{pxchfon}
%--------------------------------------- general
@@ -208,6 +208,7 @@
\let\pxcz@legacycode\relax
\let\pxcz@expert\relax
\newif\ifpxcz@glyphid
+\newif\ifpxcz@autojfmsync
%% process options
% drivers
@@ -274,6 +275,9 @@
% (no)glyphid
\DeclareOption{glyphid}{\pxcz@glyphidtrue}
\DeclareOption{noglyphid}{\pxcz@glyphidfalse}
+% (no)autojfmsync
+\DeclareOption{autojfmsync}{\pxcz@autojfmsynctrue}
+\DeclareOption{noautojfmsync}{\pxcz@autojfmsyncfalse}
% preset spec options
\pxcz@onlypreamble@def\pxcz@all@main@preset{%
noembed,%
@@ -1557,8 +1561,9 @@
\DeclareRobustCommand*{\gid}[1]{%
\begingroup
\kanjishape{dirgid}\selectfont
- \kchar#1\relax
+ \kchar#1\pxcz@gid@jfm@sync
\endgroup}
+\let\pxcz@gid@jfm@sync\relax
\def\pxcz@hy@gid#1{?}
\g@addto@macro\pdfstringdefPreHook{%
\let\gid\pxcz@hy@gid
@@ -2073,6 +2078,39 @@
\pxcz@dump@spec@to{#2.map}}
\fi
+%--------------------------------------- JFM sync
+
+%%<+> \jfmsync
+\DeclareRobustCommand*{\jfmsync}{%
+ \pxcz@jfm@sync}
+%% \pxcz@jfm@sync
+\let\pxcz@jfm@sync\relax
+
+%%<+> \jfmsyncbox{<width>}{<text>}
+\DeclareRobustCommand*{\jfmsyncbox}[2]{%
+ \makebox[#1][l]{#2\jfmsync}}
+\g@addto@macro\pdfstringdefPreHook{%
+ \let\jfmsyncbox\@secondoftwo}
+
+\ifpxcz@enabled %---- when using dvipdfmx
+
+\def\pxcz@jfm@sync{%
+ % force to break text stream
+ \special{ps:}}
+
+\ifpxcz@autojfmsync %---- <*autojfmsync>
+% Makes \git/\CID/\UTF do automatically jfmsync
+\let\pxcz@gid@jfm@sync\pxcz@jfm@sync
+\AtBeginDocument{%
+ \ifx\put@character\@undefined\else
+ \g@addto@macro\put@character{\pxcz@jfm@sync}%
+ \fi
+ \ifx\put@character@\@undefined\else
+ \g@addto@macro\put@character@{\pxcz@jfm@sync}%
+ \fi}
+\fi %---- </autojfmsync>
+\fi %----
+
%--------------------------------------- preset japanese font mappings
%% \pxcz@declare@preset{<name>}{<text>}