diff options
Diffstat (limited to 'macros/latex/contrib')
55 files changed, 377 insertions, 70 deletions
diff --git a/macros/latex/contrib/hyperxmp/README b/macros/latex/contrib/hyperxmp/README index 4fb504485d..93a2733315 100644 --- a/macros/latex/contrib/hyperxmp/README +++ b/macros/latex/contrib/hyperxmp/README @@ -36,13 +36,13 @@ installing packages. Building hyperxmp.pdf is a little more involved: - pdflatex hyperxmp.dtx - pdflatex hyperxmp.dtx + lualatex hyperxmp.dtx + lualatex hyperxmp.dtx makeindex -s gind-hyxmp.ist hyperxmp.idx -o hyperxmp.ind makeindex -s gglo-hyxmp.ist hyperxmp.glo -o hyperxmp.gls - pdflatex hyperxmp.dtx - pdflatex hyperxmp.dtx - + lualatex hyperxmp.dtx + lualatex hyperxmp.dtx + perl add_byteCount.pl hyperxmp.pdf Copyright and license ===================== diff --git a/macros/latex/contrib/hyperxmp/add_byteCount.pl b/macros/latex/contrib/hyperxmp/add_byteCount.pl new file mode 100644 index 0000000000..0cfa3e094f --- /dev/null +++ b/macros/latex/contrib/hyperxmp/add_byteCount.pl @@ -0,0 +1,193 @@ +#!/usr/bin/env perl +use warnings; + +$name = 'add_byteCount.pl'; +$version = '1.1 2020/11/15'; +$maintainer + = 'John Collins, jcc8@psu.edu; Scott Pakin, scott+hyperxmp@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", + "Bug reports to:\n $maintainer.\n"; + exit; +} elsif ( $ARGV[0] =~ /^(-|--)(v|version)$/ ) { + print "$name, ver. $version.\n", + "Bug reports to:\n $maintainer.\n"; + exit; +} + +foreach (@ARGV) { + if ( ! fix_pdf($_) ) { $exit_code = 1; } +} + +exit $exit_code; + +#====================================================== + +sub fix_pdf { + # Change/insert byteCount field with correct file length, while preserving + # the file size and the length of the stream containing xmp metadata. + # Return 1 on success, else 0. + + local $pdf_name = shift; + local $tmp_name = "$pdf_name.new.pdf"; + local $pdf_size = (stat($pdf_name))[7]; + warn "Inserting/correcting byteCount field in '$pdf_name' ...\n"; + + # Strings surrounding (and identifying) the byteCount field, and other + # parts of the xmp packet: + local $xmp_start = '<x:xmpmeta xmlns:x="adobe:ns:meta/">'; + local $decl_bC = '<pdfaProperty:name>byteCount</pdfaProperty:name>'; + local $pre_bC = '<prism:byteCount>'; + local $post_bC = '</prism:byteCount>'; + local $pC = '<prism:pageCount>'; + local $rd_end = '</rdf:Description>'; + local $xmp_end = '</x:xmpmeta>'; + + local *PDF; + local *TMP; + + if (! open PDF, "<", $pdf_name ) { + warn " Cannot read '$pdf_name'\n"; + return 0; + } + if ( ! open TMP, ">", $tmp_name ) { + warn " Cannot write temporary file '$tmp_name'\n"; + close PDF; + return 0; + } + local $status = 0; # 0 = no XMP packet, 1 = success, >= errors + while ( <PDF> ) { + # Only examine first XMP packet: + if ( ($status == 0) && /^\s*\Q$xmp_start\E/ ) { + local @xmp = $_; + local $len_padding = 0; + local $xmp_after_line = ''; + &xmp_get_mod; + print TMP @xmp; + # Insert correct padding to leave file size unchanged: + while ( $len_padding > 0 ) { + my $len_line = 64; + if ( $len_line > $len_padding ) { $len_line = $len_padding; } + $len_padding -= $len_line; + print TMP (' ' x ($len_line - 1) ), "\n"; + } + print TMP $xmp_after_line; + $xmp_after_line = ''; + } + else { + print TMP "$_"; + } + } + close PDF; + close TMP; + + if ($status == 0) { + warn " Could not insert/modify byteCount, since no XMP packet was found.\n"; + warn " So '$pdf_name' is unchanged,\n", + " and I will delete temporary file '$tmp_name'.\n"; + unlink $tmp_name; + } elsif ($status == 1) { + rename $tmp_name, $pdf_name + or die " Cannot move temporary file '$tmp_name' to '$pdf_name'.\n", + " Error is '$!'\n"; + } else { + warn " Could not insert correct byteCount. See above for reason.\n"; + warn " So '$pdf_name' is unchanged,\n", + " and I will delete temporary file '$tmp_name'.\n"; + unlink $tmp_name; + } + return ($status == 1); +} + +#====================================================== + +sub xmp_get_mod { + # Get xmp packet, given that @xmp contains its first line. + # Get amount of trailing padding, and line after that. + # If possible, insert a byteCount field: + # Either replace existing specification, if it exists, + # or insert one in expected place for hyperxmp, if the XMP packet + # matches what hyperxmp would produce. + # Return xmp packet in @xmp, amount of padding needed in $len_padding, + # line after that in $xmp_after_line, and error code in $error. + # Set $status appropriately: 1 for success; >=1 for failure. + + $len_padding = 0; + $xmp_after_line = ''; + + my $bC_index = -1; + my $xmp_end_found = 0; + my $decl_bC_found = 0; + while ( <PDF> ) { + push @xmp, $_; + if ( /^\s*\Q$xmp_end\E/ ) { + $xmp_end_found = 1; + # Get amount of padding; + while (<PDF>) { + if ( /^\s*$/ ) { + $len_padding += length($_); + } else { + $xmp_after_line = $_; + last; + } + } + last; + } + elsif ( $bC_index >= 0 ){ + next; + } + # Rest of conditions only apply if no place yet found for byteCount + # specification. + elsif ( /^(\s*)\Q$pre_bC\E.*?\Q$post_bC\E\s*$/ ) { + $bC_index = $#xmp; + } + elsif ( /^\s*\Q$decl_bC\E/ ) { + $decl_bC_found = 1; + } + elsif ( /^(\s*)\Q$rd_end\E/ ){ + # End of rdf:Description block. + # So having previous declaration of byteCount is irrelevant. + $decl_bC_found = 0; + } + elsif ( $decl_bC_found && /^(\s*)\Q$pC\E/ ){ + $bC_index = $#xmp; + pop @xmp; + push @xmp, '', $_; + } + + } # End reading of XMP + + if ($bC_index < 0) { + if ( ! $xmp_end_found ) { + warn " End of XMP packet not found.\n"; + $status = 2; + } + elsif ( ! $decl_bC_found ) { + warn " XMP packet not in appropriate hyperxmp-compatible format.\n"; + $status = 3; + } + return; + } + my $new_line = ' ' . $pre_bC . $pdf_size . $post_bC . "\n"; + my $old_line = $xmp[$bC_index]; + my $delta_len = length($new_line) - length($old_line); + if ($delta_len > $len_padding) { + warn " Cannot get padding correct for '$pdf_name'.\n", + " Length change of bC line = $delta_len; ", + " Padding bytes available = $len_padding.\n"; + $status = 4; + return; + } else { + $len_padding -= $delta_len; + $xmp[$bC_index] = $new_line; + $status = 1; + } +} + +#====================================================== diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.dtx b/macros/latex/contrib/hyperxmp/hyperxmp.dtx index a6dd612e77..47968aed38 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/01 v5.7 Store hyperref metadata in XMP format] + [2020/11/18 v5.8 Store hyperref metadata in XMP format] %</package> % %<*driver> @@ -116,7 +116,7 @@ %</driver> % \fi % -% \CheckSum{2826} +% \CheckSum{2836} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -305,7 +305,7 @@ % \texorpdfstring{Dvips\SortIndex{dvips}{\texttt{dvips}}}{Dvips}^^A % } % \DeclareRobustCommand{\progname}[1]{^^A -% \texttt{#1}\SortIndex{#1}{\texttt{#1}}^^A +% \mbox{\texttt{#1}}\SortIndex{#1}{\texttt{#1}}^^A % } % \DeclareRobustCommand{\Lua}{^^A % Lua\index{Lua}^^A @@ -1489,68 +1489,82 @@ % property that indicates the \acro{PDF} file size in bytes. % \pkgname{hyperxmp} computes this value automatically when the document % is built using \LuaLaTeX\ but not when using any other \TeX\ engine. -% (Note that \pkgname{hyperxmp} uses the file size from the +% Note that \pkgname{hyperxmp} uses the file size from the % \emph{previous} run of \LuaLaTeX\ because the new \acro{PDF} file is -% not yet complete.) -% -% The \progname{latexmk} build tool can be configured to automatically -% append a line of the form ``|\hypersetup{pdfbytes=|\meta{number}|}|'' -% to the generated |.aux| file. The subsequent build of the document -% will read the |.aux| file at the end of the preamble and set -% \optname{pdfbytes} accordingly. The Perl code shown in -% Figure~\ref{fig:latexmkrc}, derived from code posted by Nelson Posse -% Lago and John Collins on -% \url{https://github.com/borisveytsman/acmart/issues/413}, can be -% included in a \progname{latexmk} configuration file to set -% \optname{pdfbytes} automatically whenever \progname{latexmk} builds a -% \pkgname{hyperxmp}-based document using -% \pdfLaTeX\ (\progname{latexmk}'s |--pdf| option). The code can be -% adapted, \textit{mutatis mutandis}, to work with \XeLaTeX\ builds -% (\progname{latexmk}'s |--pdfxe| or |--xelatex| option). +% not yet complete. Consequently, one extra compilation is needed for +% 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} +% 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}''. +% +% The \progname{latexmk} build tool can be configured to run +% \progname{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 +% \progname{latexmk} manual} for information on configuration-file +% naming on different operating systems and explanations of the hook +% functions used in Figure~\ref{fig:latexmkrc}. +% +% \changes{v5.8}{2020/11/18}{Distribute an +% \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} % % \iffalse %<*listings> % \fi -\begin{figure} +\newsavebox{\latexmkrcbox} +\begin{lrbox}{\latexmkrcbox} \begin{lstlisting}[ language=perl, columns=fullflexible, + linewidth=19pc, frame=single, basicstyle=\footnotesize, - showstringspaces=false + showstringspaces=false, + upquote=true ] -$pdflatex = 'internal mylatex %O %S'; - -sub mylatex { - my @args = @_; - $retval = system 'pdflatex', @args; - get_pdf_size(); - return $retval; +foreach my $cmd ( "latex", "lualatex", "pdflatex", "xelatex", + "dvipdf", "xdvipdfmx", "ps2pdf" ) { + ${$cmd} = "internal mycmd4 ${$cmd}"; } -sub get_pdf_size { - my $size = (stat($out_dir1 . $root_filename . ".pdf"))[7]; - open(AUX, '>>', $aux_dir1 . $root_filename . ".aux") - || die "Can't open file " . $aux_dir1 . $root_filename . ".aux: $!"; - if (defined($size)) { - print AUX "\\\@ifpackageloaded{hyperxmp}{\\hypersetup{pdfbytes=$size}}{}\n"; +sub mycmd4 { + my $retval = system @_; + if ( $$Pdest =~ /\.pdf$/ ) { + system 'add_byteCount', $$Pdest; } - close(AUX); + return $retval; } \end{lstlisting} - \caption{Code to include in a \progname{latexmk} configuration file - to automate the assignment of \pkgname{hyperxmp}'s - \optname{pdfbytes} option when building with \pdfLaTeX} - \label{fig:latexmkrc} -\end{figure} +\end{lrbox} % \iffalse %</listings> % \fi % -% See \href{http://mirrors.ctan.org/support/latexmk/latexmk.pdf}{the -% \progname{latexmk} manual} for information on configuration-file -% naming on different operating systems and explanations of the hooks -% used in the Figure~\ref{fig:latexmkrc} code. +% \begin{figure} +% \centering +% \usebox{\latexmkrcbox} +% \caption{ \progname{latexmk} configuration-file code for +% automatically invoking \progname{add\_byteCount} every time a +% \acro{PDF} file is generated} +% \label{fig:latexmkrc} +% \end{figure} +% +% Even though \pkgname{hyperxmp} can compute the byte count +% automatically when run from \LuaLaTeX, users of \progname{latexmk} +% need to use configuration-file code like that shown in +% Figure~\ref{fig:latexmkrc}. Otherwise, \progname{latexmk} would +% compile the document one time too few for the byte count to +% converge. It is recommended that those who use both \progname{latexmk} +% and \pkgname{hyperxmp} configure \progname{latexmk} to be +% \pkgname{hyperxmp}-aware. % % % \StopEventually{^^A @@ -3194,13 +3208,111 @@ sub get_pdf_size { % Derek Dreyer, and the other contributors to % \protect\href{https://github.com/borisveytsman/acmart/issues/413}{\protect\pkgname{acmart} issue \#413}, % ``Latexmk goes into an infinite loop even on sample files from ACM''} +% \changes{v5.8}{2020/11/05}{Take +% \protect\mbox{\protect\texttt{-\kern0pt-output-directory}} into +% consideration when querying the output file size. Thanks to John +% Collins for pointing out that the user can change the output +% directory} % \begin{macrocode} \ifLuaTeX - \edef\hyxmp@prev@pdf@size{% - \luadirect{% -local nbytes = lfs.attributes("\hyxmp@jobname.pdf", "size") +% \end{macrocode} +% Now that we know we're running \LuaLaTeX\ we define a Lua function, +% |get_pdf_size|, that takes the base name of the output file and +% returns the number of bytes in the corresponding \acro{PDF} file. One +% difficulty is that, at the time of this writing, \LuaTeX\ lacks a +% mechanism for querying the full name of the output file. Our +% workaround is a tad kludgy but seems to work. We walk the list of +% command-line arguments for +% \mbox{``|-\kern0pt-output-directory=|\meta{dir}''}. (We in fact +% accept either one or two initial dashes and abbreviations as terse as +% \mbox{``|-output-d|''}.) Then, we concatenate the output directory +% (or ``|.|'' if unspecified), a path separator, the given base name of +% the job, and a ``|.pdf|'' extension. Alas, different operating +% systems use different path separators so we have to query the +% operating-system type to select an appropriate separator: ``|\|'' on +% Windows/\acro{DOS} and ``|/|'' on everything else. +% +% |get_pdf_size| is called regardless of whether we're producing +% \acro{PDF} or \acro{DVI} output. We assume that even if the user +% specified |--output-format=dvi|, the user's intention is eventually to +% convert the document to \acro{PDF}. +% \begin{macrocode} + \begin{luacode*} +function get_pdf_size (bname) +% \end{macrocode} +% Search the list of command-line arguments for the output directory. +% \begin{macrocode} + local odir = "" + for _, opt in ipairs(arg) do + local m = string.match(opt, "%-output%-d.-=(.*)") + if m then + odir = m + end + end +% \end{macrocode} +% Set the path separator to either ``|/|'' or ``|\|'', depending on the +% operating system. +% \begin{macrocode} + local sep = "/" + if os.type == "windows" or os.type == "msdos" then + sep = "\\\\" + end +% \end{macrocode} +% Concatenate the output directory, path separator, base name, and +% \texttt{.pdf} extension. Do not insert a path separator if either +% (1)~no output directory was specified, (2)~the output directory +% already ends with the path separator, or (3)~the output directory ends +% in a colon (and is therefore a relative directory) on +% Windows/\acro{DOS}. As a few examples, +% +% \bigskip +% \noindent +% \begingroup +% \let\bs=\textbackslash +% \begin{tabular}{@{\quad\textbullet~}l@{~+~}l@{~+~}l@{~+~``\texttt{.pdf}''~=~}l@{}} +% ``'' & ``\texttt{/}'' & ``\texttt{myfile}'' +% & ``\texttt{myfile.pdf}'' \\ +% ``\texttt{/docs}'' & ``\texttt{/}'' & ``\texttt{myfile}'' +% & ``\texttt{/docs/myfile.pdf}'' \\ +% ``\texttt{/docs/}'' & ``\texttt{/}'' & ``\texttt{myfile}'' +% & ``\texttt{/docs/myfile.pdf}'' \\ +% ``\texttt{C:\bs docs}'' & ``\texttt{\bs}'' & ``\texttt{myfile}'' +% & ``\texttt{C:\bs docs\bs myfile.pdf}'' \\ +% ``\texttt{C:\bs docs\bs}'' & ``\texttt{\bs}'' & ``\texttt{myfile}'' +% & ``\texttt{C:\bs docs\bs myfile.pdf}'' \\ +% ``\texttt{C:\bs}'' & ``\texttt{\bs}'' & ``\texttt{myfile}'' +% & ``\texttt{C:\bs myfile.pdf}'' \\ +% ``\texttt{C:}'' & ``\texttt{\bs}'' & ``\texttt{myfile}'' +% & ``\texttt{C:myfile.pdf}'' \\ +% \end{tabular} +% \endgroup +% \bigskip +% \begin{macrocode} + local dlast = string.sub(odir, -1) + if odir == "" or dlast == sep or (dlast == ":" and sep == "\\\\") then + sep = "" + end + local fname = odir .. sep .. bname .. ".pdf" +% \end{macrocode} +% Query the file size and return it. +% \begin{macrocode} + local nbytes = lfs.attributes(fname, "size") + return nbytes +end + \end{luacode*} +% \end{macrocode} +% Now that we've defined |get_pdf_size| we invoke it, passing it +% \cs{hyxmp@jobname} as the base name of the job. (Recall that +% \cs{hyxmp@jobname} is the same as \cs{jobname} but with any +% surrounding double quotes removed.) We store |get_pdf_size|'s +% output---which will be empty if the \acro{PDF} file doesn't yet +% exist---in \cs{hyxmp@prev@pdf@size}. +% \begin{macrocode} + \xdef\hyxmp@prev@pdf@size{% + \luadirect{ +nbytes = get_pdf_size("\hyxmp@jobname") if nbytes then - tex.write(nbytes) + tex.write(nbytes) end }% }% diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.pdf b/macros/latex/contrib/hyperxmp/hyperxmp.pdf Binary files differindex d62a5dc555..80892a532a 100644 --- a/macros/latex/contrib/hyperxmp/hyperxmp.pdf +++ b/macros/latex/contrib/hyperxmp/hyperxmp.pdf diff --git a/macros/latex/contrib/reledmac/doc-include/migrate-par.dtx b/macros/latex/contrib/reledmac/doc-include/migrate-par.dtx index 53243c00f4..3250a61796 100644 --- a/macros/latex/contrib/reledmac/doc-include/migrate-par.dtx +++ b/macros/latex/contrib/reledmac/doc-include/migrate-par.dtx @@ -87,10 +87,10 @@ % Now, they are aligned to the left. % Please contact us if you need to retain the older behaviour. % \subsection{Migration to \reledpar~v.~2.24.3} -% There where an inconstancy with hanging verses. -% If you defined indentation of hanging verse as +2+, with \verb+setstanzaindents{2,…}+, it was, in reality, typeset as equal +4+. This happened : +% There was an inconstancy with hanging verses. +% If you defined indentation of hanging verses as \verb+2+, with \verb+setstanzaindents{2,…}+, the indent was, in reality, typeset as equal to \verb+4+. This happened: % \begin{itemize} % \item only in parallel typesetting; % \item only with \cs{stanza} macro, not with \env{astanza} environment. % \end{itemize} -% This inconsistency has been corrected. If you want to keep old indentation after upgrading the package, just multiply by two the fist argument of \cs{setstanzaindents}. +% This inconsistency has been corrected. If you want to keep old indentation after upgrading the package, just multiply by two the first argument of \cs{setstanzaindents}. diff --git a/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf b/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf Binary files differindex c88289349b..889a274314 100644 --- a/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf +++ b/macros/latex/contrib/reledmac/doc-more/page-typesetting-columns.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf b/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf Binary files differindex 668bf42af4..0a3a8f57c7 100644 --- a/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf +++ b/macros/latex/contrib/reledmac/examples/1-criticalendnotes.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf b/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf Binary files differindex ad8aed9842..b94bf4394b 100644 --- a/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf +++ b/macros/latex/contrib/reledmac/examples/1-criticalnotes.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf b/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf Binary files differindex 97905f27a0..8496b6f8a3 100644 --- a/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf +++ b/macros/latex/contrib/reledmac/examples/1-sidenotes.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-tabular.pdf b/macros/latex/contrib/reledmac/examples/1-tabular.pdf Binary files differindex 910096821a..a9c51f1831 100644 --- a/macros/latex/contrib/reledmac/examples/1-tabular.pdf +++ b/macros/latex/contrib/reledmac/examples/1-tabular.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf b/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf Binary files differindex 072cf0b014..4c83dbf5b1 100644 --- a/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf +++ b/macros/latex/contrib/reledmac/examples/1-verses-doublenumbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/1-verses.pdf b/macros/latex/contrib/reledmac/examples/1-verses.pdf Binary files differindex 17f794dfdc..405a754008 100644 --- a/macros/latex/contrib/reledmac/examples/1-verses.pdf +++ b/macros/latex/contrib/reledmac/examples/1-verses.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-antilabe.pdf b/macros/latex/contrib/reledmac/examples/2-antilabe.pdf Binary files differindex b5a7fbe8f0..418778bbf4 100644 --- a/macros/latex/contrib/reledmac/examples/2-antilabe.pdf +++ b/macros/latex/contrib/reledmac/examples/2-antilabe.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf b/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf Binary files differindex 4f36ed6c82..271adc68be 100644 --- a/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-cross_referencing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf b/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf Binary files differindex 970ef5bc69..88aea5e5c6 100644 --- a/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-footnote_spacing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-glossaries.pdf b/macros/latex/contrib/reledmac/examples/2-glossaries.pdf Binary files differindex a57d00a95f..673078080f 100644 --- a/macros/latex/contrib/reledmac/examples/2-glossaries.pdf +++ b/macros/latex/contrib/reledmac/examples/2-glossaries.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-indexing.pdf b/macros/latex/contrib/reledmac/examples/2-indexing.pdf Binary files differindex b3ace18d2b..7f1e1f9ab2 100644 --- a/macros/latex/contrib/reledmac/examples/2-indexing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-indexing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf b/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf Binary files differindex 32dde32100..8c70a05ea2 100644 --- a/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf +++ b/macros/latex/contrib/reledmac/examples/2-lemma_disambigution.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf b/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf Binary files differindex 7a8a407890..5d64987a03 100644 --- a/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf +++ b/macros/latex/contrib/reledmac/examples/2-line_numbers_in_header.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-linespacing.pdf b/macros/latex/contrib/reledmac/examples/2-linespacing.pdf Binary files differindex 00efac4682..9e8e550bcb 100644 --- a/macros/latex/contrib/reledmac/examples/2-linespacing.pdf +++ b/macros/latex/contrib/reledmac/examples/2-linespacing.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf b/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf Binary files differindex 4c3542f413..57f9a04950 100644 --- a/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf +++ b/macros/latex/contrib/reledmac/examples/2-manuscript-apparatus.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-notes-width.pdf b/macros/latex/contrib/reledmac/examples/2-notes-width.pdf Binary files differindex fe15c3bb6b..886d5d8663 100644 --- a/macros/latex/contrib/reledmac/examples/2-notes-width.pdf +++ b/macros/latex/contrib/reledmac/examples/2-notes-width.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf b/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf Binary files differindex 0b98b45f9f..7c3d574163 100644 --- a/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf +++ b/macros/latex/contrib/reledmac/examples/2-one_series_per_pstart.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-performances.pdf b/macros/latex/contrib/reledmac/examples/2-performances.pdf Binary files differindex f962c5e6f3..f54cdd9842 100644 --- a/macros/latex/contrib/reledmac/examples/2-performances.pdf +++ b/macros/latex/contrib/reledmac/examples/2-performances.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf Binary files differindex b1a24575ac..f051ce8138 100644 --- a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf +++ b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf b/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf Binary files differindex 1f42f13dee..019b92d1ad 100644 --- a/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf +++ b/macros/latex/contrib/reledmac/examples/2-subdivision-number-in-header.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf Binary files differindex cca58dc542..f3b7a0631e 100644 --- a/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/2-titles_in_line_numbering_with_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf b/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf Binary files differindex 06d90b3078..9135244077 100644 --- a/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf +++ b/macros/latex/contrib/reledmac/examples/2-titles_not_in_line_numbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf Binary files differindex eb29881b67..fa234426a6 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_columns_different_languages.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf Binary files differindex 8926c5bba6..3d2286ab4b 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_mwe.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf Binary files differindex f8937f319b..23ecaaa9ee 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_pages_different_languages_lualatex.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf Binary files differindex 8c7fad1e28..060a966d0a 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_same_page_number_in_both_side.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf Binary files differindex 8fd4e56054..04f8aac074 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted-nomax.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf Binary files differindex e14e10e833..0e1bfaa60c 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_advancedshifted.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf Binary files differindex d5beac997d..32fc320a98 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_default.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf Binary files differindex 6c751b3fbf..87d09cd20e 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax-shifted.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf Binary files differindex 39a2542af1..5dc6e3be31 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nomax.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf Binary files differindex 635df762e1..520ce73ad5 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_nosync.pdf diff --git a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf Binary files differindex 57756dcdba..4d13b9452e 100644 --- a/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf +++ b/macros/latex/contrib/reledmac/examples/3-reledpar_sync_setting_shifted.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf Binary files differindex 4595f34253..3ed1dcc278 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column-continuous-numbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf Binary files differindex 7939487f6e..95e233664e 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_column_mix_with_not_column.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf Binary files differindex d5286172bd..9e3d14194c 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_alignment.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf Binary files differindex 74a6bf7214..0893ffc29b 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_columns_titles_in_line_numbering_with_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf Binary files differindex 78bc00377b..252dc8f100 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_inside-outside-columns.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf Binary files differindex 8e1b25e4bc..7da2f82e64 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_one_series_per_pstart.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf Binary files differindex a61b80c32f..403ae30a91 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_long_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf Binary files differindex 3cb849d651..da319cfaaf 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_notes_leftpage.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf Binary files differindex 1c8779e01d..1ed4c721c1 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_paragraph_separator_between.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf Binary files differindex 6dbba49ee4..6b3320340b 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_pages_titles_in_line_numbering_with_notes.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf Binary files differindex 45bd9b223c..2cc17e616f 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_titles_not_in_line_numbering.pdf diff --git a/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf b/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf Binary files differindex 206ce8a665..1a080ebed2 100644 --- a/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf +++ b/macros/latex/contrib/reledmac/examples/4-reledpar_verse_text_between.pdf diff --git a/macros/latex/contrib/reledmac/migration.pdf b/macros/latex/contrib/reledmac/migration.pdf Binary files differindex 1a5ad7baea..cd6af6144e 100644 --- a/macros/latex/contrib/reledmac/migration.pdf +++ b/macros/latex/contrib/reledmac/migration.pdf diff --git a/macros/latex/contrib/reledmac/reledmac.dtx b/macros/latex/contrib/reledmac/reledmac.dtx index d5738c5e15..f3bdfacf3d 100644 --- a/macros/latex/contrib/reledmac/reledmac.dtx +++ b/macros/latex/contrib/reledmac/reledmac.dtx @@ -566,7 +566,8 @@ % \changes{v2.34.4}{2020/09/16}{Fix some bugs with lineation by page, when a numbered section starts at the very beginning of page.} % \changes{v2.34.4}{2020/09/16}{Fix bugs with \protect\cs{parafootsepX} outside of numbered section.} % \changes{v2.34.5}{2020/09/23}{Fix incompatibility between \protect\cs{apprefwithpage} / \protect\cs{SErefwithpage} and line number annotation mechanism.} -% \changes{v2.34.6}{2020/09/23}{Fix incompatibility with \protect\package{calc} package (add with v.2.34.4} +% \changes{v2.34.6}{2020/09/23}{Fix incompatibility with \protect\package{calc} package (added with v2.34.4).} +% \changes{v2.34.7}{2020/11/19}{Fix bug with \protect\cs{parafootsepX} in some circumstances (add with v2.34.4).} % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} % @@ -2231,7 +2232,8 @@ % \section{Apparatus customization} % \label{displayoptions} % \changes{v1.0.0}{2012/09/15}{New generic commands to customize footnote display.} -% Some commands can be used to change the display of the footnotes. +% \subsection{Introduction} +% Some commands can be used to change the display of the footnotes.\footnote{In the code of reledmac, these commands are called \enquote{hooks}.} % All can have an optional argument \oarg{s}, which is the letter of the series\,---\,or % a list of letters separated by comma\,---\,depending on which option is applied. % If the optional argument is omitted or empty, the setting will apply to the entire series. @@ -4407,7 +4409,7 @@ % \begin{macrocode} %<*code> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{reledmac}[2020/10/10 v2.34.6 typesetting critical editions]% +\ProvidesPackage{reledmac}[2020/11/19 v2.34.7 typesetting critical editions]% % \end{macrocode} % % \subsection{Package options} @@ -13689,16 +13691,16 @@ {\csuse{parafootsepX@#1}}% {}% \global\csname prevpage#1@num\endcsname=\page@num% - \else%We can't use directly the page counter, see https://tex.stackexchange.com/a/239457/7712 - \global\expandafter\advance\csname footnote#1@parafootsepX\endcsname by 1% - \edef\@tmpa{parafootsepX@#1@\the\csname footnote#1@parafootsepX\endcsname}% - \expandafter\edlabel\expandafter{\@tmpa}% - \edef\@tmpb{\expandafter\xpageref\expandafter{\@tmpa}}% - \IfStrEq{\csuse{prevpage#1@num}}{\@tmpb}% - {\csuse{parafootsepX@#1}}% - {}% - \global\cslet{prevpage#1@num}{\@tmpb}% - \fi% + \else%We can't use directly the page counter, see https://tex.stackexchange.com/a/239457/7712 + \global\expandafter\advance\csname footnote#1@parafootsepX\endcsname by 1% + \edef\@tmpa{parafootsepX@#1@\the\csname footnote#1@parafootsepX\endcsname}% + \expandafter\edlabel\expandafter{\@tmpa}% + \edef\@tmpb{\expandafter\xpageref\expandafter{\@tmpa}}% + \IfStrEq{\csuse{prevpage#1@num@outnumbering}}{\@tmpb}% + {\csuse{parafootsepX@#1}}% + {}% + \global\cslet{prevpage#1@num@outnumbering}{\@tmpb}% + \fi% \fi% } % \end{macrocode} diff --git a/macros/latex/contrib/reledmac/reledmac.pdf b/macros/latex/contrib/reledmac/reledmac.pdf Binary files differindex c1d2a8ed39..4964ebe5b0 100644 --- a/macros/latex/contrib/reledmac/reledmac.pdf +++ b/macros/latex/contrib/reledmac/reledmac.pdf diff --git a/macros/latex/contrib/reledmac/reledpar.pdf b/macros/latex/contrib/reledmac/reledpar.pdf Binary files differindex 3f55ab7612..d153462f07 100644 --- a/macros/latex/contrib/reledmac/reledpar.pdf +++ b/macros/latex/contrib/reledmac/reledpar.pdf |