summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/pdfx/pdfx.dtx')
-rw-r--r--Master/texmf-dist/source/latex/pdfx/pdfx.dtx277
1 files changed, 164 insertions, 113 deletions
diff --git a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
index 31a1322d83e..99fce07c5c8 100644
--- a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
+++ b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
@@ -19,7 +19,7 @@
%
% \fi
%
-% \CheckSum{6102}
+% \CheckSum{6202}
% \iffalse
%
%<*driver>
@@ -38,9 +38,9 @@
\Copyrighted{False}
\CopyrightURL{http://tug.org/texlive/}
\CoverDisplayDate{November \thisyear}
-\CoverDate{\thisyear-11-29}
-\CreatorTool{pdfTeX + pdfx.sty with option \pdfxopt, from TeX Live \lastyear}
-\Date{2017-05-18\sep 2017-06-23\sep 2018-11-29}
+\CoverDate{\thisyear-12-22}
+\CreatorTool{LaTeX + pdfx.sty with option \pdfxopt, from TeX Live \lastyear}
+\Date{2017-05-18\sep 2017-06-23\sep 2018-11-29\sep 2018-12-22}
\Advisory{An earlier version of this documentation was published as: TUGboat 36, No.2, pp.136\textendash 142 (2015)}
\Advisory{v1.6: Added XMP support for PDF/UA-1. Added more Metadata fields and Language support.}
\Advisory{v1.6: Default RGB and CMYK profiles now require the colorprofiles.sty package.}
@@ -49,6 +49,8 @@
\Advisory{v1.6: Revised glyphtounicode.sty to use variation selectors, altered maps to PUA codepoints; added more glyphs via glyphtounicode-ntx.tex }
\Advisory{v1.6: Support for 8-bit Hebrew encodings, some Arabic and Devanagari.}
\Advisory{v1.6: Updated documentation, incl. for LaTeX changes.}
+\Advisory{v1.6.1: Fixed issue with ifthen package; improved Metadata with LuaTeX and XeTeX.}
+\Advisory{v.1.6.1: Flexibility with page boxes for PDF/X.}
\pdfxEnableCommands{%
\def\CVR{C.V. Radhakrishnan}\def\Thanh{H\`an Th\eee Thanh}%
\def\eee{^^c3^^aa^^cc^^81 }}
@@ -163,9 +165,11 @@
% Support for 8-bit Hebrew encodings, some Arabic and Devanagari.
% Updated documentation, incl. for LaTeX changes.
% }%
+% \changes{v1.6.1}{2018/12/22}{Fixed issue with ifthen package;
+% improved Metadata with LuaTeX and XeTeX. Flexibility with page boxes for PDF/X.}
% \title{Generation of PDF/X- and PDF/A-\penalty-200 compliant PDFs with \pdftex --- \texttt{pdfx.sty}}
-% \date{2018/11/18}
-% \version{1.6}
+% \date{2018/12/22}
+% \version{1.6.1}
% \keywords{PDF, PDF/A, PDF/X, pdf\TeX, \LaTeX, Multilingual Metadata}
% \author{C.\,V.\,Radhakrishnan, \Thanh, Ross Moore {\upshape\small
% and} Peter Selinger}
@@ -292,9 +296,9 @@
% were standardized in 2005, 2011 and 2012, respectively. Earlier
% versions contain a subset of the features of later versions, so for
% maximum portability, it is preferable to use a lower-numbered
-% version. There is no conformance level `u' in version 1 of the
-% standard. For many typical uses of PDF/A, it is sufficient to use
-% PDF/A-1b.
+% version, when the extra features allowed in higher versions are not used.
+% There is no conformance level `u' in version 1 of the standard.
+% Thus for many typical uses of PDF/A, it is sufficient to use PDF/A-1b.
%
% \begin{itemize}
% \item |a-1a|: generate PDF/A-1a. Experimental, not fully implemented.
@@ -590,6 +594,7 @@
% \medskip
% Other places for the |{filecontents*}| environment can work,
% but \emph{only} when it contains \emph{no} non-ascii UTF-8 byte sequences.
+% Since 2018, with default
% See Section~\ref{ssec-symbols} below for more information on the macros
% that can be safely used within |.xmpdata| metadata files.
%
@@ -802,8 +807,9 @@
%
% Unfortunately not all PDF browsers (in particular, older ones and much Apple software)
% give ready access to the XMP metadata packet. Some authors want to see everything
-% using e.g., the Unix/Linux |pdfinfo| command. In fact there is the |-meta| option to get
-% the complete metadata packet. This can give more than what one wants, so use it as follows:
+% using e.g., the Unix/Linux command: |pdfinfo -enc UTF-8 |. In fact there is the |-meta|
+% option to get the complete metadata packet (in UTF-8 encoding).
+% This can give more than what one wants, so use it as follows:
% \begin{decl}[]
% pdfinfo -meta <filename>.pdf \textbar\ grep 'dc:'
% \end{decl}
@@ -1034,15 +1040,15 @@
% \%\% Custom profile: 7C Indigo TAC370 (ColorLogic)\\
% |\gdef\viiIndigoTAC{\let\CallasMacOSdir\CallasMacOSpdfaPilotdir |\\
% | \setCUSTOMcolorprofile |\\
-% | {7C Indigo_TAC370_ColorLogic.icc}\%|\\
-% | {\CallasProfilesdir}\%|\\
-% | {7C Indigo TAC370 \string\(ColorLogic\string\)}\% /ProfileName |\\
-% | {http://www.colorlogic.de}\% /RegistryName |\\
-% | {7CLR}\% number of colors specifier |\\
-% | {02400000}\% ICC version |\\
-% | {/Cyan /Magenta /Yellow /Black /Orange /Green /Violet}\% colour names |\\
-% | {48110b8b410ee6be015f3932c3167869}\% CheckSum |\\
-% |}\%|
+% | {7C Indigo_TAC370_ColorLogic.icc}%|\\
+% | {\CallasProfilesdir}%|\\
+% | {7C Indigo TAC370 \string\(ColorLogic\string\)}% /ProfileName |\\
+% | {http://www.colorlogic.de}% /RegistryName |\\
+% | {7CLR}% number of colors specifier |\\
+% | {02400000}% ICC version |\\
+% | {/Cyan /Magenta /Yellow /Black /Orange /Green /Violet}% colour names |\\
+% | {48110b8b410ee6be015f3932c3167869}% CheckSum |\\
+% |}|
% \end{decl}
% which uses a profile that accompanies the \texttt{pdfaPilot} software from
% Callas Software Gmbh~\cite{pdfaPilot}.
@@ -1094,7 +1100,8 @@
% encountered while generating PDF/A compliant documents are available
% here:
% \url{http://support.river-valley.com/wiki/index.php?title=Generating_PDF/A_compliant_PDFs_from_pdftex}.
-%
+% Be aware that this is based on use of an earlier version of the |pdfx| package,
+% so some of the advice may have been superseded.
%
%
% \section[Installing]{Installing}
@@ -1110,8 +1117,7 @@
% to get the documentation that you are reading now,
% run (\textsc{pdf})\LaTeX{} on the file |pdfx.dtx|.
% The resulting PDF should be valid as PDF/A-2u.
-% % Or better, use
-% % the included |Makefile|, which will also regenerate the index.
+% Or better, use the included |Makefile|, which will also regenerate the index.
%
% To install the package, first extract the program code; i.e., the
% file |pdfx.sty|, by running \LaTeX{} or \TeX{} on the file |pdfx.ins|.
@@ -1134,8 +1140,7 @@
% written into the PDF file, and supporting features such as
% hyperlinking, bookmarks, etc.
% \item |xcolor| for ensuring consistent use of the color model
-% appropriate the PDF variant, within text and hyperlinks
-% (when allowed).
+% appropriate the PDF variant, within text and hyperlinks (when allowed).
% \item |glyphtounicode.tex| (not Xe\LaTeX) maps glyph names
% to corresponding Unicode code-points.
% \item |ifluatex| allowing coding specific to Lua\LaTeX.
@@ -1204,7 +1209,7 @@
% may fail to pass validation tests.
%
% Xe\TeX\ is designed for processing UTF-8 input only. When presented
-% with a \LaTeX\ source using a legacy encoding, such as |latin2| or |koi8-r|,
+% with \LaTeX\ source using a legacy encoding, such as |latin2| or |koi8-r|,
% the input is accepted and a PDF produced. Yet there will be garbage
% characters corresponding to each character entered from the upper range
% (128--255). This is evident in the PDF content and bookmarks;
@@ -1214,7 +1219,7 @@
%
% Not all fonts, in particular Open-Type fonts (OTF), naturally come with
% mappings of the glyphs to Unicode code points. This is a requirement
-% with PDF/A and PDF/E standards.
+% with PDF/A, PDF/E and PDF/UA standards.
% Use of such fonts can result in validation errors, such as:
% \begin{itemize}
% \item
@@ -1226,7 +1231,7 @@
% If one has access to Adobe's |Acrobat Pro| software, then its |Preflight|
% utility can rewrite the uncompressed output from Xe\LaTeX\ into a valid
% PDF standard, using compression of the contents but not of the XMP packet.
-% Similarly |Preflight| can fix the missing font information.
+% Similarly |Preflight| can sometimes fix the missing font information.
%
%
% \subsubsection{Limitations using Lua\LaTeX}\label{sssec-luatex}
@@ -1903,7 +1908,7 @@
% to make this work cleanly,
% as just doing these commands would interfere with other uses of |\pdfstringdef|.
% In case a long sectioning command has an optional argument, or a $*$-variant
-% in needed, then include it this way.
+% is needed, then include it this way.
%\begin{decl}[]
% |\pdfxBookmark[Ar'avot e'r]{\section*}{\sectAtitle}{Ar'avot e'r, Araratyan dashti ...}|
%\end{decl}
@@ -2141,13 +2146,13 @@
% As well as rebinding each command for a letter, the font style-switching commands
% are aliased to do nothing, as these are not relevant to creating UTF-8 output.
% Being localised by the |L8U| grouping, this causes no problem elsewhere within the document.
-% This is similar to |\psdaliasnames| and |\psdmapshortnames| from |hyperref.sty|
+% These are similar to macros |\psdaliasnames| and |\psdmapshortnames| from |hyperref.sty|,
% which rebind user macros to LICRs, so that |PU| encoded versions of LICRs can be used.
%
% \begin{figure}[htb]
% \includegraphics[scale=.625]{Armenian-example-UTF8.png}
-% \caption{Part of the source coding for Figure~\ref{ex-arm}, viewed as UTF-8 encoded,
-% within editing software.}\label{src-arm}
+% \caption{Image of part of the source coding for Figure~\ref{ex-arm},
+% viewed as UTF-8 encoded, within editing software.}\label{src-arm}
% \end{figure}
%
% Several other `rebinding' commands are defined, mostly with package-loading options.
@@ -2546,7 +2551,7 @@
}{}%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pdfx}
- [2018/11/29 v1.6 PDF/X and PDF/A support (CVR/HTH/RRM/PS)]
+ [2018/12/22 v1.6.1 PDF/X and PDF/A support (CVR/HTH/RRM/PS)]
\newif\ifpdfx@noBOM \pdfx@noBOMfalse % use a BOM in the XMP packet
\newif\ifpdfx@x \pdfx@xfalse % PDF/X mode
@@ -2633,7 +2638,7 @@
}% external OPI workflow, i.e. multiple files involved
\DeclareOption{x-3}{\global\pdfx@xtrue\def\xmp@Part{3}% RGB allowed, but rare!
\def\xmp@Conformance{}\def\xmp@ReleaseDate{2003}%
- \global\pdfminorversion=4 }% same as x-303
+ \global\pdfx@minorversion=4 }% same as x-303
\DeclareOption{x-302}{\global\pdfx@xtrue\def\xmp@Part{3}%
\def\xmp@Conformance{}\def\xmp@ReleaseDate{2002}% ISO 15930-3:2002
\global\pdfx@minorversion=3 }
@@ -2892,12 +2897,14 @@
\RequirePackage{ifxetex}
\ifxetex
\def\pdfx@pages@xetex#1{\special{pdf:put @pages <<#1>>}}
+ \def\pdfx@pageattr@xetex#1{\special{pdf:put @thispage <<#1>>}}
\def\pdfx@docinfo@xetex#1{\special{pdf:put @docinfo <<#1>>}}
\def\pdfx@catalog@xetex#1{\special{pdf:put @catalog <<#1>>}}
- \def\pdfx@mapline@xetex#1{}
+ \def\pdfx@mapline@xetex#1{\special{pdf:mapline #1}}%% does this work ??
+%% \def\pdfx@mapline@xetex#1{}
\def\pdf@compress@xetex=#1{}
%%
- \let\pdfpageattr\pdfx@pages@xetex
+ \let\pdfpagesattr\pdfx@pages@xetex
\let\pdfinfo\pdfx@docinfo@xetex
\let\pdfcatalog\pdfx@catalog@xetex
\let\pdfmapline\pdfx@mapline@xetex
@@ -2907,6 +2914,7 @@
%%\newif\ifpdfx@pdfmark % control future support for dvips
+\RequirePackage{everyshi}
\RequirePackage{ifluatex}
\ifluatex
\IfFileExists{luatex85.sty}{% 2016+
@@ -2919,7 +2927,6 @@
\let\pdfescapestring\pdf@escapestring
\else
\ifxetex
- \usepackage{everyshi}%
\expandafter\ifx\csname mdfivesum\endcsname\relax
% too early a version of XeTeX
\let\pdfx@mdfivesum\relax
@@ -2977,11 +2984,13 @@
\edef\pdfx@theight{\strip@pt\dimen0}%
\ifxetex
\xdef\pdfx@everypage@xetex{%
- /MediaBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
- /TrimBox[25 20 \pdfx@twidth\space \pdfx@theight]%
+ /MediaBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
+ /BleedBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
+ /CropBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
+ /TrimBox[25 20 \pdfx@twidth\space \pdfx@theight]%
}%
\fi
- \edef\next{\endgroup\pdfpageattr{%
+ \edef\next{\endgroup\pdfpagesattr{%
/MediaBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
%% /ArtBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
/BleedBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
@@ -2990,9 +2999,14 @@
}\next
\ifxetex
\AtBeginDvi{%
- \immediate\special{pdf:put @thispage <<\pdfx@everypage@xetex>>}}%
+ \expandafter\immediate\pdfx@pageattr@xetex{\pdfx@everypage@xetex}}%
\EveryShipout{%
- \immediate\special{pdf:put @thispage <<\pdfx@everypage@xetex>>}}%
+ \expandafter\immediate\pdfx@pageattr@xetex{\pdfx@everypage@xetex}}%
+ \else
+ \EveryShipout{%
+ \expandafter\ifx\expandafter\relax\the\pdfpageattr\relax
+ \immediate\pdfpageattr\expandafter{\the\pdfpagesattr}%
+ \fi }%
\fi
\else
%% PDF/A-1b doesn't allow object compression
@@ -4782,25 +4796,50 @@
%% But some PDF readers don't support XMP, so it is nice to have
%% /Info fields, when this can be done reliably.
%%
+%% 2018-12-16: load package outside the grouping
+\RequirePackage{stringenc}%
\begingroup
- \RequirePackage{stringenc}%
- \expandafter\ifx\csname pdf@escapehex\endcsname\relax
- \PackageWarning{pdfx}{%
- Missing an implementation of \string\pdf@escapehex ^^J
- Translated Metadata cannot be generated as PDF strings.^^J}%
- \def\pdfx@GeneratePdfString#1#2{}%
- \def\pdfx@ConvertUTFtoBE#1#2{}%
- \else
- \def\pdfx@GeneratePdfString#1#2{%
+ \catcode`\| 0
+ \catcode `\\ 12
+ |gdef |pdfx@parsebackslash#1{%
+ |begingroup
+ |def |pdfx@parsemacro{#1}%
+ |def |pdfx@parseout{}%
+ |expandafter |pdfx@doparsebackslash#1\|pdfx@endparse
+ }
+ |gdef |pdfx@doparsebackslash#1\#2|pdfx@endparse{%
+ |edef |pdfx@parseout{|pdfx@parseout#1}%
+ |ifx |relax#2|relax
+ |let |next |pdfx@parseend
+ |else
+ |edef |pdfx@parseout{|pdfx@parseout \\}%
+ |def |next{|pdfx@doparsebackslash#2|pdfx@endparse}%
+ |fi |next
+ }
+|endgroup
+\def\pdfx@parseend{%
+ \edef\next{\endgroup\def\expandafter\noexpand\pdfx@parsemacro{\pdfx@parseout}}%
+ \next
+}%
+\begingroup
+%% \expandafter\ifx\csname pdf@escapehex\endcsname\relax
+%% \PackageWarning{pdfx}{%
+%% Missing an implementation of \string\pdf@escapehex ^^J
+%% Translated Metadata cannot be generated as PDF strings.^^J}%
+%% \def\pdfx@GeneratePdfString#1#2{}%
+%% \def\pdfx@ConvertUTFtoBE#1#2{}%
+%% \fi %%\else
+ \gdef\pdfx@GeneratePdfString#1#2{%
% converts a UTF-8 string to UTF-16be
\StringEncodingConvert{#1}{#2}{utf8}{utf16be}%
- \xdef#1{\string\376\string\377\pdfescapestring{#1}}%
+ \edef\pdfx@tempii{#1}\relax
+ \xdef#1{\string\376\string\377\pdfescapestring{\pdfx@tempii}}%
}%
- \def\pdfx@ConvertUTFtoBE#1#2{%
+ \gdef\pdfx@ConvertUTFtoBE#1#2{%
\setbox0=\hbox{% catch any rubbish escaping to the MVL
\def\cf@encoding{L8U}\fontencoding{L8U}%
\ifluatex
- \let\pdfescapestring\luaescapestring
+%% \let\pdfescapestring\luaescapestring
\else\ifxetex\else
\inputencoding{8bit}%
\fi\fi
@@ -4808,10 +4847,18 @@
\pdfx@xmpunimarkup
\let\backslash\textbackslash
\edef\pdfx@temp{#2}% ensure XMP expands to UTF8
- \pdfx@GeneratePdfString{#1}{\pdfx@temp}%
- }%
+ \ifluatex
+ \pdfx@parsebackslash\pdfx@temp
+ \pdfstringdef{#1}{\pdfx@temp}%
+ \else\ifxetex
+ \pdfx@parsebackslash\pdfx@temp
+ \pdfstringdef{#1}{\pdfx@temp}%
+ \else
+ \pdfx@GeneratePdfString{#1}{\pdfx@temp}%
+ \fi\fi
+ }% end of \setbox
}%
- \fi
+%% \fi
\pdfx@pdfmarkup
\global\let\pdfx@pdfAuthor\@empty
\global\let\pdfx@pdfTitle\@empty
@@ -4819,45 +4866,57 @@
\global\let\pdfx@pdfKeywords\@empty
\ifpdfx@nopdfinfo % transliterated strings present
%% RRM: this may still work with parser macros ???
- \ifluatex
- %% \pdf@escapehex gets it wrong!!
- %% Is there a better way ?
- \else
- \pdfx@ConvertUTFtoBE\pdfx@pdfTitle\xmp@Title
- \pdfx@ConvertUTFtoBE\pdfx@pdfSubject\xmp@Subject
- \fi
-\else
- \pdfx@topdfstring\pdfx@pdfTitle\xmp@Title
- \ifpdfx@e\else\ifpdfx@x\else
- \pdfx@topdfstring\pdfx@pdfSubject\xmp@Subject
- \fi\fi
- \fi
+ \expandafter\ifx\expandafter\relax\xmp@Title\relax\else
+ \pdfx@ConvertUTFtoBE{\pdfx@pdfTitle}{\xmp@Title}%
+ \fi
+ \expandafter\ifx\expandafter\relax\xmp@Subject\relax\else
+ \pdfx@ConvertUTFtoBE{\pdfx@pdfSubject}{\xmp@Subject}%
+ \fi
+\else %% pdfx@nopdfinfotrue
+ \expandafter\ifx\expandafter\relax\xmp@Title\relax\else
+ \ifluatex
+ \pdfx@ConvertUTFtoBE\pdfx@pdfTitle\xmp@Title
+ \else\ifxetex
+ \pdfx@ConvertUTFtoBE\pdfx@pdfTitle\xmp@Title
+ \else
+ \pdfx@GeneratePdfString\pdfx@pdfTitle\xmp@Title
+ \fi\fi
+ \fi
+ \expandafter\ifx\expandafter\relax\xmp@Subject\relax\else
+ \ifluatex
+ \pdfx@ConvertUTFtoBE\pdfx@pdfSubject\xmp@Subject
+ \else\ifxetex
+ \pdfx@ConvertUTFtoBE\pdfx@pdfSubject\xmp@Subject
+ \else
+ \pdfx@GeneratePdfString\pdfx@pdfSubject\xmp@Subject
+ \fi\fi
+ \fi
+ \fi % end of \ifpdfx@nopdfinfo
\pdfx@topdfstring\pdfx@CreatorTool\xmp@CreatorTool
\pdfx@topdfstring\pdfx@Producer\xmp@Producer
%% \pdfescapestring needed
- \expandafter\ifx\csname pdfescapestring\endcsname\relax
- \else
+%% \expandafter\ifx\csname pdfescapestring\endcsname\relax
+%% \else
\expandafter\ifx\expandafter\relax\xmp@Author\relax
\else
%% check for multiple authors with parser macro
\expandafter\pdfx@parseforsep\xmp@Author\sep\pdfx@endparse
\ifpdfx@sep@infield@
\else
- \pdfx@ConvertUTFtoBE{\pdfx@pdfAuthor}{\xmp@Author}%
+ \pdfx@ConvertUTFtoBE{\pdfx@pdfAuthor}{\xmp@Author}%
\fi %% end of \ifpdfx@sep@infield@
\fi %% end of \xmp@Author test
\expandafter\ifx\expandafter\relax\xmp@Keywords\relax
\else
%% check for multiple keywords with parser macro
\expandafter\pdfx@parseforsep\xmp@Keywords\sep\pdfx@endparse
- \ifpdfx@sep@infield@\else
- \ifluatex\else
- \pdfx@ConvertUTFtoBE{\pdfx@pdfKeywords}{\xmp@Keywords}%
- \fi
+ \ifpdfx@sep@infield@
+ \else
+ \pdfx@ConvertUTFtoBE{\pdfx@pdfKeywords}{\xmp@Keywords}%
\fi %% end of \ifpdfx@sep@infield@
\fi %% end of \xmp@Keywords test
%%
- \fi %% end of \pdfescapestring test
+%% \fi %% end of \pdfescapestring test
\endgroup
%% Affects CMap creation for certain fonts, according to glyph names
@@ -4989,11 +5048,11 @@
\begingroup
\def\sep{; }% should not be needed, but just in case
\pdfinfo{%
- \ifx\pdfx@pdfTitle\@empty\else /Title(\pdfx@pdfTitle)\fi
- \ifx\pdfx@pdfAuthor\@empty\else /Author(\pdfx@pdfAuthor)\fi
- \ifx\pdfx@pdfSubject\@empty\else /Subject(\pdfx@pdfSubject)\fi
- \ifx\pdfx@pdfKeywords\@empty\else /Keywords(\pdfx@pdfKeywords)\fi
- /Creator(\pdfx@CreatorTool)%
+ \ifx\pdfx@pdfTitle\@empty\else /Title(\pdfx@pdfTitle)^^J\fi
+ \ifx\pdfx@pdfAuthor\@empty\else /Author(\pdfx@pdfAuthor)^^J\fi
+ \ifx\pdfx@pdfSubject\@empty\else /Subject(\pdfx@pdfSubject)^^J\fi
+ \ifx\pdfx@pdfKeywords\@empty\else /Keywords(\pdfx@pdfKeywords)^^J\fi
+ /Creator(\pdfx@CreatorTool)^^J%
\ifx\@pdfcreationdate\@empty
/CreationDate(D:\pdfx@convDate)%
\else
@@ -5005,8 +5064,8 @@
\else
/ModDate(\@pdfmoddate)%
\fi
- /Producer(\pdfx@Producer)%
- /Trapped/False
+ ^^J/Producer(\pdfx@Producer)%
+ /Trapped/False^^J%
\ifnum\xmp@Part=1
/GTS_PDFXVersion(PDF/X-1\ifnum\xmp@ReleaseDate>2001
\xmp@Conformance\fi:\xmp@ReleaseDate)%
@@ -5061,11 +5120,11 @@
\begingroup
\def\sep{; }% should not be needed, but just in case
\pdfinfo{%
- \ifx\pdfx@pdfTitle\@empty\else /Title(\pdfx@pdfTitle)\fi
- \ifx\pdfx@pdfAuthor\@empty\else /Author(\pdfx@pdfAuthor)\fi
- \ifx\pdfx@pdfSubject\@empty\else /Subject(\pdfx@pdfSubject)\fi
- \ifx\pdfx@pdfKeywords\@empty\else /Keywords(\pdfx@pdfKeywords)\fi
- /Creator(\pdfx@CreatorTool)%
+ \ifx\pdfx@pdfTitle\@empty\else /Title(\pdfx@pdfTitle)^^J\fi
+ \ifx\pdfx@pdfAuthor\@empty\else /Author(\pdfx@pdfAuthor)^^J\fi
+ \ifx\pdfx@pdfSubject\@empty\else /Subject(\pdfx@pdfSubject)^^J\fi
+ \ifx\pdfx@pdfKeywords\@empty\else /Keywords(\pdfx@pdfKeywords)^^J\fi
+ /Creator(\pdfx@CreatorTool)^^J%
\ifx\@pdfcreationdate\@empty
/CreationDate(D:\pdfx@convDate)%
\else
@@ -5077,8 +5136,8 @@
\else
/ModDate(\@pdfmoddate)%
\fi
- /Producer(\pdfx@Producer)%
- /Trapped/False
+ ^^J/Producer(\pdfx@Producer)%
+ /Trapped/False^^J%
/GTS_PDFEVersion(PDF/E-1\xmp@Conformance:\xmp@ReleaseDate)%
}% end of PDF/E info
\endgroup %% end of scope for \sep
@@ -5113,11 +5172,11 @@
\begingroup
\def\sep{; }% should not be needed, but just in case
\pdfinfo{%
- \ifx\pdfx@pdfTitle\@empty\else /Title(\pdfx@pdfTitle)\fi
- \ifx\pdfx@pdfAuthor\@empty\else /Author(\pdfx@pdfAuthor)\fi
- \ifx\pdfx@pdfSubject\@empty\else /Subject(\pdfx@pdfSubject)\fi
- \ifx\pdfx@pdfKeywords\@empty\else /Keywords(\pdfx@pdfKeywords)\fi
- /Creator(\pdfx@CreatorTool)%
+ \ifx\pdfx@pdfTitle\@empty\else /Title(\pdfx@pdfTitle)^^J\fi
+ \ifx\pdfx@pdfAuthor\@empty\else /Author(\pdfx@pdfAuthor)^^J\fi
+ \ifx\pdfx@pdfSubject\@empty\else /Subject(\pdfx@pdfSubject)^^J\fi
+ \ifx\pdfx@pdfKeywords\@empty\else /Keywords(\pdfx@pdfKeywords)^^J\fi
+ /Creator(\pdfx@CreatorTool)^^J%
\ifx\@pdfcreationdate\@empty
/CreationDate(D:\pdfx@convDate)%
\else
@@ -5129,8 +5188,8 @@
\else
/ModDate(\@pdfmoddate)%
\fi
- /Producer(\pdfx@Producer)%
- /Trapped/False
+ ^^J/Producer(\pdfx@Producer)%
+ /Trapped/False^^J%
/GTS_PDFA1Version (PDF/A-\xmp@Part\xmp@conf:\xmp@ReleaseDate)%
}% end of PDF/A info
\endgroup %% end of scope for \sep
@@ -5139,21 +5198,14 @@
\fi\fi
%%----------------------------------------------------------------------
+%% 2018-12-16: xmpincl needs the ifthen package
+%% it should be loaded outside the grouping, else biblatex may barf
+%%
+\RequirePackage{ifthen}
\begingroup
-%% override the \ifpdf check of xmpincl package
-\ifxetex
- \pdftrue
-\else\ifluatex
+%% override the \ifpdf check of xmpincl package, inside the grouping
\pdftrue
-\fi\fi
-\RequirePackage{xmpincl}
-\ifxetex
- % revert \ifpdf
- \pdffalse
-\else\ifluatex
- \pdffalse
-\fi\fi
-
+ \RequirePackage{xmpincl}
%% combine coding from xmpincl and hyperxml to support XeTeX
\def\pdfx@xmpincl@xetex#1{%
\IfFileExists{#1.xmp}{%
@@ -5392,7 +5444,6 @@
%%----------------------------------------------------------------------
\ifpdfx@transliterated
%% support for bookmarks with transliterated input
- \RequirePackage{stringenc}
\ifxetex\let\pdf@escapehex\empty\fi % don't need it
\expandafter\ifx\csname pdf@escapehex\endcsname\relax
\PackageWarning{pdfx}{%