summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-10-08 21:21:24 +0000
committerKarl Berry <karl@freefriends.org>2020-10-08 21:21:24 +0000
commitb195fd068d85b86612410a800bda267fdb36e3f7 (patch)
tree0283eddd59cde3a3c5827f62c613efface194b38 /Master/texmf-dist/tex
parent99ea21fd2f0b9b4de585316431bf979e59ac35c4 (diff)
hyperxmp (8oct20)
git-svn-id: svn://tug.org/texlive/trunk@56599 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty44
1 files changed, 30 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
index 87a0f265a8b..0bec03894dd 100644
--- a/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
+++ b/Master/texmf-dist/tex/latex/hyperxmp/hyperxmp.sty
@@ -22,7 +22,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{hyperxmp}
- [2020/09/24 v5.5 Store hyperref metadata in XMP format]
+ [2020/10/05 v5.6 Store hyperref metadata in XMP format]
\edef\hyxmp@dq@code{\the\catcode`\"}
\catcode`\"=12
\@ifundefined{AtEndDocument}{%
@@ -156,13 +156,21 @@
\def\@pdfversionid{1}
\define@key{Hyp}{pdfversionid}{\hyxmp@pdfstringdef\@pdfversionid{#1}}
\begingroup
-\let\ifdraft=\relax
-\RequirePackage{ifdraft}
-\ifdraft{%
- \gdef\@pdfrendition{draft}%
-}{%
- \gdef\@pdfrendition{default}%
-}
+ \@ifpackageloaded{ifdraft}{%
+ \let\next=\relax
+ }{%
+ \let\ifdraft=\relax
+ \RequirePackage{ifdraft}%
+ \def\next{%
+ \expandafter\global\expandafter\let\csname ver@ifdraft.sty\endcsname=\relax
+ }%
+ }%
+ \ifdraft{%
+ \gdef\@pdfrendition{draft}%
+ }{%
+ \gdef\@pdfrendition{default}%
+ }
+ \next
\endgroup
\define@key{Hyp}{pdfrendition}{\hyxmp@pdfstringdef\@pdfrendition{#1}}
\def\@pdfpublication{}
@@ -1593,6 +1601,10 @@ ______</Iptc4xmpCore:CreatorContactInfo>^^J%
\newcatcodetable\hyxmp@cct
\savecatcodetable\hyxmp@cct
\fi
+\bgroup
+ \catcode`\_=11
+ \gdef\hyxmp@prot@us{_}%
+\egroup
\ifLuaTeX
\begin{luacode*}
function write_xmp_font_list (cct)
@@ -1603,8 +1615,9 @@ function write_xmp_font_list (cct)
local xml = string.gsub(val, "&", "&amp;")
xml = string.gsub(xml, "<", "&lt;")
xml = string.gsub(xml, ">", "&gt;")
+ xml = string.gsub(xml, "_", "\\hyxmp@prot@us ")
tex.print(cct, "____________<stFnt:" .. name .. ">" ..
- val .. "</stFnt:" .. name .. ">^^J%")
+ xml .. "</stFnt:" .. name .. ">^^J%")
return
end
end
@@ -1615,11 +1628,14 @@ function write_xmp_font_list (cct)
for i, f in font.each() do
tex.print(cct, "__________<rdf:li rdf:parseType=\"Resource\">^^J%")
if f.filename then
- local info = fontloader.info(f.filename)
- show_field("fontFace", info.fullname)
- show_field("fontFamily", info.familyname)
- show_field("fontName", info.fontname)
- show_field("versionString", info.version)
+ local fname = string.gsub(f.filename, "^harfloaded:(.*)", "%1")
+ local info = fontloader.info(fname)
+ if info then
+ show_field("fontFace", info.fullname)
+ show_field("fontFamily", info.familyname)
+ show_field("fontName", info.fontname)
+ show_field("versionString", info.version)
+ end
local baseName = string.gsub(f.filename, ".*[/\\](.*)", "%1")
show_field("fontFileName", baseName)
else