diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/pdfx')
-rw-r--r-- | Master/texmf-dist/source/latex/pdfx/Makefile.src | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pdfx/pdfx.dtx | 189 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pdfx/pdfx.ins | 4 |
3 files changed, 139 insertions, 56 deletions
diff --git a/Master/texmf-dist/source/latex/pdfx/Makefile.src b/Master/texmf-dist/source/latex/pdfx/Makefile.src index 80d102c327e..7681e190128 100644 --- a/Master/texmf-dist/source/latex/pdfx/Makefile.src +++ b/Master/texmf-dist/source/latex/pdfx/Makefile.src @@ -17,7 +17,7 @@ out: # sed 's/BOOKMARK/fxmark/g;' tmp.out > x.out; mv x.out tmp.out ; pdf: - pdflatex $(file).dtx + pdflatex -recorder $(file).dtx index: makeindex -s gind.ist -o $(file).ind $(file).idx diff --git a/Master/texmf-dist/source/latex/pdfx/pdfx.dtx b/Master/texmf-dist/source/latex/pdfx/pdfx.dtx index 99fce07c5c8..ffdb92ee01b 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) 2018, CV Radhakrishnan <cvr@river-valley.org>, +% Copyright (c) 2019, 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,45 @@ % % \fi % -% \CheckSum{6202} +% \CheckSum{6309} % \iffalse % %<*driver> \pdfcompresslevel 9 \providecommand{\pdfxopt}{a-2u} \providecommand{\lastyear}{2018} -\providecommand{\thisyear}{2018} +\providecommand{\thisyear}{2019} \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 \lastyear} +\Keywords{PDF/X-, PDF/A- and PDF/E-compliance\sep Multilingual Metadata\sep installation\sep \TeX Live \thisyear} \PublicationType{manual} \Contributor{Norbert Preining: 'colorprofiles' package} \Copyright{Public domain.} \Copyrighted{False} \CopyrightURL{http://tug.org/texlive/} -\CoverDisplayDate{November \thisyear} -\CoverDate{\thisyear-12-22} -\CreatorTool{LaTeX + pdfx.sty with option \pdfxopt, from TeX Live \lastyear} -\Date{2017-05-18\sep 2017-06-23\sep 2018-11-29\sep 2018-12-22} +\CoverDisplayDate{March \thisyear} +\CoverDate{\thisyear-03-10} +\CreatorTool{LaTeX + pdfx.sty with option \pdfxopt, from TeX Live \thisyear} +\Date{2017-05-18\sep 2017-06-23\sep 2018-11-29\sep 2018-12-22\sep 2019-02-08\sep 2019-03-10} \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: Revised glyphtounicode.sty to use variation selectors.} +\Advisory{v1.6: altered maps to PUA codepoints.} +\Advisory{v1.6: added more glyphs via glyphtounicode-ntx.tex } \Advisory{v1.6: Support for 8-bit Hebrew encodings, some Arabic and Devanagari.} \Advisory{v1.6: Updated documentation, incl. for LaTeX changes.} \Advisory{v1.6.1: Fixed issue with ifthen package; improved Metadata with LuaTeX and XeTeX.} \Advisory{v.1.6.1: Flexibility with page boxes for PDF/X.} +\Advisory{v.1.6.2: Fixed passing of options to xcolor, and some glyphtounicode values.} +\Advisory{v.1.6.2: Fixed encoding issue. Extra warning when colorprofiles.tex is missing.} +\Advisory{v.1.6.3: Properly fixed encoding issue; supports \string\pdfomitcharset\ primitive.} +\Advisory{v.1.6.3: Reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.} +\Advisory{v.1.6.3: Patched \string\mathaccentV\ to output accents after the base character.} \pdfxEnableCommands{% \def\CVR{C.V. Radhakrishnan}\def\Thanh{H\`an Th\eee Thanh}% \def\eee{^^c3^^aa^^cc^^81 }} @@ -64,6 +71,7 @@ \input text89.def \usepackage[T1]{fontenc} \hypersetup{citecolor=blue} +\pdfstringdefDisableCommands{\def\thinspace{}} \newcommand{\fixmd}{${}^{\mathrm f}$} \newcommand{\starmd}{${}^{\ast}$} \EnableCrossrefs @@ -126,8 +134,7 @@ % \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 -% package.} +% \changes{v1.01}{2008/12/10}{glyphtounicode-cmr.tex included with the package.} % \changes{v1.3}{2008/12/01}{Fix copyright in xmp files.} % \changes{v1.5.4}{2015/02/28}{Fixed timezone bug; Unicode support; more % PDF variants; added color profiles.} @@ -166,10 +173,13 @@ % Updated documentation, incl. for LaTeX changes. % }% % \changes{v1.6.1}{2018/12/22}{Fixed issue with ifthen package; -% improved Metadata with LuaTeX and XeTeX. Flexibility with page boxes for PDF/X.} +% improved Metadata with LuaTeX and XeTeX. Flexibility with page boxes for PDF/X.}% +% \changes{v1.6.2}{2019/01/04}{Fixed passing of options to xcolor, and some glyphtounicode values.}% +% \changes{v1.6.3}{2019/02/27}{Fixed encoding issues; support for new pdfomitcharset primitive; +% reference to veraPDF validation software; additions to glyphtounicode-ntx.tex.}% % \title{Generation of PDF/X- and PDF/A-\penalty-200 compliant PDFs with \pdftex --- \texttt{pdfx.sty}} -% \date{2018/12/22} -% \version{1.6.1} +% \date{2019/02/27} +% \version{1.6.3} % \keywords{PDF, PDF/A, PDF/X, pdf\TeX, \LaTeX, Multilingual Metadata} % \author{C.\,V.\,Radhakrishnan, \Thanh, Ross Moore {\upshape\small % and} Peter Selinger} @@ -431,7 +441,13 @@ % applicable standard.\\This may produce a non-standard-conforming PDF file. % \item |pdf17|: use PDF 1.7, overriding the version specified by the % applicable standard.\\This may produce a non-standard-conforming PDF file. +% \item |nocharset|: do not generate the Charset entry for fonts (\pdftex\ only). +% \item |usecharset|: generate the Charset entry for fonts (\pdftex\ only). % \end{itemize} +% The latter two options affect the value of the |\pdfomitcharset| primitive, +% added to \pdftex\ in 2019, due to differing requirements for PDF/A-1 +% and other PDF/A versions. Indeed use of the |/Charset| entry for a font +% is deprecated entirely for PDF 2.0~\cite{PDF20} and later. % % \subsubsection{XMP language options}\label{ssec-xmplang} % @@ -551,6 +567,8 @@ % 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}. +% \textsf{veraPDF}~\cite{veraPDF} is Open Source software providing validation for PDF/A, +% and other checkers useful in a PDF/A production setting. % % \textbf{Warning}: The |\jobname.xmpdata| file may be included in the % main document source, within a |{filecontents*}| environment, @@ -2174,10 +2192,10 @@ % 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} -% +% % Macro commands for many mathematical symbols can be used directly in metadata without extra % support; e.g., basic arithmetic operations, letter-like symbols, spacing commands. % Super- and subscripted letters and numerals can use |\textsuperscript| and |\textsubscript| @@ -2367,8 +2385,8 @@ % \end{itemize} % % -% \clearpage -% \section[Bibliography]{Bibliography} +% \section[Bibliography]{Bibliography}% +% {\let\newpage\relax % \begin{thebibliography}{999} % % \bibitem{PDF17}Adobe Systems Inc.; @@ -2514,6 +2532,7 @@ % \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. % \url{http://www.idealliance.org/specifications/prism-metadata-initiative/prism} @@ -2522,6 +2541,11 @@ % 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{veraPDF} veraPDF. Industry Supported PDF/A Validation. +% Software, dual-licensed under the GNU General Public License v3 or later (GPLv3+) +% and Mozilla Public License v2 or later (MPLv2+). \url{https://verapdf.org}. +% Wiki: \url{https://github.com/veraPDF/veraPDF-validation-profiles/wiki} +% % \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/}. @@ -2534,7 +2558,7 @@ % PDF/X: \url{https://en.wikipedia.org/wiki/PDF/X} % % \end{thebibliography} -% \goodbreak +% }\goodbreak % \section[Implementation]{Implementation} % % \iffalse @@ -2551,7 +2575,7 @@ }{}% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{pdfx} - [2018/12/22 v1.6.1 PDF/X and PDF/A support (CVR/HTH/RRM/PS)] + [2019/02/27 v1.6.3 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 @@ -2560,6 +2584,7 @@ \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 +\newif\ifpdfx@omitcharset % used with pdfomitcharset primitive \DeclareOption{noerr}{\pdfx@noerrtrue} @@ -2587,25 +2612,37 @@ {, else continue to build a non-valid document}% } +%% support pdfomitcharset primitive, added to pdfTeX in 2019 +\DeclareOption{nocharset}{\pdfx@omitcharsettrue} +\DeclareOption{usecharset}{\pdfx@omitcharsetfalse} + %% 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}% - \def\xmp@Conformance{A}\def\xmp@ReleaseDate{2005}} + \def\xmp@Conformance{A}\def\xmp@ReleaseDate{2005}% + \pdfx@omitcharsetfalse} \DeclareOption{a-1b}{\global\pdfx@xfalse\def\xmp@Part{1}% - \def\xmp@Conformance{B}\def\xmp@ReleaseDate{2005}} + \def\xmp@Conformance{B}\def\xmp@ReleaseDate{2005}% + \pdfx@omitcharsetfalse} \DeclareOption{a-2a}{\global\pdfx@xfalse\def\xmp@Part{2}% - \def\xmp@Conformance{A}\def\xmp@ReleaseDate{2010}} + \def\xmp@Conformance{A}\def\xmp@ReleaseDate{2010}% + \pdfx@omitcharsettrue} \DeclareOption{a-2b}{\global\pdfx@xfalse\def\xmp@Part{2}% - \def\xmp@Conformance{B}\def\xmp@ReleaseDate{2010}} + \def\xmp@Conformance{B}\def\xmp@ReleaseDate{2010}% + \pdfx@omitcharsettrue} \DeclareOption{a-2u}{\global\pdfx@xfalse\def\xmp@Part{2}% - \def\xmp@Conformance{U}\def\xmp@ReleaseDate{2010}} + \def\xmp@Conformance{U}\def\xmp@ReleaseDate{2010}% + \pdfx@omitcharsettrue} \DeclareOption{a-3a}{\global\pdfx@xfalse\def\xmp@Part{3}% - \def\xmp@Conformance{A}\def\xmp@ReleaseDate{2012}} + \def\xmp@Conformance{A}\def\xmp@ReleaseDate{2012}% + \pdfx@omitcharsettrue} \DeclareOption{a-3b}{\global\pdfx@xfalse\def\xmp@Part{3}% - \def\xmp@Conformance{B}\def\xmp@ReleaseDate{2012}} + \def\xmp@Conformance{B}\def\xmp@ReleaseDate{2012}% + \pdfx@omitcharsettrue} \DeclareOption{a-3u}{\global\pdfx@xfalse\def\xmp@Part{3}% - \def\xmp@Conformance{U}\def\xmp@ReleaseDate{2012}} + \def\xmp@Conformance{U}\def\xmp@ReleaseDate{2012}% + \pdfx@omitcharsettrue} %% %% PDF/X options %% comments added, using @@ -2865,6 +2902,16 @@ \pdfresetpageorigin=0 \fi +\expandafter\ifx\csname pdfomitcharset\endcsname\relax\else + \ifpdfx@omitcharset + \pdfomitcharset = 1 % + %% do not create /Charset listings of font glyphs; + %% optional for PDF/A-2,3 and PDF 2.x + \else + \pdfomitcharset = 0 % + %% create the /Charset listings of font glyphs, required with PDF/A-1 + \fi +\fi \newif\ifpdfx@nopdfinfo \ifmathxmp\pdfx@nopdfinfotrue @@ -3054,26 +3101,31 @@ \expandafter\ifx\csname inputencodingname\endcsname\relax \else \def\pdfx@restoreencoding#1{% - \@tempcnta=128 - \loop - \catcode\@tempcnta=13 - \advance\@tempcnta\@ne - \ifnum\@tempcnta<256 - \repeat + \@tempcnta=128 + \loop + \catcode\@tempcnta=13 + \advance\@tempcnta\@ne + \ifnum\@tempcnta<256 + \repeat \inputencoding{#1}% + \let\LastDeclaredEncoding\pdfx@LastDeclaredEncoding + \let\DeclareFontEncoding@\pdfx@DeclareFontEncoding@ + \let\DeclareUnicodeCharacter\pdfx@DeclareUnicodeCharacter }% \AtEndOfPackage{\pdfx@restoreencoding\pdfx@inputencodingname}% \let\pdfx@inputencodingname\inputencodingname - \let\pdfx@DeclareUnicodeCharacter\DeclareUnicodeCharacter + \global\let\pdfx@DeclareUnicodeCharacter\DeclareUnicodeCharacter + \global\let\pdfx@DeclareFontEncoding@\DeclareFontEncoding@ \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}% +%% \global\let\DeclareUnicodeCharacter\pdfx@DeclareUnicodeCharacter +%% \global\let\DeclareFontEncoding@\DeclareFontEncoding@saved + \global\let\pdfx@LastDeclaredEncoding\LastDeclaredEncoding + \expandafter\inputencoding\expandafter{\inputencodingname}% \fi %%---------------------------------------------------------------------- @@ -4188,7 +4240,13 @@ }% \expandafter\pdfx@tryoldprofilesfalse \fi -}{\pdfx@tryoldprofilestrue} +}{% + \PackageWarning{pdfx}{% + The 'colorprofiles' package is not installed correctly.^^J + File 'colorprofiles.tex' is missing. Proceeding without it. + }% + \pdfx@tryoldprofilestrue +} {\catcode`\| 14 \catcode`\% 12 \catcode`\_ 12 \catcode`\: 12 \catcode`\. 12 \catcode`\- 12 \catcode`\/ 12 @@ -4872,14 +4930,15 @@ \expandafter\ifx\expandafter\relax\xmp@Subject\relax\else \pdfx@ConvertUTFtoBE{\pdfx@pdfSubject}{\xmp@Subject}% \fi -\else %% pdfx@nopdfinfotrue +\else %% pdfx@nopdfinfofalse \expandafter\ifx\expandafter\relax\xmp@Title\relax\else \ifluatex \pdfx@ConvertUTFtoBE\pdfx@pdfTitle\xmp@Title \else\ifxetex \pdfx@ConvertUTFtoBE\pdfx@pdfTitle\xmp@Title \else - \pdfx@GeneratePdfString\pdfx@pdfTitle\xmp@Title +%% \pdfx@GeneratePdfString\pdfx@pdfTitle\xmp@Title % why does this fail ??? + \pdfx@ConvertUTFtoBE{\pdfx@pdfTitle}{\xmp@Title}% ??? RRM 2019-02-17 \fi\fi \fi \expandafter\ifx\expandafter\relax\xmp@Subject\relax\else @@ -4888,7 +4947,8 @@ \else\ifxetex \pdfx@ConvertUTFtoBE\pdfx@pdfSubject\xmp@Subject \else - \pdfx@GeneratePdfString\pdfx@pdfSubject\xmp@Subject +%% \pdfx@GeneratePdfString\pdfx@pdfSubject\xmp@Subject % why does this fail ??? + \pdfx@ConvertUTFtoBE{\pdfx@pdfSubject}{\xmp@Subject}% 2019-02-17 \fi\fi \fi \fi % end of \ifpdfx@nopdfinfo @@ -4957,6 +5017,23 @@ \egroup \spacefactor\accent@spacefactor } +%% same for named accents in math-mode +\def\pdfx@mathaccentV#1#2#3#4#5{% + #5{\mathsurround=\z@\relax + \everymath{}% + \mathchoice + {\setbox\z@\hbox{$\displaystyle #5$}\kern-\wd\z@}% + {\setbox\z@\hbox{$\textstyle #5$}\kern-\wd\z@}% + {\setbox\z@\hbox{$\scriptstyle #5$}\kern-\wd\z@}% + {\setbox\z@\hbox{$\scriptscriptstyle #5$}\kern-\wd\z@}% + }% + \AMS@mathaccentV{#1}{#2}{#3}{#4}{\phantom{#5}}% +} +\AtBeginDocument{% + \@ifpackageloaded{amsmath}{% + \let\AMS@mathaccentV\mathaccentV + \let\mathaccentV\pdfx@mathaccentV}% +}% %% How to support XeTeX here ? %%%%% adjust accent characters to the Unicode Combining variant %%%% @@ -5000,25 +5077,30 @@ \pdfglyphtounicode{space_uni034D}{034D}% } -\AtBeginDocument{% +\def\pdfx@check@accents{% \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 + \@ifpackageloaded{mmap}{}{% + \pdfx@ErrorWarning{another package has patched \string\add@accent }% + {Hit <return> to continue}{}{}}% + \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}% - }{}% +%% this is now handled by glyphtounicode-ntx.tex +%% \@ifpackageloaded{newtxmath}{% +%% \pdfglyphtounicode{vec}{20D7}% +%% \pdfglyphtounicode{rvec}{20D6}% +%% \pdfglyphtounicode{lrvec}{20E1}% +%% }{}% \fi % end of \ifxetex + \let\pdfx@check@accents\unDefiNeD } +\AtBeginDocument{\pdfx@check@accents} %% suppress hyperlinks when generating PDF/X \def\pdfx@linkfile@pdfX#1#2#3{% @@ -5384,7 +5466,7 @@ % % this will have been done already for PDF/X % - \PassOptionsToPackage{xcolor}{cmyk,hyperref} + \PassOptionsToPackage{cmyk,hyperref}{xcolor} \def\pdfx@handlexcolor{\def\@@mod{cmyk}\selectcolormodel{cmyk}% \convertcolorsUtrue\convertcolorsDtrue} \ifpdfx@x @@ -5408,7 +5490,7 @@ %% } \fi \else - \PassOptionsToPackage{xcolor}{rgb,hyperref} + \PassOptionsToPackage{rgb,hyperref}{xcolor} \def\pdfx@handlexcolor{\def\@@mod{rgb}\selectcolormodel{rgb}% \convertcolorsUtrue\convertcolorsDtrue} \fi @@ -5546,6 +5628,7 @@ %</package> % \fi % \Finale -% \newpage\PrintIndex +% \let\newpage\relax +% \PrintIndex % \PrintChanges % \endinput diff --git a/Master/texmf-dist/source/latex/pdfx/pdfx.ins b/Master/texmf-dist/source/latex/pdfx/pdfx.ins index 62abff20e06..afd943fbb59 100644 --- a/Master/texmf-dist/source/latex/pdfx/pdfx.ins +++ b/Master/texmf-dist/source/latex/pdfx/pdfx.ins @@ -4,7 +4,7 @@ \preamble - Copyright (c) 2018, CV Radhakrishnan <cvr@river-valley.org>, + Copyright (c) 2019, 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> @@ -32,7 +32,7 @@ \Msg{ * *} \Msg{ * To produce the documentation run the relevant file.dtx *} \Msg{ * through pdfLaTeX or use the Makefile which is far *} -\Msg{ * more easier. *} +\Msg{ * more convenient. *} \Msg{ * *} \Msg{ * Happy TeXing! *} \Msg{ * *} |