summaryrefslogtreecommitdiff
path: root/macros/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-06-21 03:02:27 +0000
committerNorbert Preining <norbert@preining.info>2020-06-21 03:02:27 +0000
commit9f10616edfed3b801246055ec6d06631ff60f9b1 (patch)
treed143be5217ed52f0895aa56a068090d530966afb /macros/latex
parenteb6236a4ba3566f36e4f6f8cf78f39ea56861520 (diff)
CTAN sync 202006210302
Diffstat (limited to 'macros/latex')
-rw-r--r--macros/latex/contrib/apa7/apa7.dtx36
-rw-r--r--macros/latex/contrib/apa7/apa7.pdfbin522083 -> 522679 bytes
-rw-r--r--macros/latex/contrib/apa7/samples/longsample.pdfbin196731 -> 196731 bytes
-rw-r--r--macros/latex/contrib/apa7/samples/shortsample.pdfbin64110 -> 64110 bytes
-rw-r--r--macros/latex/contrib/hyperxmp/hyperxmp.dtx491
-rw-r--r--macros/latex/contrib/hyperxmp/hyperxmp.pdfbin1326332 -> 1341156 bytes
-rw-r--r--macros/latex/contrib/pict2e/README.md3
-rw-r--r--macros/latex/contrib/pict2e/p2e-drivers.pdfbin216020 -> 216020 bytes
-rw-r--r--macros/latex/contrib/pict2e/pict2e.dtx83
-rw-r--r--macros/latex/contrib/pict2e/pict2e.pdfbin887097 -> 889454 bytes
10 files changed, 415 insertions, 198 deletions
diff --git a/macros/latex/contrib/apa7/apa7.dtx b/macros/latex/contrib/apa7/apa7.dtx
index fcaeda30fb..2f816a3f8a 100644
--- a/macros/latex/contrib/apa7/apa7.dtx
+++ b/macros/latex/contrib/apa7/apa7.dtx
@@ -4,11 +4,11 @@
% %
% CHANGE THESE VALUES WITH EACH NEW RELEASE: %
% %
-%<class>\ProvidesClass{apa7}[2020/05/27 v1.08 APA formatting (7th edition)]
+%<class>\ProvidesClass{apa7}[2020/06/19 v1.09 APA formatting (7th edition)]
% %
%<*internal> %
-\def\apaSevenVersionDate{2020/05/27}
-\def\apaSevenVersionNumber{1.08}
+\def\apaSevenVersionDate{2020/06/19}
+\def\apaSevenVersionNumber{1.09}
% %
% %
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -245,6 +245,8 @@ and the derived files apa7.ins,
%
% \changes{v1.08}{2020/05/27}{Added support for optional running head (shorttitle) in stu mode.}
%
+% \changes{v1.09}{2020/06/19}{Fixed note command (will no longer print "Author Note" header).}
+%
% \begin{abstract}
% The \textit{Publication Manual} of the American Psychological
% Association is widely used in the social sciences. The most
@@ -441,7 +443,7 @@ and the derived files apa7.ins,
% \begin{itemize}
% \item \DescribeMacro{\note}|\note|\marg{note-text}: Notation of
% manuscript date or other information desired beneath the
-% affiliation line
+% affiliation line (not part of the APA 7th edition specification for title page)
% \item \DescribeMacro{\journal}|\journal|\marg{journal-name}: Journal
% name or other note; typeset in the top left header of page 1
% (|jou| and |doc| modes only); to change the starting page to a
@@ -2511,12 +2513,9 @@ and the derived files apa7.ins,
\@affilSix \vspace{0.25in} \\ }}}}}
%% --- thp 2006/01/05 end of six-author display
- \@ifundefined{@note}{}{
- \vfill
- \section{\normalfont\normalsize\textbf\acksname}
- \raggedright
- \setlength{\parindent}{0.5in}
- \indent\@note\par}
+ \@ifundefined{@note}
+ {\vspace*{\baselineskip} }
+ {\@note}
}{% mask author identity -- show nothing in the author or author note space
}
@@ -2542,12 +2541,9 @@ and the derived files apa7.ins,
\@professor \\
\@duedate \\
- \@ifundefined{@note}{}{
- \vfill
- \section{\normalfont\normalsize\textbf\acksname}
- \raggedright
- \setlength{\parindent}{0.5in}
- \indent\@note\par}
+ \@ifundefined{@note}
+ {\vspace*{\baselineskip} }
+ {\@note}
\end{center}
@@ -2555,12 +2551,10 @@ and the derived files apa7.ins,
{}
{%
\vfill%
- \begin{center}%
- \acksname%
- \end{center}%
- \protect\raggedright
+ \section{\normalfont\normalsize\textbf\acksname}
+ \raggedright
\setlength{\parindent}{0.5in}
- \indent\par\@acks%
+ \indent\@acks\par%
}
}
diff --git a/macros/latex/contrib/apa7/apa7.pdf b/macros/latex/contrib/apa7/apa7.pdf
index 50bbb1c9c6..68b928107e 100644
--- a/macros/latex/contrib/apa7/apa7.pdf
+++ b/macros/latex/contrib/apa7/apa7.pdf
Binary files differ
diff --git a/macros/latex/contrib/apa7/samples/longsample.pdf b/macros/latex/contrib/apa7/samples/longsample.pdf
index 204fa117cf..61af7536c3 100644
--- a/macros/latex/contrib/apa7/samples/longsample.pdf
+++ b/macros/latex/contrib/apa7/samples/longsample.pdf
Binary files differ
diff --git a/macros/latex/contrib/apa7/samples/shortsample.pdf b/macros/latex/contrib/apa7/samples/shortsample.pdf
index 8ceb61d7fb..aafd245226 100644
--- a/macros/latex/contrib/apa7/samples/shortsample.pdf
+++ b/macros/latex/contrib/apa7/samples/shortsample.pdf
Binary files differ
diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.dtx b/macros/latex/contrib/hyperxmp/hyperxmp.dtx
index e4e4f52837..9861784479 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/06/13 v5.3 Store hyperref metadata in XMP format]
+ [2020/06/19 v5.4 Store hyperref metadata in XMP format]
%</package>
%
%<*driver>
@@ -112,7 +112,7 @@
%</driver>
% \fi
%
-% \CheckSum{2610}
+% \CheckSum{2671}
%
% \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
@@ -190,8 +190,16 @@
%
% ^^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}}}
+% \DeclareRobustCommand{\pkgname}[1]{^^A
+% \mbox{\textsf{#1}}^^A
+% \SortIndex{#1}{\textsf{#1} (package)}^^A
+% \index{packages&#1=\textsf{#1}}^^A
+% }
+% \DeclareRobustCommand{\clsname}[1]{^^A
+% \mbox{\textsf{#1}}^^A
+% \SortIndex{#1}{\textsf{#1} (class)}^^A
+% \index{classes&#1=\textsf{#1}}^^A
+% }
% \makeatletter
% \DeclareRobustCommand{\xmpprop}[2][]{^^A XMP property
% \def\xmppropopt{#1}^^A
@@ -210,7 +218,11 @@
% }
% \makeatother
% \index{XMP=\acrostyle {XMP}&properties|see{properties, \acrostyle{XMP}}}
-% \DeclareRobustCommand{\pdfterm}[1]{\mbox{\textsf{#1}}\SortIndex{#1}{\textsf{#1}}}
+% \DeclareRobustCommand{\pdfterm}[1]{^^A
+% \mbox{\textsf{#1}}^^A
+% \SortIndex{#1}{\textsf{#1}}^^A
+% \index{PDF=\acrostyle{PDF}&#1=\textsf{#1}}^^A
+% }
% \DeclareRobustCommand{\cmdname}[1]{\mbox{\texttt{#1}}\SortIndex{#1}{\texttt{#1}}}
% \DeclareRobustCommand{\optname}[1]{^^A
% \mbox{\textsf{#1}}^^A
@@ -272,6 +284,15 @@
% \DeclareRobustCommand{\Lua}{^^A
% Lua\index{Lua}^^A
% }
+% \DeclareRobustCommand{\Koma}{^^A
+% Koma^^A
+% \SortIndex{Koma}{Koma (class)}^^A
+% \index{classes&Koma}^^A
+% }
+% \DeclareRobustCommand{\ACMclass}{^^A
+% \acro{ACM}^^A
+% \index{classes&ACM=\acrostyle{ACM}}^^A
+% }
%
% ^^A Define an environment just like macro but for Lua functions.
% \makeatletter
@@ -1143,15 +1164,16 @@
% \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}).
+% via the \Koma\ letter classes (e.g.,~\clsname{scrlttr2}) and the
+% \ACMclass\ 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.
+% If a document uses either or \pkgname{babel} or \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{babel}
+% and \pkgname{polyglossia} for a list of all languages used in the
+% document and include this list in an \acro{XMP} \xmpprop{dc:language}
+% element.
%
% \usagenote{Multilingual metadata}
% \label{note:multilingual}
@@ -2212,6 +2234,7 @@
}{}%
}%
% \end{macrocode}
+% \Needspace{6\baselineskip}
% \begin{macro}{\KV@Hyp@pdfauthor}
% \begin{macro}{\xmpcomma}
% \begin{macro}{\xmpquote}
@@ -2337,6 +2360,26 @@
% \end{macro}
% \end{macro}
%
+% \begin{macro}{\hyxmp@concated@metadata}
+% Assume that if the document loaded either \pkgname{babel} or
+% \pkgname{polyglossia} it will eventually define one or more languages
+% that \pkgname{hyperxmp} can list within a \xmpprop{dc:language}
+% element.
+% \begin{macrocode}
+\edef\hyxmp@concated@metadata{}
+\AtEndPreamble{%
+ \@ifpackageloaded{babel}{%
+ \edef\hyxmp@concated@metadata{babel}%
+ }{%
+ \@ifpackageloaded{polyglossia}{%
+ \edef\hyxmp@concated@metadata{polyglossia}%
+ }{%
+ }%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\hyxmp@find@metadata}
% \begin{macro}{\hyxmp@concated@metadata}
% Issue a warning message if the author failed to specify any metadata
@@ -2348,6 +2391,7 @@
% \begin{macrocode}
\newcommand*{\hyxmp@find@metadata}{%
\edef\hyxmp@concated@metadata{%
+ \hyxmp@concated@metadata
\@baseurl
\@pdfauthor
\@pdfauthortitle
@@ -2452,11 +2496,151 @@
% \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}
+% If \cs{@pdflang} is not set, see if we can detect the document
+% language via either the \pkgname{babel} or \pkgname{polyglossia}
+% packages.
+% \begin{macrocode}
+ \@if@def@and@nonempty{@pdflang}{%
+ }{%
+ \hyxmp@detect@langs
+ }%
+% \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}
+% dictionary, the metadata must match. This requirement poses a problem
+% for a user-unspecified \optname{pdfcreationdate} in the context of
+% \XeLaTeX\@. In this case we explicitly define |\@pdfcreationdate| as
+% |\hyxmp@today@pdf| to prevent the \cmdname{xdvipdfmx} back-end
+% processor from detecting a missing \pdfterm{CreationDate} in the
+% \pdfterm{Info} dictionary and adding its own---typically a few seconds
+% after \pkgname{hyperxmp} has constructed an \xmpprop{xmp:CreateDate}
+% for the \acro{XMP} metadata and leading to a metadata mismatch.
+% \begin{macrocode}
+ \@ifundefined{XeTeXversion}{}{%
+ \@ifmtargexp{\@pdfcreationdate}{%
+ \let\@pdfcreationdate=\hyxmp@today@pdf
+ }%
+ {}%
+ }%
+% \end{macrocode}
+% If the document claims to comply with one or more \acro{PDF}
+% standards, check that all of the requisite metadata are present.
+% \begin{macrocode}
+ \hyxmp@check@standards
+% \end{macrocode}
+% Older versions of \pkgname{hyperref} write the \pdfterm{Info}
+% dictionary to the \acro{PDF} file at the end of the document. New
+% versions of \pkgname{hyperref} write the \pdfterm{Info} dictionary to
+% the \acro{PDF} file at the \emph{beginning} of the document. For
+% compatibility with both old and new \pkgname{hyperref} implementations
+% we suppress writing the \pdfterm{Info} dictionary here, at the
+% beginning of the document.
+% \changes{v4.1}{2019/04/02}{Invoke
+% \protect\cs{hyxmp@no@info@lists} at the beginning of the
+% document, for compatibility with both newer and older versions of
+% \protect\pkgname{hyperref}}
+% \begin{macrocode}
+ \hyxmp@no@info@lists
+% \end{macrocode}
+% We wait until the end of the document to construct the \acro{XMP}
+% packet and write it to the \acro{PDF} document catalog. This gives
+% the author ample opportunity to provide metadata to \pkgname{hyperref}
+% and thereby \pkgname{hyperxmp}.
+% \begin{macrocode}
+ \hyxmp@at@end{%
+ \hyxmp@find@metadata
+ \hyxmp@embed@packet
+ }%
+ }{%
+ \PackageWarningNoLine{hyperxmp}{%
+ \jobname.tex failed to include a\MessageBreak
+ \string\usepackage\string{hyperref\string}
+ in the preamble.\MessageBreak
+ Consequently, all hyperxmp functionality will be\MessageBreak
+ disabled}%
+ }%
+}
+% \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}| and at the |\end{document}|.
+% We additionally identify here the natural language(s) in use because
+% these aren't known until the end of the document when provided by
+% \pkgname{babel} or \pkgname{polyglossia}. Also, \pkgname{hyperref}
+% forbids changes to \optname{pdflang} past the |\begin{document}|.
+% \changes{v1.3}{2011/04/25}{Introduced the \protect\optname{pdfmetalang}
+% package option, which enables an author to specify the language in which he
+% wrote the document's metadata}
+% \changes{v2.0}{2012/08/02}{New \cs{AtBeginDocument} code from Heiko
+% Oberdiek to properly encode \cs{@pdfmetalang}}
+% \changes{v3.3}{2017/07/21}{Don't overwrite an existing
+% \protect\optname{pdfmetalang} with \protect\optname{pdflang} or
+% \protect\texttt{x-default}. This addresses a bug report by Niklas
+% Beisert}
+% \changes{v5.4}{2020/06/18}{Moved the automatic assignment of
+% \protect\cs{@pdflang} and \protect\cs{@pdfmetalang} from
+% \protect\cs{hyxmp@auto@assign@data} to within a call to
+% \protect\cs{hyxmp@at@end}}
+% \begin{macrocode}
+\hyxmp@at@end{%
+ \hyxmp@set@dc@lang
+ \ifx\@pdfmetalang\@empty
+ \ifx\@pdflang\@empty
+ \let\@pdfmetalang=\hyxmp@x@default
+ \else
+ \edef\@pdfmetalang{\@pdflang}%
+ \fi
+ \fi
+ \hyxmp@xmlify\@pdfmetalang
+ \hyxmp@auto@assign@data
+}
+% \end{macrocode}
+%
+%
+% \subsection{Advanced metadata detection}
+%
+% \pkgname{hyperxmp} strives to be as convenient and user-friendly as
+% possible. To that end, we try to automatically detect as much
+% metadata as possible. The author can of course augment or override
+% autodetected metadata by explicitly providing values to
+% \cs{hypersetup}, but the hope is that we can save the author some
+% effort in many cases.
+%
+% In this section, we identify additional metadata we can use. Most of
+% the functionality is class- or package-specific. For example, we
+% check for phone numbers provided to the \Koma\ letter classes via
+% |\setkomavar{fromphone}{|\dots|}| and/or
+% |\setkomavar{frommobilephone}{|\dots|}|, street addresses provided to
+% the \ACMclass\ article class via \cs{affiliation}, and languages
+% the \pkgname{polyglossia} package is instructed to load via
+% \cs{setdefaultlanguage} and \cs{setotherlanguage}.
+%
% \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).
+% numbers provided to a \Koma\ letter class (mobile and landline).
% \begin{macrocode}
\newcommand*{\hyxmp@set@koma@phones}{%
\@if@def@and@nonempty{scr@frommobilephone@var}{%
@@ -2525,30 +2709,6 @@
% \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
-% language, specified to \pkgname{hyperref} with the \protect\optname{pdflang}
-% option. If the author did not specify a language, we use |x-default|
-% as the metadata language.
-% \changes{v1.3}{2011/04/25}{Introduced the \protect\optname{pdfmetalang}
-% package option, which enables an author to specify the language in which he
-% wrote the document's metadata}
-% \changes{v2.0}{2012/08/02}{New \cs{AtBeginDocument} code from Heiko
-% Oberdiek to properly encode \cs{@pdfmetalang}}
-% \changes{v3.3}{2017/07/21}{Don't overwrite an existing
-% \protect\optname{pdfmetalang} with \protect\optname{pdflang} or
-% \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
- \fi
- \hyxmp@xmlify\@pdfmetalang
-% \end{macrocode}
% If the author left \optname{pdftitle} blank but specified |\title|,
% use the title for \optname{pdftitle}. Do likewise for various other
% metadata: identify author-provided information that can be co-opted
@@ -2558,7 +2718,7 @@
% 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}
+% \protect\pkgname{hyperxmp} use the \Koma\ letter classes's metadata}
% \begin{macrocode}
\hyxmp@use@first@valid{pdftitle}{\@pdftitle}{%
\scr@subject@var,%
@@ -2728,6 +2888,8 @@
% ``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.
+% \changes{v5.4}{2020/06/16}{Bug fix: Correct a missing ``else'' argument
+% in two invocations of \protect\cs{@if@def@and@nonempty}}
% \begin{macrocode}
\@if@def@and@nonempty{@acmDOI}{%
\IfSubStr{\@acmDOI}{10.1145/1122445.1122456}{}{%
@@ -2738,6 +2900,7 @@
}%
}%
}%
+ {}%
% \end{macrocode}
% \begin{macro}{\hyxmp@strip@isbn@date}
% \begin{macro}{\hyxmp@acm@isbn}
@@ -2761,6 +2924,7 @@
}%
}%
}%
+ {}%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2819,16 +2983,17 @@
% \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
+% \pkgname{hyperref}) and in the Dublin Core \xmpprop{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}.
+% \xmpprop{dc:language} accepts multiple languages. If the document
+% loads either \pkgname{babel} or \pkgname{polyglossia} and does not
+% specify \optname{pdflang} in \cs{hypersetup}, \cs{hyxmp@set@dc@lang}
+% is redefined below (in \cs{hyxmp@detect@langs}) to set
+% \cs{hyxmp@dc@lang} to \pkgname{babel}\slash\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
@@ -2837,119 +3002,139 @@
% \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@detect@langs}
+% If \optname{pdflang} was not specified, try to determine the document
+% language(s) using either \pkgname{babel}'s or \pkgname{polyglossia}'s
+% definitions. If so, we redefine \cs{hyxmp@set@dc@lang} as a
+% comma-separate list of languages used in the document.
+% \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}
+% \changes{v5.4}{2020/06/16}{Refactored language detection into a
+% separate command}
% \begin{macrocode}
-\AtEndPreamble{%
- \@ifpackageloaded{hyperref}{%
+\newcommand*{\hyxmp@detect@langs}{%
+ \@ifundefined{mainbcp47id}{%
+ \@ifundefined{LocaleForEach}{%
% \end{macrocode}
-% In older versions of \pkgname{hyperref}, \cs{@pdflang} is set to
+% The document doesn't appear to have loaded either \pkgname{babel} or
+% \pkgname{polyglossia}. In this case we have one small task to do. 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.
+% metadata. To avoid that situation we explicitly set \cs{@pdflang} to
+% \cs{@empty} to avoid problems with non-expandable symbols.
% \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}%
+ \let\@pdflang=\@empty
+ }{%
+% \end{macrocode}
+% Use \pkgname{babel}'s \cs{LocaleForEach} and \cs{getlocaleproperty} to
+% construct a comma-separate list of all document languages. We also
+% set \cs{@pdflang} within \cs{hyxmp@set@dc@lang}.
+% (\cs{hyxmp@detect@langs} should only be called if \cs{@pdflang} is
+% empty.) Unlike \pkgname{polyglossia}, \pkgname{babel} does not
+% provide information about the main language until after the
+% |\begin{document}| so we have to wait until \cs{hyxmp@set@dc@lang} is
+% called to set it.
+% \changes{v5.4}{2020/06/17}{Added support for \protect\pkgname{babel}}
+% \begin{macrocode}
+ \BabelEnsureInfo
+ \renewcommand*{\hyxmp@set@dc@lang}{%
+ \getlocaleproperty\@pdflang{\bbl@main@language}{identification/tag.bcp47}%
+ \hyxmp@write@pdflang
+ \let\hyxmp@dc@lang=\relax
+ \LocaleForEach{%
+ \getlocaleproperty\hyxmp@lang@tag{####1}{identification/tag.bcp47}%
+ \ifx\hyxmp@dc@lang\relax
+ \edef\hyxmp@dc@lang{\hyxmp@lang@tag}%
+ \else
+ \edef\hyxmp@dc@lang{\hyxmp@dc@lang,\hyxmp@lang@tag}%
+ \fi
}%
}%
- \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}
-% dictionary, the metadata must match. This requirement poses a problem
-% for a user-unspecified \optname{pdfcreationdate} in the context of
-% \XeLaTeX\@. In this case we explicitly define |\@pdfcreationdate| as
-% |\hyxmp@today@pdf| to prevent the \cmdname{xdvipdfmx} back-end
-% processor from detecting a missing \pdfterm{CreationDate} in the
-% \pdfterm{Info} dictionary and adding its own---typically a few seconds
-% after \pkgname{hyperxmp} has constructed an \xmpprop{xmp:CreateDate}
-% for the \acro{XMP} metadata and leading to a metadata mismatch.
+% Use \pkgname{polyglossia}'s \cs{mainbcp47id} as the document's main
+% language and its \cs{xpg@bcp@loaded} as a comma-separated list of all
+% document languages.
% \begin{macrocode}
- \@ifundefined{XeTeXversion}{}{%
- \@ifmtargexp{\@pdfcreationdate}{%
- \let\@pdfcreationdate=\hyxmp@today@pdf
- }%
- {}%
+ \xdef\@pdflang{\csname mainbcp47id\endcsname}%
+ \renewcommand*{\hyxmp@set@dc@lang}{%
+ \edef\hyxmp@dc@lang{\xpg@bcp@loaded}%
}%
+ }%
+}
% \end{macrocode}
-% If the document claims to comply with one or more \acro{PDF}
-% standards, check that all of the requisite metadata are present.
+% \end{macro}
+%
+% \begin{macro}{\hyxmp@write@pdflang}
+% Here's a conundrum: \pkgname{babel} doesn't provide access to
+% information on the document's main language until after the
+% |\begin{document}|. However, \pkgname{hyperref} allows
+% \optname{pdflang} to be set only \emph{before} the |\begin{document}|.
+% So what do we do?
+%
+% Note that the underlying \cs{@pdflang} macro serves two purposes:
+% \pkgname{hyperref} uses it to set the \pdfterm{Lang} entry in the
+% \acro{PDF} document catalog, and \pkgname{hyperxmp} uses it as the
+% default metadata language. The latter is used in \xmpprop{dc:title}
+% and other \acro{XMP} properties that can include per-language
+% variants. We set \cs{@pdflang} once we have the main-language
+% information from \pkgname{babel}. As this is too late for
+% \pkgname{hyperref}, we bypass \pkgname{hyperref} and manually write
+% the \pdfterm{Lang} key into the document catalog. This is a bit
+% kludgy, but we do leverage as much of \pkgname{hyperref}'s
+% infrastructure as possible to increase \cs{hyxmp@write@pdflang}'s
+% robustness.
+% \changes{v5.4}{2020/06/19}{Added this macro}
+% \begin{macrocode}
+\newcommand*{\hyxmp@write@pdflang}{%
+ \@ifundefined{pdfmark}{%
+ \@ifundefined{@pdfm@mark}{%
+ \@ifundefined{pdfcatalog}{%
+% \end{macrocode}
+% We don't recognize the \tex\ engine or \acro{PDF} generator. (This is
+% unexpected.) We therefore issue a warning message and take no further
+% action.
+% \begin{macrocode}
+ \PackageWarning{hyperxmp}{Unknown PDF generator; not setting the language (\@pdflang) in the PDF catalog}%
+ }{%
+% \end{macrocode}
+% We're running either \pdfTeX\ or \LuaTeX\@. (\pkgname{hyperref}
+% defines \cs{pdfcatalog} in the latter case.)
% \begin{macrocode}
- \hyxmp@check@standards
+ \pdfcatalog{/Lang (\@pdflang)}%
+ }%
+ }{%
% \end{macrocode}
-% Older versions of \pkgname{hyperref} write the \pdfterm{Info}
-% dictionary to the \acro{PDF} file at the end of the document. New
-% versions of \pkgname{hyperref} write the \pdfterm{Info} dictionary to
-% the \acro{PDF} file at the \emph{beginning} of the document. For
-% compatibility with both old and new \pkgname{hyperref} implementations
-% we suppress writing the \pdfterm{Info} dictionary here, at the
-% beginning of the document.
-% \changes{v4.1}{2019/04/02}{Invoke
-% \protect\cs{hyxmp@no@info@lists} at the beginning of the
-% document, for compatibility with both newer and older versions of
-% \protect\pkgname{hyperref}}
+% We're running either \XeTeX\ or \tex~+
+% \texttt{dvipdfm}.\SortIndex{dvipdfm}{\texttt{dvipdfm}}.
% \begin{macrocode}
- \hyxmp@no@info@lists
+ \@pdfm@mark{docview << /Lang (\@pdflang) >>}%
+ }%
+}{%
% \end{macrocode}
-% We wait until the end of the document to construct the \acro{XMP}
-% packet and write it to the \acro{PDF} document catalog. This gives
-% the author ample opportunity to provide metadata to \pkgname{hyperref}
-% and thereby \pkgname{hyperxmp}.
+% We're running either \tex~+ \Dvips~+ Adobe Acrobat Distiller (or other
+% converter from PostScript to \acro{PDF}).
% \begin{macrocode}
- \hyxmp@at@end{%
- \hyxmp@find@metadata
- \hyxmp@embed@packet
+ \pdfmark{%
+ pdfmark=/PUT,Raw={%
+ \string{Catalog\string} <<
+ /Lang (\@pdflang)
+ >>
+ }%
}%
- }{%
- \PackageWarningNoLine{hyperxmp}{%
- \jobname.tex failed to include a\MessageBreak
- \string\usepackage\string{hyperref\string}
- in the preamble.\MessageBreak
- Consequently, all hyperxmp functionality will be\MessageBreak
- disabled}%
}%
}
% \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}
+% \end{macro}
%
%
% \subsection{Manipulating author-supplied data}
@@ -4628,7 +4813,7 @@ _______________________________________________________________^^J%
% Assign |\hyxmp@major@minor| to be the \acro{PDF} version targeted by
% the running \TeX\ engine.
% \changes{v5.2}{2020/05/10}{Added this macro. \string\pkgname{hyperxmp}
-% now correctly specifies \string\xmpterm{pdf:PDFVersion} when
+% now correctly specifies \string\xmpprop{pdf:PDFVersion} when
% generating \string\acro{PDF}~2.0+. Thanks to Ulrike Fischer for
% alerting me to \string\acro{PDF}~2.0's availability in the
% \string\TeX\ ecosystem and informing me how to activate it}
@@ -4852,11 +5037,11 @@ ______</dc:#2>^^J%
% \end{macro}
%
% \begin{macro}{\hyxmp@cond@dc@identifier}
-% Conditionally add a \xmpterm{dc:identifier} tag. Given a prefix
+% Conditionally add a \xmpprop{dc:identifier} tag. Given a prefix
% string~(|#1|) and a main string~(|#2|), wrap these in a
-% \xmpterm{dc:identifier} if the main string is nonempty and
+% \xmpprop{dc:identifier} if the main string is nonempty and
% |\hyxmp@xmlified| \emph{is} empty (implying the
-% \xmpterm{dc:identifier} has not yet been written).
+% \xmpprop{dc:identifier} has not yet been written).
% \changes{v5.2}{2020/04/29}{Added this macro}
% \begin{macrocode}
\newcommand*{\hyxmp@cond@dc@identifier}[2]{%
@@ -4883,14 +5068,19 @@ ______</dc:#2>^^J%
% the author specified \optname{pdftype}, and the
% \xmpprop{dc:identifier} if the author specified
% \optname{pdfidentifier} or if we can derive it from other options. We
-% also specify the \xmpprop{dc:date} property using the date the
-% document was run through \LaTeX\ and the \xmpprop{dc:source} property
-% using the base name of the source file with |.tex| appended.
+% also specify the \xmpprop{dc:source} property using the base name of
+% the source file with |.tex| appended and the \xmpprop{dc:date}
+% property using the date the document was run through \LaTeX---unless
+% the author specified \optname{pdfdate}, in which case we use that.
% \changes{v2.0}{2012/08/26}{Added support for \xmpprop{dc:language}
% and \xmpprop{dc:source}}
% \changes{v2.4}{2013/12/21}{Made \xmpprop{dc:language} a \xmpterm{Bag}
% instead of an individual item so as to conform to the latest
% \acro{XMP} specifications, a detail identified by Florian Breitwieser}
+% \changes{v5.3}{2020/06/13}{Include all languages used in the document
+% in \protect\xmpprop{dc:language}}
+% \changes{v5.4}{2020/06/18}{Bug fix: Use \protect\cs{hyxmp@today@xmp}
+% as the date only if \protect\cs{@pdfdatetime} is undefined}
% \begin{macrocode}
\newcommand*{\hyxmp@dc@schema}{%
\hyxmp@add@simple{dc:format}{application/pdf}%
@@ -4898,7 +5088,11 @@ ______</dc:#2>^^J%
\hyxmp@rdf@dc[\ifHy@pdfa]{description}{\@pdfsubject}%
\hyxmp@rdf@dc{rights}{\@pdfcopyright}%
\hyxmp@singleton@dc{publisher}{\@pdfpublisher}%
- \hyxmp@singleton@dc[Seq]{date}{\hyxmp@today@xmp}%
+ \@ifmtargexp{\@pdfdatetime}{%
+ \hyxmp@singleton@dc[Seq]{date}{\hyxmp@today@xmp}%
+ }{%
+ \hyxmp@singleton@dc[Seq]{date}{\@pdfdatetime}%
+ }%
\hyxmp@singleton@dc{type}{\@pdftype}%
\hyxmp@list@to@xml[\ifHy@pdfa]{creator}{Seq}{\hyxmp@pdfauthor}%
\hyxmp@list@to@xml{subject}{Bag}{\hyxmp@pdfkeywords}%
@@ -4906,18 +5100,7 @@ ______</dc:#2>^^J%
\else
\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.
@@ -6254,6 +6437,7 @@ __</rdf:RDF>^^J%
% file, which offers the benefit of live hyperlinks in almost all
% \acro{PDF} readers.
%
+%
% \subsection{Ensuring proper support}
%
% \begin{macro}{\next}
@@ -6298,6 +6482,7 @@ __</rdf:RDF>^^J%
\typeout{Generating PDF/A-1b compliant hyperxmp documentation.}
% \end{macrocode}
%
+%
% \subsection{Complying with the PDF/A-1b standard}
%
% We can't specify \PDFstd{A}{1}{b}{} compliance until after both
diff --git a/macros/latex/contrib/hyperxmp/hyperxmp.pdf b/macros/latex/contrib/hyperxmp/hyperxmp.pdf
index 28b08b0787..998059c14e 100644
--- a/macros/latex/contrib/hyperxmp/hyperxmp.pdf
+++ b/macros/latex/contrib/hyperxmp/hyperxmp.pdf
Binary files differ
diff --git a/macros/latex/contrib/pict2e/README.md b/macros/latex/contrib/pict2e/README.md
index cda901f5a1..0e38783414 100644
--- a/macros/latex/contrib/pict2e/README.md
+++ b/macros/latex/contrib/pict2e/README.md
@@ -36,8 +36,5 @@ Recommended TDS locations:
pict2e.cfg: tex/latex/[TEXDIST]/graphics.cfg
```
-For general installation advice, see
-http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages
-
For bug reports use the GitHub repository: https://github.com/rolfn/pict2e/issues
diff --git a/macros/latex/contrib/pict2e/p2e-drivers.pdf b/macros/latex/contrib/pict2e/p2e-drivers.pdf
index fe1a1c89af..12c0741fba 100644
--- a/macros/latex/contrib/pict2e/p2e-drivers.pdf
+++ b/macros/latex/contrib/pict2e/p2e-drivers.pdf
Binary files differ
diff --git a/macros/latex/contrib/pict2e/pict2e.dtx b/macros/latex/contrib/pict2e/pict2e.dtx
index 9c2b986cc2..cccd714da7 100644
--- a/macros/latex/contrib/pict2e/pict2e.dtx
+++ b/macros/latex/contrib/pict2e/pict2e.dtx
@@ -23,7 +23,7 @@
%
%<*package>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesPackage{pict2e}[2020/06/13 v0.3d Improved picture commands (HjG,RN,JT)]
+\ProvidesPackage{pict2e}[2020/06/20 v0.3e Improved picture commands (HjG,RN,JT)]
%</package>
%
%<*driver>
@@ -63,9 +63,9 @@
% \fi
%
% \GetFileInfo{pict2e.sty}
-% \def\docdate{2020/06/13}
+% \def\docdate{2020/06/20}
%
-% \CheckSum{2157}
+% \CheckSum{2206}
%
% ^^A ========
%
@@ -188,6 +188,8 @@
% \changes{v0.2z}{2014/01/12}{Conflict wit epic, eepic solved. (JT)}
% \changes{v0.3a}{2016/01/09}{Local line types, documentation fixes. (JT)}
% \changes{v0.3d}{2020/06/13}{\cmd{\@sline} renamed \cmd{\pIIe@sline} (RN)}
+% \changes{v0.3e}{2020/06/20}{Added \cmd{\Vector}, \cmd{\polyvector}
+% suggested by FMi (RN)}
% \fi
%
% \changes{v0.1a}{2003/07/18}{First version. (RN)}
@@ -1284,26 +1286,32 @@
% An equivalent \cmd{\pIIearc} to \cmd{\arc} is defined to solve possible
% conflicts with other packages.
%
-% \subsubsection{Lines, polygons}
+% \subsubsection{Line, Vector, polyline, polyvector, and polygon}
% \label{sec:usage:lines+polygons}
%
% \DescribeMacro\Line
% \DescribeMacro\polyline
+% \DescribeMacro\Vector
+% \DescribeMacro\polyvector
% \DescribeMacro\polygon
% \DescribeMacro{\polygon*}
% |\Line|\parg{X1,Y1}\parg{X2,Y2}\\
% |\polyline|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
+% |\Vector|\parg{X1,Y1}\parg{X2,Y2}\\
+% |\polyvector|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
% |\polygon|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
% |\polygon*|\parg{X1,Y1}\parg{X2,Y2}\dots\parg{Xn,Yn}\\
% A natural way how to describe a line segment is to give the coordinates of
-% the endpoints. The syntax of the \cmd{\line} is different because
+% the endpoints. The syntax of the \cmd{\line}/\cmd{\vector} is different
+% because
% the lines in the standard \texttt{picture} environment are made from small
% line segments of a limited number of slopes given in a font. However, this
% package changes the \cmd{\line} command computing the coordinates of the
% endpoints and using an internal macro for drawing a line segment with given
% endpoints. Hence it would be crazy do not use this possibility directly.
-% This is done by the command \cmd{\Line}. The command \cmd{\polyline} draws a
-% stroken line connecting points with given coordinates. The command
+% This is done by the commands \cmd{\Line} and \cmd{\Vector}. The commands
+% \cmd{\polyline} and \cmd{\polyvector} draws a
+% stroken line/vector connecting points with given coordinates. The command
% \cmd{\polygon} draws a polygon with given vertices, the star variant gives
% filled polygon. At least two points should be given.
%
@@ -2203,7 +2211,7 @@
% \]
% and $t = x/s$ and $\tau = 2(t-1/2)$.
% \end{quote}
-% \changes{v0.2r}{2005/07/15}{Two wrong global assignment changed. (RN)}
+% \changes{v0.2r}{2005/07/15}{Two wrong global assignments changed. (RN)}
% \begin{macrocode}
\newcommand*\pIIe@pyth[3]{%
\begingroup
@@ -2499,11 +2507,13 @@
\pIIe@divide{\@tempdimb}\dimen@\@ydim
\pIIe@divide{\@tempdima}\dimen@\@xdim
% \end{macrocode}
-% Rotate the following vector\slash arrow outlines by angle $\theta$.
+% Rotate the following vector\slash arrow outlines by angle $\theta$:\par
+% \BigIndent
+% $\cos{\theta}$\quad$\sin{\theta}$\quad$-\sin{\theta}$\quad$\cos{\theta}$\quad $0\quad 0$
% \begin{macrocode}
\pIIe@concat\@xdim\@ydim{-\@ydim}\@xdim\z@\z@
% \end{macrocode}
-% Internal command to draw the outline of the vector\slash arrow.
+% Internal command to draw the outline of the vector\slash arrow.
% \begin{macrocode}
\pIIe@vector
\pIIe@fillGraph
@@ -3196,15 +3206,14 @@
% We abuse \cmd{\@setfpsbit} from the float processing modules of the
% kernel.
% ^^A (Should this go to section low-level?)
-% \begin{macrocode}
+% \begin{macrocode}
\newcommand*\pIIe@get@quadrants[1]{%
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue \@tempcnta\z@
\@tfor\reserved@a:=#1\do{\csname @ov\reserved@a false\endcsname}%
\if@ovr \if@ovb\@setfpsbit2\fi \if@ovt\@setfpsbit4\fi \fi
\if@ovl \if@ovb\@setfpsbit1\fi \if@ovt\@setfpsbit8\fi \fi}
-% \end{macrocode}
+% \end{macrocode}
% \end{macro}
-%
% \subsubsection{Quadratic Bezier Curve}
% \label{sec:implementation:bezier-curves}
%
@@ -3259,7 +3268,6 @@
\fi}
% \end{macrocode}
% \end{macro}
-%
% \begin{macro}{\pIIe@bezier@QtoC}
% \changes{v0.1u}{2003/11/21}{New ancillary macro (HjG)}
% Ancillary macro; saves us some tokens above.
@@ -3271,10 +3279,10 @@
% \noindent
% (Missing: Reference for mathematical formula. Or is this trivial?)
% \begin{macrocode}
- \newcommand*\pIIe@bezier@QtoC[3]{%
- \@tempdimc#1\relax \advance\@tempdimc-#2\relax
- \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
- #3\@tempdimc}
+ \newcommand*\pIIe@bezier@QtoC[3]{%
+ \@tempdimc#1\relax \advance\@tempdimc-#2\relax
+ \divide\@tempdimc\thr@@ \advance\@tempdimc #2\relax
+ #3\@tempdimc}
% \end{macrocode}
% \end{macro}
%
@@ -3404,13 +3412,17 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{Lines and polygons}
-% \label{sec:implementation:lines-polygons}
+% \subsubsection{Line, Vector, polyline, polyvector, and polygon}
+% \label{sec:implementation:polyline-polyvector}
%
+% \changes{v0.3e}{2020/06/20}{Added \cmd{\Vector} and \cmd{\polyvector}
+% suggested by FMi. (RN)}
% \begin{macro}{\Line}
% \begin{macro}{\polyline}
+% \begin{macro}{\Vector}
+% \begin{macro}{\polyvector}
% \begin{macro}{\polygon}
-% We use recursive macros for \cmd{\polyline} and \cmd{\polygon}.
+% We use recursive macros for \cmd{\polyline}, \cmd{\polyvector}, and \cmd{\polygon}.
% \begin{macrocode}
\let\lp@r( \let\rp@r)
\def\Line(#1,#2)(#3,#4){\polyline(#1,#2)(#3,#4)}
@@ -3423,6 +3435,33 @@
\def\@polyline(#1,#2){%
\pIIe@lineto{#1\unitlength}{#2\unitlength}%
\@ifnextchar\lp@r{\@polyline}{\pIIe@strokeGraph\ignorespaces}}
+ \def\Vector(#1,#2)(#3,#4){\polyvector(#1,#2)(#3,#4)}
+ \def\polyvector(#1,#2){%
+ \@killglue
+ \@ifnextchar\lp@r{\begingroup\@polyvector(#1,#2)}{%
+ \PackageWarning{pict2e}%
+ {Polygonal vectors require at least two vertices!}\ignorespaces}}
+ \def\@polyvector(#1,#2)(#3,#4){%
+% \end{macrocode}
+% See the similar definition for \cmd{\vector} (\ref{sec:implementation:vector})
+% \begin{macrocode}
+ \@xdim#1\unitlength \@tempdima=#3\unitlength
+ \@ydim#2\unitlength \@tempdimb=#4\unitlength
+ \advance\@tempdima-\@xdim \advance\@tempdimb-\@ydim
+ \ifdim\@tempdima=\z@ \@linelen\@tempdimb \else
+ \ifdim\@tempdimb=\z@ \@linelen\@tempdima \else
+ \pIIe@pyth\@tempdima\@tempdimb\@linelen
+ \fi
+ \fi
+ \ifdim\@linelen<\z@ \@linelen-\@linelen\fi
+ \pIIe@divide{\@tempdima}\@linelen\@ovxx
+ \pIIe@divide{\@tempdimb}\@linelen\@ovyy
+% \end{macrocode}
+% Note the shift to the previous point in addition to the rotation.
+% \begin{macrocode}
+ \pIIe@concat\@ovxx\@ovyy{-\@ovyy}\@ovxx\@xdim\@ydim
+ \pIIe@vector \pIIe@fillGraph
+ \@ifnextchar\lp@r{\@polyvector(#3,#4)}{\endgroup\ignorespaces}}
\def\polygon{%
\@killglue
\@ifstar{\begingroup\@tempswatrue\@polygon}%
@@ -3441,6 +3480,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsubsection{Path commands}
% \label{sec:implementation:path-commands}
diff --git a/macros/latex/contrib/pict2e/pict2e.pdf b/macros/latex/contrib/pict2e/pict2e.pdf
index bcc86e4850..bb634560b3 100644
--- a/macros/latex/contrib/pict2e/pict2e.pdf
+++ b/macros/latex/contrib/pict2e/pict2e.pdf
Binary files differ