diff options
author | Norbert Preining <norbert@preining.info> | 2020-11-23 03:01:13 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-11-23 03:01:13 +0000 |
commit | f0be59ccfa7046c57199fe35c49e1e8963fcb1a9 (patch) | |
tree | 76acc32660433b9e6bb1921e5fd180463f57d160 /macros/latex/contrib/hyperxmp | |
parent | 77b930de8c27e0e88d6861bf623015271146a1d5 (diff) |
CTAN sync 202011230301
Diffstat (limited to 'macros/latex/contrib/hyperxmp')
-rw-r--r-- | macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.1 | 36 | ||||
-rwxr-xr-x[-rw-r--r--] | macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.pl (renamed from macros/latex/contrib/hyperxmp/add_byteCount.pl) | 44 | ||||
-rw-r--r-- | macros/latex/contrib/hyperxmp/hyperxmp.dtx | 30 | ||||
-rw-r--r-- | macros/latex/contrib/hyperxmp/hyperxmp.pdf | bin | 1551868 -> 1555235 bytes |
4 files changed, 89 insertions, 21 deletions
diff --git a/macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.1 b/macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.1 new file mode 100644 index 0000000000..e1aa4c8b90 --- /dev/null +++ b/macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.1 @@ -0,0 +1,36 @@ +.TH HYPERXMP-ADD-BYTECOUNT 1 "22 November 2020" "v1.1" +.SH NAME +hyperxmp-add-bytecount \- adds/updates byteCount specification in XMP +packet in PDF file. +.SH SYNOPSIS +.B hyperxmp-add-bytecount +.RI [ options ] +.IR filename.pdf ... +.SH DESCRIPTION +\fBhyperxmp-add-bytecount\fP adds/updates the \fCbyteCount\fP +specification in the XMP packet in a PDF file(s), with \fCbyteCount\fP += file size. The XMP packet needs to be of, or compatible with, the +format produced from a document that uses +.UR https://ctan.org/pkg/hyperxmp +the +.ie t L\h'-0.36'\v'-0.15'\s-2A\s+2\v'0.15'\h'-0.15'T\h'-0.1667'\v'0.2'E\v'-0.2'\h'-0.125'X +.el LaTeX +hyperxmp package +.UE . +.PP +If no XMP packet of a compatible form is found in the PDF file, no +change is made to the file. +.SH OPTIONS +.IP \fB-help\fP +Write usage summary and exit. +.IP \fB-version\fP +Output version information and exit. +.SH BUGS +Email bug reports to +.MT jcc8@psu.edu +John Collins +.ME +and/or +.MT scott+hyxmp@pakin.org +Scott Pakin +.ME . diff --git a/macros/latex/contrib/hyperxmp/add_byteCount.pl b/macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.pl index 0cfa3e094f..8d965a63f5 100644..100755 --- a/macros/latex/contrib/hyperxmp/add_byteCount.pl +++ b/macros/latex/contrib/hyperxmp/hyperxmp-add-bytecount.pl @@ -1,22 +1,48 @@ #!/usr/bin/env perl use warnings; -$name = 'add_byteCount.pl'; -$version = '1.1 2020/11/15'; +############################################################# +############################################################# + +######################################################################## +# hyperxmp-add-bytecount # +# Adds/updates byteCount specification in XMP packet in pdf file(s) # +# made by hyperxmp, with byteCount = file size. # +# Copyright (C) 2020 John Collins <jcc8@psu.edu> # +# and Scott Pakin, <scott+hyxmp@pakin.org> # +# # +# This program may be distributed and/or modified under the conditions # +# of the LaTeX Project Public License, either version 1.3c of this # +# license or (at your option) any later version. # +# # +# The latest version of this license is in: # +# # +# http://www.latex-project.org/lppl.txt # +# # +# and version 1.3c or later is part of all distributions of LaTeX # +# version 2008/05/04 or later. # +######################################################################## + +$name = 'hyperref-add-bytecount'; +$version = '1.1-2020-11-20'; $maintainer - = 'John Collins, jcc8@psu.edu; Scott Pakin, scott+hyperxmp@pakin.org'; + = 'John Collins, jcc8@psu.edu; Scott Pakin, scott+hyxmp@pakin.org'; my $exit_code = 0; if ( (! @ARGV) || ($ARGV[0] =~ /^(-|--)(h|help)$/) ) { - print "$name, ver. $version.\n", - "Usage '$name pdf_filename(s)'\n", - "Adds byteCount specification to XMP packet in pdf file(s) from hyperxmp,\n", - "with byteCount = file size.\n", + print "$name $version.\n", + "Usage: $name [options] pdf_filename(s)\n", + " Adds/updates byteCount specification in XMP packet in pdf file(s) from\n", + " hyperxmp, with byteCount = file size.\n", + " No change if there's no XMP packet of the form produced by hyperxmp.\n", + "Options:\n", + " -help or -h Output usage information.\n", + " -version or -v Output version information.\n", "Bug reports to:\n $maintainer.\n"; exit; } elsif ( $ARGV[0] =~ /^(-|--)(v|version)$/ ) { - print "$name, ver. $version.\n", + print "$name $version.\n", "Bug reports to:\n $maintainer.\n"; exit; } @@ -120,7 +146,7 @@ sub xmp_get_mod { $len_padding = 0; $xmp_after_line = ''; - + my $bC_index = -1; my $xmp_end_found = 0; my $decl_bC_found = 0; diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.dtx b/macros/latex/contrib/hyperxmp/hyperxmp.dtx index 47968aed38..4fad6b29d0 100644 --- a/macros/latex/contrib/hyperxmp/hyperxmp.dtx +++ b/macros/latex/contrib/hyperxmp/hyperxmp.dtx @@ -22,7 +22,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{hyperxmp} %<*package> - [2020/11/18 v5.8 Store hyperref metadata in XMP format] + [2020/11/22 v5.9 Store hyperref metadata in XMP format] %</package> % %<*driver> @@ -1495,15 +1495,17 @@ % the byte count to converge relative to the the number of compilations % that would otherwise be required. % -% Starting with \pkgname{hyperxmp}~v5.8, the \pkgname{hyperxmp} +% Starting with \pkgname{hyperxmp}~v5.9, the \pkgname{hyperxmp} % distribution includes a Perl\index{Perl} script called -% \progname{add\_byteCount} that edits a \acro{PDF} file in place, -% adding or replacing the \xmpprop{prism:byteCount} property with one -% that specifies the final file size. Run the script as -% ``\progname{add\_byteCount} \meta{filename.pdf}''. +% \progname{hyperxmp-add-bytecount} that edits a \acro{PDF} file in +% place, adding or replacing the \xmpprop{prism:byteCount} property with +% one that specifies the final file size.\footnote{The script was in +% fact introduced with \progname{hyperxmp}~v5.8 and was then called +% \texttt{add\_byteCount}.} Run the script as +% ``\progname{hyperxmp-add-bytecount} \meta{filename.pdf}''. % % The \progname{latexmk} build tool can be configured to run -% \progname{add\_byteCount} automatically every time a \acro{PDF} file +% \progname{hyperxmp-add-bytecount} automatically every time a \acro{PDF} file % is generated. Simply add the code shown in Figure~\ref{fig:latexmkrc} % to your \progname{latexmk} configuration file. See % \href{http://mirrors.ctan.org/support/latexmk/latexmk.pdf}{the @@ -1515,6 +1517,9 @@ % \protect\progname{add\_byteCount} script and document some sample % \protect\progname{latexmk} configuration code that invokes it. % Thanks to John Collins for providing both of those} +% \changes{v5.9}{2020/11/22}{At Karl Berry's request, rename +% \protect\progname{add\_byteCount} to the less generic-sounding +% \protect\progname{hyperxmp-add-bytecount}} % % \iffalse %<*listings> @@ -1528,17 +1533,18 @@ frame=single, basicstyle=\footnotesize, showstringspaces=false, - upquote=true + upquote=true, + literate={-}{-}{1} ] foreach my $cmd ( "latex", "lualatex", "pdflatex", "xelatex", "dvipdf", "xdvipdfmx", "ps2pdf" ) { - ${$cmd} = "internal mycmd4 ${$cmd}"; + ${$cmd} = "internal mycmd ${$cmd}"; } -sub mycmd4 { +sub mycmd { my $retval = system @_; if ( $$Pdest =~ /\.pdf$/ ) { - system 'add_byteCount', $$Pdest; + system 'hyperxmp-add-bytecount', $$Pdest; } return $retval; } @@ -1552,7 +1558,7 @@ sub mycmd4 { % \centering % \usebox{\latexmkrcbox} % \caption{ \progname{latexmk} configuration-file code for -% automatically invoking \progname{add\_byteCount} every time a +% automatically invoking \progname{hyperxmp-add-bytecount} every time a % \acro{PDF} file is generated} % \label{fig:latexmkrc} % \end{figure} diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.pdf b/macros/latex/contrib/hyperxmp/hyperxmp.pdf Binary files differindex 80892a532a..f11adaee15 100644 --- a/macros/latex/contrib/hyperxmp/hyperxmp.pdf +++ b/macros/latex/contrib/hyperxmp/hyperxmp.pdf |