summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-06 22:14:29 +0000
committerKarl Berry <karl@freefriends.org>2018-12-06 22:14:29 +0000
commit89b6a5f0bb4c2c1ae32c47aee92f309f4263000a (patch)
treeb100f9a980a2ba8b9ce95d48b5e47c72af2f7f8d /Master/texmf-dist/source/latex/pdfx/pdfx.dtx
parent4730f384a0f5538cd55aedf11762bcc5d3aeec86 (diff)
pdfx (6dec18)
git-svn-id: svn://tug.org/texlive/trunk@49333 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/pdfx/pdfx.dtx')
-rw-r--r--Master/texmf-dist/source/latex/pdfx/pdfx.dtx2488
1 files changed, 1881 insertions, 607 deletions
diff --git a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
index 1a636a76814..31a1322d83e 100644
--- a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
+++ b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx
@@ -2,7 +2,7 @@
%
% File: pdfx.dtx
%
-% Copyright (c) 2016, CV Radhakrishnan <cvr@river-valley.org>,
+% Copyright (c) 2018, CV Radhakrishnan <cvr@river-valley.org>,
% Han The Thanh <thanh@river-valley.org>,
% Ross Moore <ross.moore@mq.edu.au>,
% Peter Selinger <selinger@mathstat.dal.ca>
@@ -19,38 +19,54 @@
%
% \fi
%
-% \CheckSum{3939}
+% \CheckSum{6102}
% \iffalse
%
%<*driver>
\pdfcompresslevel 9
\providecommand{\pdfxopt}{a-2u}
-\providecommand{\thisyear}{2017}
+\providecommand{\lastyear}{2018}
+\providecommand{\thisyear}{2018}
\begin{filecontents*}{./\jobname.xmpdata}
\Title{Generation of PDF/X- and PDF/A-compliant PDFs with pdfTeX \textemdash\ pdfx.sty}
\Author{\CVR\sep \Thanh\sep Ross Moore\sep Peter Selinger}
\Subject{This package supports generation of PDF/X-, PDF/A- and PDF/E-compliant documents, in most of their variants, using pdfLaTeX, LuaLaTeX and XeLaTeX.}
-\Keywords{PDF/X-, PDF/A- and PDF/E-compliance\sep Multilingual Metadata\sep installation\sep \TeX Live \thisyear}
+\Keywords{PDF/X-, PDF/A- and PDF/E-compliance\sep Multilingual Metadata\sep installation\sep \TeX Live \lastyear}
\PublicationType{manual}
-\Copyright{Public domain.\textLF An earlier version of this documentation was published as: TUGboat 36, No.2, pp.136\textendash 142 (2015)}
+\Contributor{Norbert Preining: 'colorprofiles' package}
+\Copyright{Public domain.}
\Copyrighted{False}
\CopyrightURL{http://tug.org/texlive/}
-\CoverDisplayDate{May \thisyear}
-\CoverDate{\thisyear-05-17}
-\CreatorTool{pdfTeX + pdfx.sty with option \pdfxopt, from TeX Live \thisyear}
+\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}
+\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.}
+\Relation{Requires the colorprofiles package for RGB and CMYK default profiles.}
+\Advisory{v1.6: Access more profiles, incl. to pdfaPilot's color profile folders.}
+\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.}
\pdfxEnableCommands{%
\def\CVR{C.V. Radhakrishnan}\def\Thanh{H\`an Th\eee Thanh}%
\def\eee{^^c3^^aa^^cc^^81 }}
\end{filecontents*}
+\PassOptionsToPackage{dvipsnames,svgnames}{xcolor}
\documentclass[a4paper]{ltxdoc}
\usepackage[\pdfxopt]{pdfx}
\usepackage{rvdtx}
\usepackage{graphicx}
+\usepackage[latin10]{inputenc}
+\input text89.def
\usepackage[T1]{fontenc}
\hypersetup{citecolor=blue}
+\newcommand{\fixmd}{${}^{\mathrm f}$}
+\newcommand{\starmd}{${}^{\ast}$}
\EnableCrossrefs
\CodelineIndex
-\RecordChanges
+\RecordChanges
\begin{document}
\DocInput{\jobname.dtx}
\PrintChanges
@@ -83,16 +99,17 @@
% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
-% \DoNotIndex{\space,\@empty,\special,\@nil,\advance\@nnil}
-% \DoNotIndex{\\,\@gobble,\@@,\@fornoop,\@fortmp,\@ifundefined}
-% \DoNotIndex{\@tempcnta,\@tempcntb,\{,\},\alph,\bgroup,\egroup}
+% \DoNotIndex{\space,\@empty,\special,\@nil,\advance\@nnil,\z@,\@@mod}
+% \DoNotIndex{\\,\@gobble,\@@,\@fornoop,\@fortmp,\@ifundefined,\@firstoftwo,\@secondoftwo}
+% \DoNotIndex{\@tempcnta,\@tempcntb,\@tempboxa,\ifnot@empty,\@this,\@firstofone}
+% \DoNotIndex{\{,\},\alph,\bgroup,\dp,\ht,\kern,\egroup}
% \DoNotIndex{\do,\end,\HN,\ifcase,\ifnum,\IfFileExists,\ifvmode}
% \DoNotIndex{\ignorespaces,\immediate,\input,\item,\jobname}
% \DoNotIndex{\leavevmode,\loop,\repeat,\makeatletter,\makeatother}
% \DoNotIndex{\meaning,\newcounter,\next,\or,\par,\renewcommand}
% \DoNotIndex{\renewcommand,\renewenvironment,\stepcounter}
% \DoNotIndex{\Tg,\thepage,\unskip,\write,\advance,\{,\}}
-% \DoNotIndex{\@ifpackageloaded,\@pdfcreationdate,\@pdfcreator}
+% \DoNotIndex{\@ifpackageloaded,\@ifclassloaded,\@pdfcreationdate,\@pdfcreator}
% \DoNotIndex{\@pdfmoddate,\AtBeginDocument,\catcode,\DeclareOption}
% \DoNotIndex{\endinput,\endlinechar,\errmessage,\everyeof,\futurelet}
% \DoNotIndex{\Hy@DisableOption,\Hy@UseMaketitleInfos,\hypersetup}
@@ -104,7 +121,7 @@
% \DoNotIndex{\pdfmdfivesum,\pdfminorversion,\pdfobj,\pdfobjcompresslevel}
% \DoNotIndex{\pdfpageattr,\pdfresetpageorigin,\pdfstringdef}
% \DoNotIndex{\pdftexbanner,\ProcessOptions,\ProvidesPackage,\RequirePackage}
-% \DoNotIndex{\scantokens,\typeout}
+% \DoNotIndex{\scantokens,\typeout,\vrule,\wd}
%
% \changes{v1.00}{2008/12/01}{Initial commit to the CVS.}
% \changes{v1.01}{2008/12/10}{glyphtounicode-cmr.tex included with the
@@ -133,12 +150,22 @@
% Adjusted to changes in the LaTeX core, affecting macros for composite
% commands; incl. \texttt{\textbackslash textsuperscript} and others.}%
% \changes{v1.5.83}{2017/05/16}{Improved support for XeLaTeX and LuaLaTeX.}%
-% \changes{v1.5.84}{2017/05/18}{Fully expand options for hyperref. Better support for
-% extended IPA letters and modifiers. Adjusted release versions and dates.}%
-% \title{Generation of PDF/X- and PDF/A-compliant PDFs
-% with pdf\TeX{} --- \texttt{pdfx.sty}}
-% \date{2017/05/18}
-% \version{1.5.84}
+% \changes{v1.5.84}{2017/05/18}{Fully expand options for hyperref. Better support
+% for extended IPA letters and modifiers. Adjusted release versions and dates.}%
+% \changes{v1.5.85}{2017/06/23}{Fixed bugs, and fully implemented L8U as
+% a pseudo-encoding; renamed L8U files into the form *-penc.def }%
+% \changes{v1.6}{2018/11/18}{Added XMP support for PDF/UA-1.
+% Added more Metadata fields and Language support.
+% Default RGB and CMYK profiles now require the colorprofiles.sty package.
+% Added file CallasColorProfiles.tex .
+% Revised glyphtounicode.sty to use variation selectors, altered maps to PUA
+% codepoints; added more glyphs via glyphtounicode-ntx.tex .
+% Support for 8-bit Hebrew encodings, some Arabic and Devanagari.
+% Updated documentation, incl. for LaTeX changes.
+% }%
+% \title{Generation of PDF/X- and PDF/A-\penalty-200 compliant PDFs with \pdftex --- \texttt{pdfx.sty}}
+% \date{2018/11/18}
+% \version{1.6}
% \keywords{PDF, PDF/A, PDF/X, pdf\TeX, \LaTeX, Multilingual Metadata}
% \author{C.\,V.\,Radhakrishnan, \Thanh, Ross Moore {\upshape\small
% and} Peter Selinger}
@@ -151,7 +178,7 @@
%
% \section[Introduction]{Introduction}
%
-% This package\footnote{A slightly earlier version of this documentation
+% This package\footnote{An earlier version of this documentation
% was published as \cite{pdfx}. All the changes since then have been developed
% and coded by the 3rd-listed author.}
% currently supports generation of PDF/X-, PDF/A- and PDF/E-compliant
@@ -160,13 +187,13 @@
% As of \TeX\,Live 2016 it now also works with Lua\LaTeX\ and Xe\LaTeX,
% when using appropriate command-line options\footnote{%
% The required invokation is:\quad
-% |xelatex --shell-escape <filename>.tex |}, but
+% |xelatex --shell-escape -output-driver="xdvipdfmx -z 0" <filename>.tex |}, but
% with some limitations --- see Sections~\ref{sssec-xetex} and \ref{sssec-luatex}.
% By `supports', we mean that the package provides correct and sufficient
% means to declare that a document conforms with a stated PDF variant
-% (PDF/X, PDF/A, PDF/E, PDF/VT, etc.) along with the version and/or
+% (PDF/X, PDF/A, PDF/E, PDF/VT, PDF/UA, etc.) along with the version and/or
% level of conformance.
-% This package also allows appropriate metadata and color profile
+% This package also allows appropriate Metadata and Color Profile
% to be specified, according to the requirements of the PDF variant.
%
% Metadata elements, most of which must ultimately be written as XML
@@ -179,18 +206,18 @@
% how this file should be constructed.
%
% \medskip
-% What this package \emph{does not} do is to check for all the details
+% What this package \emph{does not do} is to check for all the details
% of document structure and type of content that may be required
% (or restricted) within a PDF variant. For example, PDF/VT \cite{PDFVT} requires
-% well-structure parts, using Form XObject sections tagged as `/DPart'.
+% well-structured parts, using Form XObject sections tagged as `/DPart'.
% Similarly PDF/A-1a (and 2a and 3a) \cite{PDFA,PDFA2,PDFA3} require
% a fully `Tagged PDF', including a detailed structure tagging which
-% envelops the complete contents of the document.
-% This is beyond the current version of \pdftex, as commonly shipped.
+% envelops the complete contents of the document, as does also PDF/UA \cite{PDF-UA}.
+% This is beyond the current version of \LaTeX\ engines, as commonly shipped.
% So while this package provides enough to meet the declaration,
% metadata and font-handling aspects for these PDF/A variants,
% it is not sufficient to produce fully conforming PDFs.
-% However, with extra \pdftex-based software that \emph{is} capable
+% However, with extra \pdftex-based software or macro coding that \emph{is} capable
% of producing `Tagged PDF', this package can be used as part of
% the overall workflow to produce fully conforming documents.
%
@@ -225,12 +252,12 @@
%
% PDF/E is an ISO standard \cite{PDFE} intended for documents used in engineering workflows.
% PDF/VT \cite{PDFVT} allows for high-volume customised form printing, such as utility bills.
-% PDF/UA (`Universal Accessibility') is emerging as a standard \cite{PDF-UA,PDFUA1} supporting
-% Assistive Technologies, incorporating web-accessibility guidelines (WCAG)
+% PDF/UA (`Universal Accessibility') has emerged as a standard \cite{PDF-UA,PDFUA1,PDFUABSI}
+% supporting Assistive Technologies, incorporating web-accessibility guidelines (WCAG)
% for electronic documents.
% In future, PDF/H may emerge for health records and medical-related
% documents. Other applications can be envisaged.
-% Declarations and Metadata are supported for the first two of these.
+% Declarations and Metadata are supported for the first three of these.
% The others are the subject of further work; revised versions of this
% package can be expected in later years.
%
@@ -248,7 +275,7 @@
% \end{decl}
% where the options are as follows.
%
-% \subsection{Options}\label{ssec-options}
+% \subsection{Package options}\label{ssec-options}
%
% \subsubsection{PDF/A options}
%
@@ -287,12 +314,26 @@
%
% \subsubsection{PDF/E options}
%
-% PDF/E is an ISO standard intended for documents used in engineering
+% PDF/E is an ISO standard~\cite{PDFE} intended for documents used in engineering
% workflows. There is only one version of the PDF/E standard so far,
% and it is called PDF/E-1.
%
% \begin{itemize}
% \item |e-1|: generate PDF/E-1.
+% \item |e|: same as |e-1|.
+% \end{itemize}
+%
+% \subsubsection{PDF/UA options}
+%
+% PDF/UA is an ISO and ANSI standard~\cite{PDF-UA,PDFUABSI} intended for making
+% structured documents readable and navigable using Assistive Technology;
+% e.g., screen-readers, Braille keyboards and such-like.
+% Documents prepared this way can be easily saved in other formats which
+% preserve the structure, such as XML, HTML, and (Microsoft) Word-based formats.
+%
+% \begin{itemize}
+% \item |ua-1|: generate PDF/UA-1.
+% \item |ua|: same as |ua-1|.
% \end{itemize}
%
% \subsubsection{PDF/VT options}
@@ -306,8 +347,8 @@
% implemented by the |pdfx| package.
%
% \begin{itemize}
-% \item |vt-1|: generate PDF/VT-1. Experimental, not fully implemented.
-% \item |vt-2|: generate PDF/VT-2. Experimental, not fully implemented.
+% \item |vt-1|: generate PDF/VT-1, based on PDF/X-4. Experimental, not fully implemented
+% \item |vt-2|: generate PDF/VT-2, based on PDF/X-5pg. Experimental, not fully implemented.
% \item |vt-2s|: generate PDF/VT-2s. Experimental, not fully implemented.
% \end{itemize}
% By `Experimental, not fully implemented' here we mean primarily that
@@ -335,14 +376,15 @@
% use of an externally supplied color profile (instead of an embedded one),
% and/or a `g' version, which permits the use of external graphical
% content. Moreover, PDF/X-5 has an `n' version, which extends
-% PDF/X-4p by permitting additional color spaces other than Grayscale,
+% PDF/X-4p by permitting additional `Custom' color spaces other than Grayscale,
% RGB, and CMYK. For many typical uses of PDF/X, it is sufficient to
% use PDF/X-1a.
%
% \begin{itemize}
-% \item |x-1|: generate PDF/X-1.
+% \item |x-1|: generate PDF/X-1; now obsolete, doesn't validate.
% \item |x-1a|: generate PDF/X-1a. Options |x-1a1| and |x-1a3| are
% also available to specify PDF/X-1a:2001 or PDF/X-1a:2003 explicitly.
+% \item |x-2|: generate PDF/X-2; unpublished, doesn't validate.
% \item |x-3|: generate PDF/X-3. Options |x-302| and |x-303| are
% also available to specify PDF/X-3:2002 or PDF/X-3:2003 explicitly.
% \item |x-4|: generate PDF/X-4. Options |x-408| and |x-410| are
@@ -372,7 +414,7 @@
% package.
% \item |noBOM|: do not generate the optional byte-order marker. (default)
% \item |noerr|: avoids stopping when making PDF/X with an RGB profile,
-% and at other unusual situations.
+% and at other unusual situations; e.g., PDF/UA without also PDF/A.
% \item |pdf12|: use PDF 1.2, overriding the version specified by the
% applicable standard.\\This may produce a non-standard-conforming PDF file.
% \item |pdf13|: use PDF 1.3, overriding the version specified by the
@@ -449,39 +491,61 @@
% ArmSCII8 encoding of upper-range characters (byte codes 160--255),
% or a combination of both, using |\textARM| as parser macro.
% All support from |armxmp| is loaded also.
+% \item |HEBxmp|: support for hebrew letters entered using either
+% LHE input transliteration of ASCII characters, or the CP1255, CP862
+% or ISO-8859-8 (HE8) encoding of upper-range characters (byte codes 160--255),
+% or a combination of these using |\textLHE|, |\textHEBO|, |\textHEB| as parser macros.
+% All support from |hebxmp| is loaded also.
% \end{itemize}
% These `parser' options have received limited testing, so please
% report any mistakes in the UTF-8 output that you may encounter.
%
% \subsection{Data file for metadata}\label{ssec-metadata}
%
-% As mentioned above, standards-compliant PDF documents require metadata
-% to be included. The |pdfx| package expects metadata be
-% supplied in a special data file called |\jobname.xmpdata|. Here,
-% |\jobname| is usually the basename of the document's main |.tex|
-% file. For example, if your document source is in the file
-% |main.tex|, then the metadata must be in a file called
-% |main.xmpdata|. None of the individual metadata fields are
-% mandatory, but for most documents, it makes sense to define at least
-% the title and the author. For more technical aspects of metadata
-% and its uses, consult the work of the Dublin Core Initiative~\cite{DC}
-% and PRISM~\cite{PRISM}.
+% As mentioned above, standards-compliant PDF documents require
+% document-level metadata to be included.
+% This, known as an `XMP packet'~\cite{XMP-spec,XMP-ISO},
+% is like having a library catalog card included within the PDF itself. It is an unencrypted
+% portion of the PDF file, with data expressed in Extensible Markup Language (XML),
+% using Resource Description Format (RDF~\cite{RDF}) syntax, encoded as UTF-8
+% so readable by any text editing software on any modern computing platform.
+%
+% Some advantages of doing this are clear.
+% \begin{itemize}
+% \item For a librarian: cataloguing information is available within the file itself,
+% without the need to search explicitly in the visual layout of the content or elsewhere;
+% \item All actual libraries cataloguing this PDF can have consistent information;
+% including web-based indexing sites such as Google.
+% \item For the author(s): who can specify the kind of information most appropriate
+% to help readers understand the nature and purpose of the document.
+% \end{itemize}
+%
+% The |pdfx| package builds the XMP metadata from information supplied via a special data file
+% called |\jobname.xmpdata|. Here, |\jobname| is usually the basename of the document's main
+% |.tex| file. For example, if your document source is in the file |main.tex|,
+% then the metadata must be in a file called |main.xmpdata|.
+% None of the individual metadata fields are mandatory, but for most documents, it makes sense
+% to specify at least the title and the author. For more technical aspects of metadata
+% and its uses, consult the work of the Dublin Core Initiative~\cite{DC} and PRISM~\cite{PRISM}.
%
% Here is a short |.xmpdata| file:
% \begin{decl}[]
% |\Title{Baking through the ages}|\\
% |\Author{A. Baker\sep C. Kneader}|\\
+% |\Language{en-GB}|\\
% |\Keywords{cookies\sep muffins\sep cakes}|\\
% |\Publisher{Baking International}|
% \end{decl}
% You should note that multiple authors and keywords have been separated
-% by |\sep|. This |\sep| macro serves a technical purpose and is only
-% permitted within the |\Author|, |\Keywords|, and |\Publisher| fields.
+% by |\sep|. This |\sep| macro serves a technical purpose and is
+% permitted within the |\Author|, |\Keywords|, and |\Publisher| fields,
+% as well as some others. See \S\ref{mdfields} below for a complete listing
+% of the supported author-supplied metadata fields.
%
% After processing, the local directory contains a file named such as
-% |pdfa.xmpi| or |pdfx.xmpi| according to the PDF variant required.
-% This file is the complete XMP Metadata packet. It can be checked for
-% validity, using an online validator, such as at
+% |pdfa.xmpi| or |pdfe.xmpi| or |pdfx.xmpi| according to the PDF variant desired.
+% This file is the complete XMP Metadata packet.
+% It can be checked for validity, using an online validator, such as at
% \href{http://www.pdflib.com/knowledge-base/xmp-metadata/free-xmp-validator/}{www.pdflib.com}.
%
% \textbf{Warning}: The |\jobname.xmpdata| file may be included in the
@@ -491,6 +555,7 @@
% |\begin{filecontents*}{\jobname.xmpdata}|\\
% | \Title{Baking through the ages}|\\
% | \Author{A. Baker\sep C. Kneader}|\\
+% | \Language{en-GB}|\\
% | \Keywords{cookies\sep muffins\sep cakes}|\\
% | \Publisher{Baking International}|\\
% |\end{filecontents*}|\\
@@ -498,20 +563,20 @@
% |...|
% \end{decl}
% Including the metadata with the \LaTeX\ source is very convenient.
-% Having it at the top of the file also brings attention to it, placing
-% emphasis on the desirability of including metadata, and keeping it
-% accurate while the main content of the document is subject to changes
-% or revision. Macro definitions can also occur prior to the |\documentclass|
-% command, including any that may be needed within the metadata. An example
-% of this is apparent in Figure~\ref{koi8-code} occurring later.
-%
-% However, this ordering is also extremely important, else any non-ascii
-% UTF-8 byte sequences can become active characters and expand upon data
-% being written out, rather than remaining as inactive bytes.
+% Having it at the top of the file also brings attention to it, placing emphasis on
+% the desirability of including metadata, and keeping it accurate while the main
+% content of the document is subject to changes or revision.
+% Macro definitions can also occur prior to the |\documentclass| command,
+% including any that may be needed within the metadata.
+% An example of this is apparent in Figure~\ref{koi8-code} occurring later.
+%
+% However, this ordering is also extremely important, else any non-ascii UTF-8 byte
+% sequences can become active characters and expand upon data being written out,
+% rather than remaining as inactive bytes.
% If you edit the metadata supplied this way, remember to remove the
% existing copy of |\jobname.xmpdata| file before the next processing run,
-% as \LaTeX\ does not write a new copy of the file when it exists on disk
-% already, within the current working directory or elsewhere that \LaTeX\ may find.
+% as \LaTeX\ does not write a new copy of the file when it exists on disk already,
+% within the current working directory or elsewhere that \LaTeX\ may find.
% In development or testing situations the filename may need to be given as
% |./\jobname.xmpdata|, else an older version may be loaded in error.
%
@@ -528,89 +593,186 @@
% See Section~\ref{ssec-symbols} below for more information on the macros
% that can be safely used within |.xmpdata| metadata files.
%
-% \subsection{List of supported metadata fields}
+% \subsection{List of supported metadata fields}\label{mdfields}
%
-% Here is a complete list of user-definable metadata fields currently
-% supported, and the kind of information they convey.
+% Following is a complete list of user-definable metadata fields currently supported,
+% separated into particular groupings.
+% Each command is accompanied by the specific XML tagged field name (with namespace)
+% that is placed into the document-level Metadata packet, as well as the kind of information
+% being conveyed.
% More may be added in the future.
% These commands can \emph{only} be used within the |.xmpdata| file.
+%
+% Most commands take an optional argument specifying the natural language,
+% using RFC5646 (BCP 47)~\cite{BCP47} codes, in which the metadata field is given.
+% Languages for multiple entries can use e.g., |\sep[de] ...|.
+% Only those fields requiring a specific format (e.g. dates) do \emph{not}
+% support language specifiers; these are indicated with \fixmd.
+% Fields allowing more than one value are indicated with \starmd.
+% Multiple values may be given as separate instances of the macro, or as a single
+% instance with the values delimited by |\sep|, as in the example above.
%
% \subsubsection{General information:}
%
% \begin{itemize}
-% \item |\Author|: the document's human author. Separate multiple
-% authors with |\sep|.
-% \item |\Title|: the document's title.
-% \item |\Keywords|: list of keywords, separated with |\sep|.
-% \item |\Subject|: the abstract.
-% \item |\Publisher|: the publisher. Multiple pieces in a publishing
-% chain should be separated with |\sep|.
+% \item \starmd|\Author|: \hfill (|dc:creator|)\\
+% the document's human author(s). Separate multiple authors with |\sep|.
+% \item \starmd|\Title|: \hfill (|dc:title|)\\
+% the document's title; multiple language versions are supported.
+% \item \starmd\fixmd|\Language|: \hfill (|dc:language|)\\
+% list of languages used within the document.
+% \item \starmd|\Keywords|: \hfill (|dc:subject|)\\
+% list of keywords, separated with |\sep|.
+% \item \starmd|\Publisher|: \hfill (|dc:publisher|)\\
+% the publisher(s). Multiple pieces in a publishing chain should be separated with |\sep|.
+% \item \starmd|\Subject|: \hfill (|dc:description|)\\
+% the abstract, or short description.
% \end{itemize}
%
% \subsubsection{Copyright information:}\label{sssec-copy}
%
% \begin{itemize}
-% \item |\Copyright|: a copyright statement.
-% \item |\CopyrightURL|: location of a web page describing the owner
+% \item |\Copyright|: \hfill (|dc:rights|)\\
+% a copyright statement.
+% \item \fixmd|\CopyrightURL|: \hfill (|xmpRights:WebStatement|)\\
+% location of a web page describing the owner
% and/or rights statement for this document.
-% \item |\Copyrighted|: `True' if the document is copyrighted,
-% and `False' if it isn't. This is automatically set to `True'
-% if either |\Copyright| or |\CopyrightURL| is specified, but this
-% can be overridden.
+% \item \fixmd|\Copyrighted|: \hfill (|xmpRights:Marked|)\\
+% `True' if the document is copyrighted, and `False' if it isn't.
+% This is automatically set to `True' if either |\Copyright| or |\CopyrightURL| is specified,
+% but this can be overridden.
% For example, if the copyright statement is `Public Domain',
% then specify also |\Copyrighted{False}|.
+% \item \starmd|\Owner|: \hfill (|xmpRights:Owner|)\\
+% specifies the owner(s) of the document or resource.
+% \item \fixmd|\CertificateURL|: \hfill (|xmpRights:Certificate|)\\
+% gives the URL to online proof of ownership, if available.
+% \end{itemize}
+%
+% \subsubsection{more Dublin Core metadata:}\label{sssec-dc}
+% From version 1.6 of |pdfx.sty|, the following fields can be used to provide a greater
+% range of information to be specified as metadata.
+% \begin{itemize}
+% \item \starmd|\Contributor|: \hfill (|dc:contributor|)\\
+% contributor(s) other than author(s) of the PDF document.
+% \item |\Coverage|: \hfill (|dc:coverage|)\\
+% statement about the extent or scope of the document's contents.
+% \item \starmd\fixmd|\Date|: \hfill (|dc:date|)\\
+% date(s) when something significant occurred relating to the resource (e.g., version changes);
+% must be in ISO date format |YYYY-MM-DD| or |YYYY-MM|.
+% \item \fixmd|\PublicationType|: \hfill (|dc:type|)\\
+% The type of publication. If specified, must be one of `book', `catalog', `feed', `journal',
+% `magazine', `manual', `newsletter', `pamphlet'. This is automatically set to `journal'
+% if |\Journaltitle| is specified (see below), but can be overridden.
+% \item \starmd|\Relation|: \hfill (|dc:relation|)\\
+% how this PDF or resource relates to other document(s) or resources.
+% \item \fixmd|\Source|: \hfill (|dc:source|)\\
+% specifies a source document from which the PDF is derived.
+% \item \fixmd|\Doi|: \hfill (|dc:identifier|, |prism:doi|, |prism:url|)\\
+% Digital Object Identifier (DOI) for the document, without the leading `doi:'.
+% \item \fixmd|\ISBN|: \hfill (|dc:identifier|)\\
+% the ISBN for the PDF itself, or Book/Monograph of which it is part.
+% \item \fixmd|\URLlink|: \hfill (|dc:identifier|, |prism:url|)\\
+% gives a URL address for an online copy of the document.
% \end{itemize}
+%
+% The remaining Dublin Core field |(dc:format)| is always set to `|application/pdf|'.
%
% \subsubsection{Publication information:}\label{sssec-publ}
-% The following macros allow for inclusion of metadata fields,
-% as specified by the Dublin Core Initiative~\cite{DC}
-% and by PRISM~\cite{PRISM} to meet publishing requirements.
+% The following macros allow for inclusion of publication related metadata fields,
+% as specified by PRISM~\cite{PRISM} to meet publishing requirements.
% \begin{itemize}
-% \item |\PublicationType|: The type of publication. If defined, must
-% be one of `book', `catalog', `feed', `journal', `magazine', `manual',
-% `newsletter', `pamphlet'. This is automatically set to `journal'
-% if |\Journaltitle| is specified, but can be overridden.
-% \item |\Journaltitle|: The title of the journal in which the
-% document was published.
-% \item |\Journalnumber|: The ISSN for the publication in which the
-% document was published.
-% \item |\Volume|: Journal volume.
-% \item |\Issue|: Journal issue/number.
-% \item |\Firstpage|: First page number of the published version of
-% the document.
-% \item |\Lastpage|: Last page number of the published version of the
-% document.
-% \item |\Doi| : Digital Object Identifier (DOI) for the document,
-% without the leading `doi:'.
-% \item |\CoverDisplayDate|: Date on the cover of the journal issue,
-% as a human-readable text string.
-% \item |\CoverDate|: Date on the cover of the journal issue, in a
-% format suitable for storing in a database field with a `date'
-% data type; e.g. |YYYY-MM|, or |YYYY-MM-DD|.
+% \item |\Journaltitle|: \hfill (|prism:issueName|)\\
+% The title of the journal in which the document was published.
+% \item \fixmd|\Journalnumber|: \hfill (|prism:issn|)\\
+% The ISSN for the journal/series in which the document was published.
+% \item \fixmd|\Volume|: \hfill (|prism:volume|)\\
+% Journal volume.
+% \item \fixmd|\Issue|: \hfill (|prism:number|)\\
+% Journal issue/number.
+% \item \fixmd|\Firstpage|: \hfill (|prism:startingPage|, |prism:pageRange|)\\
+% First page number of the published version of the document.
+% \item \fixmd|\Lastpage|: \hfill (|prism:endingPage|, |prism:pageRange|)\\
+% Last page number of the published version of the document.
+% \item |\CoverDisplayDate|: \hfill (|prism:coverDisplayDate|)\\
+% Date on the cover of the journal issue, as a human-readable text string.
+% \item \fixmd|\CoverDate|: \hfill (|prism:coverDate|)\\
+% Date on the cover of the journal issue, in a format suitable for storing in a database
+% field with a `date' data type; e.g. |YYYY-MM|, or |YYYY-MM-DD|.
% \end{itemize}
% This is an area which can be expanded, to deal with more kinds
-% of publication.
+% of publication and metadata fields.
+% The ExtensionSchema \cite{TN0009} technique is used to add new fields.
+% Examples of this can be found in the template files |pdfx.xmp|, |pdfa.xmp|, |pdfe.xmp|.
%
% \subsubsection{Backward Compatibility}
% The following macros are also recognised, for backward compatibility
% with earlier versions of the package.
% \begin{itemize}
-% \item |\Creator|: synonymous with |\CreatorTool| which is usually handled
-% automatically anyway, but can be over-ridden.
+% \item \starmd|\AuthoritativeDomain|: \hfill (|pdfx:AuthoritativeDomain|)\\
+% specifies extra names (e.g., of companies) associated to the existence of the PDF or resource.
+% \item |\Creator|: \hfill (|xmp:CreatorTool|)\\
+% synonymous with |\CreatorTool| which is usually handled automatically anyway,
+% but can be over-ridden.
% \item |\Org|: synonymous with |\Publisher|.
% \item |\WebStatement|: synonymous with |\CopyrightURL|.
% \end{itemize}
%
+% \subsubsection{more XMP metadata:}\label{sssec-xmp}
+%
+% \begin{itemize}
+% \item \starmd|\Advisory|: \hfill (|xmp:Advisory|)\\
+% noteworthy information; e.g., revision data or changes.
+% \item \fixmd|\BaseURL|: \hfill (|xmp:BaseURL|)\\
+% base-URL for relative hyperlinks within the PDF.
+% \item \starmd|\Identifier|: \hfill (|xmp:Identifier|)\\
+% more advance forms than (|dc:identifier|); see~\cite{XMP-spec,XMP-ISO}.
+% \item |\Nickname|: \hfill (|xmp:Nickname|)\\
+% a pseudonym or `nickname' as a colloquial identifier for the resource.
+% \item \starmd|\Thumbnails|: \hfill (|xmp:Thumbnails|)\\
+% allows small page images to be associated with each page of the PDF.
+% An appropriate XML-compatible representation is required for such images.
+% \end{itemize}
+%
+% \subsubsection{PDF standards metadata:}\label{sssec-pdfstd}
+% The following metadata fields are generated automatically by the \LaTeX\ engine.
+% Some are dependent on the particular loading options that specify the desired compliance
+% with a PDF standard, and level of conformance.
+% There are no separate user-macros to alter these.
+% The first three dates are usually set to be identical.
+%
+% \begin{itemize}
+% \item (|xmp:CreateDate|) : creation date\&time of the PDF.
+% \item (|xmp:MetadataDate|) : creation date\&time of the Metadata for the PDF.
+% \item (|xmp:ModifyDate|) : date\&time of latest modifications to the PDF.
+% \item (|xmpMM:DocumentID|) : unique identifier for the PDF, based on MD5 sum.
+% \item (|xmpMM:InstanceID|) : unique identifier based on creation date\&time.
+% \item (|pdf:Producer|) : \TeX\ engine used; either `Lua\TeX', `Xe\TeX', `\pdftex'.
+% \item (|pdf:Trapped|) : currently always set to `False'.
+% \item (|pdfaid:part|) : |1|, |2| or |3| for PDF/A-?
+% \item (|pdfaid:conformance|) : |a|, |b| or |u| for PDF/A-??
+% \item (|pdfuaid:part|) : currently |1| for PDF/UA-1
+% \item (|pdfe:ISO_PDFEVersion|) : currently |1| for PDF/E-1
+% \item (|pdf:Version|) : |PDF/X-1|, |PDF/X-2| or |PDF/X-3|
+% \item (|pdfx:GTS_PDFXVersion|) : e.g., |PDF/X-1a:2003| up to PDF/X-3 ;
+% but no year for PDF/X-4 and PDF/X-5 variants
+% \item (|pdfx:GTS_PDFXConformance|) : e.g., |PDF/X-1a:2003| up to PDF/X-2
+% \item (|pdfxid:GTS_PDFXVersion|) : e.g., |PDF/X-4p:2008| after PDF/X-3
+% \item (|pdfvtid:GTS_PDFVTVersion|) : e.g., |PDF/VT-2s| for PDF/VT
+% \item (|pdfvtid:GTS_PDFVTModDate|) : same as |xmp:ModifyDate|
+% \end{itemize}
+%
% \subsection{Symbols permitted in metadata}\label{ssec-symbols}
%
% Within the metadata, all printable ASCII characters except
-% |\|, |{|, |}| and |%| represent themselves. Also, all printable
-% Unicode characters from the basic multilingual plane (i.e., up to
-% code point U+FFFF) can be used directly with the UTF-8 encoding.
-% (Please note: encodings other than UTF-8 are not currently supported
-% in the metadata). Consecutive whitespace characters are combined
-% into a single space. Whitespace after a macro such as |\copyright|,
-% |\backslash|, or |\sep| is ignored. Blank lines are not permitted.
+% |\|, |{|, |}| and |%| represent themselves. Also, all printable Unicode characters
+% from the basic multilingual plane (i.e., up to code point U+FFFF)
+% can be used directly with the UTF-8 encoding.
+% (Please note: encodings other than UTF-8 are not supported in the metadata,
+% except as arguments to `parser-macros'; see Section~\ref{ssec-xmplang}).
+% Consecutive whitespace characters are combined into a single space.
+% Whitespace after a macro such as |\copyright|, |\backslash|, or |\sep| is ignored.
+% Blank lines are not permitted.
% Moreover, the following markup can be used:
%
% \begin{itemize}
@@ -621,13 +783,41 @@
% \item |\backslash|: a literal backslash |\|
% \item |\copyright|: the copyright symbol \textcopyright
% \end{itemize}
-% The macro |\sep| is only permitted within |\Author|, |\Keywords|,
-% and |\Publisher|. It's purpose is to separate multiple authors,
-% keywords, etc. appropriately and consistently in the different ways
-% that such information is represented within the PDF file.
+% The macro |\sep| is permitted within |\Author|, |\Keywords|,
+% |\Publisher|, and other macros marked with \starmd\ above.
+% It's purpose is to separate multiple authors, keywords, etc.
+% to appear as separate list items appropriately and consistently
+% in the different ways that such information is represented
+% within the PDF file.
% The package takes care of this when |\sep| is used.
+% For example, in the XMP metadata, it expands as |</rdf:li><rdf:li>| tagging.
+%
+% \subsubsection{PDF Info strings}\label{sssec-info}
+% When |\sep| is not used within its argument, the metadata from |\Title|,
+% |\Author| and |\Keywords| is also included in the PDF |/Info| dictionary.
+% When this is the case, validation for the declared standard
+% will occur only if the corresponding |/Info| item and XMP metadata field
+% convert to exactly the same Unicode string.
+% This cannot happen when |\sep| is used, so the |/Info| items are then not populated.
+%
+% 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:
+% \begin{decl}[]
+% pdfinfo -meta <filename>.pdf \textbar\ grep 'dc:'
+% \end{decl}
+% to extract just the Dublin Core metadata fields.
+%
+% Another possibility is to \emph{not} use |\sep| with multiple authors and/or keywords.
+% Instead replace it with simply `|, |'. We do not recommend doing this, as more sophisticated
+% metadata tools will see the result as a single value, rather than multiple authors, say.
+% Different language codes cannot be applied when done this way.
+% However, some authors may find this a satisfactory solution that suits their own tools.
+%
+%
+% \subsection{Macros permitted in metadata}\label{ssec-macros}
%
-% \medskip
% Other \TeX\ macros actually can be used, provided the author is very
% careful and not ask for too-complicated \TeX\ or \LaTeX\ expansions
% into internal commands or non-character primitives; basically just accents,
@@ -646,7 +836,7 @@
% \begin{decl}[]
% | H\unhbox \voidb@x \bgroup \let \unhbox \voidb@x \setbox \@tempboxa ... |
% \end{decl}
-% going on for many lines. This clearly has no place within the XMP Metadata.
+% going on for many lines. This clearly has no place within the XMP metadata.
% To get around this, one could try using simplified macro definitions
% \begin{decl}[]
% | \pdfxEnableCommands{|\\
@@ -658,7 +848,7 @@
%
% This works fine for metadata fields that appear just in the XMP packet.
% However, it is not sufficient for the PDF |/Author| key, which must exactly match
-% with the |dc:creator| Metadata element. What is needed instead is
+% with the |dc:creator| metadata element. What is needed instead is
% \begin{decl}[]
% | \pdfxEnableCommands{|\\
% | \def\thanh{H^^c3^^a0n Th\eee Thanh}\def\eee{^^c3^^aa^^cc^^81 }}|
@@ -679,7 +869,7 @@
% produce the required UTF-8 byte sequences.
%
% \medskip
-% This current version (1.5.8) now extends this input encoding to include
+% Since version (1.5.8) this input encoding was extended to include
% macro definitions covering \LaTeX's internal character representation
% of other alphabets (e.g., extended Latin, Cyrillic, Greek, etc.).
% However this can become memory intensive, requiring a large number of
@@ -694,7 +884,7 @@
% part of the |pdfx| package.
%
%
-% \subsection{Color profiles}
+% \subsection{Color profiles}\label{sec-profiles}
%
% Most standards compliant PDF documents require a \emph{color
% profile} to be embedded within the file. In a nutshell, such a profile
@@ -730,7 +920,11 @@
% \end{decl}
% Within the arguments of these macros, the characters |<|, |>|, |&|,
% |^|, |_|, |#|, |$|, and |~| can be used as themselves, but
-% |%| must be escaped as |\%|. The defaults are:
+% |%| must be escaped as |\%|.
+%
+% From version (1.6) the default RGB and CMYK color profiles are now supplied
+% using the |colorprofiles| package by Norbert Preining and Ross Moore~\cite{colorp}.
+% Earlier versions of \texttt{pdfx.sty} set the defaults via:
% \begin{decl}[]
% |\setRGBcolorprofile{sRGB_IEC61966-2-1_black_scaled.icc}|\\
% | {sRGB_IEC61966-2-1_black_scaled}|\\
@@ -741,7 +935,9 @@
% | {FOGRA39 (ISO Coated v2 300\% (ECI))}|\\
% | {http://www.argyllcms.com/}|
% \end{decl}
-% Some color profile files may be obtained from the International
+% These can still be used if the files from earlier version are available
+% on your \TeX\ system, but they will need to be requested, as above.
+% Other color profile files may be obtained from the International
% Color Consortium. Please take a look at
% \url{http://www.color.org/iccprofile.xalter}.
%
@@ -776,29 +972,41 @@
% \texttt{\string\IFRAXXX} & ISOnewspaper30v4 ISO/DIS 12647-3:2004\\
% \end{tabular}
% \end{decl}
-% As of the time of writing, only the first six of these result in PDFs
+% As of the time of first compiling this list, only the first six of these result in PDFs
% which can validate with external profiles (i.e., for PDF/X-4p and PDF/X-5pg)
-% using current versions of Adobe Acrobat Pro software. It is unclear
-% whether the others (incl.\,\verb|\IFRAXXVI| and \verb|\IFRAXXX|) fail due
+% using the then-current versions of Adobe Acrobat Pro software. It is unclear
+% whether the others (incl.\,\verb|\IFRAXXVI| and \verb|\IFRAXXX|) failed due
% to incorrect data or problems in the validation software.
-% All but those last two can be used for valid embedded profiles,
-% providing the corresponding files can be found. The following macro
-% is used to set the (absolute or relative) path, on the local operating system,
-% to the location of color profile files.
+% Since then, with updates to Acrobat Pro, almost all the others have been verified
+% to work, except \verb|\IFRAXXX| which seems no longer available.
+% Thus these commands come with a `use at own risk' clause.
+%
+% For `external' profiles, there is a command |\setEXTERNALprofile|, taking 9 arguments,
+% that must be used. Consult |AdobeExternalProfiles.tex| for examples of its use.
+%
+% All but the last of the macros listed above can also be used for valid embedded profiles,
+% providing the corresponding files can be found.
+% The following macros are used to set the (absolute or relative) path,
+% on the local operating system, to the location of color profile files.
% \begin{decl}
% \defmacro{pdfxSetRGBcolorProfileDir}\marg{path to RGB color profiles}\\
% \defmacro{pdfxSetCMYKcolorProfileDir}\marg{path to CMYK profiles}
% \end{decl}
-% On a Macintosh, one uses either a macro |\MacOSColordir| which expands
-% into the path for system-provided profiles:
+% On a Macintosh, there are various places where the color profiles may be found.
+% One can use either a macro |\MacOSColordir| which expands
+% into the path for system-provided profiles:
% \begin{decl}[]
% |/System/Library/ColorSync/Profiles/|
% \end{decl}
+% or the macro |\MacOSLibraryColordir| expanding to:
+% \begin{decl}[]
+% |/Library/ColorSync/Profiles/|
+% \end{decl}
% or |\AdobeMacOSdir| which expands into the path:
% \begin{decl}[]
% |/Library/Application Support/Adobe/Color/Profiles/Recommended/|
% \end{decl}
-% Under Windows the macro is |\WindowsColordir| which expands:
+% Under Windows an available macro is |\WindowsColordir| which expands to:
% \begin{decl}[]
% |C:\Windows\System32\Spool\Drivers\Color/|
% \end{decl}
@@ -817,31 +1025,59 @@
% cause a validation problem, as these are interpreted as RGB colours
% even when 4 components are given. This may be a bug in validators,
% as PDF specifies that the number of components should match the color space.
-%
+%
+% \subsubsection{`Custom' color spaces}\label{ssec-custom}
+%
+% It is also possible to specify `Custom' color spaces, other than RGB or CMYK.
+% Here is an example command |\viiIndigoTAC|, defined as follows:
+% \begin{decl}[]
+% \%\% 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 |\\
+% |}\%|
+% \end{decl}
+% which uses a profile that accompanies the \texttt{pdfaPilot} software from
+% Callas Software Gmbh~\cite{pdfaPilot}.
+% The macro |\CallasMacOSpdfaPilotdir|, defined in the file \texttt{CallasColorProfiles.tex},
+% specifies the directory where this Custom profile is located, when installed under MacOS.
+% One needs to |\input CallasColorProfiles.tex| \emph{before} loading the |pdfx| package.
+% Macros for other directories are also defined in this file.
%
% \subsection{Notes on the internal representation of metadata}
%
% Within the PDF file, metadata is deposited in two places: some data
% goes into the native PDF |/Info| dictionary, and some data goes into
% an XMP packet stored separately within the file. XMP is Adobe's
-% Extensible Metadata Platform, and is an XML-based format. See
-% \href{http://www.adobe.com/devnet/xmp/}{Adobe XMP Development
-% Center} for more exhaustive information about XMP. An XMP Toolkit
-% SDK which supports the GNU/Linux, Macintosh and Windows operating
-% systems is also provided under modified BSD licence.
-%
-% Some of the metadata, such as the author, title, and keywords, are
-% stored \emph{both} in the XMP packet and in the |/Info|
-% dictionary. For the resulting file to be standards-compliant, the two
-% copies of the data must be identical. All of this is taken care of
-% automatically by the |pdfx| package.
+% Extensible Metadata Platform~\cite{XMP-spec,XMP-ISO}, and is an XML-based format.
+% See \href{http://www.adobe.com/devnet/xmp/}{Adobe XMP Development Center}
+% for more exhaustive information about XMP.
+% An XMP Toolkit SDK which supports the GNU/Linux, Macintosh and Windows operating
+% systems is also available under modified BSD licence.
+%
+% Some of the metadata, such as the author, title, and keywords, can be
+% stored \emph{both} in the XMP packet and in the |/Info| dictionary.
+% For the resulting file to be standards-compliant, the two copies of the data
+% must be identical. This is taken care of automatically by the |pdfx| package,
+% except when |\sep| is used to handle multiple entries, as discussed above
+% in \S\ref{sssec-info}. In such cases the string is not included within the |/Info|
+% dictionary. Note that this is in accordance with the PDF 2.0 specification~\cite{PDF20},
+% which deprecates use of the |/Info| dictionary for such metadata.
%
-% In principle, users can resort to alternate ways to create an XMP
-% file for inclusion in PDF. In this case, users should create a file
-% |pdfa.xmp| or |pdfx.xmp| (etc., depending on the PDF flavor)
-% containing the pre-defined data. However, this is an error-prone
-% process and is not recommended for most users. If there is a
-% particular field of metadata that you need and that is not currently
+% In principle, users can resort to alternate ways to create an XMP file
+% for inclusion in PDF. In this case, one should create a customised template
+% file |pdfa.xmp| or |pdfx.xmp| or |pdfe.xmp| (etc., depending on the PDF flavor)
+% containing the pre-defined data. This can be done by modifying the ones supplied
+% with the |pdfx| package. However, this is an error-prone process and is
+% \emph{not} recommended for most users.
+% If there is a particular field of metadata that you need and that is not currently
% supported, please contact the package authors.
%
% |pdfx| makes use of the |xmpincl| package to include XMP data into
@@ -880,8 +1116,8 @@
% 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|.
% Create a directory named |pdfx| under |$TEXMF/tex/latex| and copy the files
-% |pdfx.sty|, |8bit.def|, |glyphtounicode-cmr.tex|, as well as the other
-% |*.tex|, |l8u*.def|, |*.icc| and |*.xmp| files, into it. Then update
+% |pdfx.sty|, |8bit.def|, |glyphtounicode-cmr.tex|, |glyphtounicode-ntx.tex| as well
+% as the other |*.tex|, |l8u*-penc.def| and |*.xmp| files, into it. Then update
% \TeX's file database using the appropriate command for your distribution
% and operating system (such as |texhash| or |mktexlsr|, or similar).
%
@@ -900,7 +1136,7 @@
% \item |xcolor| for ensuring consistent use of the color model
% appropriate the PDF variant, within text and hyperlinks
% (when allowed).
-% \item |glyphtounicode.tex| (\pdftex\ only) maps glyph names
+% \item |glyphtounicode.tex| (not Xe\LaTeX) maps glyph names
% to corresponding Unicode code-points.
% \item |ifluatex| allowing coding specific to Lua\LaTeX.
% \item |ifxetex| allowing coding specific to Xe\LaTeX.
@@ -952,7 +1188,7 @@
% validate to a particular PDF standard, one need to use a command
% to run the \TeX\ engine, as follows.
% \begin{decl}[]
-% |xelatex -shell-escape <filename>.tex |
+% |xelatex -shell-escape -output-driver="xdvipdfmx -z 0" <filename>.tex |
% \end{decl}
% The |-shell-escape| option allows a command-line task to be run,
% which writes the creation-date \& time of the running job into
@@ -963,6 +1199,10 @@
% this need for |-shell-escape| must be viewed as imposing a limitation on the
% work-flows in which this can be safely used.
%
+% The |-output-driver="xdvipdfmx -z 0"| suppresses compression, which
+% is not allowed for the XMP metadata packet. Without this, the resulting PDF
+% 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|,
% the input is accepted and a PDF produced. Yet there will be garbage
@@ -1026,24 +1266,21 @@
% \item |pdfvt.xmp| --- specimen |xmp| template for PDF/VT.
% \item |pdfx.xmp| --- specimen |xmp| template for PDF/X.
% \item |8bit.def| --- custom input encoding.
-% \item |l8uenc.def| --- input encoding macro declarations.
-% \item |l8uarb.def| --- input macro declarations for Arabic.
-% \item |l8uarm.def| --- input macro declarations for Armenian.
+% \item |l8u-penc.def| --- input encoding macro declarations.
+% \item |l8uarb-penc.def| --- input macro declarations for Arabic.
+% \item |l8uarm-penc.def| --- input macro declarations for Armenian.
% \item |armglyphs.dfu| --- Unicode mapping for Armenian letters.
-% \item |l8ucyr.def| --- input macro declarations for Cyrillic alphabet.
-% \item |l8udev.def| --- input macro declarations for Devanagari.
-% \item |l8ugrk.def| --- input macro declarations for Greek alphabet.
-% \item |l8ulat.def| --- input macro declarations for Latin 1--9 encodings.
-% \item |l8umath.def| --- input macro declarations for mathematical symbols.
-% \item |glyphtounicode-cmr.tex| --- maps glyph names to corresponding
-% Unicode for Computer Modern and other \TeX-specific fonts.
-% \item |coated_FOGRA39L_argl.icc| --- CMYK color profile
-% (freely distributable).
-% \item |sRGB_IEC61966-2-1_black_scaled.icc| --- RGB color profile
-% freely distributable.
-% \item |ICC_LICENSE.txt| --- license for the color profiles.
+% \item |l8ucyr-penc.def| --- input macro declarations for Cyrillic alphabet.
+% \item |l8udev-penc.def| --- input macro declarations for Devanagari.
+% \item |l8ugrk-penc.def| --- input macro declarations for Greek alphabet.
+% \item |l8uheb-penc.def| --- input macro declarations for Hebrew alphabet.
+% \item |l8ulat-penc.def| --- input macro declarations for Latin 1--9 encodings.
+% \item |l8umath-penc.def| --- input macro declarations for mathematical symbols.
+% \item |glyphtounicode-cmr.tex|, |glyphtounicode-ntx.tex| --- maps glyph names
+% to corresponding Unicode for Computer Modern and other \TeX-specific fonts.
% \item |AdobeColorProfiles.tex| --- macros for inclusion of Adobe-supplied color profiles.
% \item |AdobeExternalProfiles.tex| --- macros for use of external color profiles.
+% \item |CallasColorProfiles.tex| --- macros for profiles included with Callas pdfaPilot software.
% \end{itemize}
%
% \subsubsection{Documentation \& Examples}
@@ -1064,10 +1301,13 @@
% \item |src/pdfx.xmpdata| --- metadata for the documentation.
% \item |src/rvdtx.sty| --- used by |pdfx.dtx|.
% \item |src/Makefile| --- a Makefile for building the documentation.
+% \item |src/MANIFEST| --- list of files in this directory.
+% \item |src/text89.def| --- used with Figure\,\ref{ex-arm} in the documentation.
% \item |src/{arm-start,koi8-example,koi8-example2,latin2-example}.tex|
% --- used in the documentation with figures showing example coding.
-% \item |src/{TL-POL-meta,TL-RU-LICRs,TL-RU-metadata,TL-RU-toc,armtex-meta,usage-meta,|\\
-% |math-assign5}.png| --- screenshot images showing multilingual and other metadata.
+% \item |src/{TL-POL-meta,TL-RU-LICRs,TL-RU-metadata,TL-RU-toc,Armenian-example-UTF8,|\\
+% |armtex-meta,usage-meta,math-assign5}.png| --- screenshot images showing multilingual
+% and other metadata.
% \end{itemize}
%
% \subsection{Miscellaneous information}
@@ -1118,7 +1358,7 @@
% using \TeX, \LaTeX\ and other \TeX-based formats, include similar
% metadata information, much of which currently does not accompany the
% resulting PDF. It is becoming increasingly common, if not yet a legal
-% requirement, for PDFs to satisfy a standard that includes inclusion
+% requirement, for PDFs to satisfy a standard that requires inclusion
% of metadata. This is especially so for government agencies and institutions
% receiving government funding, in several countries around the world.
%
@@ -1185,18 +1425,29 @@
%
% \begin{figure}[htb]
% \centering
-% \includegraphics[scale=.35]{TL-RU-metadata}
-% \caption{Metadata generated from the coding shown in Figure~\ref{koi8-code},
+% \includegraphics[scale=.33]{TL-RU-metadata}
+% \caption{Metadata generated from the coding shown in Figure\,\ref{koi8-code},
% viewed using Acrobat Pro's `Additional Metadata \dots' panel.}\label{koi8-meta}
% \end{figure}
+% \begin{figure}[htb]
+% {\UseRawInputEncoding
+% \begin{decl}[]
+% \input{koi8-example}
+% \end{decl}
+% }%
+% \setbox0=\hbox{\kern-10cm\texttt{\`{ }\^{ }\~{ }\"{ }\r{ }\^{ }\u{ }\H{ }\'{ }\k{ }\v{ }\.{ }\i}}%
+% \ht0=0pt\dp0=0pt\box0\vskip-\baselineskip
+% \caption{Example of cyrillics in metadata, shown as if \texttt{T1}-encoded.
+% See Figure\,\ref{koi8-meta} for the actual result.}\label{koi8-code}
+% \end{figure}
%
% \subsubsection[Metadata with Cyrillics]{Metadata with Cyrillics}\label{sssec-cyr}
%
-% Here is a `real-world' example, with Figure~\ref{koi8-meta} showing the metadata
+% Here is a `real-world' example, with Figure\,\ref{koi8-meta} showing the metadata
% as could be produced for the Russian language version of the \TeX\ Live documentation,
-% from coding as shown in Figure~\ref{koi8-code}.
-% The source file itself is actually encoded for KOI8-R, as indicated by
-% |\usepackage[koi8-r]{inputenc}|,
+% from coding as shown in Figure\,\ref{koi8-code}.
+% The source file itself is actually encoded for KOI8-R, as indicated by the presence
+% of the code line |\usepackage[koi8-r]{inputenc}|,
% but is deliberately shown here encoded as |T1|~\cite[p.\,449]{LC2}.
% This difference is immaterial for checking the validity of the metadata.
% For example, the stream of upper (accents, etc.) characters within
@@ -1205,15 +1456,6 @@
% Strings for the |\Subject| and |\Keywords| are taken from the first actual paragraph
% in the document, and from early subsection titles.
%
-% \begin{figure}[htb]
-% \begin{decl}[]
-% \input{koi8-example}
-% \end{decl}
-% \setbox0=\hbox{\kern-10cm\texttt{\`{ }\^{ }\~{ }\"{ }\r{ }\^{ }\u{ }\H{ }\'{ }\k{ }\v{ }\.{ }\i}}%
-% \ht0=0pt\dp0=0pt\box0\vskip-\baselineskip
-% \caption{Example of cyrillics in metadata, shown as if \texttt{T1}-encoded.
-% See Figure~\ref{koi8-meta} for the actual result.}\label{koi8-code}
-% \end{figure}
% It is the `parser' command/macro |\textKOI{ ... }| that indicates that the upper range
% characters (having byte codes 128--255) are to be treated as KOI8-R characters,
% rather than as part of UTF-8 byte sequences. It works by examining each byte in sequence,
@@ -1221,8 +1463,8 @@
% This happens during the processing of data from |\jobname.xmpdata| for fleshing-out
% the XMP metadata packet to be included within the final PDF/A document.
%
-% The `parser' macros defined for various encodings, are given in figure~\ref{parsers}.
-% In Section~\ref{ssec-xmplang} the package options are given
+% The `parser' macros defined for various encodings, are given in Figure\,\ref{parsers}.
+% In Section\,\ref{ssec-xmplang} the package options are given
% for loading the appropriate support for desired languages or alphabets.
% Support for other encodings can be added, if there proves to be a need.
%
@@ -1242,10 +1484,17 @@
% |\textKOI| & KOI8-R, KOI8-RU & cyrillic alphabets \\
% |\textLGR| & LGR, ISO-8859-7 & Greek \& Polytonic Greek\\
% |\textARM| & Arm\TeX, ArmSCII8 & Armenian\\
+% |\textHEB| & HE8, ISO-8859-8, CP1255 & Hebrew\\
+% |\textHEBO| & CP862 & Hebrew\\
% |\(...\)| & parses simple mathematical expressions\\\hline
% \end{tabular}
% \caption{Parser macros, defined for specific types of input.}\label{parsers}
% \end{figure}
+% \begin{figure}[hbt]
+% \centering
+% \includegraphics[scale=.5]{TL-RU-LICRs}
+% \caption{How to see LICRs in the \texttt{.log} window.}\label{koi8-LICR}
+% \end{figure}
%
% With encoded characters marked in this way with a `parser' macro,
% it is actually possible to mix UTF-8 metadata with other bytes;
@@ -1262,17 +1511,20 @@
% different encodings. Thus LICRs allow for a reliable representation
% passed to a different context; think `I $=$ Interchange'.
%
-% \begin{figure}[htbp]
-% \centering
-% \includegraphics[scale=.5]{TL-RU-LICRs}
-% \caption{How to see LICRs in the \texttt{.log} window.}\label{koi8-LICR}
-% \end{figure}
-% \begin{figure}[htbp]
+% \begin{figure}[hbt]
+% {\UseRawInputEncoding
% \begin{decl}[]
% \input{koi8-example2}
% \end{decl}
+% }%
% \caption{Example of cyrillics in metadata, using LICRs.}\label{koi8-code2}
% \end{figure}
+% \begin{figure}[htbp]
+% \centering
+% \includegraphics[scale=.5]{TL-RU-toc}
+% \caption{How to get desired LICRs into the \texttt{.toc} file.}\label{koi8-toc}
+% \end{figure}
+%
% Figure~\ref{koi8-LICR} shows how to see this.
% The document source in the lower portion clearly shows the cyrillic
% input, whereas the |.log| messages in a command-line window above
@@ -1285,7 +1537,7 @@
% The |.xmpdata| file might now look as in Figure~\ref{koi8-code2}.
% Although very verbose, this should be resistant to any corruption due to
% character encodings, and produces the same result within the PDF,
-% as in Figure~{koi8-meta}.
+% as in Figure~\ref{koi8-meta}.
%
% Alternatively one can exploit the |.toc| file, using \LaTeX's command
% |\addtocontents|, as shown in Figure~\ref{koi8-toc}.
@@ -1293,12 +1545,6 @@
% of the |.toc| file, taking care to remove anything of a non-character
% nature (e.g., implementing the size and spacing of the letters in \TeX).
%
-% \begin{figure}[htb]
-% \centering
-% \includegraphics[scale=.5]{TL-RU-toc}
-% \caption{How to get desired LICRs into the \texttt{.toc} file.}\label{koi8-toc}
-% \end{figure}
-%
% Of course once you have harvested the metadata in this format, remove
% or comment-out those extra |\showLICRs| to get uninterrupted processing.
% Similarly comment-out the extra |\addtocontents| lines, else the real
@@ -1323,9 +1569,11 @@
%\end{figure}
%
%\begin{figure}[!htp]
+% {\UseRawInputEncoding
%\begin{decl}[]
% \input{latin2-example}
%\end{decl}
+% }%
%\caption{Start of the \LaTeX\ source for the Polish version of \TeX\ Live
% documentation. Although Latin-2 encoded, the bytes are shown here using
% \LaTeX's \texttt{T1} encoding \cite[p.\,449]{LC2}.}\label{tldoc-pol}
@@ -1361,7 +1609,7 @@
% add verbatim markers (\texttt{$\vert$...$\vert$}) and adjust line lengths for display
% within Figure~\ref{tldoc-pol}. This file's contents is included as part of the
% documentation via |\input{latin2-example}| within an environment that handles
-% presentation aspects.
+% presentation aspects, and (since 2018) declares |\UseRawInputEncoding|.
%
% What \emph{cannot} be done is to paste the preamble content directly into |pdfx.dtx|.
% Consider what would then happen, using `t{\l}umaczy' (`translators', on line 10
@@ -1371,9 +1619,9 @@
% However, it occurs at slot |"B3| within Latin-2 encoding.
% In the |T1| font encoding \cite[p.\,449]{LC2} the character glyph name
% for slot |"B3| is |/scedilla|, which is what shows in Figure~\ref{tldoc-pol}.
-% When the `\l' is pasted directly into
-% a UTF-8 file and shown verbatim, the result is the pair of glyphs
-% |"C5| (|/Aring|) and |"82| (|/Cacute|); \emph{viz.} |tłumaczy|.
+% When the `\l' is pasted directly into a UTF-8 file and shown verbatim,
+% the result is the pair of glyphs |"C5| (|/Aring|) and |"82| (|/Cacute|);
+% \emph{viz.} {\UseRawInputEncoding |tłumaczy|}.
%
% As with Figure~\ref{koi8-code} it is not important that the correct characters
% are shown here, but that the metadata in |\jobname.xmpdata| corresponds to what
@@ -1559,11 +1807,14 @@
% how the word indicated in red is obtained via parsing.}\label{arm-meta}
% \end{figure}
%
-% \begin{figure}[!htp]
+% \begin{figure}[!htbp]
+% \let\small\scriptsize
+% {\UseRawInputEncoding
% \begin{decl}[]
% \input{arm-start.tex}%
% \end{decl}
-%\caption{Enriched \LaTeX\ source for the Armenian version of the \ArmTeX\ manual,
+% }%
+% \caption{Enriched \LaTeX\ source for the Armenian version of the \ArmTeX\ manual,
% with added metadata demonstrating the \ArmTeX\ transliteration scheme for \texttt{OT6} encoding.
% Also shown is coding used to produce bookmarks from the transliteration.}\label{arm-code}
% \end{figure}
@@ -1572,7 +1823,7 @@
% TeXLive: \textcolor{urlcolor}{\texttt{.../2016/texmf-dist/doc/generic/armenian/}}}
% provides the method to typeset Armenian, with input being specified in various ways
% including a transliteration scheme from ASCII input. This transliteration is directed
-% at the use of fonts using the |OT6| encoding, developed for this purpose.
+% at the use of the |OT6| encoding, developed for this purpose.
% Each way is supported by |pdfx.sty| with appropriate loading options, similar
% to the support for Greek~(see Section~\ref{sssec-grk}).
% \begin{itemize}
@@ -1584,6 +1835,8 @@
% |AR8xmp|: using the \ArmTeX\ (|OT6|) transliteration scheme or with upper-range
% characters in |ArmSCII8| encoding, using the `parser' macro |\textARM|.
% \end{itemize}
+%
+% \goodbreak\noindent
% There are 39 letters in the Armenian alphabet, so the transliteration includes
% many 2-letter combinations to specify the desired character. Whereas Greek uses
% punctuation symbols to specify diacritics, Armenian requires either ligatures
@@ -1681,7 +1934,7 @@
% Sample `real-world' documents would be greatly appreciated.
%
%
-% \subsection[L8U Encoding]{L8U Encoding}\label{ssec-L8U}
+% \subsection[L8U pseudo-encoding]{L8U pseudo-encoding}\label{ssec-L8U}
%
% To understand how |pdfx| handles the translation into UTF-8 of input that is not already
% in that format, we'll briefly discuss \LaTeX's font-encoding mechanism, which is the
@@ -1690,9 +1943,9 @@
% Various \LaTeX\ packages declare this as LICR in different ways, for different purposes.
%\begin{decl}[]
% |greek-fontenc/lgrenc.def:\DeclareTextSymbol{\textgamma}{LGR}{103}|\\
+% |tipa/t3enc.def:\DeclareTextSymbol\textgamma{T3}{71} % Gamma|\\
% |greek-fontenc/greek-euenc.def:\DeclareTextCommand{\textgamma}{\LastDeclaredEncoding}{γ}|\\
% |hyperref/puenc.def:\DeclareTextCommand{\textgamma}{PU}{\83\263}%* U+03B3|\\
-% |tipa/t3enc.def:\DeclareTextSymbol\textgamma{T3}{71} % Gamma|\\
% |ucs/data/uni-2.def:\uc@dclc{611}{tipa}{\textgamma}%|\\
% |ucs/data/uni-3.def:\uc@dclc{947}{default}{\textgamma}%|
% \end{decl}
@@ -1702,22 +1955,30 @@
% handles UTF-8 input, mapping it to LICRs, with {\color{verbcolor}\texttt{pdfx.sty}}
% we need the reverse mapping into UTF-8, not just from LICRs but also from legacy
% 8-bit encodings and transliteration schemes.}.
-% The |LGR| refers to greek fonts, encoded as explained in Section~\ref{sssec-grk},
-% whereas |PU| is used to create bookmark strings, and other PDF string inclusions,
-% using |\pdfstringdef| from the |hyperref| package.
-% IPA phonetics use the |T3| encoding, allowing |\textgamma| to refer to a character
-% from a completely different Unicode block.
+% In four of these examples there is a number, which refers to a position in an `encoding vector'
+% for the particular font used to place the character onto the printable page.
+% For example |LGR| refers to greek fonts, encoded as explained in Section~\ref{sssec-grk}.
+% IPA phonetics use the |T3| encoding, so |\textgamma| refers to a character
+% from a different Unicode block.
+%
+% With two of these cases there is no specific font.
+% For example, |PU| is used to create bookmark strings,
+% and other PDF string inclusions, using |\pdfstringdef| from the |hyperref| package.
% With |greek-euenc.def| designed for Xe\TeX\ and Lua\TeX, the encoding can be variable,
% with the output bytes being those for the UTF-8 encoding of $\gamma$, namely |^^ce^^b3|,
% shown here as the |T1|-encoded pair |γ|.
+% The term `pseudo-encoding' has been coined by the \LaTeX\ team.
+% Although there is no actual font to determine the encoding, to an author there is essentially
+% no difference in how corresponding macros can be used to get a character placed into
+% an appropriate structure within the PDF.
%
% Thus there are 4 output forms for this character,
% and we've not even considered how $\gamma$ is used in mathematics!
-% To handle these concurrently, one has internally defined control-sequence names
+% To handle these concurrently, one has internally-defined control-sequence names
% \begin{decl}[]
% |\LGR\textgamma=\char"67| \qquad where $6\times 16 + 7 = 103$\\
-% |\PU\textgamma=\long macro:->\83\263|\\
% |\T3\textgamma=\char"47| \qquad where $4\times 16 + 7 = 71$\\
+% |\PU\textgamma=\long macro:->\83\263|\\
% |\L8U\textgamma=\long macro:->γ|
% \end{decl}
% where the 2nd `\textbackslash' is part of the name\footnote{%
@@ -1726,7 +1987,7 @@
% The latter macro is explained below.
% To use the specific version of the macro, \LaTeX\ maintains a `font-encoding'
% parameter, set using |\fontencoding{...}| local to the surrounding environment grouping.
-%
+%
% To the above declarations of |\textgamma|, to deal with conversion to UTF-8,
% the |pdfx| package adds the following declarations when the |LGRxmp| option is used.
% \begin{decl}[]
@@ -1735,23 +1996,23 @@
% |pdfx/l8ugrk.def:\DeclareTextCompositeCommand{\textLGRenc}{L8U}{g}{γ} |\\
% |pdfx/l8ugrk.def:\DeclareTextCompositeCommand{\textLGRenc}{L8U}{^^e3}{γ}|
% \end{decl}
-% The encoding name |L8U| indicates \textbf{L}ocal conversion into UTF-\textbf{8} \textbf{U}nicode,
-% as required for metadata, using |pdfx.sty|. Currently this encoding is used in one place
-% only; during the interpretation of information supplied through the |\jobname.xmpdata| file.
+% The pseudo-encoding name |L8U| indicates \textbf{L}ocal conversion into UTF-\textbf{8} \textbf{U}nicode,
+% as required for metadata, using |pdfx.sty|. Currently this pseudo-encoding is used in one place only;
+% during the interpretation of information supplied through the |\jobname.xmpdata| file.
% This happens as part of the |pdfx| package, \emph{before} it uses |xmpincl.sty|.
% Such specificity justifies being called a `Local' encoding.
% However, other tasks may emerge requiring on-the-fly conversion to UTF-8.
-% In this case all the functionality of this encoding could be shifted into a separate package,
-% and the name of the encoding changed to reflect this more general usage.
+% In this case all the functionality of this pseudo-encoding could be shifted into a separate package,
+% and the name changed to reflect this more general usage.
% Bookmarks from transliterated input, as described in Section~\ref{sssec-arm},
% is possibly a sufficient reason to have a separate package. Another possibility is to
% generate on-the-fly creation of UTF-8 strings, to be sent to Xe\TeX\ or Lua\TeX\ running
% as a slave process to generate images of string using OTF fonts, which \pdftex\ currently
% cannot handle. The result would then be imported back into the running job as an image.
-% The authors invite suggestions of how this |L8U| encoding functionality can be put to
+% The authors invite suggestions of how this |L8U| pseudo-encoding functionality can be put to
% good use.
%
-% \medskip
+% \goodbreak
% Accented letters normally use (e.g., from |t1enc.def|)
%\begin{decl}[]
% |\DeclareTextComposite{\`}{T1}{A}{192}|
@@ -1774,7 +2035,7 @@
% as in |ISO-8859-7| encoding.
%
% All these associations come together in the `parser' macro |\textLGR| which works as follows.
-% Firstly, |\textLGR| is declared for |L8U| encoding only, where it expands as follows.
+% Firstly, |\textLGR| is declared for |L8U| pseudo-encoding only, where it expands as follows.
%\begin{decl}[]
% |\L8U\textLGR #1->\textgreekLGRstring {#1}|\\
% |\L8U\textgreekLGRstring #1->\textgreekLGR@ii #1\@empty \@empty|\\
@@ -1784,7 +2045,7 @@
% |\textgreekLGR@i #1->\textgreekLGR@ii #1|
%\end{decl}
% Thus |\textLGRenc| is called on each token in the argument of |\textLGR|.
-% Now |\textLGRenc|, which is applicable only when |L8U| encoding is in effect,
+% Now |\textLGRenc|, which is applicable only when |L8U| pseudo-encoding is in effect,
% has a default expansion of just passing the character through unchanged; \emph{viz.}
%\begin{decl}[]
% |\DeclareTextCommand{\textLGRenc}{L8U}[1]{#1}|
@@ -1794,12 +2055,12 @@
% In particular, that final argument can include coding that `looks ahead' to find the next
% character. This is used, for example, with diacritics in Greek, multi-letter sequences
% for Armenian letters, and other special cases related to ligatures and punctuation symbols.
-% To illustrate this Figure~\ref{ex-arm} follows the conversion of a specific word,
+% To illustrate this Figure~\ref{ex-arm} (below) follows the conversion of a specific word,
% given in the transliteration for Armenian~(see Section~\ref{sssec-arm}).
% This conversion occurs using only \TeX's macro-expansion ability.
-% Some of the details relevant to this example are explained there.
+% Some details relevant to this example are explained there.
%
-%\begin{figure}[!htp]
+%\begin{figure}[!htbp]
%\begin{decl}[]
% |\textARM{Se\armuh van}|\\
% |\textarmenARMstring {Se\armuh van}|\\
@@ -1839,12 +2100,12 @@
% Similarly |\armen@nc| (named for \textbf{n}ext \textbf{c}haracter)
% looks to see whether that 5th argument token matches with the character in the
% 1st bracing. If so, the 2nd bracing's tokens are substituted, else those of the 3rd bracing.
-% This is how to cope with `Sh' or `Sh', implemented as ligatures in an |OT6| encoded font,
+% This is how to cope with `Sh' or `SH', implemented as ligatures in an |OT6| encoded font,
% denoting a different letter from a single `S'. The macro |\armuh| is used here
% to \emph{prevent} a ligature from |ev| that would otherwise occur.
-% But then one must have written |e\armuh v| to get the separate letters.
-% The space becoming an active token, which explains the need for |\textarmgobblespace|
-% to restart parsing appropriately. Of course |\textarmenARM@i| behaves like |\textgreekLGR@i|
+% One writes |e\armuh v| to get the separate letters. As the space becomes an active token,
+% we need |\textarmgobblespace| to restart parsing appropriately.
+% Of course |\textarmenARM@i| behaves like |\textgreekLGR@i|
% as explained earlier, with a test for |\@empty| as the 2nd token.
% At the end, any remaining |\@empty| expand into nothing.
%
@@ -1852,16 +2113,20 @@
% in Figure~\ref{arm-meta}, from {\color{verbcolor}\texttt{OT6}} transliterated form into UTF-8 bytes.
% In each line, \TeX\ expansion occurs at the position of the left-most `\textbackslash'.
% The resulting bytes are shown here in {\color{verbcolor}\texttt{T1}} encoding,
-% as in previous examples.}\label{ex-arm}
+% as in previous examples, with {\color{verbcolor}\texttt{?}} indicating an invisible character
+% in the byte range {\color{verbcolor}\texttt{Ox80}--\texttt{Ox9f}}.
+% See Figure\,\ref{src-arm} for how this source appears with UTF-8 encoding.
+% }\label{ex-arm}
+% \bigskip
%\end{figure}
%
% Note how in Figure~\ref{ex-arm} the Arm\TeX\ user macro |\armuh| gets aliased
% to an LICR called |\textarmuh|. Since |\armuh| is already defined, not as an LICR,
% it cannot be declared to be one without creating problems.
-% Instead, within the environment grouping where |L8U| encoding is specified,
+% Instead, within the environment grouping where |L8U| pseudo-encoding is specified,
% one uses |\let\armuh\textarmuh| within a `rebinding' macro command
% |\LIIXUmaparmenianletters|\footnote{The start of the macro name is derived from pseudo-Roman
-% numerals: IX = 9, IIX = 8}.
+% numerals: IX = 9, IIX = 8}
% to get LICR functionality from user-commands.
%\begin{decl}[]
% |\def\LIIXUmaparmenianletters{%|\\
@@ -1879,23 +2144,32 @@
% This is similar to |\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}
+% \end{figure}
+%
% Several other `rebinding' commands are defined, mostly with package-loading options.
%\begin{itemize}
% \item |\LIIXUmapTeXnames| always defined
% \item |\LIIXUscriptcommands| handles |\textsuperscript|, |\textsubscript|, |\t|
% \item |\LIIXUtipacommands| handles IPA letters and symbols
% \item |\LIIXUmaparabicletters| with |arbxmp|
+% \item |\LIIXUmaparmenianletters| with |armxmp| and |AR8xmp|
+% \item |\LIIXUmapdevaccents| with |devxmp|
% \item |\LIIXUmapgreekletters| with |grkxmp| and |LGRxmp|
+% \item |\LIIXUmaphebrewletters| with |hebxmp| and |HEBxmp|
% \item |\LIIXUmaplatinchars| and |\LIIXUcancelfontswitches| with |LATxmp|
% \item |\LIIXUmapmathletterlikes| always defined
% \item |\LIIXUmapmathspaces| always defined
% \item |\LIIXUmapmath...| with |mathxmp| --- see Section~\ref{ssec-math} below.
%\end{itemize}
% It may well be that more macro names can be added to some of these commands,
-% to allow more user macros to be used within the metadata. Suggestions for such additions
-% should be sent to the |pdfx| package authors.
+% to allow macro usage within the metadata.
+% Suggestions for such additions should be sent to the |pdfx| package authors, along
+% with example documents. Similarly support for more languages can be requested.
%
-%
% \subsection[Nested Parsing\,\textemdash\,Mathematics in Metadata]%
% {Nested Parsing\,\textemdash\,Mathematics in Metadata}\label{ssec-math}
%
@@ -2061,9 +2335,7 @@
% \item
% Support for the |dvips| driver with Ghostscript as PDF producer; possible since |gs v9.21|.
% \item
-% Support for |Lang| specification in XMP Metadata.
-% \item
-% Separate the |L8U| encoding support into a separate package.
+% Separate the |L8U| pseudo-encoding support into a separate package.
% \item
% Conformance to multiple PDF standards; e.g. both PDF/A and PDF/E,
% both PDF/A and PDF/X with RGB or CMYK color profile, other combinations.
@@ -2078,13 +2350,15 @@
% \item
% Support for more PRISM metadata fields, incl. PRISM 3.0~\cite{PRISM}.
% \item
-% Explore ways to overcome difficulties that may arise with other packages.
+% Explore ways to overcome incompatibilities that may arise with other packages.
% \item
-% Full support for PDF/VT.
+% Full support for PDF/VT; in particular, transparency groups and PDF/VT-2s.
% \item
-% Support for some aspects of PDF/UA and `Tagged PDF'.
+% Support for more aspects of PDF/UA and `Tagged PDF'.
% \item
% Develop ways to usefully use |L8U| apart from metadata and bookmarks.
+% \item
+% Support emerging standards based on PDF 2.0~\cite{PDF20}.
% \end{itemize}
%
%
@@ -2097,67 +2371,35 @@
% Also available as \cite{ISO32000}.\\
% \url{http://www.adobe.com/devnet/pdf/pdf_reference.html}.
%
-% \bibitem{DC}
-% Dublin Core Metadata Element Set, Version 1.1, October 2010\\
-% \url{http://dublincore.org/documents/dces/}
-%
-% \bibitem{PDFA}ISO\,19005-1:2005;
-% Document Management --- Electronic document file format for long term preservation
-% --- Part 1: Use of PDF\,1.4\,(PDF/A-1);
-% Technical Committee ISO/TC\,171/SC\,2 (Sept. 2005).
-% Revisions via Corrigenda: ISO\,19005-1:2005/Cor\,1:2007 (March 2007);
-% ISO\,19005-1:2005/Cor\,2:2011 (Dec. 2011). \\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=38920}.
-%
-% \bibitem{PDFA2}ISO\,19005-2:2011;
-% Document Management --- Electronic document file format for long term preservation
-% --- Part 2: Use of ISO\,32000-1\,(PDF/A-2); \hfil
-% Technical Committee ISO/TC\,171/SC\,2 (June 2011).
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=50655}.
-%
-% \bibitem{PDFA3}ISO\,19005-3:2012;
-% Document Management --- Electronic document file format for long term preservation
-% --- Part 3: Use of ISO\,32000-1 with support for embedded files (PDF/A-3);
-% Technical Committee ISO/TC\,171/SC\,2 (October 2012).\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=57229}.
-%
-% \bibitem{ISO32000}ISO\,32000-1:2008;
-% Document management\,---\,Portable document format\,(PDF\,1.7);
-% Technical Committee ISO/TC\,171/SC\,2 (July 2008).
-% Also available as \cite{PDF17}.\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=51502}.
-%
-% \bibitem{PDF20}ISO\,32000-2-20140220;
-% Document management --- Portable document format --- Part~2: PDF\,2.0;
-% Technical Committee ISO/TC\,171/SC\,2, in draft form (Feb. 2014).
-%
-% \bibitem{PDFE}ISO\,24517-1:2008;
-% Document Management --- Engineering document format using PDF --- Part 1:
-% Use of PDF 1.6 (PDF/E-1);
-% Technical Committee ISO/TC\,171/SC\,2 (May 2008).\\
-% \url{http://www.iso.org/iso/catalogue_detail?csnumber=42274}.
+% \bibitem{XMP-spec}Adobe Systems Inc.;
+% XMP Specification, Adding Intelligence to Media. September 2005.
+% Also available as ISO 16684-1:2012\,\cite{XMP-ISO}.\\
+% \url{http://www.adobe.com/devnet/xmp/}.
%
-% \bibitem{PDFUA1}ISO\,14289-1:2012;
+% \bibitem{PDFUA1} ANSI\,/\,AIIM\,/\,ISO\,14289-1:2012;
% Document management applications --- Electronic document file format enhancement for accessibility
% --- Part 1: Use of ISO\,32000-1\,(PDF/UA-1);
% Technical Committee ISO/TC\,171/SC\,2 (July 2012).
% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=54564}.\\
% Revised as ISO\,14289-1:2014 (December 2014):
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=64599}.
+% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=64599}.\\
+% Available from ANSI at \url{https://webstore.ansi.org/Standards/ISO/ISO142892014}.
%
-% \bibitem{PDF-UA}
-% PDF/UA Technical Implementation Guide: Understanding ISO\,14289-1 (PDF/UA-1). \penalty-200
-% AIIM Global Community of Information Professionals. \hfil
-% \href{http://www.aiim.org/Research-and-Publications/standards/committees/PDFUA/Technical-Implementation-Guide}%
-% {\small\tt http://www.aiim.org/Re\penalty-200 search-and-Publications/standards/committees/PDFUA/Technical-Implementation\penalty-200 -Guide}.
+% \bibitem{PDFUABSI} BS,/\,ISO\,14289-1:2014; Document Management Applications.
+% Electronic Document File Format Enhancement For Accessibility. Use Of ISO 32000-1 (PDF/UA-1) (British Standard)
+% \url{https://webstore.ansi.org/Standards/BSI/BSISO142892014}.
%
+% \bibitem{pdfaPilot} Callas Software Gmbh.;
+% \texttt{pdfaPilot}, plug-in or desktop software for PDF/A versions.
+% \url{https://www.callassoftware.com/en/products/pdfapilot}.
%
-% \bibitem{PDFVT}ISO\,16612-2:2010;
-% Graphic technology\,---\,Variable data exchange\,---\,Part 2:\hfil
-% Using PDF/X-4 \penalty-5000 and PDF/X-5 (PDF/VT-1 and PDF/VT-2).
-% Technical Committee ISO/TC\,130 (December 2005). \hfil
-% \href{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=38013}{{\small\tt http://www.iso.org/iso/home/store/catalogue\_tc/catalogue\_detail.htm?\penalty-200csnumber=38013}}.
+% \bibitem{DC}
+% Dublin Core Metadata Element Set, Version 1.1, October 2010\\
+% \url{http://dublincore.org/documents/dces/}.
%
+% \bibitem{BCP47}IETF; Best Current Practice \#47: Tags for Identifying Languages.
+% Incorporates RFC\,5646; obsoletes RFC\,4646. IETF Network Working Group, September 2009.
+% \url{https://tools.ietf.org/pdf/bcp47.pdf}.
%
% \bibitem{PDFX}ISO\,15930-1:2001;
% Graphic technology --- Prepress digital data exchange --- Use of PDF --- Part 1:
@@ -2197,24 +2439,88 @@
% Revision via Corrigendum: ISO\,15930-8:2010/Cor\,1:2011 (August 2011);
% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=60210}.
%
+% \bibitem{PDFVT}ISO\,16612-2:2010;
+% Graphic technology\,---\,Variable data exchange\,---\,Part 2:\hfil
+% Using PDF/X-4 \penalty-5000 and PDF/X-5 (PDF/VT-1 and PDF/VT-2).
+% Technical Committee ISO/TC\,130 (December 2005). \hfil
+% \href{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=38013}%
+% {{\small\tt http://www.iso.org/iso/home/store/catalogue\_tc/catalogue\_detail.htm?\penalty-200csnumber=38013}}.
+%
+% \bibitem{XMP-ISO}ISO\,16684-1:2012;
+% Graphic technology --- Extensible metadata platform (XMP) specification --- Part 1:
+% Data model, serialization and core properties.
+% Technical Committee ISO/TC\,130 (February 2012).
+% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=57421}.
+%
+% \bibitem{PDFA}ISO\,19005-1:2005;
+% Document Management --- Electronic document file format for long term preservation
+% --- Part 1: Use of PDF\,1.4\,(PDF/A-1);
+% Technical Committee ISO/TC\,171/SC\,2 (Sept. 2005).
+% Revisions via Corrigenda: ISO\,19005-1:2005/Cor\,1:2007 (March 2007);
+% ISO\,19005-1:2005/Cor\,2:2011 (Dec. 2011). \\
+% \url{http://www.iso.org/iso/catalogue_detail?csnumber=38920}.
+%
+% \bibitem{PDFA2}ISO\,19005-2:2011;
+% Document Management --- Electronic document file format for long term preservation
+% --- Part 2: Use of ISO\,32000-1\,(PDF/A-2); \hfill
+% Technical Committee ISO/\penalty-200 TC\,171/SC\,2 (June 2011).\\
+% \url{http://www.iso.org/iso/catalogue_detail?csnumber=50655}.
+%
+% \bibitem{PDFA3}ISO\,19005-3:2012;
+% Document Management --- Electronic document file format for long term preservation
+% --- Part 3: Use of ISO\,32000-1 with support for embedded files (PDF/A-3);
+% Technical Committee ISO/TC\,171/SC\,2 (October 2012).\\
+% \url{http://www.iso.org/iso/catalogue_detail?csnumber=57229}.
+%
+% \bibitem{PDFE}ISO\,24517-1:2008;
+% Document Management --- Engineering document format using PDF --- Part 1:
+% Use of PDF 1.6 (PDF/E-1);
+% Technical Committee ISO/TC\,171/SC\,2 (May 2008).\\
+% \url{http://www.iso.org/iso/catalogue_detail?csnumber=42274}.
+%
+% \bibitem{ISO32000}ISO\,32000-1:2008;
+% Document management\,---\,Portable document format\,(PDF\,1.7);
+% Technical Committee ISO/TC\,171/SC\,2 (July 2008).
+% Also available as \cite{PDF17}.\\
+% \url{http://www.iso.org/iso/catalogue_detail?csnumber=51502}.
+%
+% \bibitem{PDF20}ISO\,32000-2:2017;
+% Document management --- Portable document format --- Part~2: PDF\,2.0;
+% Technical Committee ISO/TC\,171/SC\,2 Document file formats, EDMS systems
+% and authenticity of information. (July 2017)\\
+% \url{https://www.iso.org/standard/63534.html}.
+%
% \bibitem{LC2} F.\,Mittelbach, M.\,Goossens with J.\,Braams, D.\,Carlisle, C.\,Rowley;
% The \LaTeX\ Companion --- 2nd edition. Addison--Wesley (now Pearson Education Inc.), 2004.
% ISBN 0-201-36299-6 (paperback).
%
+% \bibitem{TN0009}PDF/A Competence Centre;
+% TechNote 0009: XMP Extension Schemas in PDF/A-1. (March 2008)
+% \href{https://www.pdfa.org/publication/technical-note-tn-0009-xmp-extension-schemas-in-pdfa-1/}%
+% {\small\tt https://www.pdfa.org/publication/technical-note-tn-0009-xmp-extension\penalty-200 -schemas-in-pdfa-1/}.
+%
+% \bibitem{PDF-UA}
+% PDF/UA Technical Implementation Guide: Understanding ISO\,14289-1 (PDF/UA-1). \penalty-200
+% AIIM Global Community of Information Professionals. \hfil
+% \href{http://www.aiim.org/Research-and-Publications/standards/committees/PDFUA/Technical-Implementation-Guide}%
+% {\small\tt http://www.aiim.org/Re\penalty-200 search-and-Publications/standards/committees/PDFUA/Technical-Implementation\penalty-200 -Guide}.
+%
+% \bibitem{colorp} N.\,Preining;
+% \texttt{colorprofiles} \textemdash\ Collection of free ICC profiles.
+% \TeX\ and \LaTeX\ package (by R.\,Moore), distributed with \TeX{}Live. (November 2018)\\
+% \url{https://ctan.org/pkg/colorprofiles}.
% \bibitem{PRISM}PRISM; Publishing Requirements for Industry Standard Metadata.
-% PRISM Metadata Initiative; Idealliance Working Group.
+% PRISM Metadata Initiative; Idealliance Working Group.
% \url{http://www.idealliance.org/specifications/prism-metadata-initiative/prism}
%
-% \bibitem{XMP}ISO\,16684-1:2012;
-% Graphic technology --- Extensible metadata platform (XMP) specification --- Part 1:
-% Data model, serialization and core properties.
-% Technical Committee ISO/TC\,130 (February 2012).
-% \url{http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=57421}.
-%
% \bibitem{pdfx}C.\,V.\,Radhakrishnan, \Thanh, Ross Moore, Peter Selinger;
-% Generation of PDF/X- and PDF/A-compliant PDFs with pdf\TeX{} --- \texttt{pdfx.sty}.
+% Generation of PDF/X- and PDF/A-compliant PDFs with \pdftex --- \texttt{pdfx.sty}.
% TUGboat Vol.\,36, No.\,2; TUG 2015 Conference Proceedings. \TeX\ Users Group, 2015; pp.\,136--142.
%
+% \bibitem{RDF} World Wide Web Consortium (W3C);
+% Resource Description Format: RDF 1.1 XML Syntax. W3C Recommendation. (February 2014)
+% \url{https://www.w3.org/TR/rdf-syntax-grammar/}.
+%
% \bibitem{wikiPDF}Wikipedia;
% PDF/A: \url{https://en.wikipedia.org/wiki/PDF/A}\newline
% PDF/E: \url{https://en.wikipedia.org/wiki/PDF/E}\newline
@@ -2240,11 +2546,12 @@
}{}%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pdfx}
- [2017/05/18 v1.5.84 PDF/X and PDF/A support (CVR/HTH/RRM/PS)]
+ [2018/11/29 v1.6 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
-\newif\ifpdfx@e \pdfx@efalse % PDF/E mode; not implemented yet
+\newif\ifpdfx@e \pdfx@efalse % PDF/E mode; not fully implemented yet
+\newif\ifpdfx@ua\pdfx@uafalse % PDF/UA mode; not fully implemented yet
\newif\ifpdfx@vt \pdfx@vtfalse % PDF/VT mode, extension of PDF/X
\newif\ifno@iccprofile % used with PDF/X-4p and PDF/X-5pg
\newif\ifpdfx@noerr % error messages become just warnings
@@ -2257,6 +2564,25 @@
\def\xmp@ReleaseDate{2005} % 2001 for PDF/X-1, 2005 for PDF/A-1,
% 2010 for PDF/A-2, 2012 for PDF/A-3.
+\newcount\pdfx@minorversion
+\expandafter\ifx\csname pdfminorversion\endcsname\relax
+\else
+ \global\pdfx@minorversion=\the\pdfminorversion
+\fi
+
+\def\pdfx@ErrorWarning#1#2#3#4{%
+ \ifpdfx@noerr \PackageWarning{pdfx}{#1.^^J #2#3.^^J}%
+ \else \PackageError{pdfx}{#1}{#2#4.^^J
+ Use option 'noerr' to avoid this message.^^J}%
+ \fi}
+
+\def\pdfx@Xvn@message{%
+ \pdfx@ErrorWarning{PDF/X-5n has no default profile}%
+ {Provide your own}{; continuing to build a non-valid document}%
+ {, else continue to build a non-valid document}%
+}
+
+%% PDF/A options
%% default is to create PDF/A-1b
%% options can change this for PDF/X or higher levels of PDF/A
\DeclareOption{a-1a}{\global\pdfx@xfalse\def\xmp@Part{1}%
@@ -2275,135 +2601,160 @@
\def\xmp@Conformance{B}\def\xmp@ReleaseDate{2012}}
\DeclareOption{a-3u}{\global\pdfx@xfalse\def\xmp@Part{3}%
\def\xmp@Conformance{U}\def\xmp@ReleaseDate{2012}}
-\DeclareOption{x-1}{\global\pdfx@xtrue\def\xmp@Part{1}%
- \def\xmp@Conformance{a}\def\xmp@ReleaseDate{2001}%
- \global\pdfminorversion=3 }
-\DeclareOption{x-1a}{\global\pdfx@xtrue\def\xmp@Part{1}%
+%%
+%% PDF/X options
+%% comments added, using
+%% https://www.eci.org/_media/downloads/pdfx/pdfx_faq_english_nov05.pdf
+%% https://en.wikipedia.org/wiki/PDF/X#List_of_the_PDF.2FX_standards
+%%
+\DeclareOption{x-1}{\global\pdfx@xtrue\def\xmp@Part{1}% obsolete
+ \def\xmp@Conformance{a}\def\xmp@ReleaseDate{1999}% CMYK only
+ \global\pdfx@minorversion=2\relax
+ \pdfx@ErrorWarning{PDF/X-1:1999 is no longer an accepted standard}%
+ {Use option x-1a1 or x-1a3 }{; continuing to build a non-valid document}%
+ {, else continue to build a non-valid document.}%
+ }% effectively same as x-1a1
+\DeclareOption{x-1a}{\global\pdfx@xtrue\def\xmp@Part{1}% CMYK only
\def\xmp@Conformance{a}\def\xmp@ReleaseDate{2003}%
- \global\pdfminorversion=3 }
+ \global\pdfx@minorversion=3 }% same as x-1a3
\DeclareOption{x-1a1}{\global\pdfx@xtrue\def\xmp@Part{1}%
- \def\xmp@Conformance{a}\def\xmp@ReleaseDate{2001}%
- \global\pdfminorversion=3 }
+ \def\xmp@Conformance{a}\def\xmp@ReleaseDate{2001}% ISO 15930-1:2001
+ \global\pdfx@minorversion=3 }
\DeclareOption{x-1a3}{\global\pdfx@xtrue\def\xmp@Part{1}%
- \def\xmp@Conformance{a}\def\xmp@ReleaseDate{2003}%
- \global\pdfminorversion=3 }
-\DeclareOption{x-2}{\global\pdfx@xtrue\def\xmp@Part{2}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2002}%
- \global\pdfminorversion=4 }
-\DeclareOption{x-3}{\global\pdfx@xtrue\def\xmp@Part{3}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2002}%
- \global\pdfminorversion=3 }
+ \def\xmp@Conformance{a}\def\xmp@ReleaseDate{2003}% ISO 15930-4:2003
+ \global\pdfx@minorversion=3 }
+\DeclareOption{x-2}{\global\pdfx@xtrue\def\xmp@Part{2}% XMP Metadata
+%% \def\xmp@Conformance{}\def\xmp@ReleaseDate{2002}% ISO 15930-2:2003
+ \def\xmp@Conformance{}\def\xmp@ReleaseDate{2003}% ISO 15930-5, withdrawn 2011
+ \global\pdfx@minorversion=4\relax
+ \pdfx@ErrorWarning{PDF/X-2:2003 was never published as a standard}%
+ {Use option x-1a or x-3 }{; continuing to build a non-valid document}%
+ {, else continue to build a non-valid document}%
+ }% 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
\DeclareOption{x-302}{\global\pdfx@xtrue\def\xmp@Part{3}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2002}%
- \global\pdfminorversion=3 }
+ \def\xmp@Conformance{}\def\xmp@ReleaseDate{2002}% ISO 15930-3:2002
+ \global\pdfx@minorversion=3 }
\DeclareOption{x-303}{\global\pdfx@xtrue\def\xmp@Part{3}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2003}%
- \global\pdfminorversion=4 }
+ \def\xmp@Conformance{}\def\xmp@ReleaseDate{2003}% ISO 15930-6:2003
+ \global\pdfx@minorversion=4 }
%%% Later versions, yet to be fully implemented
\DeclareOption{x-4}{\global\pdfx@xtrue\def\xmp@Part{4}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \def\xmp@Conformance{}\def\xmp@ReleaseDate{2010}% ISO 15930-7:2010
+ \global\pdfx@minorversion=6 }% same as x-410
\DeclareOption{x-4p}{\global\pdfx@xtrue\global\no@iccprofiletrue
- \def\xmp@Part{4}\def\xmp@Conformance{p}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \def\xmp@Part{4}\def\xmp@Conformance{p}\def\xmp@ReleaseDate{2010}%
+ \global\pdfx@minorversion=6 }% same as x-4p10
\DeclareOption{x-408}{\global\pdfx@xtrue\def\xmp@Part{4}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}% ISO 15930-7:2008
+ \global\pdfx@minorversion=6 }
\DeclareOption{x-410}{\global\pdfx@xtrue\def\xmp@Part{4}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \def\xmp@Conformance{}\def\xmp@ReleaseDate{2010}% ISO 15930-7:2010
+ \global\pdfx@minorversion=6 }
\DeclareOption{x-4p08}{\global\pdfx@xtrue\global\no@iccprofiletrue
\def\xmp@Part{4}\def\xmp@Conformance{p}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-7:2010
\DeclareOption{x-4p10}{\global\pdfx@xtrue\global\no@iccprofiletrue
\def\xmp@Part{4}\def\xmp@Conformance{p}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-7:2010
\DeclareOption{x-5}{\global\pdfx@xtrue\def\xmp@Part{5}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \def\xmp@Conformance{g}\def\xmp@ReleaseDate{2008}%
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2010
\DeclareOption{x-5g}{\global\pdfx@xtrue\def\xmp@Part{5}%
\def\xmp@Conformance{g}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
-\DeclareOption{x-5n}{\global\pdfx@xtrue\def\xmp@Part{5}%
- \def\xmp@Conformance{n}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2010
+\DeclareOption{x-5n}{\global\pdfx@xtrue %\global\no@iccprofiletrue
+ \def\xmp@Part{5}\def\xmp@Conformance{n}\def\xmp@ReleaseDate{2010}%
+ \global\pdfx@minorversion=6 \pdfx@Xvn@message}% ISO 15930-8:2010
\DeclareOption{x-5pg}{\global\pdfx@xtrue\global\no@iccprofiletrue
- \def\xmp@Part{5}\def\xmp@Conformance{pg}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \def\xmp@Part{5}\def\xmp@Conformance{pg}\def\xmp@ReleaseDate{2010}%
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2010
\DeclareOption{x-508}{\global\pdfx@xtrue\def\xmp@Part{5}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \def\xmp@Conformance{g}\def\xmp@ReleaseDate{2008}%
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2008
\DeclareOption{x-5g08}{\global\pdfx@xtrue\def\xmp@Part{5}%
\def\xmp@Conformance{g}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
-\DeclareOption{x-5n08}{\global\pdfx@xtrue\def\xmp@Part{5}%
- \def\xmp@Conformance{n}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2008
+\DeclareOption{x-5n08}{\global\pdfx@xtrue %\global\no@iccprofiletrue
+ \def\xmp@Part{5}\def\xmp@Conformance{n}\def\xmp@ReleaseDate{2008}%
+ \global\pdfx@minorversion=6 \pdfx@Xvn@message}% ISO 15930-8:2008
\DeclareOption{x-5pg08}{\global\pdfx@xtrue\global\no@iccprofiletrue
\def\xmp@Part{5}\def\xmp@Conformance{pg}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2008
\DeclareOption{x-510}{\global\pdfx@xtrue\def\xmp@Part{5}%
- \def\xmp@Conformance{}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \def\xmp@Conformance{g}\def\xmp@ReleaseDate{2010}%
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2010
\DeclareOption{x-5g10}{\global\pdfx@xtrue\def\xmp@Part{5}%
\def\xmp@Conformance{g}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
-\DeclareOption{x-5n10}{\global\pdfx@xtrue\def\xmp@Part{5}%
- \def\xmp@Conformance{n}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2010
+\DeclareOption{x-5n10}{\global\pdfx@xtrue %\global\no@iccprofiletrue
+ \def\xmp@Part{5}\def\xmp@Conformance{n}\def\xmp@ReleaseDate{2010}%
+ \global\pdfx@minorversion=6 \pdfx@Xvn@message}% ISO 15930-8:2010
\DeclareOption{x-5pg10}{\global\pdfx@xtrue\global\no@iccprofiletrue
\def\xmp@Part{5}\def\xmp@Conformance{pg}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }% ISO 15930-8:2010
+%%
+%% PDF/E options
+%%
+\DeclareOption{e}{\global\pdfx@xfalse\global\pdfx@etrue
+ \def\xmp@Part{1}\def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}%
+ \gdef\thepdfminorversion{6}% same as e-1
+ }
\DeclareOption{e-1}{\global\pdfx@xfalse\global\pdfx@etrue
\def\xmp@Part{1}\def\xmp@Conformance{}\def\xmp@ReleaseDate{2008}%
- \global\pdfminorversion=6 }
+ \gdef\thepdfminorversion{6}% ISO 24517-1:2008
+ }
+%% PDF/UA options
+%%
+\let\xmp@PDFUA\@empty
+\DeclareOption{ua}{\global\pdfx@uatrue % ISO 14289-1:2012, 2014
+ \def\xmp@UAlevel{1}\let\xmp@PDFUA\relax}% same as ua-1
+\DeclareOption{ua-1}{\global\pdfx@uatrue % ISO 14289-1:2012, 2014
+ \def\xmp@UAlevel{1}\let\xmp@PDFUA\relax}
+%%
+%% PDF/VT options
+%%
\DeclareOption{vt-1}{\global\pdfx@xtrue\global\pdfx@vttrue
\def\xmp@Part{4}\def\xmp@vtPart{1}\def\xmp@Conformance{}%
\def\xmp@vtConformance{}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \gdef\xmpMM@VersionID{1}%
+ \global\pdfx@minorversion=6 }
\DeclareOption{vt-2}{\global\pdfx@xtrue\global\pdfx@vttrue
- \global\no@iccprofiletrue
+ \global\no@iccprofiletrue \gdef\xmpMM@VersionID{1}%
\def\xmp@Part{5}\def\xmp@vtPart{2}\def\xmp@Conformance{pg}%
\def\xmp@vtConformance{}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }
\DeclareOption{vt-2s}{\global\pdfx@xtrue\global\pdfx@vttrue
- \global\no@iccprofiletrue
+ \global\no@iccprofiletrue \gdef\xmpMM@VersionID{1}%
\def\xmp@Part{5}\def\xmp@vtPart{2}\def\xmp@Conformance{pg}%
\def\xmp@vtConformance{s}\def\xmp@ReleaseDate{2010}%
- \global\pdfminorversion=6 }
+ \global\pdfx@minorversion=6 }
%% options to alter PDF minor version, in case needed in special circumstances
-\DeclareOption{pdf12}{\global\pdfminorversion=2 }
-\DeclareOption{pdf13}{\global\pdfminorversion=3 }
-\DeclareOption{pdf14}{\global\pdfminorversion=4 }
-\DeclareOption{pdf15}{\global\pdfminorversion=5 }
-\DeclareOption{pdf16}{\global\pdfminorversion=6 }
-\DeclareOption{pdf17}{\global\pdfminorversion=7 }
+\DeclareOption{pdf12}{\global\pdfx@minorversion=2 }% 1999
+\DeclareOption{pdf13}{\global\pdfx@minorversion=3 }% 2001 Acrobat 4 (ISBN 0-201-61588-6)
+\DeclareOption{pdf14}{\global\pdfx@minorversion=4 }% 2003 Acrobat 5 (ISBN 0-201-75839-3)
+\DeclareOption{pdf15}{\global\pdfx@minorversion=5 }% 2005 Acrobat 6
+\DeclareOption{pdf16}{\global\pdfx@minorversion=6 }% 2006 Acrobat 7 (ISBN 0-321-30474-8)
+\DeclareOption{pdf17}{\global\pdfx@minorversion=7 }% 2008 ISO 32000-1:2008
%% inhibits writing the XMP byte-order marker
\DeclareOption{noBOM}{\pdfx@noBOMtrue}
\DeclareOption{useBOM}{\pdfx@noBOMfalse}
-\expandafter\ifx\csname pdfminorversion\endcsname\relax
- \gdef\thepdfminorversion{4}% assumed with XeTeX
- \def\pdf@minorversion@xetex=#1{\gdef\thepdfminorversion{#1}}%
- \let\pdfminorversion\pdf@minorversion@xetex
-\else
- \pdfminorversion=4 % assumed for PDF/A ; options may change this for PDF/X
-\fi
-\expandafter\ifx\csname pdfresetpageorigin\endcsname\relax\else
- \pdfresetpageorigin=0
-\fi
-
%% options for language character macros in XMP metadata
\newif\ifcyrxmp
\newif\ifcyrKOIxmp
\newif\ifgrkxmp
\newif\ifgrkLGRxmp
\newif\ifhebxmp
+\newif\ifhebHEBxmp
\newif\ifarbxmp
\newif\ifarmxmp
\newif\ifarmSCIxmp
+\newif\ifdevxmp
\newif\ifvnmxmp
\newif\iflatEXTxmp
\newif\iflatLATxmp
@@ -2417,9 +2768,11 @@
\DeclareOption{grkxmp}{\global\grkxmptrue}
\DeclareOption{LGRxmp}{\global\grkLGRxmptrue\global\grkxmptrue}
\DeclareOption{hebxmp}{\global\hebxmptrue}
+\DeclareOption{HEBxmp}{\global\hebHEBxmptrue\global\hebxmptrue}
\DeclareOption{arbxmp}{\global\arbxmptrue}
\DeclareOption{armxmp}{\global\armxmptrue}
\DeclareOption{AR8xmp}{\global\armSCIxmptrue\global\armxmptrue}
+\DeclareOption{devxmp}{\global\devxmptrue}
\DeclareOption{vnmxmp}{\global\vnmxmptrue}
\DeclareOption{ipaxmp}{\global\ipaxmptrue\global\latEXTxmptrue}
\DeclareOption{mathxmp}{\global\mathxmptrue\global\grkxmptrue}
@@ -2431,9 +2784,11 @@
\global\grkxmptrue
\global\grkLGRxmptrue
\global\hebxmptrue
+ \global\hebHEBxmptrue
\global\arbxmptrue
\global\armxmptrue
\global\armSCIxmptrue
+ \global\devxmptrue
\global\vnmxmptrue
\global\latEXTxmptrue
\global\latLATxmptrue
@@ -2448,10 +2803,64 @@
\ExecuteOptions{noBOM,a-1b}
\ProcessOptions
+\ifpdfx@ua\ifpdfx@x\else
+ \expandafter\if\xmp@Conformance A\else
+ \pdfx@ErrorWarning{PDF/UA requires 'Tagged PDF' for any structure.^^J
+ Then PDF/A Conformance must be 'a'}%
+ {Use option 'a-\xmp@Part a'}%
+ {; continuing with a likely invalid document}%
+ {, or continue for a likely invalid document}%
+%%% \gdef\xmp@Conformance{A}% do we want this?
+\fi\fi\fi
+
+\expandafter\ifx\csname pdflastobj\endcsname\relax
+\else
+ \ifnum\pdflastobj >\z@ % pdftex has already written objects
+ \ifnum\pdfx@minorversion=\pdfminorversion\else
+ \PackageError{pdfx}%
+ {^^J(pdfx) Cannot change the \string\pdfminorversion^^J%
+ (pdfx) PDF version remains at 1.\the\pdfminorversion.^^J%
+ (pdfx) Use \string\pdfminorversion=\the\pdfx@minorversion\space
+ before \string\documentclass}%
+ {(pdfx) Another package or document-class has written objects into the PDF.^^J%
+ (pdfx) Hit return to continue with PDF version 1.\the\pdfminorversion.%
+ }%
+ \global\pdfx@minorversion=\the\pdfminorversion
+ \fi
+ \else
+ \global\pdfminorversion\pdfx@minorversion
+ \fi
+\fi
+
\expandafter\ifx\csname thepdfminorversion\endcsname\relax
- \xdef\thepdfminorversion{\the\pdfminorversion}
+ \expandafter\ifx\csname pdfminorversion\endcsname\relax
+ \else
+ \xdef\thepdfminorversion{\the\pdfminorversion}
+\fi\fi
+
+\expandafter\ifx\csname pdfminorversion\endcsname\relax
+ \gdef\thepdfminorversion{4}% assumed with XeTeX
+ \def\pdf@minorversion@xetex=#1{\gdef\thepdfminorversion{#1}}%
+ \let\pdfminorversion\pdf@minorversion@xetex
+\else
+ \ifnum\pdfminorversion < 4\relax
+ \ifpdfx@x
+ % more testing needed with PDF/X
+ \else
+ \pdfminorversion=4\relax % assumed for PDF/A ; options may change this for PDF/X
+ \gdef\thepdfminorversion{4}%
+ \fi
+ \else
+ \ifnum\pdfminorversion<\thepdfminorversion\relax
+ \global\pdfminorversion=\thepdfminorversion\relax
+ \fi
+ \fi
+\fi
+\expandafter\ifx\csname pdfresetpageorigin\endcsname\relax\else
+ \pdfresetpageorigin=0
\fi
+
\newif\ifpdfx@nopdfinfo
\ifmathxmp\pdfx@nopdfinfotrue
\else
@@ -2459,20 +2868,26 @@
\else
\ifgrkLGRxmp\pdfx@nopdfinfotrue
\else
+ \ifhebHEBxmp\pdfx@nopdfinfotrue
+\else
\ifcyrKOIxmp\pdfx@nopdfinfotrue
\else
\ifarmSCIxmp\pdfx@nopdfinfotrue
-\fi\fi\fi\fi\fi
+\fi\fi\fi\fi\fi\fi
\iflatLATxmp\pdfx@useactivespacestrue\fi
\ifgrkLGRxmp\pdfx@useactivespacestrue\fi
+\ifhebHEBxmp\pdfx@useactivespacestrue\fi
\ifcyrKOIxmp\pdfx@useactivespacestrue\fi
\ifarmSCIxmp\pdfx@useactivespacestrue\fi
\newif\ifpdfx@transliterated
\ifgrkLGRxmp\pdfx@transliteratedtrue\fi
+\ifhebHEBxmp\pdfx@transliteratedtrue\fi
\ifarmSCIxmp\pdfx@transliteratedtrue\fi
+\RequirePackage{iftex}
+\RequirePackage{ifpdf}
%% Support for pdfTeX primitives when using XeTeX:
\RequirePackage{ifxetex}
\ifxetex
@@ -2490,6 +2905,8 @@
\let\pdfobjcompresslevel\pdf@compress@xetex
\fi
+%%\newif\ifpdfx@pdfmark % control future support for dvips
+
\RequirePackage{ifluatex}
\ifluatex
\IfFileExists{luatex85.sty}{% 2016+
@@ -2499,6 +2916,7 @@
}%
\RequirePackage{pdftexcmds}%
\let\pdfx@mdfivesum\pdf@mdfivesum
+ \let\pdfescapestring\pdf@escapestring
\else
\ifxetex
\usepackage{everyshi}%
@@ -2513,7 +2931,7 @@
\let\pdfx@mdfivesum\pdfmdfivesum
\fi
\fi
-\def\pdfx@encodingfile{l8uenc.def}
+\def\pdfx@encodingfile{l8u-penc.def}
\expandafter\ifx\csname pdftexbanner\endcsname\relax
\expandafter\ifx\csname luatexbanner\endcsname\relax
@@ -2567,6 +2985,7 @@
/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
+ /CropBox[0 0 \pdfx@mwidth\space \pdfx@mheight]^^J
/TrimBox[25 20 \pdfx@twidth\space \pdfx@theight]}
}\next
\ifxetex
@@ -2575,6 +2994,13 @@
\EveryShipout{%
\immediate\special{pdf:put @thispage <<\pdfx@everypage@xetex>>}}%
\fi
+\else
+%% PDF/A-1b doesn't allow object compression
+ \ifnum\xmp@ReleaseDate=2005\relax
+ \expandafter\ifx\csname pdfobjcompresslevel\endcsname\relax
+ \else
+ \pdfobjcompresslevel=0\relax
+ \fi \fi
\fi
\ifxetex
%% How to support XeTeX here ?
@@ -2609,7 +3035,32 @@
\@namedef{T@L8U}{}%
\@namedef{D@L8U}{}%
\@namedef{M@L8U}{}%
+
+%% adjust to LaTeX's 2018 change to the default encoding
+\expandafter\ifx\csname inputencodingname\endcsname\relax
+\else
+ \def\pdfx@restoreencoding#1{%
+ \@tempcnta=128
+ \loop
+ \catcode\@tempcnta=13
+ \advance\@tempcnta\@ne
+ \ifnum\@tempcnta<256
+ \repeat
+ \inputencoding{#1}%
+ }%
+ \AtEndOfPackage{\pdfx@restoreencoding\pdfx@inputencodingname}%
+ \let\pdfx@inputencodingname\inputencodingname
+ \let\pdfx@DeclareUnicodeCharacter\DeclareUnicodeCharacter
+ \UseRawInputEncoding
+\fi
\InputIfFileExists{\pdfx@encodingfile}{}{}
+\expandafter\ifx\csname pdfx@inputencodingname\endcsname\relax
+\else
+ \let\inputencodingname\pdfx@inputencodingname
+ \let\DeclareUnicodeCharacter\pdfx@DeclareUnicodeCharacter
+ \let\DeclareFontEncoding@\DeclareFontEncoding@saved
+ \inputencoding{\inputencodingname}%
+\fi
%%----------------------------------------------------------------------
%% Macros for reading XMP data with special catcodes. Usage:
@@ -2627,42 +3078,425 @@
\ifpdfx@useactivespaces\obeyspaces\fi % capture spaces as active characters
\xmp@doparse{#1}%
}
+\def\afterxmp@parse{}% methods may change this
\def\xmp@doparse#1#2{%
\def\@this{#2}#1
\endgroup
+ % do any post-processing
+ \afterxmp@parse
+ \def\afterxmp@parse{}%
}
%%----------------------------------------------------------------------
%% Local commands. They are only brought into scope during the reading
-%% of xmpdata.
+%% of xmpdata. Some fields can have a 'xml:lang' attribute; others must have.
+%% LANG values as in: (BCP 47) https://tools.ietf.org/html/rfc5646#appendix-A
+%%
+\def\xmp@lang@Default{x-default}
+\let\xmp@lang@Title\xmp@lang@Default
+\let\xmp@lang@Author\xmp@lang@Default
+\let\xmp@lang@Keywords\xmp@lang@Default
+\let\xmp@lang@Subject\xmp@lang@Default
+%%\def\xmp@lang@CreatorTool{\xmp@lang@Default}
+\let\xmp@lang@Producer\xmp@lang@Default
+%%\def\xmp@lang@Volume{\xmp@lang@Default}
+%%\def\xmp@lang@Issue{\xmp@lang@Default}
+\let\xmp@lang@Copyright\xmp@lang@Default
+\let\xmp@lang@PublicationType\xmp@lang@Default
+\let\xmp@lang@Publisher\xmp@lang@Default
+\let\xmp@lang@Coverage\xmp@lang@Default
+\let\xmp@lang@Contributor\xmp@lang@Default
+\let\xmp@lang@Relation\xmp@lang@Default
+%%% PRISM fields
+\let\xmp@lang@CoverDisplayDate\xmp@lang@Default
+\let\xmp@lang@JournalTitle\xmp@lang@Default
+%%\def\xmp@lang@JournalNumber{\xmp@lang@Default}
+%%% xmp: & xmpRights: fields
+\let\xmp@lang@Advisory\xmp@lang@Default
+\let\xmp@lang@Identifier\xmp@lang@Default
+\let\xmp@lang@Nickname\xmp@lang@Default
+\let\xmp@lang@Owner\xmp@lang@Default
+
+%% some validators require a language attribute for
+%% dc:title set via \Title
+%% dc:description set via \Subject
+%% dc:rights set via \Copyright
+%% xmpRights:UsageTerms set via \Copyright
+%%
+{\catcode `\" 12 \catcode`\: 12 \catcode`\= 12
+ \gdef\pdfx@xmp@checklang#1{%
+ \ifx #1\xmp@lang@Default\else\space xml:lang="#1"\fi}
+ \gdef\pdfx@xmp@strictlang#1{\space xml:lang="#1"}
+}% end of \catcodes
+\let\xmp@checklang\pdfx@xmp@checklang
+\let\xmp@strictlang\pdfx@xmp@strictlang
+
+\newcommand{\pdfx@Title}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Title{#1}\fi
+ \xmp@parse{\global\let\xmp@Title\@this}}
+
+%% allow for multiple authors, keywords and languages
+%% also: contributor, date, relation, type, thumbnails
+%% and AuthoritativeDomain, Advisory, Identifier, Owner
+\newcommand{\pdfx@Author}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Author{#1}\fi
+ \def\afterxmp@parse{\let\Author\pdfx@extraAuthor}%
+ \xmp@parse{\global\let\xmp@Author\@this}}
+\newcommand{\pdfx@Keywords}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Keywords{#1}\fi
+ \def\afterxmp@parse{\let\Keywords\pdfx@extraKeywords}%
+ \xmp@parse{\global\let\xmp@Keywords\@this}}
+\newcommand{\pdfx@Language}{%
+ \def\afterxmp@parse{\let\Language\pdfx@extraLanguages}%
+ \xmp@parse{\global\let\xmp@Language\@this}}
+
+\newcommand{\pdfx@AuthoritativeDomain}{%
+ \def\afterxmp@parse{\let\AuthoritativeDomain\pdfx@extraAuthoritativeDomain}%
+ \xmp@parse{\global\let\xmp@AuthoritativeDomain\@this}}
+\newcommand{\pdfx@Date}{%
+ \def\afterxmp@parse{\let\Date\pdfx@extraDate}%
+ \xmp@parse{\global\let\xmp@Date\@this}}
+\newcommand{\pdfx@Contributor}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Contributor{#1}\fi
+ \def\afterxmp@parse{\let\Contributor\pdfx@extraContributor}%
+ \xmp@parse{\global\let\xmp@Contributor\@this}}
+\newcommand{\pdfx@Relation}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Relation{#1}\fi
+ \def\afterxmp@parse{\let\Relation\pdfx@extraRelation}%
+ \xmp@parse{\global\let\xmp@Relation\@this}}
+%%\newcommand{\pdfx@Type}[1][]{%
+%% \ifx\relax#1\relax\else\gdef\xmp@lang@Type{#1}\fi
+%% \def\afterxmp@parse{\let\Type\pdfx@extraType}%
+%% \xmp@parse{\global\let\xmp@Type\@this}}
+
+\newcommand{\pdfx@Advisory}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Advisory{#1}\fi
+ \def\afterxmp@parse{\let\Advisory\pdfx@extraAdvisory}%
+ \xmp@parse{\global\let\xmp@Advisory\@this}}
+\newcommand{\pdfx@Identifier}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Identifier{#1}\fi
+ \def\afterxmp@parse{\let\Identifier\pdfx@extraIdentifier}%
+ \xmp@parse{\global\let\xmp@Identifier\@this}}
+\newcommand{\pdfx@Thumbnails}{%
+ \def\afterxmp@parse{\let\Thumbnails\pdfx@extraThumbnails}%
+ \xmp@parse{\global\let\xmp@Thumbnails\@this}}
+
+\newcommand{\pdfx@Owner}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Owner{#1}\fi
+ \def\afterxmp@parse{\let\Owner\pdfx@extraOwner}%
+ \xmp@parse{\global\let\xmp@Owner\@this}}
+
+{\obeyspaces%
+ \ifpdfx@useactivespaces\gdef\pdfx@insert@sep{\sep }%
+ \else\gdef\pdfx@insert@sep{\sep}\fi%
+}
+\newcommand{\pdfx@extraAuthor}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Author
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Author\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Author
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Author\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Author
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Author\xmp@extraAuthor}%
+ }%
+ \xmp@parse{\global\let\xmp@extraAuthor\@this}%
+ }%
+\newcommand{\pdfx@extraKeywords}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Keywords
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Keywords\pdfx@insert@sep}%
+ \else%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Keywords
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Keywords\pdfx@insert@sep[#1]}%
+ \fi%
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Keywords
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Keywords\xmp@extraKeywords}}%
+ \xmp@parse{\global\let\xmp@extraKeywords\@this}%
+ }%
+\newcommand{\pdfx@extraLanguages}{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Language
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Language\pdfx@insert@sep}%
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Language
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Language\xmp@extraLanguages}}%
+ \xmp@parse{\global\let\xmp@extraLanguages\@this}%
+ }%
+
+\newcommand{\pdfx@extraContributor}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Contributor
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Contributor\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Contributor
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Contributor\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Contributor
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Contributor\xmp@extraContributor}%
+ }%
+ \xmp@parse{\global\let\xmp@extraContributor\@this}%
+ }%
+
+\newcommand{\pdfx@extraAuthoritativeDomain}{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@AuthoritativeDomain
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@AuthoritativeDomain\pdfx@insert@sep}%
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@AuthoritativeDomain
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@AuthoritativeDomain\xmp@extraAuthoritativeDomain}%
+ }%
+ \xmp@parse{\global\let\xmp@extraAuthoritativeDomain\@this}%
+ }%
+
+\newcommand{\pdfx@extraDate}{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Date
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Date\pdfx@insert@sep}%
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Date
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Date\xmp@extraDate}%
+ }%
+ \xmp@parse{\global\let\xmp@extraDate\@this}%
+ }%
+
+\newcommand{\pdfx@extraRelation}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Relation
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Relation\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Relation
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Relation\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Relation
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Relation\xmp@extraRelation}%
+ }%
+ \xmp@parse{\global\let\xmp@extraRelation\@this}%
+ }%
+
+%%\newcommand{\pdfx@extraType}[1][]{%
+%%% \show\xmp@Type
+%% \ifx\relax#1\relax
+%% \expandafter\expandafter\expandafter\gdef
+%% \expandafter\expandafter\expandafter\xmp@Type
+%% \expandafter\expandafter\expandafter{%
+%% \expandafter\xmp@Type\pdfx@insert@sep}%
+%% \else
+%% \expandafter\expandafter\expandafter\gdef
+%% \expandafter\expandafter\expandafter\xmp@Type
+%% \expandafter\expandafter\expandafter{%
+%% \expandafter\xmp@Type\pdfx@insert@sep[#1]}%
+%% \fi
+%% \def\afterxmp@parse{%
+%% \expandafter\expandafter\expandafter\gdef
+%% \expandafter\expandafter\expandafter\xmp@Type
+%% \expandafter\expandafter\expandafter{%
+%% \expandafter\xmp@Type\xmp@extraType}%
+%% %\show\xmp@Type
+%% }%
+%% \xmp@parse{\global\let\xmp@extraType\@this}%
+%% }%
+
+\newcommand{\pdfx@extraAdvisory}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Advisory
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Advisory\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Advisory
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Advisory\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Advisory
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Advisory\xmp@extraAdvisory}%
+ }%
+ \xmp@parse{\global\let\xmp@extraAdvisory\@this}%
+ }%
+
+\newcommand{\pdfx@extraIdentifier}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Identifier
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Identifier\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Identifier
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Identifier\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Identifier
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Identifier\xmp@extraIdentifier}%
+ }%
+ \xmp@parse{\global\let\xmp@extraIdentifier\@this}%
+ }%
+
+\newcommand{\pdfx@extraThumbnails}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Thumbnails
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Thumbnails\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Thumbnails
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Thumbnails\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Thumbnails
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Thumbnails\xmp@extraThumbnails}%
+ }%
+ \xmp@parse{\global\let\xmp@extraThumbnails\@this}%
+ }%
+
+\newcommand{\pdfx@extraOwner}[1][]{%
+ \ifx\relax#1\relax
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Owner
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Owner\pdfx@insert@sep}%
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Owner
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Owner\pdfx@insert@sep[#1]}%
+ \fi
+ \def\afterxmp@parse{%
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\xmp@Owner
+ \expandafter\expandafter\expandafter{%
+ \expandafter\xmp@Owner\xmp@extraOwner}%
+ }%
+ \xmp@parse{\global\let\xmp@extraOwner\@this}%
+ }%
+
+\newcommand{\pdfx@Subject}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Subject{#1}\fi
+ \xmp@parse{\global\let\xmp@Subject\@this}}
+\newcommand{\pdfx@Producer}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Producer{#1}\fi
+ \xmp@parse{\global\let\xmp@Producer\@this}}
+\newcommand{\pdfx@Publisher}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Publisher{#1}\fi
+ \xmp@parse{\global\let\xmp@Publisher\@this}}
+\newcommand{\pdfx@Copyright}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Copyright{#1}\fi
+ \xmp@parse{\global\let\xmp@Copyright\@this%
+ \ifx\xmp@Copyrighted\@empty\gdef\xmp@Copyrighted{True}\fi}}
+
+\newcommand{\pdfx@Coverage}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@Coverage{#1}\fi
+ \xmp@parse{\global\let\xmp@Coverage\@this}}
+
+%% PRISM Text fields
+\newcommand{\pdfx@CoverDisplayDate}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@CoverDisplayDate{#1}\fi
+ \xmp@parse{\global\let\xmp@CoverDisplayDate\@this}}
+\newcommand{\pdfx@JournalTitle}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@JournalTitle{#1}\fi
+ \ifx\xmp@PublicationType\@empty\gdef\xmp@PublicationType{journal}\fi
+ \xmp@parse{\global\let\xmp@JournalTitle\@this}}
+
+%% Uses PRISM Controlled Vocabulary:
+%% http://prismstandard.org/vocabularies/3.0/aggregationtype.xml
+%% blog, book, bookazine, catalog, feed, journal, magazine, manual
+%% newsletter, newspaper, other, report, pamphlet, vook, whitepaper
+%%
+\newcommand{\pdfx@PublicationType}[1][]{%
+ \ifx\relax#1\relax\else\gdef\xmp@lang@PublicationType{#1}\fi
+ \xmp@parse{\global\let\xmp@PublicationType\@this}}
+
\def\pdfx@localcommands{
- \def\Title{\xmp@parse{\global\let\xmp@Title\@this}}
- \def\Author{\xmp@parse{\global\let\xmp@Author\@this}}
- \def\Keywords{\xmp@parse{\global\let\xmp@Keywords\@this}}
- \def\Subject{\xmp@parse{\global\let\xmp@Subject\@this}}
+ \let\Title\pdfx@Title
+ \let\Author\pdfx@Author
+ \let\Keywords\pdfx@Keywords
+ \let\Subject\pdfx@Subject
+ \let\Language\pdfx@Language
\def\CreatorTool{\xmp@parse{\global\let\xmp@CreatorTool\@this}}
- \def\Producer{\xmp@parse{\global\let\xmp@Producer\@this}}
+ \let\Producer\pdfx@Producer
\def\Volume{\xmp@parse{\global\let\xmp@Volume\@this}}
\def\Issue{\xmp@parse{\global\let\xmp@Issue\@this}}
- \def\CoverDisplayDate{\xmp@parse{\global\let\xmp@CoverDisplayDate\@this}}
+ \let\CoverDisplayDate\pdfx@CoverDisplayDate
\def\CoverDate{\xmp@parse{\global\let\xmp@CoverDate\@this}}
- \def\Copyright{\xmp@parse{\global\let\xmp@Copyright\@this%
- \ifx\xmp@Copyrighted\@empty\gdef\xmp@Copyrighted{True}\fi}}
+ \let\Copyright\pdfx@Copyright
\def\CopyrightURL{\xmp@parse{\global\let\xmp@CopyrightURL\@this%
\ifx\xmp@Copyrighted\@empty\gdef\xmp@Copyrighted{True}\fi}}
\def\Copyrighted{\xmp@parse{\global\let\xmp@Copyrighted\@this}}
\def\Doi{\xmp@parse{\global\let\xmp@Doi\@this}}
+ \def\ISBN{\xmp@parse{\global\let\xmp@ISBN\@this}}
+ \def\URLlink{\xmp@parse{\global\let\xmp@URL\@this}}
\def\Lastpage{\xmp@parse{\global\let\xmp@Lastpage\@this}}
\def\Firstpage{\xmp@parse{\global\let\xmp@Firstpage\@this}}
- \def\PublicationType{\xmp@parse{\global\let\xmp@PublicationType\@this}}
- \def\Journaltitle{\xmp@parse{\global\let\xmp@Journaltitle\@this%
- \ifx\xmp@PublicationType\@empty\gdef\xmp@PublicationType{journal}\fi}}
+ \let\PublicationType\pdfx@PublicationType
+ \let\Journaltitle\pdfx@JournalTitle
\def\Journalnumber{\xmp@parse{\global\let\xmp@Journalnumber\@this}}
- \def\Publisher{\xmp@parse{\global\let\xmp@Publisher\@this}}
+ \let\Publisher\pdfx@Publisher
+ \let\Coverage\pdfx@Coverage
+ \def\Source{\xmp@parse{\global\let\xmp@Source\@this}}
+ \let\Contributor\pdfx@Contributor
+ \let\Date\pdfx@Date
+ \let\Relation\pdfx@Relation
+ \let\Advisory\pdfx@Advisory
+ \def\BaseURL{\xmp@parse{\global\let\xmp@BaseURL\@this}}
+ \let\Identifier\pdfx@Identifier
+ \let\Nickname\pdfx@Nickname
+ \let\Thumbnails\pdfx@Thumbnails
+ \let\Owner\pdfx@Owner
+ \def\CertificateURL{\xmp@parse{\global\let\xmp@CertificateURL\@this}}
+ \def\MMversionID{\xmp@parse{\global\let\xmpMM@versionID\@this}}
+%% \let\Type\pdfx@Type
%%
%% currently unused; for backward compatibility only
- \def\AuthoritativeDomain{\xmp@parse
- {\global\let\xmp@AuthoritativeDomain\@this}}
+ \let\AuthoritativeDomain\pdfx@AuthoritativeDomain
\let\Creator\CreatorTool % for backward compatibility
\let\Org\Publisher % for backward compatibility
\let\WebStatement\CopyrightURL % for backward compatibility
@@ -2713,10 +3547,21 @@
%%----------------------------------------------------------------------
%% Markup bindings to be used during XMP generation.
-{\obeyspaces\ifpdfx@useactivespaces%
-\xdef\pdfx@sep {</rdf:li>^^J <rdf:li>}%
-\else\gdef\pdfx@sep{</rdf:li>^^J <rdf:li>}%
-\fi}
+{%
+ \catcode`\<=12 \catcode`\>=12 \catcode`\/=12 \catcode`\:=12 \catcode`\"=12
+\obeyspaces\ifpdfx@useactivespaces%
+ \gdef\pdfx@sep {\pdfx@check@lang}%
+\else%
+ \gdef\pdfx@sep{\pdfx@check@lang}%
+\fi%
+ \xdef\pdfx@sep@nolang{</rdf:li>^^J <rdf:li>}%
+ \xdef\pdfx@sep@lang[#1]{</rdf:li>^^J <rdf:li xml:lang="#1">}%
+}% end of \obeyspaces and \catcode ....
+
+\def\pdfx@check@lang#1{%
+ \ifx[#1\expandafter\@firstoftwo
+ \else\expandafter\@secondoftwo\fi
+ {\pdfx@sep@lang#1}{\pdfx@sep@nolang#1}}
\def\pdfx@xmpmarkup{%
\pdfx@actives
@@ -2789,7 +3634,9 @@
\fi
\ifarbxmp \LIIXUmaparabicletters\fi
\ifarmxmp \LIIXUmaparmenianletters\fi
+ \ifdevxmp\LIIXUmapdevaccents\fi
\ifgrkxmp \LIIXUmapgreekletters\fi
+ \ifhebxmp \LIIXUmaphebrewletters\fi
}
%% In case macros are used in XMP Metadata, need a way to map these
@@ -2823,6 +3670,12 @@
\def\sep{; }%
%\let\sep\pdfx@sep
%% Note: '\ ', \&, \copyright are already predefined by hyperref.
+%% allow LICRs to expand into PDF strings
+ \def\cf@encoding{PU}%
+ \def\9##1{\ifcase##1\string\0\or\string\1\or\string\2\or\string\3\fi}%
+ \def\8{\string\00}%
+ \def\0{\string\0}\def\1{\string\1}\def\2{\string\2}\def\3{\string\3}%
+ \pdfx@xmpunimarkup
\the\pdfxsafeforxmp@toks
}
@@ -2835,12 +3688,14 @@
\else
\def\xmp@Producer{pdfTeX}
\fi\fi
+\global\let\pdfxProducer\xmp@Producer
\global\let\xmp@CreatorTool\@empty
\global\let\xmp@Title\@empty
\global\let\xmp@Author\@empty
\global\let\xmp@Keywords\@empty
\global\let\xmp@Subject\@empty
+\global\let\xmp@Language\@empty
\global\let\xmp@Volume\@empty
\global\let\xmp@Issue\@empty
\global\let\xmp@CoverDisplayDate\@empty
@@ -2850,41 +3705,67 @@
\global\let\xmp@CopyrightURL\@empty
\gdef\xmp@WebStatement{\xmp@CopyrightURL}
\global\let\xmp@Doi\@empty
+\global\let\xmp@ISBN\@empty
+\global\let\xmp@URL\@empty
\global\let\xmp@Lastpage\@empty
\global\let\xmp@Firstpage\@empty
\global\let\xmp@PublicationType\@empty
\global\let\xmp@Journaltitle\@empty
\global\let\xmp@Journalnumber\@empty
+%%\global\let\xmp@Type\@empty
+\global\let\xmp@Contributor\@empty
+\global\let\xmp@Coverage\@empty
+\global\let\xmp@Date\@empty
+\global\let\xmp@Relation\@empty
+\global\let\xmp@Source\@empty
\global\let\xmp@Publisher\@empty
\gdef\xmp@Org{\xmp@Publisher}
\global\let\xmp@AuthoritativeDomain\@empty
+\global\let\xmp@Advisory\@empty
+\global\let\xmp@BaseURL\@empty
+\global\let\xmp@Identifier\@empty
+\global\let\xmp@Nickname\@empty
+\global\let\xmp@Thumbnails\@empty
+\global\let\xmp@Owner\@empty
+\global\let\xmp@CertificateURL\@empty
%%----------------------------------------------------------------------
%% Alternative way to get the CreationDate using Lua for XeTeX
\ifdefined\pdfcreationdate\else
+ \begingroup %% ensure correct catcodes, not done by \dospecials
+ \catcode`\:=12 \catcode`\.=12
\begin{filecontents*}{creationdate.lua}
os.remove("creationdate.timestamp")
io.output("creationdate.timestamp"):write(os.date("\\edef\\tempa{\\string D:%Y%m%d%H%M%S}\n\\def\\tempb{%z}"))
\end{filecontents*}
+ \endgroup
\ifnum\shellescape=1
- \begingroup
+ \begingroup %% ensure correct catcodes when file is read in
+ \catcode`\'=12 \catcode`\.=12 \catcode`\:=12 \catcode`\+=12
\immediate\write18{texlua creationdate.lua}
\input{creationdate.timestamp}
\def\tempc#1#2#3#4#5{#1#2#3'#4#5'}
\edef\tempb{\expandafter\tempc\tempb}
\edef\x{\endgroup\def\noexpand\pdfcreationdate{\tempa\tempb}}\x
\else
+ \begingroup %% ensure correct catcodes in the error/warning messages
+ \catcode`\<=12 \catcode`\>=12 \catcode`\"=12 \catcode`\-=12
+ \catcode`\: 12 \catcode`\' 12 \catcode`\= 12
\ifpdfx@noerr
\PackageWarning{pdfx}{%
CreationDate is not properly supported;^^J
PDF validation may fail. To avoid this problem use:^^J
- xelatex -shell-escape <filename>^^J}
+ xelatex -shell-escape -output-driver="xdvipdfmx -z 0" <filename>^^J}
\else
\PackageError{pdfx}{%
CreationDate is not properly supported;^^J
PDF validation may fail.}{To avoid this problem use:^^J
- xelatex -shell-escape <filename> }
+ xelatex -shell-escape -output-driver="xdvipdfmx -z 0" <filename> }
\fi
+ %% Using a constant date, to allow processing to finish smoothly.
+ \edef\x{\endgroup
+ \def\noexpand\pdfcreationdate{\string D:20181028075445+10'00'}}%
+ \x
\fi
\fi
@@ -2937,30 +3818,70 @@
%%----------------------------------------------------------------------
%% load xcolor before hyperref to get the link colors correct
%%
+\PassOptionsToPackage{nosetpagesize}{color}
+\PassOptionsToPackage{nosetpagesize}{graphics}
+\@ifpackageloaded{xcolor}{%
+ % Beamer will have already loaded xcolor
+ % need to understand what options it used
+}{
\ifpdfx@x
\RequirePackage[cmyk,hyperref]{xcolor}
\else
-%% \RequirePackage[rgb,hyperref]{xcolor}
+ \RequirePackage[rgb,hyperref]{xcolor}
\fi
+}%
+
+%% loading puenc.def will kill a lot of what mathtext.sty established
+\@ifpackageloaded{mathtext}{%
+ \PackageWarningNoLine{pdfx}{pdfx.sty and hyperref.sty should be loaded^^J
+ before mathtext.sty , otherwise text symbols may not show in math mode.}%
+}{}
+
+\newif\ifpdfx@hluatex
+\IfFileExists{hluatex.def}{\pdfx@hluatextrue}{\pdfx@hluatexfalse}
%% the "pdftex" option seems to work fine with LuaTeX
+\def\pdfx@luatest{\ifpdfx@hluatex luatex\else pdftex \fi}
%% Hyperref options for PDF/X
\edef\pdfx@pdfX@opts@pdftex{%
- draft,pdftex,pdfpagemode=UseNone,bookmarks=false,%
- pdfversion=1.\thepdfminorversion,pdfstartview=}
+ draft,pdftex,pdfpagemode=UseNone,bookmarks=false,%
+ pdfversion=1.\thepdfminorversion,pdfstartview=}
\edef\pdfx@pdfX@opts@xetex{%
- draft,xetex,pdfpagemode=UseNone,bookmarks=false,%
- pdfversion=1.\thepdfminorversion,pdfstartview=}
-\edef\pdfx@pdfX@opts@luatex{%
- draft,luatex,pdfpagemode=UseNone,bookmarks=false,%
- pdfversion=1.\thepdfminorversion,pdfstartview=}
+ draft,xetex,pdfpagemode=UseNone,bookmarks=false,%
+ pdfversion=1.\thepdfminorversion,pdfstartview=}
+ \edef\pdfx@pdfX@opts@luatex{%
+ draft,\pdfx@luatest,pdfpagemode=UseNone,bookmarks=false,%
+ pdfversion=1.\thepdfminorversion,pdfstartview=}%
+
+\newif\ifpdfx@hyperrefloaded
+\expandafter\ifx\csname ifHy@pdfa\endcsname\relax\else\pdfx@hyperrefloadedtrue\fi
%% Hyperref options for PDF/A and PDF/E
-\edef\pdfx@pdfAE@opts@pdftex{pdftex,pdfa,pdfversion=1.\thepdfminorversion}%
-\edef\pdfx@pdfAE@opts@xetex{xetex,pdfa,pdfversion=1.\thepdfminorversion}%
-\edef\pdfx@pdfAE@opts@luatex{luatex,pdfa,pdfversion=1.\thepdfminorversion}%
-
+\newtoks\pdfx@tmptoks
+\pdfx@tmptoks{%
+\ifHy@pdfa
+ \edef\pdfx@pdfAE@opts@pdftex{pdftex}%
+ \edef\pdfx@pdfAE@opts@xetex{xetex,pdfversion=1.\thepdfminorversion}%
+ \edef\pdfx@pdfAE@opts@luatex{\pdfx@luatest,pdfversion=1.\thepdfminorversion}%
+ \edef\pdfx@pdfAE@opts@pdfmark{pdfmark,pdfversion=1.\thepdfminorversion}%
+ \else
+ \edef\pdfx@pdfAE@opts@pdftex{pdftex,pdfa}%
+ \edef\pdfx@pdfAE@opts@xetex{xetex,pdfa,pdfversion=1.\thepdfminorversion}%
+ \edef\pdfx@pdfAE@opts@luatex{\pdfx@luatest,pdfa,pdfversion=1.\thepdfminorversion}%
+ \edef\pdfx@pdfAE@opts@pdfmark{pdfmark,pdfa,pdfversion=1.\thepdfminorversion}%
+ \fi
+}
+\ifpdfx@hyperrefloaded
+ \the\pdfx@tmptoks\relax
+\else
+ \edef\pdfx@pdfAE@opts@pdftex{pdftex,pdfa}%
+ \edef\pdfx@pdfAE@opts@xetex{xetex,pdfa,pdfversion=1.\thepdfminorversion}%
+ \edef\pdfx@pdfAE@opts@luatex{\pdfx@luatest,pdfa,pdfversion=1.\thepdfminorversion}%
+ \edef\pdfx@pdfAE@opts@pdfmark{pdfmark,pdfa,pdfversion=1.\thepdfminorversion}%
+\fi
+\pdfx@tmptoks{}%
+
\ifpdfx@x
\@ifpackageloaded{hyperref}{%
\ifxetex
@@ -3032,6 +3953,7 @@
\fi
\newif\ifpdfx@cmyk
+\newif\ifpdfx@custom
\ifpdfx@x % PDF/X normally needs a CMYK color profile for printing
\global\pdfx@cmyktrue
\fi
@@ -3079,21 +4001,26 @@
\catcode`\_ 11\relax\catcode`\& 11\relax\catcode`\~ 11\relax
\catcode`\% 11\relax
\edef\({\string\(}\edef\){\string\)}%
- \pdfx@externalprofile}
+ \ifno@iccprofile
+ \expandafter\pdfx@externalprofile
+ \else
+ \expandafter\pdfx@externalprofile@gobble
+ \fi
+ }
%%
%%
\def\pdfx@setRGBcolorprofiledir#1{%
- \gdef\pdfx@RGBcolorprofiledir{#1}%
+ \xdef\pdfx@RGBcolorprofiledir{#1}%
}
\def\pdfx@setCMYKcolorprofiledir#1{%
- \gdef\pdfx@CMYKcolorprofiledir{#1}%
+ \xdef\pdfx@CMYKcolorprofiledir{#1}%
}
\pdfx@setRGBcolorprofiledir{}
\pdfx@setCMYKcolorprofiledir{}
%% This does indeed work! Use it in .xmpdata files
-\providecommand{\MacOSColordir}%
- {/System/Library/ColorSync/Profiles/}
+\providecommand{\MacOSColordir}{/System/Library/ColorSync/Profiles/}
+\providecommand{\MacOSLibraryColordir}{/Library/ColorSync/Profiles/}
\providecommand{\AdobeMacOSdir}%
{/Library/Application Support/Adobe/Color/Profiles/Recommended/}
\edef\pdfx@tmp{C:\string\Windows\string\System32\string\Spool%
@@ -3109,7 +4036,8 @@
\let\pdfxSetColorProfileDir\pdfxSetCMYKcolorProfileDir
%%
\def\pdfx@setrgbprofile#1#2#3#4{%
- \xdef\pdfx@rgb@profile{\pdfx@RGBcolorprofiledir#1}% valid file name
+ \xdef\pdfx@rgb@profile{\pdfx@RGBcolorprofiledir#1}% valid file path/name
+ \xdef\pdfx@rgb@profilename{#1}% valid file name
\gdef\pdfx@rgb@identifier{#2}%
\gdef\pdfx@rgb@info{#3}%
\pdfstringdef\pdfx@rgb@registry{#4}% valid URL
@@ -3118,7 +4046,8 @@
}% closes-off \setRGBcolorprofile
%%
\def\pdfx@setcmykprofile#1#2#3#4{%
- \xdef\pdfx@cmyk@profile{\pdfx@CMYKcolorprofiledir#1}% valid file name
+ \xdef\pdfx@cmyk@profile{\pdfx@CMYKcolorprofiledir#1}% valid file path/name
+ \xdef\pdfx@cmyk@profilename{#1}% valid file name
%% \expandafter\gdef\expandafter\pdfx@cmyk@profile\expandafter
%% {\pdfx@colorprofiledir#1}% valid file name
\gdef\pdfx@cmyk@intent{#2}%
@@ -3129,7 +4058,28 @@
%% \pdfstringdef\pdfx@cmyk@registry{#4}% valid URL
\endgroup
\global\pdfx@cmyktrue
- }% closes-off \setCMYKcolorprofile
+ }% closes-off \setcmykcolorprofile
+%%
+\def\setCUSTOMcolorprofile{%
+ \begingroup
+ \catcode`\_ 11\relax\catcode`\& 11\relax\catcode`\~ 11\relax
+ \catcode`\% 11\relax
+ \edef\({\string\(}\edef\){\string\)}%
+ \pdfx@setcustomprofile
+}
+\def\pdfx@setcustomprofile#1#2#3#4#5#6#7#8{%
+ \xdef\pdfx@customcolorprofiledir{#2}% valid directory location
+ \xdef\pdfx@custom@profile{#1}% valid file name
+ \gdef\pdfx@custom@identifier{#3}%
+ \gdef\pdfx@custom@registry{#4}%
+ \gdef\pdfx@custom@numcolors{#5}% num-colors specifier
+ \gdef\pdfx@iccversion{#6}% Hex string for /ICCVersion < ... >
+ \gdef\pdfx@custom@colornames{#7}%
+ \gdef\pdfx@profile@checksum{#8}% Hex string for /CheckSum < ... >
+\endgroup
+ \global\pdfx@cmykfalse
+ \global\pdfx@customtrue
+ }% closes-off \pdfx@setcustomprofile
%%
\def\pdfx@setgrayprofile#1#2#3#4{%
\gdef\pdfx@gray@profile{#1}% valid file name
@@ -3149,8 +4099,13 @@
\gdef\pdfx@cmyk@info{#8}% for /Info
\gdef\pdfx@profile@checksum{#9}% Hex string for /CheckSum < ... >
\endgroup}% closes-off \setEXTERNALprofile
+\def\pdfx@externalprofile@gobble#1#2#3#4#5#6#7#8#9{%
+ \PackageError{pdfx}{Wrong option for using an External Color profile}%
+ {Use one of the options: x-4p , x-4p08 , x-4p10 or x-5pg .}%
+ \endgroup}
%%
%% default color profiles
+
{\catcode`\_ 12 \catcode`\& 12 \catcode`\~ 12
\gdef\pdfx@xprofile@cmykdefault{coated_FOGRA39L_argl.icc}
\gdef\pdfx@aprofile@rgbdefault{sRGB_IEC61966-2-1_black_scaled.icc}
@@ -3190,9 +4145,43 @@
%% software for any purpose.
%%
%%----------------------------------------------------------------------
-{\catcode`\| 14 \catcode`\% 12 \catcode`\_ 12
+
+\newif\ifpdfx@tryoldprofiles
+
+%% The colorprofiles package was added to TeXLive in October 2018.
+%% It allows the default Color Profiles to be maintained independent
+%% of the pdfx package.
+%% In particular sRGB_IEC61966-2-1_black_scaled.icc is no longer
+%% distributed with TeXLive 2018 and later.
+%% Older versions still have this file.
+%%
+\IfFileExists{colorprofiles.tex}{%
+ \RequirePackage{colorprofiles}[2018/11/01]%
+ \ifx\colorpro@rgb@profile\relax
+ \expandafter\pdfx@tryoldprofilestrue
+ \else
+ \begingroup %% \endgroup occurs within the macro expansion
+ \pdfx@setrgbprofile{\colorpro@rgb@profile
+ }{\colorpro@rgb@identifier
+ }{\colorpro@rgb@info
+ }{\colorpro@rgb@registry
+ }%
+ \begingroup %% \endgroup occurs within the macro expansion
+ \pdfx@setcmykprofile{\colorpro@cmyk@profile
+ }{\colorpro@cmyk@intent
+ }{\colorpro@cmyk@identifier
+ }{\colorpro@cmyk@registry
+ }%
+ \expandafter\pdfx@tryoldprofilesfalse
+ \fi
+}{\pdfx@tryoldprofilestrue}
+
+{\catcode`\| 14 \catcode`\% 12 \catcode`\_ 12 \catcode`\: 12
+ \catcode`\. 12 \catcode`\- 12 \catcode`\/ 12
\edef\@bchar{\expandafter\@gobble\string\\}|
\edef\({\string\(}\edef\){\string\)}|
+\ifpdfx@tryoldprofiles
+ || this will be used by TeXLive installations up to 2017.
\begingroup | \endgroup occurs within the macro expansion
\expandafter\pdfx@setrgbprofile\expandafter
{sRGB_IEC61966-2-1_black_scaled.icc}|
@@ -3204,6 +4193,7 @@
{Coated FOGRA39}|
{FOGRA39 \string\(ISO Coated v2 300%\space \string\(ECI\string\)\string\)}|
{http://www.argyllcms.com/}|{http://www.color.org}|
+\fi || end of \ifpdfx@tryoldprofiles
\begingroup | \endgroup occurs within the macro expansion
\pdfx@setgrayprofile{Gray_linear.icc}|
{}|
@@ -3219,6 +4209,7 @@
{Coated FOGRA39 \(ISO 12647-2:2004\)}{74FF62F330BF0DBE4495B5720542D511}|
\fi
}% end of \catcode
+
%%
%%----------------------------------------------------------------------
%% License for the file coated_FOGRA39L_argl.icc :
@@ -3248,6 +4239,7 @@
%%----------------------------------------------------------------------
\newif\ifexternalICCprofiles
+\newif\ifpdfx@noXMPdata
\begingroup
%% override unneeded color-profile specifier
@@ -3286,70 +4278,104 @@
\fi\fi
\makeatletter
\pdfx@localcommands
-%%
+%% Do this in a box, so any stray characters don't get into TeX's lists.
+\setbox0\hbox{%
\InputIfFileExists{\jobname.xmpdata}%
{\typeout{** pdfx: Metadata file \jobname.xmpdata read successfully.}}%
{\typeout{** pdfx: No file \jobname.xmpdata .
- Metadata will be incomplete!}}
+ Metadata will be incomplete!}\aftergroup\pdfx@noXMPdatatrue}}
\endgroup
+%% ----------------------------------------------------------------------
+
+\def\pdfx@LanguageSpec{}
+\def\pdfx@mainLanguage{en-US}% absolute default
+\def\pdfx@checkfor@sep#1#2\sep#3\pdfx@endparse{\def#1{#2}}
+\ifx\@empty\xmp@Language\else
+ \expandafter\pdfx@checkfor@sep\expandafter\pdfx@mainLanguage\xmp@Language
+ \sep\pdfx@endparse
+\fi
+\edef\pdfx@LanguageSpec{/Lang (\pdfx@mainLanguage)}
%% ----------------------------------------------------------------------
\begingroup
-\ifpdfx@x % PDF/X needs a CMYK or RGB color profile for printing
+ \catcode`\_ 12 \catcode`\" 12 \catcode`\' 12
+ \catcode`\< 12 \catcode`\> 12 \catcode`\/ 12 \catcode`\[ 12 \catcode`\] 12
\edef\@pctchar{\expandafter\@gobble\string\%}
\edef\@bchar{\expandafter\@gobble\string\\}
\edef\0{\string\0}
\edef\({\string\(}
\edef\){\string\)}
- \catcode`\_ 12
+%%
+ \def\pdfx@outcatalog@dict{%
+ \pdfx@LanguageSpec
+ /ViewerPreferences <</DisplayDocTitle true >>
+ /OutputIntents \pdfx@outintents % needs appropriate expansion
+ }%
+\ifpdfx@x % PDF/X needs a CMYK or RGB color profile for printing
\ifno@iccprofile % PDF/X-4p and PDF/X-5pg
- \ifxetex
- \special{pdf:obj @colorURL <</FS/URL/F(\pdfx@colorURL)>>}%
- \special{pdf:obj @colorprofile <<%
+%%
+%% URL and metadata for the desired external Color Profile
+%%
+ \edef\pdfx@colorURL@dict{<</FS/URL/F(\pdfx@colorURL)>>}
+ \def\pdfx@colorprofile@dict{<< %
/CheckSum <\pdfx@profile@checksum>^^J%
/ICCVersion <\pdfx@iccversion>%
/ProfileCS (\pdfx@profileCS)^^J%
/ProfileName (\pdfx@extprofile)^^J%
- /URLs [ @colorURL ]
- >>}
- \def\OBJ@ICC{@colorprofile}%
- \else
- \immediate\pdfobj {<</FS/URL/F(\pdfx@colorURL)>>}%
+ /URLs [\OBJ@URLs] >>
+ }
+%% How to specify the PDF objects with different drivers
+ \ifxetex
+ \def\OBJ@URLs{ @colorURL }%
+ \def\OBJ@ICC{ @colorprofile }%
+ \immediate\special{pdf:obj \OBJ@URLs \pdfx@colorURL@dict }%
+ \immediate\special{pdf:obj \OBJ@ICC \pdfx@colorprofile@dict }%
+ \else % pdfTeX & LuaTeX
+ \immediate\pdfobj{\pdfx@colorURL@dict}%
\edef\OBJ@URLs{\the\pdflastobj\space 0 R}%
- \immediate\pdfobj {<<%
- /CheckSum <\pdfx@profile@checksum>^^J%
- /ICCVersion <\pdfx@iccversion>%
- /ProfileCS (\pdfx@profileCS)^^J%
- /ProfileName (\pdfx@extprofile)^^J%
- /URLs [\OBJ@URLs ]
- >>} %
+ \immediate\pdfobj{\pdfx@colorprofile@dict}%
\edef\OBJ@ICC{\the\pdflastobj\space 0 R}%
\fi
- \pdfcatalog{%
- /OutputIntents [ <<
- /Type/OutputIntent
- /S/GTS_PDFX
- /OutputCondition (\pdfx@cmyk@intent)%
- /OutputConditionIdentifier (\pdfx@cmyk@identifier)%
- /Info(\pdfx@cmyk@intent)%
- /RegistryName(\pdfx@cmyk@registry)
+%% Output Intent dictionary, with object reference
+ \edef\pdfx@outintent@dict{%
+ /Type/OutputIntent
+ /S/GTS_PDFX^^J
+ /OutputCondition (\pdfx@cmyk@intent)^^J
+ /OutputConditionIdentifier (\pdfx@cmyk@identifier)^^J
+ /Info(\pdfx@cmyk@intent)^^J
+ /RegistryName(\pdfx@cmyk@registry)^^J
%% extra dictionary required for PDF/X-4p and PDF/X-5pg
- /DestOutputProfileRef \OBJ@ICC
- >> ]}%
+ /DestOutputProfileRef \OBJ@ICC
+ }%
%%
\else % PDF/X-1 , PDF/X-1a , PDF/X-3 , PDF/X-4 , PDF/X-5g
%%
\ifpdfx@cmyk
\IfFileExists{"\pdfx@cmyk@profile"}{%
% embedded CMYK color profile
+ %%
+ %% Output Intent dictionary, with object reference
+ \def\pdfx@outintent@dict{%
+ /Type/OutputIntent
+ /S/GTS_PDFX^^J
+ /OutputCondition (\pdfx@cmyk@intent)^^J
+ /OutputConditionIdentifier (\pdfx@cmyk@identifier)^^J
+ /Info(\pdfx@cmyk@intent)^^J
+ /RegistryName(\pdfx@cmyk@registry)
+ /DestOutputProfile \OBJ@CMYK
+ }%
+ \def\pdfx@numcoords{/N 4}%
+%%
\ifxetex
- \immediate\special{pdf:fstream @colorprofile (\pdfx@cmyk@profile) <</N 4>>}
\def\OBJ@CMYK{@colorprofile}%
- \else
- \immediate\pdfobj stream attr{/N 4} file{\pdfx@cmyk@profile}%
+ \immediate\special{%
+ pdf:fstream \OBJ@CMYK (\pdfx@cmyk@profile) <<\pdfx@numcoords >>}%
+ \else % pdfTeX
+ \immediate\pdfobj stream attr{\pdfx@numcoords} file {\pdfx@cmyk@profile}%
\edef\OBJ@CMYK{\the\pdflastobj\space 0 R}%
\fi
\pdfcatalog{%
+ \pdfx@LanguageSpec
/OutputIntents [ <<
/Type/OutputIntent
/S/GTS_PDFX
@@ -3360,9 +4386,63 @@
/DestOutputProfile \OBJ@CMYK
>> ]}%
}{%
- \errmessage{No color profile \pdfx@cmyk@profile\ found
+ \PackageError{pdfx}{No color profile \pdfx@cmyk@profilename\space found
to use for CMYK printing colors.}%
+ {Is this the correct directory: \pdfx@CMYKcolorprofiledir\space ?}%
+ }% end of \IfFileExists for CMYK
+ \else\ifpdfx@custom
+%% allow Custom profile with PDF/X-5n
+ \IfFileExists{"\pdfx@customcolorprofiledir\pdfx@custom@profile"}{%
+%% embedded Custom color profile
+%%
+ %% Output Intent dictionary, with object reference
+ \def\pdfx@outintent@dict{%
+ /Type/OutputIntent
+ /S/GTS_PDFX^^J
+ /OutputConditionIdentifier (Custom)^^J
+ /OutputCondition (\pdfx@custom@identifier)^^J
+ /Info(\pdfx@custom@profile)^^J
+ /RegistryName(\pdfx@custom@registry)
+ /Registry(\pdfx@custom@registry)
+ /DestOutputProfileRef \OBJ@CustomDir
+ }%
+ \def\OBJ@CustomDir{<<
+ \pdfx@numcoords^^J
+ /URLs [ << /Type /Filespec ^^J/EF \OBJ@CustomFile^^J
+ /F (\pdfx@custom@profile) /UF (\pdfx@custom@profile) >>]^^J
+ >>}
+%% need more attributes:
+ \def\pdfx@numcoords{%
+ /CheckSum <\pdfx@profile@checksum>^^J%
+ /ICCVersion <\pdfx@iccversion>%
+ /ProfileName (\pdfx@custom@profile)^^J%
+ /ProfileCS (\pdfx@custom@numcolors)^^J%
+ /ColorantTable [\pdfx@custom@colornames]
+ }%
+ \def\pdfx@custom@filespec{%
+ /Type /EmbeddedFile >>^^J
+ /Subtype (application/vnd.iccprofile )
}%
+%%
+ \ifxetex
+ \def\OBJ@CustomFile{@colorprofile}%
+ \immediate\special{pdf:fstream \OBJ@CustomFile
+ (\pdfx@customcolorprofiledir\pdfx@custom@profile) <<\pdfx@custom@filespec >>}%
+ \else % pdfTeX
+ \immediate\pdfobj stream attr{\pdfx@custom@filespec} file %
+ {\pdfx@customcolorprofiledir\pdfx@custom@profile}%
+ \edef\OBJ@CustomFile{\the\pdflastobj\space 0 R}%
+ \fi
+ \pdfcatalog{%
+ \pdfx@LanguageSpec
+ /OutputIntents [ << \pdfx@outintent@dict >>]}%
+ }{%
+ \PackageError{pdfx}%
+ {No color profile \pdfx@custom@profile\space found to use for Custom printing colors.}%
+ {Is this the correct directory: \pdfx@customcolorprofiledir\space ?}%
+ }% end of \IfFileExists for Custom
+ \global\pdfx@cmyktrue % for TeX coloring
+%%
\else % allow RGB profile with PDF/X ???
\ifpdfx@noerr
\PackageWarning{pdfx}{PDF/X normally requires a CMYK color profile.^^J
@@ -3371,14 +4451,25 @@
\PackageError{pdfx}{PDF/X normally requires a CMYK color profile.}%
{To use RGB ensure profile is of type 'prtr' not 'mntr'.^^J^^J}%
\fi
+ % embedded RGB color profile
+ %%
+ %% Output Intent dictionary, with object reference
+ \def\pdfx@outintent@dict{%
+ /Type /OutputIntent
+ /S/GTS_PDFX^^J
+ /OutputConditionIdentifier (\pdfx@rgb@identifier)^^J
+ /DestOutputProfile \OBJ@RGB^^J
+ /Info(\pdfx@rgb@info)^^J
+ /RegistryName(\pdfx@rgb@registry)
+ }%
\IfFileExists{"\pdfx@rgb@profile"}{%
+ \def\pdfx@numcoords{/N 3 /Alternate/DeviceRGB}
\ifxetex
- \immediate\special{pdf:fstream @colorprofile (\pdfx@rgb@profile) <<
- /N 3 /Alternate/DeviceRGB >>}
+ \immediate\special{%
+ pdf:fstream @colorprofile (\pdfx@rgb@profile) << \pdfx@numcoords >>}
\def\OBJ@RGB{@colorprofile}%
\else
- \immediate\pdfobj stream attr{/N 3^^J/Alternate/DeviceRGB}
- file{\pdfx@rgb@profile}%
+ \immediate\pdfobj stream attr{\pdfx@numcoords} file{\pdfx@rgb@profile}%
\edef\OBJ@RGB{\the\pdflastobj\space 0 R}%
\fi
\edef\pdfx@outintent@dict{%
@@ -3390,90 +4481,65 @@
/RegistryName(\pdfx@rgb@registry)
}%
\ifxetex
- \special{pdf:obj @outintent@dict << \pdfx@outintent@dict >>}
- \edef\pdfx@outintent@dict{ @outintent@dict }%
- \else
-%% pdfTeX or LuaTeX
- \fi
- \ifxetex
- \immediate\special{pdf:obj @outintentsarray [ ]}%
- \immediate\special{pdf:put @outintentsarray \pdfx@outintent@dict}%
- \def\pdfx@outintents{@outintentsarray}%
- \else
- \immediate\pdfobj{<<\pdfx@outintent@dict>>}
- \edef\pdfx@outintents{[\the\pdflastobj\space 0 R]}%
- \fi
- \pdfcatalog{%
- /ViewerPreferences <</DisplayDocTitle true >>
- /OutputIntents \pdfx@outintents
- }%
+ \def\OBJ@RGB{ @colorprofile }%
+ \immediate\special{%
+ pdf:fstream @colorprofile (\pdfx@rgb@profile) <<\pdfx@numcoords >>}
+ \else %% pdfTeX or LuaTeX
+ \immediate\pdfobj stream attr{\pdfx@numcoords} file{\pdfx@rgb@profile}%
+ \edef\OBJ@RGB{\the\pdflastobj\space 0 R}%
+ \fi
}{%
- \errmessage{No color profile found to use for RGB screen colors.}%
- }%
+ \PackageError{pdfx}%
+ {No color profile \pdfx@rgb@profilename\space found to use for RGB screen colors.}%
+ {Is this the correct directory: \pdfx@RGBcolorprofiledir\space ?}%
+ }% end of \IfFileExists for RGB
+ \fi % end of \ifpdfx@custom
\fi % end of \ifpdfx@cmyk
\fi % end of \ifno@iccprofile
+%% end of PDF/X
\else
%% PDF/A and PDF/E can specify a CMYK profile
\expandafter\ifx\expandafter\relax\pdfx@rgb@profile\relax
\global\pdfx@cmyktrue
\IfFileExists{"\pdfx@cmyk@profile"}{%
+ \def\pdfx@numcoords{/N 4}
% embedded CMYK color profile
-%% How to support XeTeX here ?
- \ifxetex
- \special{pdf:fstream @colorprofile (\pdfx@cmyk@profile) <</N 4>>}
- \def\OBJ@CMYK{@colorprofile}%
- \else
- \immediate\pdfobj stream attr{/N 4} file{\pdfx@cmyk@profile}%
- \edef\OBJ@CMYK{\the\pdflastobj\space 0 R}%
- \fi
- \edef\pdfx@outintent@dict{%
- /Type /OutputIntent
- \ifpdfx@e
- /S/ISO_PDFE1
- \else
- /S/GTS_PDFA1
+ \ifxetex
+ \def\OBJ@CMYK{@colorprofile}%
+ \special{pdf:fstream @colorprofile (\pdfx@cmyk@profile) <<\pdfx@numcoords >>}
+ \else %% pdfTeX or LuaTeX
+ \immediate\pdfobj stream attr{\pdfx@numcoords} file{\pdfx@cmyk@profile}%
+ \edef\OBJ@CMYK{\the\pdflastobj\space 0 R}%
\fi
+ \edef\pdfx@outintent@dict{%
+ /Type /OutputIntent
+ \ifpdfx@e
+ /S/ISO_PDFE1
+ \else
+ /S/GTS_PDFA1
+ \fi
/OutputCondition (\pdfx@cmyk@intent)% use this or /Info ?
/OutputConditionIdentifier (\pdfx@cmyk@identifier)%
/DestOutputProfile \OBJ@CMYK
/Info(\pdfx@cmyk@intent)%
/RegistryName(\pdfx@cmyk@registry)
- }
- \ifxetex
- \special{pdf:obj @outintent@dict << \pdfx@outintent@dict >>}
- \edef\pdfx@outintent@dict{ @outintent@dict }%
- \else
-%% pdfTeX
- \fi
- \ifxetex
- \immediate\special{pdf:obj @outintentsarray [ ]}%
- \immediate\special{pdf:put @outintentsarray \pdfx@outintent@dict}%
- \def\pdfx@outintents{@outintentsarray}%
- \else
- \immediate\pdfobj{<<\pdfx@outintent@dict>>}
- \edef\pdfx@outintents{[\the\pdflastobj\space 0 R]}%
- \fi
- \pdfcatalog{%
- /ViewerPreferences <</DisplayDocTitle true >>
- /OutputIntents \pdfx@outintents
- }
+ }%
}{%
- \errmessage{No color profile \pdfx@cmyk@profile\ found
- to use for CMYK screen colors.}%
- }%
+ \PackageError{pdfx}{No color profile \pdfx@cmyk@profilename\space found
+ to use for CMYK printing colors.}%
+ {Is this the correct directory: \pdfx@CMYKcolorprofiledir\space ?}%
+ }% end of \IfFileExists for CMYK
\else
%% PDF/A and PDF/E usually need an RGB color profile for on-screen rendering
\global\pdfx@cmykfalse
- \IfFileExists{"\pdfx@rgb@profile"}{%
-%% How to support XeTeX here ?
+ \expandafter\IfFileExists\expandafter{\pdfx@rgb@profile}{%
+ \def\pdfx@numcoords{/N 3 /Alternate/DeviceRGB}
\ifxetex
- \immediate\special{pdf:fstream @colorprofile (\pdfx@rgb@profile) <<
- /N 3 /Alternate/DeviceRGB >>}
- \def\OBJ@RGB{@colorprofile}%
+ \def\OBJ@RGB{ @colorprofile }%
+ \immediate\special{pdf:fstream @colorprofile (\pdfx@rgb@profile) <<\pdfx@numcoords >>}
\else
- \immediate\pdfobj stream attr{/N 3^^J/Alternate/DeviceRGB}
- file{\pdfx@rgb@profile}%
- \edef\OBJ@RGB{\the\pdflastobj\space 0 R}%
+ \immediate\pdfobj stream attr{\pdfx@numcoords} file{\pdfx@rgb@profile}%
+ \edef\OBJ@RGB{\the\pdflastobj\space 0 R}%
\fi
\edef\pdfx@outintent@dict{%
/Type /OutputIntent
@@ -3487,29 +4553,37 @@
/Info(\pdfx@rgb@info)
/RegistryName(\pdfx@rgb@registry)
}%
+ }{%
+ \PackageError{pdfx}%
+ {No color profile \pdfx@rgb@profilename\space found to use for RGB screen colors.}%
+ {Is this the correct directory: \pdfx@RGBcolorprofiledir\space ?}%
+ }% end of \IfFileExists for RGB
+ \fi % end of ifx for PDF/A or PDF/E
+\fi % end of ifpdfx@x
+%%
+ \expandafter\ifx\csname pdfx@outintent@dict\endcsname\relax
+ \else
+%%
+%% build the OutputIntent array
+%%
\ifxetex
- \special{pdf:obj @outintent@dict << \pdfx@outintent@dict >>}
- \edef\pdfx@outintent@dict{ @outintent@dict }%
+ \def\pdfx@outintents{ @outintentsarray }%
+ \def\pdfx@outintentref{ @outintent@dict }%
+ \immediate\special{pdf:obj \pdfx@outintentref << \pdfx@outintent@dict >>}
+ \immediate\special{pdf:obj \pdfx@outintents [ ]}%
+ \immediate\special{pdf:put \pdfx@outintents \pdfx@outintentref }%
\else
-%% pdfTeX
+ \immediate\pdfobj{<<\pdfx@outintent@dict>>}%
+ \edef\pdfx@outintents{[\the\pdflastobj\space 0 R]}%
\fi
- \ifxetex
- \immediate\special{pdf:obj @outintentsarray [ ]}%
- \immediate\special{pdf:put @outintentsarray \pdfx@outintent@dict}%
- \def\pdfx@outintents{@outintentsarray}%
+%%
+%% make the Catalog entry, if not already done
+%%
+ \ifx\pdfx@outcatalog@dict\relax
\else
- \immediate\pdfobj{<<\pdfx@outintent@dict>>}
- \edef\pdfx@outintents{[\the\pdflastobj\space 0 R]}%
+ \pdfcatalog{\pdfx@outcatalog@dict}%
\fi
- \pdfcatalog{%
- /ViewerPreferences <</DisplayDocTitle true >>
- /OutputIntents \pdfx@outintents
- }%
- }{%
- \errmessage{No color profile found to use for RGB screen colors.}%
- }%
- \fi % end of \ifx
-\fi % end of \ifpdfx@x
+\fi % end of OutputIntent array and Catalog entry
\endgroup
%% ----------------------------------------------------------------------
@@ -3529,9 +4603,10 @@
\fi\fi
\makeatletter
\IfFileExists{\pdfx@encodingfile}{%
-%% \def\cf@encoding{U}\fontencoding{U}%
\def\cf@encoding{L8U}\fontencoding{L8U}%
}{}%
+ \let\protect\@typeset@protect
+ \pdfx@xmpmarkup %% !!!!! no longer needed
%% \xdef\xmp@@Author{\xmp@Author}% no need to expand
\global\let\xmp@@Author\xmp@Author
\def\sep{; }% expand to replace \sep !!! no longer needed
@@ -3614,7 +4689,7 @@
\newif\ifpdf@activechars
{\ifnum\catcode`^^c0 = 13\relax \aftergroup\pdf@activecharstrue\fi}%
%%
-%% normally not used with XeTeX
+%% normally not used with XeTeX or LuaTeX
%%
\ifpdf@activechars
@@ -3675,54 +4750,218 @@
%% ----------------------------------------------------------------------
%% detect when \sep is used for multiple authors
%% then suppress the /Author field in PDF /Info
-\newif\ifpdfx@sepinAuthor
+\newif\ifpdfx@sep@infield@
\let\pdfx@endparse\relax
\def\pdfx@parseforsep#1\sep#2\pdfx@endparse{%
- \ifx\relax#2\relax\else\pdfx@sepinAuthortrue\fi
+ \pdfx@sep@infield@false
+ \ifx\relax#2\relax\else\pdfx@sep@infield@true\fi
+}
+
+\begingroup
+ \let\CATCODE\catcode
+ \let\ENDGROUP\endgroup
+ \let\GDEF\gdef
+ \CATCODE`\m 12 \CATCODE`\a 12 \CATCODE`\c 12 \CATCODE`\r 12 \CATCODE`\o 12
+ \CATCODE`\: 12 \CATCODE`\- 12 \CATCODE`\> 12
+ \GDEF\pdfx@DOSTRIP@MACRO macro:->#1\@{#1}%
+\ENDGROUP
+\def\pdfx@strip@macro#1{%
+ \expandafter\edef\expandafter#1\expandafter{%
+ \expandafter\pdfx@DOSTRIP@MACRO\meaning#1\@}%
}
%% Convert the relevant XMP properties to PDF strings, expanding markup
%% (such as \sep, \&, \copyright, etc) in an appropriate way.
-%% These PDF strings are actually not necessary, but if supplied they
+%% These PDF strings are actually not always necessary, but if supplied they
%% must match exactly what is in the XMP version. This may be impossible
%% if math symbols are used; e.g. Plane-1 alphanumerics.
%% Generally, it is better to *not* provide PDF-info strings;
%% instead just providing metadata through XMP.
%% This is not always enough — a driver may add it by default!
%%
+%% But some PDF readers don't support XMP, so it is nice to have
+%% /Info fields, when this can be done reliably.
+%%
\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{%
+ % converts a UTF-8 string to UTF-16be
+ \StringEncodingConvert{#1}{#2}{utf8}{utf16be}%
+ \xdef#1{\string\376\string\377\pdfescapestring{#1}}%
+ }%
+ \def\pdfx@ConvertUTFtoBE#1#2{%
+ \setbox0=\hbox{% catch any rubbish escaping to the MVL
+ \def\cf@encoding{L8U}\fontencoding{L8U}%
+ \ifluatex
+ \let\pdfescapestring\luaescapestring
+ \else\ifxetex\else
+ \inputencoding{8bit}%
+ \fi\fi
+%% \pdfx@xmpmarkup %% don't want some things
+ \pdfx@xmpunimarkup
+ \let\backslash\textbackslash
+ \edef\pdfx@temp{#2}% ensure XMP expands to UTF8
+ \pdfx@GeneratePdfString{#1}{\pdfx@temp}%
+ }%
+ }%
+ \fi
\pdfx@pdfmarkup
- \global\let\pdfx@Title\@empty
- \global\let\pdfx@Subject\@empty
- \global\let\pdfx@Keywords\@empty
- \ifpdfx@nopdfinfo\else
- \pdfx@topdfstring\pdfx@Title\xmp@Title
+ \global\let\pdfx@pdfAuthor\@empty
+ \global\let\pdfx@pdfTitle\@empty
+ \global\let\pdfx@pdfSubject\@empty
+ \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@Subject\xmp@Subject
+ \pdfx@topdfstring\pdfx@pdfSubject\xmp@Subject
\fi\fi
-%% \pdfx@topdfstring\pdfx@Keywords\xmp@Keywords
\fi
\pdfx@topdfstring\pdfx@CreatorTool\xmp@CreatorTool
\pdfx@topdfstring\pdfx@Producer\xmp@Producer
- \expandafter\pdfx@parseforsep\xmp@Author\sep\pdfx@endparse
- \ifpdfx@sepinAuthor
- \aftergroup\let\aftergroup\pdfx@Author\aftergroup\@empty
- \else
- \aftergroup\let\aftergroup\pdfx@Author\aftergroup\@empty
-%% \pdfx@topdfstring\pdfx@Author\xmp@Author
- \fi
+%% \pdfescapestring needed
+ \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}%
+ \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
+ \fi %% end of \ifpdfx@sep@infield@
+ \fi %% end of \xmp@Keywords test
+%%
+ \fi %% end of \pdfescapestring test
\endgroup
-%% How to support XeTeX here ?
-\ifxetex\else
+%% Affects CMap creation for certain fonts, according to glyph names
+%% How to support XeTeX here ?
+%% Maybe it's best to be using an updated mmap.sty ?
+\ifxetex
+\else
\input glyphtounicode.tex
\input glyphtounicode-cmr.tex
+ \input glyphtounicode-ntx.tex
\pdfgentounicode=1
- \ifgrkLGRxmp
- \pdfglyphtounicode{internalchar2}{200D}%
- \fi
\fi
+\ifgrkLGRxmp
+ \ifxetex\else
+ \pdfglyphtounicode{internalchar2}{200D}%
+\fi \fi
+
+%% patch to place accents *after* the base character, rather than before
+%% based on coding from mmap.sty by RRM
+\newif\ifPDFX@inaccent
+\let\LTX@add@accent\add@accent
+\def\PDFX@add@accent#1#2{%
+ \hmode@bgroup
+ \let \hmode@start@before@group \@firstofone
+ \setbox\@tempboxa\hbox{\PDFX@inaccenttrue
+ #2\global\mathchardef\accent@spacefactor\spacefactor}%
+ #2\kern-\wd\@tempboxa
+%% \ifdim\ht\@tempboxa>1ex\relax
+ \dimen@=\ht\@tempboxa\advance\dimen@-1ex\relax
+%%% reduce how much a nested accent is raised
+ \ifPDFX@inaccent\advance\dimen@-.2ex\relax\fi
+ \raise\dimen@\hbox to\wd\@tempboxa{\hss
+ \accent#1{\vphantom{#2}}\hss}%
+%% \else
+%% \accent#1{%\vphantom{#2}
+%% \vrule width\z@ height\ht\@tempboxa depth\dp\@tempboxa}%
+%% \fi
+ \egroup
+ \spacefactor\accent@spacefactor
+}
+
+%% How to support XeTeX here ?
+%%%%% adjust accent characters to the Unicode Combining variant %%%%
+\def\PDFX@combiningchars@unicode{%
+ \pdfglyphtounicode{grave}{0300}%
+ \pdfglyphtounicode{acute}{0301}%
+ \pdfglyphtounicode{circumflex}{0302}%
+ \pdfglyphtounicode{tilde}{0303}%
+ \pdfglyphtounicode{macron}{0304}%
+ \pdfglyphtounicode{Macronsmall}{0304}%
+ \pdfglyphtounicode{breve}{0306}%
+ \pdfglyphtounicode{dotaccent}{0307}%
+ \pdfglyphtounicode{Dotaccent}{0307}%
+ \pdfglyphtounicode{Dotaccentsmall}{0307}%
+ \pdfglyphtounicode{dieresis}{0308}%
+ \pdfglyphtounicode{ogonek}{0309}%
+ \pdfglyphtounicode{ring}{030A}%
+ \pdfglyphtounicode{hungarumlaut}{030B}%
+ \pdfglyphtounicode{caron}{030C}%
+ \pdfglyphtounicode{cedilla}{0327}%
+ \pdfglyphtounicode{commaaccent}{0326}% droid
+ % tie accents in berenisadf lm stix and others
+ \pdfglyphtounicode{tieaccentlowercase}{0311}%
+ \pdfglyphtounicode{tieaccentcapital}{0361}%
+ \pdfglyphtounicode{newtieaccentlowercase}{0311}%
+ \pdfglyphtounicode{newtieaccentcapital}{0361}%
+ % cm-unicode
+ \pdfglyphtounicode{space_uni030D}{030D}%
+ \pdfglyphtounicode{space_uni030E}{030E}%
+ \pdfglyphtounicode{space_uni030F}{030F}%
+ \pdfglyphtounicode{space_uni0311}{0311}%
+ \pdfglyphtounicode{space_uni0321}{0321}%
+ \pdfglyphtounicode{space_uni0322}{0322}%
+ \pdfglyphtounicode{space_uni032A}{032A}%
+ \pdfglyphtounicode{space_uni032B}{032B}%
+ \pdfglyphtounicode{space_uni0335}{0335}%
+ \pdfglyphtounicode{space_uni0337}{0337}%
+ \pdfglyphtounicode{space_uni033A}{033A}%
+ \pdfglyphtounicode{space_uni033B}{033B}%
+ \pdfglyphtounicode{space_uni033C}{033C}%
+ \pdfglyphtounicode{space_uni034D}{034D}%
+}
+
+\AtBeginDocument{%
+ \ifx\add@accent\LTX@add@accent
+ \let\add@accent\PDFX@add@accent
+ \else
+ \expandafter\ifx\csname MT@orig@add@accent\endcsname\relax
+ \TPDF@error{another package has already patched \string\add@accent }%
+ \else
+ \expandafter\let\csname MT@orig@add@accent\endcsname\PDFX@add@accent
+ \fi\fi
+ \ifxetex
+ \else
+ \PDFX@combiningchars@unicode
+ \@ifpackageloaded{newtxmath}{%
+ \pdfglyphtounicode{vec}{20D7}%
+ \pdfglyphtounicode{rvec}{20D6}%
+ \pdfglyphtounicode{lrvec}{20E1}%
+ }{}%
+ \fi % end of \ifxetex
+}
+%% suppress hyperlinks when generating PDF/X
\def\pdfx@linkfile@pdfX#1#2#3{%
\Hy@colorlink\@filecolor#1\Hy@xspace@end}
\def\pdfx@linkstart@pdfX#1#2#3{%
@@ -3731,6 +4970,7 @@
\Hy@colorlink\@urlcolor#1\endgroup\Hy@xspace@end}
\def\pdfx@StartlinkName@pdfX#1#2{}
\def\pdfx@close@pdflink{\Hy@VerboseLinkStop\Hy@endcolorlink}%
+\def\pdfx@Acrobatmenu@noaction#1#2{#2}
\ifpdfx@x
\let\hyper@linkfile\pdfx@linkfile@pdfX
@@ -3739,19 +4979,20 @@
\let\hyper@linkend\relax
\let\Hy@StartlinkName\pdfx@StartlinkName@pdfX
\let\close@pdflink\pdfx@close@pdflink
+ \let\AcrobatMenu\pdfx@Acrobatmenu@noaction
\Hy@bookmarksfalse
%% {\def\sep{;}% should not be needed, but just in case
\AtBeginDocument{%
% cancel annotations and links
%
\def\PDF@FinishDoc{% ??? What uses this ???
- \Hy@UseMaketitleInfos
- {\def\sep{; }% should not be needed, but just in case
+ \begingroup
+ \def\sep{; }% should not be needed, but just in case
\pdfinfo{%
- \ifx\pdfx@Title\@empty\else /Title(\pdfx@Title)\fi
- \ifx\pdfx@Author\@empty\else /Author(\pdfx@Author)\fi
- \ifx\pdfx@Subject\@empty\else /Subject(\pdfx@Subject)\fi
- \ifx\pdfx@Keywords\@empty\else /Keywords(\pdfx@Keywords)\fi
+ \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\@pdfcreationdate\@empty
/CreationDate(D:\pdfx@convDate)%
@@ -3781,9 +5022,9 @@
%% support for PDF/VT extensions of PDF/X-4 and PDF/X-5
/GTS_PDFVTVersion(PDF/VT-\xmp@vtPart\xmp@vtConformance)%
\fi
- }% end of PDF/X info
- }% end of scope for \sep
- }% end of \PDF@FinishDoc
+ }%% end of PDF/X info
+ \endgroup %% end of scope for \sep
+ }%% end of \PDF@FinishDoc
}% end of \AtBeginDocument
%% \pdfinfo{% order of these dictionary keys should not matter
%% \ifx\pdfx@Author\@empty\else /Author(\pdfx@Author)\fi
@@ -3814,16 +5055,16 @@
%% }% end of PDF/X info
%% }% end of scope for \sep
\else
- \ifpdfx@e
+ \ifpdfx@e %% PDF/E
\AtBeginDocument{%
\def\PDF@FinishDoc{% ??? What uses this ???
- \Hy@UseMaketitleInfos
- {\def\sep{; }% should not be needed, but just in case
+ \begingroup
+ \def\sep{; }% should not be needed, but just in case
\pdfinfo{%
- \ifx\pdfx@Title\@empty\else /Title(\pdfx@Title)\fi
- \ifx\pdfx@Author\@empty\else /Author(\pdfx@Author)\fi
- \ifx\pdfx@Subject\@empty\else /Subject(\pdfx@Subject)\fi
- \ifx\pdfx@Keywords\@empty\else /Keywords(\pdfx@Keywords)\fi
+ \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\@pdfcreationdate\@empty
/CreationDate(D:\pdfx@convDate)%
@@ -3840,7 +5081,7 @@
/Trapped/False
/GTS_PDFEVersion(PDF/E-1\xmp@Conformance:\xmp@ReleaseDate)%
}% end of PDF/E info
- }% end of scope for \sep
+ \endgroup %% end of scope for \sep
}% end of \PDF@FinishDoc
}% end of \AtBeginDocument
%% {\def\sep{;}% should not be needed, but just in case
@@ -3861,7 +5102,7 @@
%% /Trapped/False%
%% }% end of PDF/E info
%% }% end of scope for \sep
- \else
+ \else %% PDF/A
\def\pdfx@confA{a}%
\def\pdfx@confB{b}%
\def\pdfx@confU{u}%
@@ -3869,13 +5110,13 @@
{\csname pdfx@conf\xmp@Conformance\endcsname}%
\AtBeginDocument{%
\def\PDF@FinishDoc{% ??? What uses this ???
- \Hy@UseMaketitleInfos
- {\def\sep{; }% should not be needed, but just in case
+ \begingroup
+ \def\sep{; }% should not be needed, but just in case
\pdfinfo{%
- \ifx\pdfx@Title\@empty\else /Title(\pdfx@Title)\fi
- \ifx\pdfx@Author\@empty\else /Author(\pdfx@Author)\fi
- \ifx\pdfx@Subject\@empty\else /Subject(\pdfx@Subject)\fi
- \ifx\pdfx@Keywords\@empty\else /Keywords(\pdfx@Keywords)\fi
+ \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\@pdfcreationdate\@empty
/CreationDate(D:\pdfx@convDate)%
@@ -3892,14 +5133,15 @@
/Trapped/False
/GTS_PDFA1Version (PDF/A-\xmp@Part\xmp@conf:\xmp@ReleaseDate)%
}% end of PDF/A info
- }% end of scope for \sep
+ \endgroup %% end of scope for \sep
}% end of \PDF@FinishDoc
}% end of \AtBeginDocument
\fi\fi
%%----------------------------------------------------------------------
+\begingroup
+%% override the \ifpdf check of xmpincl package
\ifxetex
- % override the \ifpdf check
\pdftrue
\else\ifluatex
\pdftrue
@@ -3941,7 +5183,7 @@
\let\includexmp\pdfx@xmpincl@xetex
\fi
-%% macro provided by Leonardo E. Segovia on 2007-05-15
+%% macro provided by Leonardo E. Segovia on 2017-05-15
%% <leonardo.segovia@cs.uns.edu.ar>
\def\pdfx@xmpincl@luatex#1{%
\IfFileExists{#1.xmp}{%
@@ -3950,7 +5192,8 @@
\pdfcompresslevel=0
\immediate\pdfobj uncompressed stream attr {/Type /Metadata /Subtype /XML}
file{#1.xmpi}%
- \pdfcatalog{/Metadata \the\pdflastobj\space 0 R}%
+ \pdfcatalog{%\pdfx@LanguageSpec
+ /Metadata \the\pdflastobj\space 0 R}%
\endgroup
}{%
\newcommand{\mcs@xmpincl@filename}{#1.xmp}%
@@ -3964,7 +5207,6 @@
\let\includexmp\pdfx@xmpincl@luatex
\fi
-
%%----------------------------------------------------------------------
\begingroup
\ifpdfx@x
@@ -3979,6 +5221,8 @@
\else
\def\xmp@template{pdfa}%
\fi\fi
+ \catcode`\'=12 \catcode`\<=12 \catcode`\>=12 \catcode`\?=12
+ \catcode`\"=12 \catcode`\= 12 %% used within the template file
%% patch commands from xmpincl.sty ...
\def\pdfx@xmpinclStart{% supply byte-order marker
<?xpacket begin='^^ef^^bb^^be' id='W5M0MpCehiHzreSzNTczkc9d' ?> %
@@ -4007,8 +5251,10 @@
\inputencoding{8bit}%
\fi\fi
\makeatletter
+ \def\cf@encoding{L8U}\fontencoding{L8U}%
+ \providecommand{\ifnot@empty}[2]{\ifx#1\@empty\relax\else#2\fi}%
\pdfx@xmpmarkup
- \expandafter\global\expandafter
+\expandafter\global\expandafter
\let\csname L8U-cmd\expandafter\endcsname\csname U-cmd\endcsname
\def\cf@encoding{L8U}\fontencoding{L8U}%
\providecommand{\ifnot@empty}[2]{\ifx#1\@empty\relax\else#2\fi}%
@@ -4077,6 +5323,8 @@
\global\let ^^f3\pdfx@save@fiii
\fi
+\endgroup
+
%%
%% controls the color model and conversions with xcolor package
%%
@@ -4118,6 +5366,30 @@
}
%%----------------------------------------------------------------------
+%% Disable some actions in Beamer navigation
+\@ifclassloaded{beamer}{%
+ \let\real@insertslidenavigationsymbol
+ \insertslidenavigationsymbol
+ \let\real@insertbackfindforwardnavigationsymbol
+ \insertbackfindforwardnavigationsymbol
+ \def\pdfx@insertslidenavigationsymbol{{%
+ \let\Acrobatmenu\pdfx@Acrobatmenu@noaction
+ \real@insertslidenavigationsymbol
+ }}%
+ \def\pdfx@insertbackfindforwardnavigationsymbol{{%
+ \let\Acrobatmenu\pdfx@Acrobatmenu@noaction
+ \real@insertbackfindforwardnavigationsymbol
+ }}%
+ \AtBeginDocument{%
+ \ifHy@pdfa
+ \let\insertslidenavigationsymbol
+ \pdfx@insertslidenavigationsymbol
+ \let\insertbackfindforwardnavigationsymbol
+ \pdfx@insertbackfindforwardnavigationsymbol
+ \fi}%
+}{}
+
+%%----------------------------------------------------------------------
\ifpdfx@transliterated
%% support for bookmarks with transliterated input
\RequirePackage{stringenc}
@@ -4143,6 +5415,7 @@
\let\Hy@@writetorep\@@writetorep
\def\pdfx@@writetorep#1#2#3#4#5{%
\begingroup
+ \pdfx@xmpunimarkup
\pdfx@prebookmark
\edef\pdfstringdefPreHook{%\pdfstringdefPreHook
\the\pdfx@DisabledCommands}%
@@ -4215,12 +5488,13 @@
%% once set correctly, don't let this change
\Hy@DisableOption{pdfa}\let\Hy@pdfafalse\relax\let\Hy@pdfatrue\relax
\endinput
+%%
+%% End of file `pdfx.sty'.
% \end{macrocode}
% \iffalse
%</package>
% \fi
% \Finale
% \newpage\PrintIndex
-% \section[Change History]{Change History}
% \PrintChanges
% \endinput