texlive[60413] Master/texmf-dist: dccpaper (4sep21)

commits+karl at tug.org commits+karl at tug.org
Sat Sep 4 00:07:53 CEST 2021


Revision: 60413
          http://tug.org/svn/texlive?view=revision&revision=60413
Author:   karl
Date:     2021-09-04 00:07:52 +0200 (Sat, 04 Sep 2021)
Log Message:
-----------
dccpaper (4sep21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/dccpaper/dccpaper.pdf
    trunk/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
    trunk/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty
    trunk/Master/texmf-dist/tex/latex/dccpaper/dccpaper-by.eps
    trunk/Master/texmf-dist/tex/latex/dccpaper/idcc.cls
    trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v14.cls
    trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v9.cls

Modified: trunk/Master/texmf-dist/doc/latex/dccpaper/dccpaper.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx	2021-09-03 22:07:38 UTC (rev 60412)
+++ trunk/Master/texmf-dist/source/latex/dccpaper/dccpaper.dtx	2021-09-03 22:07:52 UTC (rev 60413)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %<*internal|ijdc9|ijdc14|idcc|base>
-\def\Version{2021/01/25 v2.1}
+\def\Version{2021/09/03 v2.2}
 %</internal|ijdc9|ijdc14|idcc|base>
 %<*internal>
 \iffalse
@@ -490,6 +490,7 @@
 \item\pkg{etoolbox} is used behind the scenes for patching commands.
 \item\pkg{footmisc} is used to format the footnotes.
 \item\pkg{titlesec} is used to format the section headings.
+\item\pkg{hyperxmp} is used for including an XMP metadata packet.
 \item\pkg{iftex} is used to test which \TeX\ engine you are using.
 If you use Lua\LaTeX\ or \XeLaTeX\, you will also need \pkg{fontspec}.
 \end{itemize}
@@ -856,6 +857,8 @@
 \section{Appendix A: Change History}
 
 \begin{description}
+\item[v2.2] 2021-09-03\\
+Updated procedure for inserting XMP packet into PDF output.
 \item[v2.1] 2021-01-25\\
 Added details of IDCC 2021.
 \item[v2.0] 2020-01-15\\
@@ -2921,11 +2924,21 @@
 %    \end{macrocode}
 %
 % We now embed the Creative Commons licence information in the PDF using an XMP
-% packet. To do this, we employ the same technique as Scott Pakin's
-% \pkg{hyperxmp} (2014/01/02 v2.4). In order to avoid avoid a bug whereby
-% Adobe Acrobat confuses the XMP author information and the regular author
-% information, though, we \emph{only} embed the licence information.
+% packet. In order to avoid a bug whereby Adobe Acrobat confuses the XMP author
+% information and the regular author information, though, we \emph{only} embed
+% the licence information. We can use \pkg{hyperxmp} for this, but we have to
+% discard the information collected by that package and construct our own
+% packet.
 %
+%    \begin{macrocode}
+\RequirePackage{hyperxmp}
+\hypersetup{keeppdfinfo}
+\def\cc at xmp@packet{}
+\def\hyxmp at construct@packet{%
+  \let\hyxmp at xml\cc at xmp@packet
+}
+%    \end{macrocode}
+%
 % We need to make sure that any characters to appear verbatim in the XMP packet
 % are treated as ordinary characters and not active ones. The likely active
 % characters are symbols and punctuation, so should be treated as `other'
@@ -2961,7 +2974,7 @@
 %
 %    \begin{macrocode}
   \long\gdef\cc at xmp@packet{%
-<?xpacket begin='' id=''?>^^J%
+<?xpacket begin="\hyxmp at bom" id="W5M0MpCehiHzreSzNTczkc9d"?>^^J%
 <x:xmpmeta xmlns:x='adobe:ns:meta/'>^^J%
 <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>^^J%
 \sp<rdf:Description rdf:about=''^^J%
@@ -2982,191 +2995,12 @@
 \sp</rdf:Description>^^J%
 </rdf:RDF>^^J%
 </x:xmpmeta>^^J%
-<?xpacket end='r'?>^^J%
+\hyxmp at padding
+<?xpacket end="w"?>^^J%
   }%
 }
 \endgroup
 %    \end{macrocode}
-%
-% Different workflows require the XMP packet to be embedded in different ways.
-%
-% \begin{macro}{ccxmp at embed@packet at pdftex}
-% Pdf\TeX\ can inject objects into PDFs natively.
-%
-%    \begin{macrocode}
-\newcommand*{\ccxmp at embed@packet at pdftex}{%
-  \bgroup
-    \pdfcompresslevel=0
-    \immediate\pdfobj stream attr {%
-      /Type /Metadata
-      /Subtype /XML
-    }{\cc at xmp@packet}%
-    \pdfcatalog {/Metadata \the\pdflastobj\space 0 R}%
-  \egroup
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{ccxmp at embed@packet at pdfmark}
-% The \cs{pdfmark} command defined by \pkg{hyperref} is respected by tools such
-% as Dvipdf, Dvips, Dvipsone, etc.
-%
-%    \begin{macrocode}
-\newcommand*{\ccxmp at embed@packet at pdfmark}{%
-  \pdfmark{%
-    pdfmark=/NamespacePush
-  }%
-  \pdfmark{%
-    pdfmark=/OBJ,
-    Raw={/_objdef \string{ccxmp at packet\string} /type /stream}%
-  }%
-  \pdfmark{%
-    pdfmark=/PUT,
-    Raw={\string{ccxmp at packet\string}
-      2 dict begin
-        /Type /Metadata def
-        /Subtype /XML def
-        currentdict
-      end
-    }%
-  }%
-  \pdfmark{%
-    pdfmark=/PUT,
-    Raw={\string{ccxmp at packet\string} (\cc at xmp@packet)}%
-  }%
-  \pdfmark{%
-    pdfmark=/Metadata,
-    Raw={\string{Catalog\string} \string{ccxmp at packet\string}}%
-  }%
-  \pdfmark{%
-    pdfmark=/NamespacePop
-  }%
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% Dvipdfm has its own \cs{special} command for inserting PDF objects, but
-% it is a bit basic and requires advance knowledge of how long (in characters)
-% the object is.
-%
-% \begin{macro}{ccxmp at count@spaces}
-% The \cs{ccxmp at count@spaces} macro counts the number of spaces in its parameter
-% through a process of iteration, adding this figure to \cs{@tempcnta}.
-%
-%    \begin{macrocode}
-\def\ccxmp at count@spaces#1 {%
-  \def\ccxmp at one@token{#1}%
-  \ifx\ccxmp at one@token\@empty
-    \advance\@tempcnta by -1
-  \else
-    \advance\@tempcnta by 1
-    \expandafter\ccxmp at count@spaces
-  \fi
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{ccxmp at count@non at spaces}
-% The \cs{ccxmp at count@non at spaces} command counts the number of non-spaces in its
-% argument through a process of iteration, adding this figure to \cs{@tempcnta}.
-%
-%    \begin{macrocode}
-\newcommand*{\ccxmp at count@non at spaces}[1]{%
-  \def\ccxmp at one@token{#1}%
-  \ifx\ccxmp at one@token\@empty
-  \else
-    \advance\@tempcnta by 1
-    \expandafter\ccxmp at count@non at spaces
-  \fi
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{ccxmp at string@len}
-% The \cs{ccxmp at string@len} command sets \cs{@tempcnta} to the number of characters
-% (spaces + non-spaces) in its argument.
-%
-%    \begin{macrocode}
-\newcommand*{\ccxmp at string@len}[1]{%
-  \@tempcnta=0
-  \expandafter\ccxmp at count@spaces#1 {} %
-  \expandafter\ccxmp at count@non at spaces#1{}%
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{ccxmp at embed@packet at dvipdfm}
-% So now, finally, is the command for embedding the packet using Dvipdfm.
-%
-%    \begin{macrocode}
-\newcommand*{\ccxmp at embed@packet at dvipdfm}{%
-  \ccxmp at string@len{\cc at xmp@packet}%
-  \special{pdf: object @ccxmp at packet
-    <<
-      /Type /Metadata
-      /Subtype /XML
-      /Length \the\@tempcnta
-    >>
-    stream^^J\cc at xmp@packet endstream%
-  }%
-  \special{pdf: docview
-    <<
-      /Metadata @ccxmp at packet
-    >>
-  }%
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{ccxmp at embed@packet at xetex}
-% \XeTeX\ creates PDFs with Xdvipdfmx, which supports a simpler \cs{special} for
-% inserting objects that does not require us to count characters.
-%
-%    \begin{macrocode}
-\newcommand*{\ccxmp at embed@packet at xetex}{%
-  \special{pdf:stream @ccxmp at packet (\cc at xmp@packet)
-    <<
-      /Type /Metadata
-      /Subtype /XML
-    >>
-  }%
-  \special{pdf:put @catalog
-    <<
-      /Metadata @ccxmp at packet
-    >>
-  }%
-}
-%    \end{macrocode}
-% \end{macro}
-%
-% We rely on \pkg{hyperref} to tell us how the PDF will be generated (after
-% all, it may not be done in the current pass) and use the respective technique
-% to embed the XMP packet.
-%
-%    \begin{macrocode}
-\AtBeginDocument{%
-  \begingroup
-  \def\ccxmp at driver{hpdftex}%
-  \ifx\ccxmp at driver\Hy at driver
-    \ccxmp at embed@packet at pdftex
-  \else
-    \def\ccxmp at driver{hdvipdfm}%
-    \ifx\ccxmp at driver\Hy at driver
-      \ccxmp at embed@packet at dvipdfm
-    \else
-      \def\ccxmp at driver{hxetex}%
-      \ifx\ccxmp at driver\Hy at driver
-        \ccxmp at embed@packet at xetex
-      \else
-        \@ifundefined{pdfmark}{}{%
-          \ccxmp at embed@packet at pdfmark
-        }%
-      \fi
-    \fi
-  \fi
-  \endgroup
-}
-%    \end{macrocode}
 % \iffalse
 %</base>
 % \fi

Modified: trunk/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty	2021-09-03 22:07:38 UTC (rev 60412)
+++ trunk/Master/texmf-dist/tex/latex/dccpaper/dccpaper-base.sty	2021-09-03 22:07:52 UTC (rev 60413)
@@ -14,7 +14,7 @@
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
-\def\Version{2021/01/25 v2.1}
+\def\Version{2021/09/03 v2.2}
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{dccpaper-base}
     [\Version\space Common class code for IJDC and IDCC papers.]
@@ -770,6 +770,12 @@
     \\{\mathbin{\backslash}}\UrlTildeSpecial}
 }
 
+\RequirePackage{hyperxmp}
+\hypersetup{keeppdfinfo}
+\def\cc at xmp@packet{}
+\def\hyxmp at construct@packet{%
+  \let\hyxmp at xml\cc at xmp@packet
+}
 \begingroup
 \catcode`\"=12
 \catcode`\&=12
@@ -780,7 +786,7 @@
 \AtBeginDocument{%
   \def\sp{\space\space\space}
   \long\gdef\cc at xmp@packet{%
-<?xpacket begin='' id=''?>^^J%
+<?xpacket begin="\hyxmp at bom" id="W5M0MpCehiHzreSzNTczkc9d"?>^^J%
 <x:xmpmeta xmlns:x='adobe:ns:meta/'>^^J%
 <rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>^^J%
 \sp<rdf:Description rdf:about=''^^J%
@@ -801,123 +807,11 @@
 \sp</rdf:Description>^^J%
 </rdf:RDF>^^J%
 </x:xmpmeta>^^J%
-<?xpacket end='r'?>^^J%
+\hyxmp at padding
+<?xpacket end="w"?>^^J%
   }%
 }
 \endgroup
-\newcommand*{\ccxmp at embed@packet at pdftex}{%
-  \bgroup
-    \pdfcompresslevel=0
-    \immediate\pdfobj stream attr {%
-      /Type /Metadata
-      /Subtype /XML
-    }{\cc at xmp@packet}%
-    \pdfcatalog {/Metadata \the\pdflastobj\space 0 R}%
-  \egroup
-}
-\newcommand*{\ccxmp at embed@packet at pdfmark}{%
-  \pdfmark{%
-    pdfmark=/NamespacePush
-  }%
-  \pdfmark{%
-    pdfmark=/OBJ,
-    Raw={/_objdef \string{ccxmp at packet\string} /type /stream}%
-  }%
-  \pdfmark{%
-    pdfmark=/PUT,
-    Raw={\string{ccxmp at packet\string}
-      2 dict begin
-        /Type /Metadata def
-        /Subtype /XML def
-        currentdict
-      end
-    }%
-  }%
-  \pdfmark{%
-    pdfmark=/PUT,
-    Raw={\string{ccxmp at packet\string} (\cc at xmp@packet)}%
-  }%
-  \pdfmark{%
-    pdfmark=/Metadata,
-    Raw={\string{Catalog\string} \string{ccxmp at packet\string}}%
-  }%
-  \pdfmark{%
-    pdfmark=/NamespacePop
-  }%
-}
-\def\ccxmp at count@spaces#1 {%
-  \def\ccxmp at one@token{#1}%
-  \ifx\ccxmp at one@token\@empty
-    \advance\@tempcnta by -1
-  \else
-    \advance\@tempcnta by 1
-    \expandafter\ccxmp at count@spaces
-  \fi
-}
-\newcommand*{\ccxmp at count@non at spaces}[1]{%
-  \def\ccxmp at one@token{#1}%
-  \ifx\ccxmp at one@token\@empty
-  \else
-    \advance\@tempcnta by 1
-    \expandafter\ccxmp at count@non at spaces
-  \fi
-}
-\newcommand*{\ccxmp at string@len}[1]{%
-  \@tempcnta=0
-  \expandafter\ccxmp at count@spaces#1 {} %
-  \expandafter\ccxmp at count@non at spaces#1{}%
-}
-\newcommand*{\ccxmp at embed@packet at dvipdfm}{%
-  \ccxmp at string@len{\cc at xmp@packet}%
-  \special{pdf: object @ccxmp at packet
-    <<
-      /Type /Metadata
-      /Subtype /XML
-      /Length \the\@tempcnta
-    >>
-    stream^^J\cc at xmp@packet endstream%
-  }%
-  \special{pdf: docview
-    <<
-      /Metadata @ccxmp at packet
-    >>
-  }%
-}
-\newcommand*{\ccxmp at embed@packet at xetex}{%
-  \special{pdf:stream @ccxmp at packet (\cc at xmp@packet)
-    <<
-      /Type /Metadata
-      /Subtype /XML
-    >>
-  }%
-  \special{pdf:put @catalog
-    <<
-      /Metadata @ccxmp at packet
-    >>
-  }%
-}
-\AtBeginDocument{%
-  \begingroup
-  \def\ccxmp at driver{hpdftex}%
-  \ifx\ccxmp at driver\Hy at driver
-    \ccxmp at embed@packet at pdftex
-  \else
-    \def\ccxmp at driver{hdvipdfm}%
-    \ifx\ccxmp at driver\Hy at driver
-      \ccxmp at embed@packet at dvipdfm
-    \else
-      \def\ccxmp at driver{hxetex}%
-      \ifx\ccxmp at driver\Hy at driver
-        \ccxmp at embed@packet at xetex
-      \else
-        \@ifundefined{pdfmark}{}{%
-          \ccxmp at embed@packet at pdfmark
-        }%
-      \fi
-    \fi
-  \fi
-  \endgroup
-}
 %% 
 %% Copyright (C) 2021 Digital Curation Centre, University of Edinburgh
 %% <info at dcc.ac.uk>

Modified: trunk/Master/texmf-dist/tex/latex/dccpaper/dccpaper-by.eps
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/tex/latex/dccpaper/idcc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/dccpaper/idcc.cls	2021-09-03 22:07:38 UTC (rev 60412)
+++ trunk/Master/texmf-dist/tex/latex/dccpaper/idcc.cls	2021-09-03 22:07:52 UTC (rev 60413)
@@ -14,7 +14,7 @@
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
-\def\Version{2021/01/25 v2.1}
+\def\Version{2021/09/03 v2.2}
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesClass{idcc}
     [\Version\space Class for submissions to the International Digital Curation Conference.]

Modified: trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v14.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v14.cls	2021-09-03 22:07:38 UTC (rev 60412)
+++ trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v14.cls	2021-09-03 22:07:52 UTC (rev 60413)
@@ -14,7 +14,7 @@
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
-\def\Version{2021/01/25 v2.1}
+\def\Version{2021/09/03 v2.2}
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesClass{ijdc-v14}
     [\Version\space Class for submissions to the International Journal of Digital Curation, volume 14 onwards.]

Modified: trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v9.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v9.cls	2021-09-03 22:07:38 UTC (rev 60412)
+++ trunk/Master/texmf-dist/tex/latex/dccpaper/ijdc-v9.cls	2021-09-03 22:07:52 UTC (rev 60413)
@@ -14,7 +14,7 @@
 %% See:     http://www.latex-project.org/lppl.txt
 %% ----------------------------------------------------------------
 %% 
-\def\Version{2021/01/25 v2.1}
+\def\Version{2021/09/03 v2.2}
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesClass{ijdc-v9}
     [\Version\space Class for submissions to the International Journal of Digital Curation, volumes 9--13 inclusive.]



More information about the tex-live-commits mailing list.