[latex3-commits] [git/LaTeX3-latex3-hyperref] main: move greek PU to extra file and load with psdextra (1dfb18b)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Feb 11 10:49:35 CET 2021


Repository : https://github.com/latex3/hyperref
On branch  : main
Link       : https://github.com/latex3/hyperref/commit/1dfb18b952850b94328dbd44d56515e1db0c3ca7

>---------------------------------------------------------------

commit 1dfb18b952850b94328dbd44d56515e1db0c3ca7
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Feb 11 10:49:35 2021 +0100

    move greek PU to extra file and load with psdextra


>---------------------------------------------------------------

1dfb18b952850b94328dbd44d56515e1db0c3ca7
 ChangeLog.txt                |  5 ++++-
 doc/hyperref-doc.tex         |  5 ++++-
 hyperref.dtx                 | 17 ++++++++++++++---
 hyperref.ins                 |  1 +
 manifest.txt                 |  1 +
 testfiles/psdextra-greek.lvt | 11 +++++++++++
 testfiles/psdextra-greek.tlg |  6 ++++++
 7 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index b1b1bd6..d6d94b3 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,4 +1,7 @@
 2021-02-09 Ulrike Fischer/David Carlisle
+    * moved the PU-declarations for greek to an extra file
+      puenc-greek.ldf and force loading if the options psdextra is
+      used.
     * moved definition for \U accent into the cyrillic block.
       So it is only defined if \CYRDZE has been defined previously.
     * Some clarifications in the manual.
@@ -7,7 +10,7 @@
       See issue #118.
     * if platex is detected unicode is set to false, issue #171
     * reverted the delayed loading of puenc.def as it breaks
-    package options.
+    package options issue #172
     * added a \lastnodetype test to distinguish explict 0pt vskip from no skip
     in \Hy at SaveLastskip issue #167
     * enable setting the pdfversion with the xetex/dvipdfm driver,
diff --git a/doc/hyperref-doc.tex b/doc/hyperref-doc.tex
index 57df863..6f80fc2 100644
--- a/doc/hyperref-doc.tex
+++ b/doc/hyperref-doc.tex
@@ -2219,7 +2219,7 @@ Now the entry in the table of contents (and bookmarks) for the
 index points to the start of the index page, not to a location
 before this page.
 
-\subsection{puenc encoding and puenc-extra.def}
+\subsection{puenc encoding, puenc-greek.def and puenc-extra.def}
 
 The \texttt{unicode} option loads for the bookmarks \texttt{puenc.def} which contains
 quite a lot definitions of commands for the bookmarks.
@@ -2232,6 +2232,9 @@ To reduce the impact \xpackage{hyperref} uses two strategies.
 The commands for the cyrillic block  if \cs{CYRDZE} is defined,
 greek if \cs{textBeta} is defined, and hebrew if \cs{hebdalet} is defined.
 
+The greek block is in an extra file, \texttt{puenc-greek.def}, which can
+be loaded manually if needed.
+
 \item Other commands are moved to an extra file \texttt{puenc-extra.def}
 which is not loaded automatically, but can be loaded in the preamble if needed.
 Currently this file contains all definitions for the accent \cs{G}.
diff --git a/hyperref.dtx b/hyperref.dtx
index ee131eb..f72ba82 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -47,7 +47,8 @@
 %<tex4htcfg>\ProvidesFile{htex4ht.cfg}
 %<pd1enc>\ProvidesFile{pd1enc.def}
 %<puenc>\ProvidesFile{puenc.def}
-%<puextra>\ProvidesFile{puencextra.def}
+%<puextra>\ProvidesFile{puenc-extra.def}
+%<pugreek>\ProvidesFile{puenc-greek.def}
 %<puvnenc>\ProvidesFile{puvnenc.def}
 %<puarenc>\ProvidesFile{puarenc.def}
 %<psdextra>\ProvidesFile{psdextra.def}
@@ -87,8 +88,9 @@
 %<tex4ht>\Hy at VersionCheck{htex4ht.def}
 %<tex4htcfg>  Hyperref configuration file for TeX4ht]
 %<pd1enc>  Hyperref: PDFDocEncoding definition (HO)]
-%<puenc>  Hyperref: PDF Unicode definition (HO)]
+%<puenc>      Hyperref: PDF Unicode definition (HO)]
 %<puextra>  Hyperref: PDF Unicode extra definition (HO)]
+%<pugreek>  Hyperref: PDF Unicode definition (greek block) (HO)]
 %<puvnenc>  Hyperref: Additions to puenc.def for VnTeX]
 %<puarenc>  Hyperref: Additions to puenc.def for Arabi]
 %<psdextra>  Hyperref: Additions to PDF string support]
@@ -2069,6 +2071,10 @@
 \def\HyPsd at LoadExtra{%
   \ifHy at psdextra
     \ltx at iffileloaded{puenc.def}{%
+      \ltx at iffileloaded{puenc-greek.def}{}{%
+       \Hy at SaveCatcodeSettings{pu}%
+       \input{puenc-greek.def}%
+       \Hy at RestoreCatcodeSettings{pu}}%
       \Hy at SaveCatcodeSettings{psdextra}%
       \input{psdextra.def}%
       \Hy at RestoreCatcodeSettings{psdextra}%
@@ -22359,6 +22365,10 @@
 % Greek is only loaded if \cs{textBeta} is defined.
 %    \begin{macrocode}
 \ifx\textBeta\@undefined \else
+\input{puenc-greek.def}
+\fi
+%</puenc>
+%<*pugreek>
 % U+0374 GREEK NUMERAL SIGN; numeralsigngreek
 \DeclareTextCommand{\textnumeralsigngreek}{PU}{\83\164}% U+0374
 \DeclareTextCommand{\textdexiakeraia}{PU}{\83\164}% U+0374
@@ -22540,7 +22550,7 @@
 % U+03F6 GREEK REVERSED LUNATE EPSILON SYMBOL;
 %   \backepsilon (AmS)
 \DeclareTextCommand{\textbackepsilon}{PU}{\83\366}% U+03F6
-\fi
+%</pugreek>
 %    \end{macrocode}
 %
 % \subsubsection{Cyrillic: U+0400 to U+04FF}
@@ -22549,6 +22559,7 @@
 %    the help with the Cyrillic glyph names.
 %    Cyrillic only loaded if \cs{CYRDZE} is defined.
 %    \begin{macrocode}
+%<*puenc>
 \ifx\CYRDZE\@undefined \else
 % U+0400 CYRILLIC CAPITAL LETTER IE WITH GRAVE
 \DeclareTextCompositeCommand{\`}{PU}{\CYRE}{\84\000}% U+0400
diff --git a/hyperref.ins b/hyperref.ins
index 46aff3f..a894382 100644
--- a/hyperref.ins
+++ b/hyperref.ins
@@ -83,6 +83,7 @@
   \file{hxetex.def}{\from{hyperref.dtx}{xetex,pdfform,outlines}}
   \file{pd1enc.def}{\from{hyperref.dtx}{pd1enc}}
   \file{puenc.def}{\from{hyperref.dtx}{puenc}}
+  \file{puenc-greek.def}{\from{hyperref.dtx}{pugreek}}
   \file{puenc-extra.def}{\from{hyperref.dtx}{puextra}}
   \file{puvnenc.def}{\from{hyperref.dtx}{puvnenc}}
   \file{puarenc.def}{\from{hyperref.dtx}{puarenc}}
diff --git a/manifest.txt b/manifest.txt
index 14c5d68..d1597ae 100644
--- a/manifest.txt
+++ b/manifest.txt
@@ -67,6 +67,7 @@ hxetex.def
 pd1enc.def
 puenc.def
 puenc-extra.def
+puenc-greek.def
 puvnenc.def
 puarenc.def
 psdextra.def
diff --git a/testfiles/psdextra-greek.lvt b/testfiles/psdextra-greek.lvt
new file mode 100644
index 0000000..14172e9
--- /dev/null
+++ b/testfiles/psdextra-greek.lvt
@@ -0,0 +1,11 @@
+\input{regression-test}
+
+\documentclass{article}
+
+\usepackage[psdextra]{hyperref}
+
+\begin{document}
+\START 
+
+\section{Math shortnames in bookmarks \texorpdfstring{kappa}{\kappa}}
+\end{document}
diff --git a/testfiles/psdextra-greek.tlg b/testfiles/psdextra-greek.tlg
new file mode 100644
index 0000000..43476a2
--- /dev/null
+++ b/testfiles/psdextra-greek.tlg
@@ -0,0 +1,6 @@
+This is a generated file for the l3build validation system.
+Don't change this file in any respect.
+[1
+] (psdextra-greek.aux)
+Package rerunfilecheck Info: File `psdextra-greek.out' has not changed.
+(rerunfilecheck)             Checksum: 79809488FB8B8BED7FC5A8FA2775D5CB;208.





More information about the latex3-commits mailing list.