summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-06-14 03:02:26 +0000
committerNorbert Preining <norbert@preining.info>2020-06-14 03:02:26 +0000
commit893b65e5d4c0b7cb8ebbfca9ee6b090b9a4a182c (patch)
treef6b0cff2cf2f8e30ef3edbfa6c7205e588e81515 /macros/latex
parent2d0067edb74f15b431d7a1e3a42b4f525986cef0 (diff)
CTAN sync 202006140302
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/hyperxmp/hyperxmp.dtx541
-rw-r--r--macros/latex/contrib/hyperxmp/hyperxmp.pdfbin1303174 -> 1326332 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.pdfbin355481 -> 356758 bytes
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix-french.tex37
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.dtx219
-rw-r--r--macros/latex/contrib/nicematrix/nicematrix.pdfbin873835 -> 882583 bytes
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc-doc.pdf (renamed from macros/latex/contrib/pdfpc/pdfpc.pdf)bin170447 -> 172285 bytes
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc-doc.tex140
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc.ins38
-rw-r--r--macros/latex/contrib/pdfpc/pdfpc.sty (renamed from macros/latex/contrib/pdfpc/pdfpc.dtx)48
10 files changed, 852 insertions, 171 deletions
diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.dtx b/macros/latex/contrib/hyperxmp/hyperxmp.dtx
index 1d2c332018..e4e4f52837 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/05/12 v5.2 Store hyperref metadata in XMP format]
+ [2020/06/13 v5.3 Store hyperref metadata in XMP format]
%</package>
%
%<*driver>
@@ -112,7 +112,7 @@
%</driver>
% \fi
%
-% \CheckSum{2425}
+% \CheckSum{2610}
%
% \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
@@ -169,6 +169,8 @@
% standards, as requested by Robin Schwab}
% \changes{v5.0}{2020/02/26}{Added support for \protect\acro{PDF/X}
% standards, as requested by Robin Schwab}
+% \changes{v5.0}{2020/03/17}{Don't set any document dates (creation,
+% modification, or metadata) from \string\optname{pdfdate}}
% \changes{v5.2}{2020/04/29}{Introduced the \protect\optname{pdfidentifier}
% package option, which enables an author to specify a unique identifier
% for the document}
@@ -189,6 +191,7 @@
% ^^A Define a few logical styles.
% \DeclareRobustCommand{\term}[1]{#1\SortIndex{#1}{#1}}
% \DeclareRobustCommand{\pkgname}[1]{\mbox{\textsf{#1}}\SortIndex{#1}{\textsf{#1}}}
+% \DeclareRobustCommand{\clsname}[1]{\mbox{\textsf{#1}}\SortIndex{#1}{\textsf{#1}}}
% \makeatletter
% \DeclareRobustCommand{\xmpprop}[2][]{^^A XMP property
% \def\xmppropopt{#1}^^A
@@ -1128,15 +1131,27 @@
% can include \term{Unicode} characters in its \acro{XMP} fields.
%
% \usagenote{Automatically specified metadata}
-% \optname{pdftitle} defaults to the document's title as specified by
-% |\title{|\dots|}|. \optname{pdfauthor} defaults to the document's
-% author(s) as specified by |\author{|\dots|}|. \optname{pdfdate}
-% defaults to the current date and time. \optname{pdfmetalang}
-% defaults to the same value as \optname{pdflang} if non-empty,
-% ``|x-default|'' otherwise. An implication of automatic
-% metadata specification is that an author can simply include
-% |\usepackage{hyperxmp}| in a document's preamble and benefit from
-% a modicum of \acro{XMP} metadata with no additional effort.
+% \pkgname{hyperxmp} attempts to identify certain metadata
+% automatically. The hope is that in many cases, an author can simply
+% include |\usepackage{hyperxmp}| in a document's preamble and benefit
+% from a modicum of \acro{XMP} metadata with no additional effort.
+%
+% Currently, \optname{pdftitle} defaults to the document's title as
+% specified by |\title{|\dots|}|. \optname{pdfauthor} defaults to the
+% document's author(s) as specified by |\author{|\dots|}|.
+% \optname{pdfdate} defaults to the current date and time.
+% \optname{pdfmetalang} defaults to the same value as \optname{pdflang}
+% if non-empty, ``|x-default|'' otherwise. \pkgname{hyperxmp}
+% recognizes some class-specific metadata as well, such as that provided
+% via the Koma letter classes (e.g.,~\clsname{scrlttr2}) and the
+% \acro{ACM} article class (\clsname{acmart}).
+%
+% If a document uses the \pkgname{polyglossia} package, it is
+% recommended that it \emph{not} explicitly set \optname{pdflang}.
+% \optname{pdflang} accepts only a single language name while
+% \pkgname{hyperxmp} can automatically query \pkgname{polyglossia} for a
+% list of all languages used in the document and include this list in an
+% \acro{XMP} \xmpterm{dc:language} element.
%
% \usagenote{Multilingual metadata}
% \label{note:multilingual}
@@ -1435,22 +1450,24 @@
% Thanks to Heiko Oberdiek for the bug report and suggested modifications.}
%
% \begin{macro}{\hyxmp@at@end}
-% \begin{macro}{\hyxmp@driver}
% The |\hyxmp@at@end| macro includes code at the end of the document.
-% For \pdfTeX, the standard |\AtEndDocument| works well enough. For all
-% the other backends we use |\AtEndDvi| from the \pkgname{atenddvi}
-% package, which is more robust but requires an addition \LaTeX\ run.
-% \begin{macrocode}
-\def\hyxmp@driver{hpdftex}
-\ifx\hyxmp@driver\Hy@driver
- \let\hyxmp@at@end=\AtEndDocument
-\else
+% When available (as is the case in most modern \tex\ backends),
+% \cs{AtEndDocument} works well enough. Otherwise, we invoke
+% \cs{AtEndDvi} from the \pkgname{atenddvi} package, which is robust but
+% requires an addition \LaTeX\ run.
+% \changes{v5.3}{2020/05/29}{Use \protect\cs{AtEndDocument} in all
+% \protect\tex\ back ends that provide it. Thanks to Nelson Posse
+% Lago for pointing out why \protect\pkgname{atenddvi} is best avoided
+% if possible}
+% \begin{macrocode}
+\@ifundefined{AtEndDocument}{%
\RequirePackage{atenddvi}
\let\hyxmp@at@end=\AtEndDvi
-\fi
+}{%
+ \let\hyxmp@at@end=\AtEndDocument
+}
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
%
% \subsection{Integration with \textsf{hyperref}}
@@ -1504,6 +1521,20 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\@if@def@and@nonempty}
+% This macro combines \cs{@ifundefined} and \cs{@ifmtargexp}. If the
+% macro named |#1| is both defined and non-empty, evaluate~|#2|.
+% Otherwise, evaluate~|#3|.
+% \changes{v5.3}{2020/06/07}{Added this macro}
+% \begin{macrocode}
+\newcommand*{\@if@def@and@nonempty}[3]{%
+ \@ifundefined{#1}{#3}{%
+ \expandafter\@ifmtargexp\expandafter{\csname#1\endcsname}{#3}{#2}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\hyxmp@pdfstringdef}
% \begin{macro}{\hyxmp@textunderscore}
% Because \pkgname{hyperxmp} uses underscores to represent hard spaces,
@@ -2421,30 +2452,78 @@
% \end{macro}
% \end{macro}
%
-% Rather than load \pkgname{hyperref} ourself we let the author do it
-% then verify he actually did. This approach gives the author the
-% flexibility to load \pkgname{hyperxmp} and \pkgname{hyperref} in
-% either order and to call |\hypersetup| anywhere in the document's
-% preamble, not just before \pkgname{hyperxmp} is loaded.
+% \begin{macro}{\hyxmp@set@koma@phones}
+% \changes{v5.3}{2020/06/07}{Added this macro}
+% \begin{macro}{\hyxmp@koma@phones}
+% Define \cs{hyxmp@koma@phones} as a comma-separated list of the phone
+% numbers provided to a Koma letter class (mobile and landline).
% \begin{macrocode}
-\AtBeginDocument{%
- \@ifpackageloaded{hyperref}{%
+\newcommand*{\hyxmp@set@koma@phones}{%
+ \@if@def@and@nonempty{scr@frommobilephone@var}{%
+ \@if@def@and@nonempty{scr@fromphone@var}{%
+ \edef\hyxmp@koma@phones{\scr@frommobilephone@var,\scr@fromphone@var}%
+ }{%
+ \edef\hyxmp@koma@phones{\scr@frommobilephone@var}%
+ }%
+ }{%
+ \@if@def@and@nonempty{scr@fromphone@var}{%
+ \edef\hyxmp@koma@phones{\scr@fromphone@var}%
+ }{%
+ }%
+ }%
+}
% \end{macrocode}
-% In older versions of \pkgname{hyperref}, |\@pdflang| is set to
-% |\@empty| if \optname{pdflang} is not specified. In newer versions of
-% \pkgname{hyperref}, |\@pdflang| is set to |\relax| if
-% \optname{pdflang} is not specified. The latter is a bit problematic
-% for \pkgname{hyperxmp} because it makes |\@pdflang| non-expandable,
-% which causes a literal ``|\@pdflang|'' to be written as \acro{XMP}
-% metadata. To avoid that situation we redefine |\@pdflang| as
-% |\@empty| if we see it set to |\relax|.
-% \changes{v2.3a}{2013/04/16}{Bug fix: Redefine \cs{@pdflang} as
-% \cs{@empty} when \protect\pkgname{hyperref} has set
-% it to \cs{relax}}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp@use@first@valid}
+% Given a \pkgname{hyperxmp} option~(|#1|), its current value~(|#2|),
+% and a comma-separated list of option names~(|#3|), if the current
+% value is empy, invoke \cs{hypersetup} to set the option to the first
+% non-empty item in the list. If all items in the list are empty, do
+% nothing.
+% \changes{v5.3}{2020/05/29}{Added this macro}
% \begin{macrocode}
- \ifx\@pdflang\relax
- \let\@pdflang=\@empty
+\newcommand*{\hyxmp@use@first@valid}[3]{%
+ \@ifmtargexp{#2}{%
+ \hyxmp@use@first@valid@i{#1}#3,!,%
+ }%
+ {}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp@use@first@valid@i}
+% This macro performs all the work for \cs{hyxmp@use@first@valid}. It
+% loops over a comma-separated list of macros~(|#2|), stopping when it
+% encounters an end-of-list marker~(``|!|''). The first list element
+% that is neither undefined nor empty is assigned to a given option
+% name~(|#1|) using \cs{hypersetup}.
+% \begin{macrocode}
+\def\hyxmp@use@first@valid@i#1#2,{%
+ \def\next{\hyxmp@use@first@valid@i{#1}}%
+ \ifx#2!%
+ \let\next=\relax
+ \else
+ \ifx#2\undefined
+ \else
+ \@ifnotmtargexp{#2}{%
+ \hypersetup{#1={#2}}%
+ \def\next##1!,{}%
+ }%
\fi
+ \fi
+ \next
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp@auto@assign@data}
+% If certain metadata are unspecified, try to specify meaningful values
+% using data provided by author via other means (e.g.,~\cs{title} for
+% the document's title).
+% \begin{macrocode}
+\newcommand*{\hyxmp@auto@assign@data}{%
% \end{macrocode}
% If the author explicitly specified the language to use for the
% document's metadata, we use that. If not, we use the document
@@ -2461,37 +2540,346 @@
% \protect\texttt{x-default}. This addresses a bug report by Niklas
% Beisert}
% \begin{macrocode}
- \ifx\@pdfmetalang\@empty
- \ifx\@pdflang\@empty
- \let\@pdfmetalang=\hyxmp@x@default
- \else
- \edef\@pdfmetalang{\@pdflang}%
- \fi
+ \ifx\@pdfmetalang\@empty
+ \ifx\@pdflang\@empty
+ \let\@pdfmetalang=\hyxmp@x@default
+ \else
+ \edef\@pdfmetalang{\@pdflang}%
\fi
- \hyxmp@xmlify\@pdfmetalang
+ \fi
+ \hyxmp@xmlify\@pdfmetalang
% \end{macrocode}
-% \changes{v5.0}{2020/03/17}{Don't set any document dates (creation,
-% modification, or metadata) from \string\optname{pdfdate}}
% If the author left \optname{pdftitle} blank but specified |\title|,
-% use the title for \optname{pdftitle}. Likewise, if the author left
-% \optname{pdfauthor} blank but specified |\author|, use the author for
-% \optname{pdfauthor}.
+% use the title for \optname{pdftitle}. Do likewise for various other
+% metadata: identify author-provided information that can be co-opted
+% for use as \acro{XMP} metadata.
% \changes{v2.7}{2016/02/01}{Automatically use \cs{title} and \cs{author}
% if \protect\optname{pdftitle} and \protect\optname{pdfauthor} are left
% unspecified. Thanks to Maciej Radziejewski for the suggestion}
+% \changes{v5.3}{2020/05/29}{Consider other author-provided sources of
+% metadata. Thanks to Robin Schwab for proposing that
+% \protect\pkgname{hyperxmp} use the Koma letter classes's metadata}
% \begin{macrocode}
- \@ifmtargexp{\@pdftitle}{%
- \@ifnotmtargexp{\@title}{%
- \hypersetup{pdftitle={\@title}}%
+ \hyxmp@use@first@valid{pdftitle}{\@pdftitle}{%
+ \scr@subject@var,%
+ \@title
+ }%
+ \hyxmp@use@first@valid{pdfauthor}{\@pdfauthor}{%
+ \scr@fromname@var,%
+ \@author
+ }%
+ \hyxmp@use@first@valid{pdfcontactemail}{\@pdfcontactemail}{%
+ \scr@fromemail@var
+ }%
+ \hyxmp@set@koma@phones
+ \hyxmp@use@first@valid{pdfcontactphone}{\@pdfcontactphone}{%
+ \hyxmp@koma@phones
+ }%
+ \hyxmp@use@first@valid{pdfcontacturl}{\@pdfcontacturl}{%
+ \scr@fromurl@var
+ }%
+ \hyxmp@use@first@valid{pdfsubtitle}{\@pdfsubtitle}{%
+ \@subtitle
+ }%
+ \hyxmp@use@first@valid{pdfpublisher}{\@pdfpublisher}{%
+ \@publishers
+ }%
+% \end{macrocode}
+% We handle the \clsname{acmart} class specially. \clsname{acmart}
+% stores author-provided contact information in a structured format that
+% we can process fairly easily. Note that if the author is not using
+% the \clsname{acmart} class, \cs{hyxmp@parse@acmart} will have been
+% redefined to do nothing.
+% \begin{macrocode}
+ \hyxmp@parse@acmart
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\hyxmp@parse@acmart}
+% The \clsname{acmart} class stores a rich set of author metadata in its
+% \cs{addresses} macro. \cs{hyxmp@parse@acmart} extracts the contact
+% information for the first author and converts that to \acro{XMP}
+% metadata.
+% \changes{v5.3}{2020/05/30}{Added this macro}
+% \begin{macrocode}
+\newcommand*{\hyxmp@parse@acmart}{%
+ \begingroup
+% \end{macrocode}
+% \begin{macro}{\@author}
+% \clsname{acmart} has already invoked
+% |\hypersetup{pdfauthor=|\dots|}| to specify the complete list of
+% authors. At this point, |\@author| is defined to produce a warning
+% message. We locally redefine it to do nothing.
+% \begin{macrocode}
+ \let\@author=\@gobble
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\email}
+% \begin{macro}{\hyxmp@address@val}
+% Within \cs{addresses}, \cs{email} is defined to accept two arguments,
+% the second of which is the author's email address.
+% \begin{macrocode}
+ \def\email##1##2{%
+ \def\hyxmp@address@val{##2}%
+ \hyxmp@use@first@valid{pdfcontactemail}{\@pdfcontactemail}{%
+ \hyxmp@address@val
}%
}%
- {}%
- \@ifmtargexp{\@pdfauthor}{%
- \@ifnotmtargexp{\@author}{%
- \hypersetup{pdfauthor={\@author}}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\streetaddress}
+% \begin{macro}{\hyxmp@address@val}
+% \cs{streetaddress} wraps the author's street address.
+% \begin{macrocode}
+ \def\streetaddress##1{%
+ \def\hyxmp@address@val{##1}%
+ \hyxmp@use@first@valid{pdfcontactaddress}{\@pdfcontactaddress}{%
+ \hyxmp@address@val
}%
}%
- {}%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\city}
+% \begin{macro}{\hyxmp@address@val}
+% \cs{city} wraps the author's city name.
+% \begin{macrocode}
+ \def\city##1{%
+ \def\hyxmp@address@val{##1}%
+ \hyxmp@use@first@valid{pdfcontactcity}{\@pdfcontactcity}{%
+ \hyxmp@address@val
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\state}
+% \begin{macro}{\hyxmp@address@val}
+% \cs{state} wraps the author's state or region name.
+% \begin{macrocode}
+ \def\state##1{%
+ \def\hyxmp@address@val{##1}%
+ \hyxmp@use@first@valid{pdfcontactregion}{\@pdfcontactregion}{%
+ \hyxmp@address@val
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\country}
+% \begin{macro}{\hyxmp@address@val}
+% \cs{country} wraps the author's country name.
+% \begin{macrocode}
+ \def\country##1{%
+ \def\hyxmp@address@val{##1}%
+ \hyxmp@use@first@valid{pdfcontactcountry}{\@pdfcontactcountry}{%
+ \hyxmp@address@val
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\postcode}
+% \begin{macro}{\hyxmp@address@val}
+% \cs{postcode} wraps the author's postal code.
+% \begin{macrocode}
+ \def\postcode##1{%
+ \def\hyxmp@address@val{##1}%
+ \hyxmp@use@first@valid{pdfcontactpostcode}{\@pdfcontactpostcode}{%
+ \hyxmp@address@val
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\affiliation}
+% We want to produce \acro{XMP} metadata for only a single affiliation.
+% Although \cs{hyxmp@use@first@valid} will ensure that only the first
+% email, city, country, etc.\ encountered is considered, we run the
+% first of one affiliation defining, say, a city and state but no
+% country and a subsequent affiliation defining a country. In that
+% case, the \acro{XMP} would include the first author's city and state
+% and the subsequent author's country. Hence, we define
+% \cs{affiliation} to ``self destruct'' after its first use, discarding
+% all further affiliations.
+% \begin{macrocode}
+ \def\affiliation##1##2{%
+ ##2%
+ \let\affiliation=\@gobbletwo
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+% We want to evaluate \cs{addresses} with the preceding local
+% definitions in effect, but we don't want to typeset any text appearing
+% in the string. Hence, we ``typeset'' \cs{addresses} within a box that
+% is subsequently discarded.
+% \begin{macrocode}
+ \setbox0=\hbox{\addresses}%
+ \endgroup
+% \end{macrocode}
+%
+% \clsname{acmart} supports other relevant metadata in addition to the
+% authors' mailing addresses. For instance, papers accepted for
+% publication indicate their \acro{DOI} number. However, papers under
+% review will contain either a placeholder \acro{DOI},
+% ``10.1145/nnnnnnn.nnnnnnn'', or the example \acro{DOI} specified in
+% the \clsname{acmart} example document, ``10.1145/1122445.1122456''.
+% We ignore both of those \acro{DOI}s.
+% \begin{macrocode}
+ \@if@def@and@nonempty{@acmDOI}{%
+ \IfSubStr{\@acmDOI}{10.1145/1122445.1122456}{}{%
+ \IfSubStr{\@acmDOI}{10.1145/nnnnnnn.nnnnnnn}{}{%
+ \hyxmp@use@first@valid{pdfdoi}{\@pdfdoi}{%
+ \@acmDOI
+ }%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% \begin{macro}{\hyxmp@strip@isbn@date}
+% \begin{macro}{\hyxmp@acm@isbn}
+% Papers appearing in conference proceedings specify the proceedings'
+% \acro{ISBN}. As with \cs{@acmDOI} above, we ignore both the
+% placeholder \acro{ISBN}, ``978-x-xxxx-xxxx-x/YY/MM'', and the example
+% \acro{ISBN}, ``978-1-4503-XXXX-X/18/06''. We also strip off the
+% ``\texttt{/}\meta{year}\texttt{/}\meta{month}'' suffix so as to
+% include a true \acro{ISBN} in the \acro{XMP} metadata.
+% \begin{macrocode}
+ \@if@def@and@nonempty{@acmISBN}{%
+ \IfSubStr{\@acmISBN}{XXXX}{}{%
+ \IfSubStr{\@acmISBN}{xxxx}{}{%
+ \def\hyxmp@strip@isbn@date##1/##2!{##1}%
+ \edef\hyxmp@acm@isbn{%
+ \expandafter\hyxmp@strip@isbn@date\@acmISBN/!%
+ }%
+ \hyxmp@use@first@valid{pdfisbn}{\@pdfisbn}{%
+ \hyxmp@acm@isbn
+ }%
+ }%
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\hyxmp@acm@publisher}
+% The publisher is of course \acro{ACM}.
+% \begin{macrocode}
+ \def\hyxmp@acm@publisher{Association for Computing Machinery}%
+ \hyxmp@use@first@valid{pdfpublisher}{\@pdfpublisher}{%
+ \hyxmp@acm@publisher
+ }%
+% \end{macrocode}
+% Use the journal name if defined, otherwise the book name (for
+% conference proceedings).
+% \begin{macrocode}
+ \hyxmp@use@first@valid{pdfpublication}{\@pdfpublication}{%
+ \@journalName,%
+ \@acmBooktitle,%
+ \@acmConference
+ }%
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\hyxmp@acm@pubtype}
+% \clsname{acmart} makes clear whether it's typesetting a journal
+% article. If it's not a journal, we assume it's a book (conference
+% proceedings).
+% \begin{macrocode}
+ \if@ACM@journal
+ \def\hyxmp@acm@pubtype{journal}%
+ \else
+ \def\hyxmp@acm@pubtype{book}%
+ \fi
+ \hyxmp@use@first@valid{pdfpubtype}{\@pdfpubtype}{%
+ \hyxmp@acm@pubtype
+ }%
+% \end{macrocode}
+% \end{macro}
+% Journal articles have a volume and issue number.
+% \begin{macrocode}
+ \hyxmp@use@first@valid{pdfvolumenum}{\@pdfvolumenum}{%
+ \@acmVolume
+ }%
+ \hyxmp@use@first@valid{pdfissuenum}{\@pdfissuenum}{%
+ \@acmNumber
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% Nullify \cs{hyxmp@parse@acmart} if the author is not using the
+% \clsname{acmart} class.
+% \begin{macrocode}
+\@ifclassloaded{acmart}{}{\let\hyxmp@parse@acmart=\relax}
+% \end{macrocode}
+%
+% \begin{macro}{\hyxmp@set@dc@lang}
+% \begin{macro}{\hyxmp@dc@lang}
+% \cs{@pdflang} is used in both the \acro{PDF} document catalog (the
+% \pdfterm{Lang} key, written to the \acro{PDF} file by
+% \pkgname{hyperref}) and in the Dublin Core \xmpterm{dc:language} tag
+% (Section~\ref{sec:dublin-core}). Normally, these are the same.
+% However, \pdfterm{Lang} accepts only a single language while
+% \xmpterm{dc:language} accepts multiple languages. If the document
+% loads \pkgname{polyglossia} and does not specify \optname{pdflang} in
+% \cs{hypersetup}, \cs{hyxmp@set@dc@lang} is redefined below to set
+% \cs{hyxmp@dc@lang} to \pkgname{polyglossia}'s list of used languages
+% (once this is known). Otherwise, \cs{hyxmp@set@dc@lang} assigns the
+% language specified by \optname{pdflang} (if any) to
+% \cs{hyxmp@dc@lang}.
+% \begin{macrocode}
+\newcommand*{\hyxmp@set@dc@lang}{%
+ \let\hyxmp@dc@lang=\@pdflang
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% Rather than load \pkgname{hyperref} ourself we let the author do it
+% then verify he actually did. This approach gives the author the
+% flexibility to load \pkgname{hyperxmp} and \pkgname{hyperref} in
+% either order and to call |\hypersetup| anywhere in the document's
+% preamble, not just before \pkgname{hyperxmp} is loaded.
+% \begin{macrocode}
+\AtEndPreamble{%
+ \@ifpackageloaded{hyperref}{%
+% \end{macrocode}
+% In older versions of \pkgname{hyperref}, \cs{@pdflang} is set to
+% \cs{@empty} if \optname{pdflang} is not specified. In newer versions
+% of \pkgname{hyperref}, \cs{@pdflang} is set to \cs{relax} if
+% \optname{pdflang} is not specified. The latter is a bit problematic
+% for \pkgname{hyperxmp} because it makes \cs{@pdflang} non-expandable,
+% which causes a literal ``\cs{@pdflang}'' to be written as \acro{XMP}
+% metadata. To avoid that situation we redefine \cs{@pdflang} as
+% \cs{@empty} if we see it set to \cs{relax}. Actually, we first check
+% if the \pkgname{polyglossia} package has specified the document's main
+% language in \cs{mainbcp47id}. If so, we use that instead of
+% \cs{@empty} and redefine \cs{hyxmp@set@dc@lang} to consider
+% \pkgname{polyglossia}'s list of used languages.
+% \changes{v2.3a}{2013/04/16}{Bug fix: Redefine \cs{@pdflang} as
+% \cs{@empty} when \protect\pkgname{hyperref} has set
+% it to \cs{relax}}
+% \changes{v5.3}{2020/06/08}{Acquire the default language from the
+% \protect\pkgname{polyglossia} package, if loaded. Thanks to
+% Robin Schwab for bringing that package to my attention}
+% \begin{macrocode}
+ \ifx\@pdflang\relax
+ \@ifundefined{mainbcp47id}{%
+ \let\@pdflang=\@empty
+ }{%
+ \xdef\@pdflang{\csname mainbcp47id\endcsname}%
+ \renewcommand*{\hyxmp@set@dc@lang}{%
+ \edef\hyxmp@dc@lang{\xpg@bcp@loaded}%
+ }%
+ }%
+ \fi
+% \end{macrocode}
+% Fill in any missing metadata we can using values provided by the author
+% via mechanisms other than the \cs{hypersetup} command.
+% \begin{macrocode}
+ \hyxmp@auto@assign@data
% \end{macrocode}
% Most \acro{PDF} standards dictate that if the same metadata appear in
% both the \acro{XMP} packet and the \acro{PDF} \pdfterm{Info}
@@ -2550,6 +2938,19 @@
}
% \end{macrocode}
%
+% A number of classes either require or recommend that authors declare
+% various class-specific metadata \emph{after} the |\begin{document}|.
+% So where do we invoke \cs{hyxmp@auto@assign@data}? On one hand, we
+% want to invoke it before the |\begin{document}| because this may
+% obviate \pkgname{hyperxmp}'s ``\meta{job name} did not specify any
+% metadata'' warning message. On the other hand, we want to invoke it
+% after the |\begin{document}| so it picks up metadata not specified in
+% the preamble. Our solution is to invoke \cs{hyxmp@auto@assign@data}
+% twice: both before the |\begin{document}| at at the |\end{document}|.
+% \begin{macrocode}
+\hyxmp@at@end{\hyxmp@auto@assign@data}
+% \end{macrocode}
+%
%
% \subsection{Manipulating author-supplied data}
%
@@ -4436,7 +4837,7 @@ ______</dc:#2>^^J%
% \changes{v4.1}{2019/04/05}{Added this macro}
% \begin{macrocode}
\newcommand{\hyxmp@singleton@dc}[3][Bag]{%
- \@ifnotmtarg{#3}{%
+ \@ifnotmtargexp{#3}{%
\hyxmp@xmlify{#3}%
\hyxmp@add@to@xml{%
______<dc:#2>^^J%
@@ -4498,7 +4899,6 @@ ______</dc:#2>^^J%
\hyxmp@rdf@dc{rights}{\@pdfcopyright}%
\hyxmp@singleton@dc{publisher}{\@pdfpublisher}%
\hyxmp@singleton@dc[Seq]{date}{\hyxmp@today@xmp}%
- \hyxmp@singleton@dc{language}{\@pdflang}%
\hyxmp@singleton@dc{type}{\@pdftype}%
\hyxmp@list@to@xml[\ifHy@pdfa]{creator}{Seq}{\hyxmp@pdfauthor}%
\hyxmp@list@to@xml{subject}{Bag}{\hyxmp@pdfkeywords}%
@@ -4507,6 +4907,17 @@ ______</dc:#2>^^J%
\hyxmp@add@simple{dc:source}{\@pdfsource}%
\fi
% \end{macrocode}
+% Set \cs{hyxmp@dc@lang} to either the single language \cs{@pdflang}
+% (which may be unspecified) or to a list of languages used in the
+% document via \pkgname{polyglossia}. See
+% Section~\ref{sec:hyperref-int} for the definition of
+% \cs{hyxmp@set@dc@lang}.
+% \changes{v5.3}{2020/06/13}{Include all languages used in the document
+% in \protect\xmpterm{dc:language}}
+% \begin{macrocode}
+ \hyxmp@set@dc@lang
+ \hyxmp@list@to@xml{language}{Bag}{\hyxmp@dc@lang}%
+% \end{macrocode}
% If |\@pdfidentifier| is empty, try setting it to each of |\@pdfdoi|,
% |\@pdfeissn|, |\@pdfissn|, and |\@pdfisbn|, in turn, with proper
% syntactic adjustments.
@@ -4777,7 +5188,7 @@ ______</dc:#2>^^J%
%
% \begin{macro}{\hyxmp@list@to@lines}
% Given a property~(|#1|) and a macro containing a comma-separated
-% list~(|#2|), replace commas with |\xmplinesep|. Do nothing it the
+% list~(|#2|), replace commas with |\xmplinesep|. Do nothing if the
% list is empty.
% \changes{v2.2}{2012/12/07}{Added this macro}
% \begin{macrocode}
diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.pdf b/macros/latex/contrib/hyperxmp/hyperxmp.pdf
index 01425c6e03..28b08b0787 100644
--- a/macros/latex/contrib/hyperxmp/hyperxmp.pdf
+++ b/macros/latex/contrib/hyperxmp/hyperxmp.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.pdf b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
index c5d481ad72..24432563ff 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicematrix/nicematrix-french.tex b/macros/latex/contrib/nicematrix/nicematrix-french.tex
index d79a0f3727..a8c0fdd435 100644
--- a/macros/latex/contrib/nicematrix/nicematrix-french.tex
+++ b/macros/latex/contrib/nicematrix/nicematrix-french.tex
@@ -378,8 +378,45 @@ arum & iris & jacinthe & muguet
\end{center}
+\interitem
+On remarquera que les centrage horizontal du contenu des blocs est correct même si un espacement des colonnes a été
+demandé par une instruction comme |!{\qquad}| dans le préambule (ce n'est pas le cas avec |\multicolumn|). Dans
+l'exemple suivant, l'en-tête «Premier groupe» est correctement centré.
+
+\medskip
+\begin{center}
+\begin{BVerbatim}
+\begin{NiceTabular}{C!{\qquad}CCC~emphase#!{\qquad}@CCC}
+\toprule
+& ~emphase#\Block{1-3}{Premier groupe}@ & & & \Block{1-3}{Deuxième groupe} \\
+Rang & 1A & 1B & 1C & 2A & 2B & 2C \\
+\midrule
+ 1 & 0.657 & 0.913 & 0.733 & 0.830 & 0.387 & 0.893\\
+ 2 & 0.343 & 0.537 & 0.655 & 0.690 & 0.471 & 0.333\\
+ 3 & 0.783 & 0.885 & 0.015 & 0.306 & 0.643 & 0.263\\
+ 4 & 0.161 & 0.708 & 0.386 & 0.257 & 0.074 & 0.336\\
+\bottomrule
+\end{NiceTabular}
+\end{BVerbatim}
+\end{center}
\bigskip
+\begin{center}
+\begin{NiceTabular}{C!{\qquad}CCC!{\qquad}CCC}
+\toprule
+& \Block{1-3}{Premier groupe} & & & \Block{1-3}{Deuxième groupe} \\
+Rang & 1A & 1B & 1C & 2A & 2B & 2C \\
+\midrule
+ 1 & 0.657 & 0.913 & 0.733 & 0.830 & 0.387 & 0.893\\
+ 2 & 0.343 & 0.537 & 0.655 & 0.690 & 0.471 & 0.333\\
+ 3 & 0.783 & 0.885 & 0.015 & 0.306 & 0.643 & 0.263\\
+ 4 & 0.161 & 0.708 & 0.386 & 0.257 & 0.074 & 0.336\\
+\bottomrule
+\end{NiceTabular}
+\end{center}
+
+
+\interitem
On peut aussi utiliser la commande |\Block| dans des matrices mathématiques.
\medskip
diff --git a/macros/latex/contrib/nicematrix/nicematrix.dtx b/macros/latex/contrib/nicematrix/nicematrix.dtx
index e957be5dc9..a3e658e757 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.dtx
+++ b/macros/latex/contrib/nicematrix/nicematrix.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2018-2019 by F. Pantigny
+% Copyright (C) 2018-2020 by F. Pantigny
% -----------------------------------
%
% This file may be distributed and/or modified under the
@@ -15,8 +15,8 @@
%
% \fi
% \iffalse
-\def\myfileversion{4.2}
-\def\myfiledate{2020/06/07}
+\def\myfileversion{4.3}
+\def\myfiledate{2020/06/12}
%
%
%<*batchfile>
@@ -434,9 +434,49 @@ version 2005/12/01 or later.
% \end{NiceTabular}
% \end{center}
%
-%
+% \interitem
+% On should remark that the horizontal centering of the contents of the blocks
+% is correct even when an instruction such as |!{\qquad}| has been used in the
+% preamble of the array in order to increase the space between two columns (this
+% is not the case with |\multicolumn|). In the following example, the header
+% ``First group'' is correctly centered.
%
% \medskip
+% \begin{center}
+% \begin{BVerbatim}
+% \begin{NiceTabular}{C!{\qquad}CCC~emphase#!{\qquad}@CCC}
+% \toprule
+% & ~emphase#\Block{1-3}{First group}@ & & & \Block{1-3}{Second group} \\
+% Rank & 1A & 1B & 1C & 2A & 2B & 2C \\
+% \midrule
+% 1 & 0.657 & 0.913 & 0.733 & 0.830 & 0.387 & 0.893\\
+% 2 & 0.343 & 0.537 & 0.655 & 0.690 & 0.471 & 0.333\\
+% 3 & 0.783 & 0.885 & 0.015 & 0.306 & 0.643 & 0.263\\
+% 4 & 0.161 & 0.708 & 0.386 & 0.257 & 0.074 & 0.336\\
+% \bottomrule
+% \end{NiceTabular}
+% \end{BVerbatim}
+% \end{center}
+%
+% \bigskip
+% \begin{center}
+% \begin{NiceTabular}{C!{\qquad}CCC!{\qquad}CCC}
+% \toprule
+% & \Block{1-3}{First group} & & & \Block{1-3}{Second group} \\
+% Rank & 1A & 1B & 1C & 2A & 2B & 2C \\
+% \midrule
+% 1 & 0.657 & 0.913 & 0.733 & 0.830 & 0.387 & 0.893\\
+% 2 & 0.343 & 0.537 & 0.655 & 0.690 & 0.471 & 0.333\\
+% 3 & 0.783 & 0.885 & 0.015 & 0.306 & 0.643 & 0.263\\
+% 4 & 0.161 & 0.708 & 0.386 & 0.257 & 0.074 & 0.336\\
+% \bottomrule
+% \end{NiceTabular}
+% \end{center}
+%
+%
+%
+%
+% \interitem
% It's also possible to use the command |\Block| in mathematical matrices.
%
% \medskip
@@ -3659,7 +3699,7 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% The following commands are only for efficiency. It must \emph{not} be protected
+% The following commands are only for efficiency. They must \emph{not} be protected
% because it will be used (for instance) in names of \textsc{pgf} nodes.
% \begin{macrocode}
\cs_new:Npn \@@_succ:n #1 { \the \numexpr #1 + 1 \relax }
@@ -4049,9 +4089,8 @@ version 2005/12/01 or later.
% \begin{macrocode}
\seq_new:N \g_@@_pos_of_blocks_seq
% \end{macrocode}
-% The sequence |\g_@@_pos_of_blocks_seq| will be used by the test of
-% non-overlapping of two blocks and when we will draw the rules required by the
-% key |hvlines| (these rules won't be drawn within the blocks).
+% The sequence |\g_@@_pos_of_blocks_seq| when we will draw the rules required by
+% the key |hvlines| (these rules won't be drawn within the blocks).
%
% \bigskip
% We will also manage a sequence for the positions of the dotted lines. These
@@ -7884,9 +7923,9 @@ version 2005/12/01 or later.
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_non_standard_dotted_line:
{
- \begin { scope }
- \exp_args:No \@@_draw_non_standard_dotted_line:n
- { \l_@@_xdots_line_style_tl , \l_@@_xdots_color_tl }
+ \begin { scope }
+ \exp_args:No \@@_draw_non_standard_dotted_line:n
+ { \l_@@_xdots_line_style_tl , \l_@@_xdots_color_tl }
}
% \end{macrocode}
% We have used the fact that, in \textsc{pgf}, un color name can be put directly
@@ -9211,7 +9250,7 @@ version 2005/12/01 or later.
{
\int_compare:nNnT \l_tmpb_tl > { #2 - 1 }
{
- \int_compare:nNnT \l_tmpb_tl < { #4 + 1 }
+ \int_compare:nNnT \l_tmpb_tl < { #4 + 1 }
{ \bool_gset_false:N \g_tmpa_bool }
}
}
@@ -9871,10 +9910,10 @@ version 2005/12/01 or later.
% \end{macrocode}
%
% \bigskip
-% \subsection*{Block matrices}
+% \subsection*{The blocks}
%
-% The code in this section if for the construction of \emph{block matrices}. It
-% has no direct link with the environment |{NiceMatrixBlock}|.
+% The code deals with the command |\Block|. This command has no direct link with
+% the environment |{NiceMatrixBlock}|.
%
%
% The following command will be linked to |\Block| in the environments of
@@ -9882,8 +9921,10 @@ version 2005/12/01 or later.
% because it has an optional argument between |<| and |>| (for TeX instructions
% put before the math mode of the label)
%
+% It's mandatory to use a expandable command (probably because of the first
+% optional argument ?).
% \begin{macrocode}
-\NewDocumentCommand \@@_Block: { O { } m D < > { } m }
+\NewExpandableDocumentCommand \@@_Block: { O { } m D < > { } m }
{ \@@_Block_i #2 \q_stop { #1 } { #3 } { #4 } }
% \end{macrocode}
%
@@ -9909,10 +9950,10 @@ version 2005/12/01 or later.
% \begin{macrocode}
\tl_set:Nx \l_tmpa_tl
{
- { \int_use:N \c@iRow }
- { \int_use:N \c@jCol }
- { \int_eval:n { \c@iRow + #1 - 1 } }
- { \int_eval:n { \c@jCol + #2 - 1 } }
+ { \int_use:N \c@iRow }
+ { \int_use:N \c@jCol }
+ { \int_eval:n { \c@iRow + #1 - 1 } }
+ { \int_eval:n { \c@jCol + #2 - 1 } }
}
% \end{macrocode}
% Now, |\l_tmpa_tl| constains a ``object'' corresponding to the position of the
@@ -9944,7 +9985,9 @@ version 2005/12/01 or later.
%
% \bigskip
% The key |tikz| is for Tikz options used when the \textsc{pgf} node of the
-% block is created.
+% block is created (the ``normal'' block node and not the ``short'' one nor the
+% ``medium'' one). \textbf{In fact, as for now, it is \emph{not} documented}. Is
+% it really a good idea to provide such a key?
% \begin{macrocode}
\keys_define:nn { NiceMatrix / Block }
{
@@ -9965,7 +10008,8 @@ version 2005/12/01 or later.
\cs_new_protected:Npn \@@_Block_iii:nnnnnn #1 #2 #3 #4 #5 #6
{
% \end{macrocode}
-% The group is for the keys.
+% The group is for the keys (even if, as for new, there is only one key, called
+% |tikz| and not documented).
% \begin{macrocode}
\group_begin:
\keys_set:nn { NiceMatrix / Block } { #5 }
@@ -9973,7 +10017,7 @@ version 2005/12/01 or later.
%
% \begin{macrocode}
\bool_lazy_or:nnTF
- { \int_compare_p:nNn { #3 } > \c@iRow }
+ { \int_compare_p:nNn { #3 } > \g_@@_row_total_int }
{ \int_compare_p:nNn { #4 } > \c@jCol }
{ \msg_error:nnnn { nicematrix } { Block~too~large } { #1 } { #2 } }
{
@@ -9984,7 +10028,54 @@ version 2005/12/01 or later.
\hbox_set:Nn \l_@@_cell_box { #6 }
% \end{macrocode}
%
-% \medskip
+% \bigskip
+% Let's consider the following |{NiceTabular}|. Because of the instruction
+% |!{\hspace{1cm}}| in the preamble which increases the space between the
+% columns (by adding, in fact, that space to the previous column, that is to say
+% the second column of the tabular), we will create \emph{two} nodes relative to
+% the block: the node |1-1-block| and the node |1-1-block-short|. The latter
+% will be used by \pkg{nicematrix} to put the label of the node. The first one
+% won't be used explicitely.
+% \begin{Verbatim}
+% \begin{NiceTabular}{CC!{\hspace{1cm}}C}
+% \Block{2-2}{our block} & & one \\
+% & & two \\
+% three & four & five \\
+% six & seven & eight \\
+% \end{NiceTabular}
+% \end{Verbatim}
+%
+% \tikzset{highlight/.style={rectangle,
+% fill=red!15,
+% blend mode = multiply,
+% rounded corners = 0pt,
+% inner sep=0pt,
+% fit = #1}}
+%
+% \begin{tabular}{c!{\hspace{1cm}}c}
+% We highlight the node |1-1-block|
+% & We highlight the node |1-1-block-short| \\[2mm]
+% \begin{NiceTabular}{CC!{\hspace{1cm}}C}
+% \Block{2-2}{our block} & & one \\
+% & & two \\
+% three & four & five \\
+% six & seven & eight \\
+% \CodeAfter
+% \tikz \node [highlight = (1-1-block)] { } ;
+% \end{NiceTabular}
+% &
+% \begin{NiceTabular}{CC!{\hspace{1cm}}C}
+% \Block{2-2}{our block} & & one \\
+% & & two \\
+% three & four & five \\
+% six & seven & eight \\
+% \CodeAfter
+% \tikz \node [highlight = (1-1-block-short)] { } ;
+% \end{NiceTabular}
+% \end{tabular}
+%
+%
+% \bigskip
% The construction of the node corresponding to the merged cells.
% \begin{macrocode}
\pgfpicture
@@ -10012,7 +10103,55 @@ version 2005/12/01 or later.
\l_tmpb_dim \l_tmpa_dim \l_tmpd_dim \l_tmpc_dim
\end { pgfscope }
% \end{macrocode}
+%
+%
%
+% \medskip
+% We construct the |short| node.
+% \begin{macrocode}
+ \dim_set_eq:NN \l_tmpb_dim \c_max_dim
+ \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int
+ {
+% \end{macrocode}
+% We recall that, when a cell is empty, no (normal) node is created in that
+% cell. That's why we test the existence of the node before using it.
+% \begin{macrocode}
+ \cs_if_exist:cT
+ { pgf @ sh @ ns @ \@@_env: - ##1 - #2 }
+ {
+ \pgfpointanchor { \@@_env: - ##1 - #2 } { west }
+ \dim_set:Nn \l_tmpb_dim { \dim_min:nn \l_tmpb_dim \pgf@x }
+ }
+ }
+% \end{macrocode}
+% If all the cells of the column were empty, |\l_tmpb_dim| has still the same
+% value |\c_max_dim|. In that case, you use for |\l_tmpb_dim| the value of the
+% position of the vertical rule.
+% \begin{macrocode}
+ \dim_compare:nNnT \l_tmpb_dim = \c_max_dim
+ {
+ \@@_qpoint:n { col - #2 }
+ \dim_set_eq:NN \l_tmpb_dim \pgf@x
+ }
+ \dim_set:Nn \l_tmpd_dim { - \c_max_dim }
+ \int_step_inline:nnn \l_@@_first_row_int \g_@@_row_total_int
+ {
+ \cs_if_exist:cT
+ { pgf @ sh @ ns @ \@@_env: - ##1 - #4 }
+ {
+ \pgfpointanchor { \@@_env: - ##1 - #4 } { east }
+ \dim_set:Nn \l_tmpd_dim { \dim_max:nn \l_tmpd_dim \pgf@x }
+ }
+ }
+ \dim_compare:nNnT \l_tmpd_dim = { - \c_max_dim }
+ {
+ \@@_qpoint:n { col - \@@_succ:n { #4 } }
+ \dim_set_eq:NN \l_tmpd_dim \pgf@x
+ }
+ \@@_pgf_rect_node:nnnnn
+ { \@@_env: - #1 - #2 - block - short }
+ \l_tmpb_dim \l_tmpa_dim \l_tmpd_dim \l_tmpc_dim
+% \end{macrocode}
%
% \medskip
% If the creation of the ``medium nodes'' is required, we create a ``medium
@@ -10033,6 +10172,16 @@ version 2005/12/01 or later.
\int_compare:nNnTF { #1 } = { #3 }
{
% \end{macrocode}
+% We take into account the case of a block of one row in the ``first row'' or
+% the ``end row''.
+% \begin{macrocode}
+ \int_compare:nNnTF { #1 } = 0
+ { \l_@@_code_for_first_row_tl }
+ {
+ \int_compare:nNnT { #1 } = \l_@@_last_row_int
+ \l_@@_code_for_last_row_tl
+ }
+% \end{macrocode}
% If the block has only one row, we want the label of the block perfectly
% aligned on the baseline of the row. That's why we have constructed a
% |\pgfcoordinate| on the baseline of the row, in the first column of the array.
@@ -10042,7 +10191,7 @@ version 2005/12/01 or later.
% \end{macrocode}
% We retrieve (in |\pgf@x|) the $x$-value of the center of the block.
% \begin{macrocode}
- \@@_qpoint:n { #1 - #2 - block }
+ \@@_qpoint:n { #1 - #2 - block - short }
% \end{macrocode}
% We put the label of the block which has been composed in |\l_@@_cell_box|.
% \begin{macrocode}
@@ -10054,11 +10203,11 @@ version 2005/12/01 or later.
%
% \medskip
% If the number of rows is different of $1$, we put the label of the block in
-% the center of the node (the label of the block has been composed in
+% the center of the (short) node (the label of the block has been composed in
% |\l_@@_cell_box|).
% \begin{macrocode}
{
- \pgftransformshift { \@@_qpoint:n { #1 - #2 - block } }
+ \pgftransformshift { \@@_qpoint:n { #1 - #2 - block - short } }
\pgfnode { rectangle } { center }
{ \box_use_drop:N \l_@@_cell_box } { } { }
}
@@ -10172,6 +10321,7 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
+% \bigskip
% \subsection*{The redefinition of the command \textbackslash dotfill }
%
% \begin{macrocode}
@@ -10199,6 +10349,7 @@ version 2005/12/01 or later.
{ \dim_compare:nNnT { \box_wd:N \l_@@_cell_box } = \c_zero_dim \@@_dotfill }
% \end{macrocode}
%
+% \bigskip
% \subsection*{The command \textbackslash diagbox}
%
%
@@ -10256,7 +10407,8 @@ version 2005/12/01 or later.
}
% \end{macrocode}
%
-% \subsection*{The command \textbackslash CodeAfter}
+% \bigskip
+% \subsection*{The keyword \textbackslash CodeAfter}
%
% In fact, in this subsection, we define the user command |\CodeAfter| for the
% case of the ``normal syntax''. For the case of ``light-syntax'', see the
@@ -10286,7 +10438,7 @@ version 2005/12/01 or later.
\str_if_eq:eeTF \@currenvir { #1 }
{ \end { #1 } }
% \end{macrocode}
-% It this is not the |\end| we are looking for, we put those tokens in
+% If this is not the |\end| we are looking for, we put those tokens in
% |\g_@@_code_after_tl| and we go on searching for the next command |\end| with
% a recursive call to the command |\@@_CodeAfter:n|.
% \begin{macrocode}
@@ -10302,7 +10454,6 @@ version 2005/12/01 or later.
% \bigskip
% \subsection*{We process the options at package loading}
%
-%
%
% We process the options when the package is loaded (with |\usepackage|) but we
% recommend to use |\NiceMatrixOptions| instead.
@@ -11151,6 +11302,14 @@ version 2005/12/01 or later.
% It's now possible to write |\begin{pNiceMatrix}a&b\\c&d\end{pNiceMatrix}^2|
% with the expected result.
%
+% \subsection*{Changes between versions 4.2 and 4.3}
+%
+% The horizontal centering of the content of a |\Block| is correct even when an
+% instruction such as |!{\qquad}| is used in the preamble of the array.
+%
+% It's now possible to use the command |\Block| in the ``last row''.
+%
+%
% \PrintIndex
%
% \tableofcontents
diff --git a/macros/latex/contrib/nicematrix/nicematrix.pdf b/macros/latex/contrib/nicematrix/nicematrix.pdf
index 184e8e4a59..31fb149271 100644
--- a/macros/latex/contrib/nicematrix/nicematrix.pdf
+++ b/macros/latex/contrib/nicematrix/nicematrix.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfpc/pdfpc.pdf b/macros/latex/contrib/pdfpc/pdfpc-doc.pdf
index 275a168ac1..9929c83f28 100644
--- a/macros/latex/contrib/pdfpc/pdfpc.pdf
+++ b/macros/latex/contrib/pdfpc/pdfpc-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/pdfpc/pdfpc-doc.tex b/macros/latex/contrib/pdfpc/pdfpc-doc.tex
new file mode 100644
index 0000000000..3130ff0e80
--- /dev/null
+++ b/macros/latex/contrib/pdfpc/pdfpc-doc.tex
@@ -0,0 +1,140 @@
+% This file is part of pdfpc.
+% Copyright (C) 2020 Evgeny Stambulchik
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License along
+% with this program; if not, write to the Free Software Foundation, Inc.,
+% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+% -------------------------------------------------------------------------------------------
+%
+% Allow for defining some meta data and simple textual notes for use
+% with the pdfpc presentation application <https://pdfpc.github.io>.
+%
+% -------------------------------------------------------------------------------------------
+%
+% Inspired by Carsten Brandt's <https://github.com/cebe/pdfpc-latex-notes>.
+%
+% -------------------------------------------------------------------------------------------
+%
+% Please report bugs and other problems as well as suggestions for improvements
+% to the issue tracker at github <https://github.com/pdfpc/pdfpc/>
+%
+% -------------------------------------------------------------------------------------------
+\documentclass[11pt]{ltxdoc}
+
+\usepackage{iftex}
+
+\usepackage[english]{babel}
+
+\usepackage{hyperref}
+
+\newcommand*{\sty}[1]{\textsf{#1}}
+\def\param#1{\textit{\rmfamily\mdseries\ensuremath{\langle}#1\ensuremath{\rangle}}}
+
+
+\title{The \sty{pdfpc} package \\ {\large\url{https://github.com/pdfpc/pdfpc}}}
+\author{Evgeny Stambulchik}
+\date{2020/06/10 (v0.4.0)}
+
+\hypersetup{pdftitle={The pdfpc package}, pdfauthor={Evgeny Stambulchik}}
+
+\begin{document}
+\maketitle
+\thispagestyle{empty}
+
+\begin{abstract}
+This package provides a convenient way to specify notes and to define certain
+meta properties of the presentation when used with
+\href{https://pdfpc.github.io/}{PDF Presenter Console (\texttt{pdfpc}), a
+GPLv2+ licensed multi-monitor PDF presentation viewer application available on
+GitHub}\footnote{\url{https://pdfpc.github.io/}}.
+\end{abstract}
+
+\clearpage
+\section*{Dependencies and other requirements}
+
+\sty{pdfpc} requires the use of \LaTeXe.
+
+It depends on the following packages:
+
+\begin{multicols}{4}\sffamily\centering
+kvoptions \\ xstring \\ pdfcomment \\ hyperxmp
+\end{multicols}
+
+\section*{License}
+
+\textcopyright\ 2020 Evgeny Stambulchik
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3 of the License, or
+(at your option) any later version.
+
+This work consists of the following files:
+
+\begin{itemize}
+ \item "pdfpc.sty",
+ \item "pdfpc-doc.tex"
+ \item "pdfpc-doc.pdf" \emph{(compiled)}
+\end{itemize}
+
+\clearpage
+
+\part{The documentation}
+\section*{Loading \sty{pdfpc}}
+
+Load \sty{pdfpc} by adding \cmd{\usepackage\{pdfpc\}} to your preamble.
+
+The following \param{options} may be given as comma-separated list:
+
+\begin{itemize}
+\item \texttt{duration}
+\item \texttt{starttime}
+\item \texttt{endtime}
+\item \texttt{enduserslide}
+\item \texttt{lastminutes}
+\item \texttt{hidenotes}
+\item \texttt{overridenote}
+\item \texttt{defaulttransition} (needs pdfpc v4.5 or higher)
+\end{itemize}
+
+The meaning and possible values of most of these options are documented in
+\textit{pdfpcrc(5)} man page of the pdfpc program. The rest are explained below.
+
+To add a note to a slide (must not be longer than one paragraph):
+
+{\leftskip2.5em%
+\cmd{\pdfpcnote\{Text of a note\}}
+}\par
+
+The pdfpc package can be used standalone or together with beamer. In
+the later case, it may be desirable to continue using the \cmd{\note}
+command. To this end, the \texttt{overridenote} option should be provided.
+Please note though, that this will work only in simple cases.
+
+If you prefer using full-featured beamer notes rendered alongside the
+presentation (\cmd{\setbeameroption\{show notes on second screen\}}), the pdfpc
+package will autodetect it, so using the \texttt{--notes} command-line option is
+unnecessary. To override the autodetection, use the \texttt{notesposition}
+option, accepting the same values (right/left/top/bottom/none).
+
+When sharing slides, one may want to omit the (private) notes, by using the
+\texttt{hidenotes} option. Enabling it together with \texttt{overridenote} will
+disable the beamer notes as well.
+
+\StopEventually{%
+ \clearpage
+ \PrintChanges}
+\clearpage
+
+\Finale
+\end{document}
diff --git a/macros/latex/contrib/pdfpc/pdfpc.ins b/macros/latex/contrib/pdfpc/pdfpc.ins
deleted file mode 100644
index 905306c93e..0000000000
--- a/macros/latex/contrib/pdfpc/pdfpc.ins
+++ /dev/null
@@ -1,38 +0,0 @@
-\input docstrip
-
-\preamble
- pdfpc.dtx
- Copyright (C) 2020 Evgeny Stambulchik
-
- This file is part of pdfpc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
- This work consists of the files pdfpc.dtx, pdfpc.ins, and the derived file
- pdfpc.sty
-
-\endpreamble
-
-\askforoverwritefalse
-
-\generate
-{%
- \file{pdfpc.sty}{%
- \usepreamble\defaultpreamble
- \usepostamble\defaultpostamble
- \from{pdfpc.dtx}{pdfpc.sty,package}%
- }%
-}
-\endbatchfile
diff --git a/macros/latex/contrib/pdfpc/pdfpc.dtx b/macros/latex/contrib/pdfpc/pdfpc.sty
index ad5430f324..8a7c357063 100644
--- a/macros/latex/contrib/pdfpc/pdfpc.dtx
+++ b/macros/latex/contrib/pdfpc/pdfpc.sty
@@ -1,25 +1,3 @@
-%\iffalse
-%<*package>
-%% \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
-%% Lower-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
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
-%</package>
-%\fi
-%\iffalse
-% Doc-Source file to use with LaTeX2e
-%
% This file is part of pdfpc.
% Copyright (C) 2020 Evgeny Stambulchik
%
@@ -51,21 +29,15 @@
% to the issue tracker at github <https://github.com/pdfpc/pdfpc/>
%
% -------------------------------------------------------------------------------------------
-%\fi
%
-% Identify the package and force \LaTeXe:
-% \begin{macrocode}
-\ProvidesPackage{pdfpc}[2019/12/03 v0.2.1 PDFPC]
+\ProvidesPackage{pdfpc}[2020/06/10 v0.4.0 PDFPC]
\NeedsTeXFormat{LaTeX2e}
-% \end{macrocode}
%
% Require additional packages needed by \sty{pdfpc}:
-% \begin{macrocode}
\RequirePackage{kvoptions}
\RequirePackage{xstring}
\RequirePackage{pdfcomment}
\RequirePackage{hyperxmp}
-% \end{macrocode}
%
\SetupKeyvalOptions{
family=PDFPC,
@@ -77,8 +49,10 @@
\DeclareStringOption{endtime}
\DeclareStringOption{enduserslide}
\DeclareStringOption{lastminutes}
+\DeclareBoolOption{hidenotes}
\DeclareBoolOption{overridenote}
\DeclareStringOption{notesposition}
+\DeclareStringOption{defaulttransition}
\DeclareDefaultOption{\@unknownoptionerror}
%
\ProcessKeyvalOptions*
@@ -116,7 +90,6 @@
\fi%
%
% Guesswork for beamer/pgfpages notes
-% \begin{macrocode}
\ifx\PDFPC@notesposition\pdfpc@notespositionauto%
\def\PDFPC@notesposition{none}%
\def\pdfpc@onepaperheight{\paperheight}%
@@ -144,10 +117,8 @@
\fi%
\fi%
\fi%
-% \end{macrocode}
%
% Our schema
-% \begin{macrocode}
\newcommand*{\pdfpc@schema}{%
\hyxmp@add@to@xml{%
______<rdf:Description xmlns:pdfpc="https://github.com/pdfpc/pdfpc">^^J%
@@ -158,20 +129,21 @@ ______<rdf:Description xmlns:pdfpc="https://github.com/pdfpc/pdfpc">^^J%
\hyxmp@add@simple{pdfpc:EndUserSlide}{\PDFPC@enduserslide}%
\hyxmp@add@simple{pdfpc:LastMinutes}{\PDFPC@lastminutes}%
\hyxmp@add@simple{pdfpc:NotesPosition}{\PDFPC@notesposition}%
+ \hyxmp@add@simple{pdfpc:DefaultTransition}{\PDFPC@defaulttransition}%
\hyxmp@add@to@xml{%
______</rdf:Description>^^J%
}%
}
%
% Piggybacking on the hyperxmp schema...
-% \begin{macrocode}
\let\oldhyxmp@pdf@schema\hyxmp@pdf@schema
\renewcommand{\hyxmp@pdf@schema}{{\oldhyxmp@pdf@schema}{\pdfpc@schema}}
-% \end{macrocode}
-
+%
% Note command
-% \begin{macrocode}
-\newcommand{\pdfpcnote}[1]{\pdfmargincomment{#1}}
-% \end{macrocode}
+\ifPDFPC@hidenotes%
+ \newcommand{\pdfpcnote}[1]{}
+\else%
+ \newcommand{\pdfpcnote}[1]{\pdfmargincomment{#1}}
+\fi%
%
\endinput