From 956b25a304207d06fe012f8c8efcb13cc66e3eec Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 1 Aug 2021 03:00:39 +0000 Subject: CTAN sync 202108010300 --- .../exam-randomizechoices-doc.pdf | Bin 204825 -> 217081 bytes .../exam-randomizechoices-doc.tex | 288 ++++++++-- .../exam-randomizechoices.pdf | Bin 62606 -> 88494 bytes .../exam-randomizechoices.sty | 127 +++-- .../exam-randomizechoices.tex | 613 ++++++++++++++++++++- macros/latex/contrib/hvlogos/Changes | 2 + macros/latex/contrib/hvlogos/README | 9 + macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf | Bin 0 -> 76164 bytes macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex | 133 +++++ macros/latex/contrib/hvlogos/latex/hvlogos.sty | 200 +++++++ macros/latex/contrib/macrolist/README.md | 2 +- macros/latex/contrib/macrolist/macrolist.dtx | 37 +- macros/latex/contrib/macrolist/macrolist.pdf | Bin 193608 -> 194057 bytes .../contrib/pdfmanagement-testphase/CHANGELOG.md | 17 + .../contrib/pdfmanagement-testphase/README.md | 2 +- .../contrib/pdfmanagement-testphase/color-ltx.sty | 2 +- .../pdfmanagement-testphase/hyperref-generic.dtx | 139 +++-- .../pdfmanagement-testphase/hyperref-generic.pdf | Bin 949513 -> 948089 bytes .../hyperxmp-patches-tmp-ltx.sty | 2 +- .../l3backend-testphase.dtx | 116 ++-- .../l3backend-testphase.pdf | Bin 594809 -> 591169 bytes .../contrib/pdfmanagement-testphase/l3pdfannot.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfannot.pdf | Bin 577451 -> 577331 bytes .../contrib/pdfmanagement-testphase/l3pdfdict.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfdict.pdf | Bin 527225 -> 527111 bytes .../pdfmanagement-testphase/l3pdffield-action.dtx | 2 +- .../pdfmanagement-testphase/l3pdffield-action.pdf | Bin 548003 -> 547881 bytes .../l3pdffield-checkbox.dtx | 2 +- .../l3pdffield-checkbox.pdf | Bin 531031 -> 530911 bytes .../pdfmanagement-testphase/l3pdffield-choice.dtx | 2 +- .../pdfmanagement-testphase/l3pdffield-choice.pdf | Bin 534245 -> 534125 bytes .../l3pdffield-pushbutton.dtx | 2 +- .../l3pdffield-pushbutton.pdf | Bin 526426 -> 526311 bytes .../l3pdffield-radiobutton.dtx | 2 +- .../l3pdffield-radiobutton.pdf | Bin 576432 -> 576314 bytes .../l3pdffield-textfield.dtx | 2 +- .../l3pdffield-textfield.pdf | Bin 505665 -> 505534 bytes .../contrib/pdfmanagement-testphase/l3pdffield.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdffield.pdf | Bin 739384 -> 739256 bytes .../contrib/pdfmanagement-testphase/l3pdffile.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdffile.pdf | Bin 553454 -> 553330 bytes .../pdfmanagement-testphase/l3pdfmanagement.dtx | 254 ++++++++- .../pdfmanagement-testphase/l3pdfmanagement.pdf | Bin 658859 -> 673135 bytes .../contrib/pdfmanagement-testphase/l3pdfmeta.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfmeta.pdf | Bin 664002 -> 663896 bytes .../contrib/pdfmanagement-testphase/l3pdftools.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdftools.pdf | Bin 518408 -> 518296 bytes .../contrib/pdfmanagement-testphase/l3pdfxform.dtx | 4 +- .../contrib/pdfmanagement-testphase/l3pdfxform.pdf | Bin 418445 -> 418329 bytes .../contrib/pdfmanagement-testphase/ltdocinit.dtx | 4 +- .../contrib/pdfmanagement-testphase/ltdocinit.pdf | Bin 537047 -> 536935 bytes .../pdfmanagement-testphase/pdflscape-ltx.sty | 2 +- .../pdfmanagement-firstaid.dtx | 4 +- .../pdfmanagement-firstaid.pdf | Bin 421608 -> 421483 bytes .../pdfmanagement-testphase.dtx | 6 +- .../pdfmanagement-testphase.pdf | Bin 446478 -> 446355 bytes .../pdfmanagement-testphase/transparent-ltx.sty | 2 +- .../xcolor-patches-tmp-ltx.sty | 20 +- 58 files changed, 1681 insertions(+), 340 deletions(-) create mode 100644 macros/latex/contrib/hvlogos/Changes create mode 100644 macros/latex/contrib/hvlogos/README create mode 100644 macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf create mode 100644 macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex create mode 100644 macros/latex/contrib/hvlogos/latex/hvlogos.sty (limited to 'macros/latex') diff --git a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.pdf b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.pdf index 887c0c24d5..b3105ee177 100644 Binary files a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.pdf and b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.pdf differ diff --git a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.tex b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.tex index a8b00f9b10..9faf0c8ff5 100644 --- a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.tex +++ b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices-doc.tex @@ -1,3 +1,7 @@ +% !TeX encoding = UTF-8 +% !TeX TS-program = pdflatex +% !TeX spellcheck = en_GB + %%-------------------------------------------------------------------- %%-------------------------------------------------------------------- %% exam-randomizechoices-doc.tex @@ -8,7 +12,7 @@ %% The package itself is in the file exam-randomizechoices.sty. -%% Copyright (c)2019, Jesse E. J. op den Brouw +%% Copyright (c)2021, Jesse E. J. op den Brouw %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -34,28 +38,27 @@ %% J.E.J.opdenBrouw@hhs.nl %% The newest version of this package should always be available -%% from BitBucket: https://bitbucket.org/jesseopdenbrouw/exam-randomizechoices/src/master/ +%% from GitHub: https://github.com/jesseopdenbrouw/exam-randomizechoices %-------------------------------------------------------------------- %-------------------------------------------------------------------- \documentclass[12pt,a4paper]{exam} -\newcommand{\styversion}{\fileversion} -\newcommand{\stydate}{\filedate} -\newcommand{\docdate}{January 9, 2019} -%\newcommand{\docdate}{Draft: \today} +\newcommand{\styversion}{0.2} +\newcommand{\stydate}{July 31, 2021} +\newcommand{\docdate}{July 31, 2021} \usepackage{mathtools} %\usepackage{amssymb} %% Set input encoding to UTF-8 -\usepackage[utf8]{inputenc} +%\usepackage[utf8]{inputenc} %% Use T1 output font encoding \usepackage[T1]{fontenc} %% Set page layout -\usepackage[a4paper,left=1.0in,right=1.0in,top=1.0in,bottom=1.4in,footskip=0.5in]{geometry} +\usepackage[a4paper,left=1.0in,right=1.0in,top=1.0in,bottom=1.31in,footskip=0.4in]{geometry} %% Use package enumitem \usepackage{enumitem} @@ -96,9 +99,9 @@ breakatwhitespace=true, title=\lstname, upquote=true, - aboveskip=0.3\baselineskip, - belowskip=-.5\baselineskip, - escapeinside={(*}{*)} + aboveskip=0.99\baselineskip, + belowskip=-.99\baselineskip, + escapeinside={(*}{*)}, } \usepackage[colorlinks,linkcolor=blue]{hyperref} @@ -120,6 +123,9 @@ %% parskip et al. \usepackage{parskip} +%% filecontents +%\usepackage{filecontents} + %% The randomization package \usepackage[randomize,nokeeplast]{exam-randomizechoices} @@ -132,6 +138,20 @@ % without generating pdf warnings: \newcommand{\bs}{\texorpdfstring{\char`\\}{}} +% Redefine \LaTeX a bit... +\makeatletter +\DeclareRobustCommand{\LaTeX}{L\kern-.25em% + {\sbox\z@ T% + \vbox to\ht\z@{\hbox{\check@mathfonts + \fontsize\sf@size\z@ + \math@fontsfalse\selectfont + A}% + \vss}% + }% + \kern-.05em% + \TeX} +\makeatother + %--------------------------------------------------------------------- %--------------------------------------------------------------------- @@ -143,7 +163,7 @@ \cfoot[]{Page \thepage\ of \numpages} -\title{The \texttt{exam-randomizechoices} package\\[2ex]\normalsize LaTeX package for creating random placed choices in multiple choice \\environments using the \texttt{exam} document class} +\title{The \texttt{exam-randomizechoices} package\\[2ex]\normalsize \LaTeX{} package for creating random placed choices in multiple choice \\environments using the \texttt{exam} document class} \author{Jesse op den Brouw\\ Department of Electrical Engineering\\ @@ -165,7 +185,7 @@ \begin{center} \small This is the user's guide for version~\styversion{} [\stydate] of the - \verb|exam-randomizechoices| package. + \verb|exam-randomizechoices| package. \end{center} \clearpage @@ -205,9 +225,10 @@ implied warranties of merchantability and fitness for a particular purpose. \subsection{Where to find} -The development version of this package is available on BitBucket. See +The development version of this package is available on GitHub. See -\url{https://bitbucket.org/jesseopdenbrouw/exam-randomizechoices/} +%\url{https://bitbucket.org/jesseopdenbrouw/exam-randomizechoices/} +\url{https://github.com/jesseopdenbrouw/exam-randomizechoices} \subsection{Acknowledgements} The author wishes to thank the developers of the \verb|exam| document @@ -221,7 +242,7 @@ to the author. Please use a recent version of the \texttt{exam} document class. This package is tested with version 2.603 which is available in most distributions. -Testing with version 2.605\$\bs beta\$ is planned. +Testing with version 2.606\$\bs beta\$ is planned. \subsection{A word about reading this document} This document uses terminology which is described below: @@ -461,6 +482,7 @@ which typesets to: The \texttt{oneparcheckboxes} environment typesets the choices in al linear, horizontal way. An example is given below: + \begin{lstlisting} \question[5] What is the result of $1+2$? @@ -636,7 +658,7 @@ is the default behaviour of the package. \end{description} Sometimes you want the last given item to stick on its place. This is useful -if you want to use an choice item if none of the other choices are correct: +if you want to use a choice item if none of the other choices are correct: \begin{lstlisting} \question[5] What is the result of $2+5$? @@ -729,7 +751,7 @@ multiple choice environments now accept arguments just as their randomizing counterparts do. -\subsection{Seeding rhe pseudo random generator} +\subsection{Seeding the pseudo random generator} \label{sec:seeding} To get a consistent randomization, you must seed the pseudo random generator with the same seed every time you compile your document. You can set the @@ -738,7 +760,7 @@ argument that is an integer between 0 and $2^{31}-1$, \TeX's largest integer. Internally, the PGF macro \texttt{\bs pgfmathsetseed} is called, and it is flagged that you applied a seed. If you fail to do so, the seeding value is \texttt{\bs time}$\times$\texttt{\bs year} as stated by the PFG manual% -\footnote{Version 3.0.1a, page 940.}. \LaTeX\ compilers keep track of +\footnote{Version 3.1.9a, page 1046.}. \LaTeX\ compilers keep track of time by an integer that holds the minutes counted since midnight. The integer is incremented every time the time passes a minute boundary. So the scenario can be that you compile your document a couple of times with no apparent @@ -778,12 +800,28 @@ table entry will contain \textbf{??}, otherwise it will contain the used typeset The key table is typeset using the \texttt{tabular} environment, so it can be wrapped in a \texttt{table} environment. +The \texttt{\bs printkeytable} macro accepts an optional range as in: +\begin{lstlisting} +\printkeytable[21-40] +\end{lstlisting} + +It will typeset only the keys in this range. This is useful for generating +side-by-side key tables. The start question number may be omitted, in which +case the table starts at 1. The end question number may be omitted, in which +case the table will be typeset up to the last question. + An example of a key table is presented below. Note the \textbf{??} in the -Answer column. This is the result of using the standard multiple choice +Key column. This is the result of using the standard multiple choice environments (they are not overloaded, so no label is applied). +Usage of \texttt{\bs printkeytable} + \printkeytable +Usage of \texttt{\bs printkeytable[...-...]} + +\printkeytable[1-3]\quad\printkeytable[4-6]\quad\printkeytable[7-8] + The text in the table header row can be changed using two command: the command \texttt{\bs keylistquestionname} sets the text above the question numbers, which defaults to ``Question'', the command \texttt{\bs keylistkeyname} sets the text @@ -794,6 +832,39 @@ above the keys, which defaults to ``Key''. A typical use could be: \keylistkeyname{Answer Key} \end{lstlisting} +\subsection{Saving the keys to a macro} +It is possible to save the question numbers and the corresponding keys to +a macro. Please note that only the environments \texttt{randomizechoices}, +\texttt{randomizeoneparchoices}, \texttt{choices} (if overloaded) and +\texttt{oneparchoices} (if overloaded) can have valid keys in the key list. + +Saving a key list file is started by the command: + +\begin{lstlisting} +\savekeylist[(*\textsl{\textrm{command name}}*)] +\end{lstlisting} + +The optional argument is the macro name, including the \bs. if none is +supplied, it defaults to \texttt{\bs keylist} +The key list itself is constructed as a comma-separated list. The question +number and answer keys are separated with a `/'. This makes it easy to +parse the list with PGF's \texttt{\bs foreach} command (using \texttt{\bs +mykeylist} as command name): + +\savekeylist[\mykeylist] + +\begin{lstlisting} +\foreach \num/\key in \mykeylist { + \textcolor{green!\num0!red} {question \num\ has key \key} \\ +} +\end{lstlisting} + +which typesets to: + +\foreach \num/\key in \mykeylist { + \textcolor{green!\num0!red} {question \num\ has key \key} \\ +} + \subsection{Writing the keys to a file} The package provides the writing of the keys to the file. Please note that only the environments \texttt{randomizechoices}, @@ -815,7 +886,7 @@ that assigns the key list to the supplied command name (in this case \texttt{\bs mykeylist}). \writekeylist{\mykeylist} -\vspace*{\baselineskip} +%\vspace*{\baselineskip} \lstinputlisting[caption=]{\jobname.keylist} \vspace*{1.5\baselineskip} @@ -858,59 +929,160 @@ labelling mechanism supports only at the question level. \subsection{Verbatim environments} Verbatim environments such as \texttt{verbatim} and \texttt{lstlistings} -are currently \emph{not} supported in the new and (overloaded) standard multiple +are \emph{not} supported in the new and overloaded standard multiple choice environments. This is due to the way the contents of these environments -are collected. The \texttt{\bs verb} command is also not supported by the package -but \texttt{\bs lstinline} is. An example, translated to English from a Dutch exam -on the ATmega32 microcontroller chip: +are collected. The contents is first read by \TeX{} and spaces at the end +of a line are removed, and the end-of-line character is replaced by a space. +This will disrupt the formatted code in the verbatim environments. +There is extensive discussion on StackExchange on how to tackle this problem. +One could use a \texttt{verbatimbox} environment which puts the contents in +a box, or one could use the \texttt{VerbatimOut} environment which writes +the contents to a file for later inclusion. A portable solution would +be to write contents to (separate) files and include them. In the following +example using the \texttt{filecontents*} environment, four temporary files +are created and included using the \verb|\lstinputlisting| macro. \begin{lstlisting} +% Use \usepackage{filecontents} in preamble +% \question[5] -The individual pins of Port D can be configured as input or output. -The single bits of Port D are called PD7, PD6, PD5, PD4, PD3, PD2, -PD1 and PD0. Which of the following alternatives configures PD0, PD1, -PD6 and PD7 as output and the remaining pins as input? +Which of the four alternative computes the sum of the integers 1 +to 10 (inclusive)? + +\begin{filecontents*}{\jobname a.c} +sum = 0; +for (i=0; i<10; i++) { + sum += i; +} +\end{filecontents*} +\begin{filecontents*}{\jobname b.c} +sum = 0; +for (i=1; i<11; i++) { + sum += i; +} +\end{filecontents*} +\begin{filecontents*}{\jobname c.c} +sum = 0; i = 11; +while (i>0) { + sum +- i; + i--; +} +\end{filecontents*} +\begin{filecontents*}{\jobname d.c} +sum = 0; i = 0; +do { + sum += i; + i++; +} while (i<10); +\end{filecontents*} \begin{randomizechoices} -\choice \lstinline|out DDRD,0x3c| -\CorrectChoice \lstinline|ldi r20,0xc3| \par \lstinline|out DDRD,r20| -\choice \lstinline|out PORTD,0x3c| -\choice \lstinline|ldi r20,195| \par \lstinline|PORTD,r20| +\choice \lstinputlisting{\jobname a.c}\par % please use \par otherwise label get clobbered +\CorrectChoice \lstinputlisting{\jobname b.c}\par +\choice \lstinputlisting{\jobname c.c}\par +\choice \lstinputlisting{\jobname d.c}\par \end{randomizechoices} \end{lstlisting} -typesets possibly to: +which will typically typeset to: \begin{questions} -\setlength{\parskip}{0pt} \setcounter{question}{8} \question[5] -The individual pins of Port D can be configured as input or output. The single bits -of Port D are called PD7, PD6, PD5, PD4, PD3, PD2, PD1 and PD0. Which of the -following alternatives configures PD0, PD1, PD6 and PD7 as output and the remaining -pins as input? - -%%Original Dutch text -%%De individuele pinnen van Port D kunnen als ingang of uitgang geconfigureerd worden. De -%%enkelvoudige bits van Port D worden PD7, PD6, PD5, PD4, PD3, PD2, PD1, PD0 genoemd. -%%Welk van de volgende alternatieven configureert PD0, PD1, PD6 en PD7 als uitgang en de -%%overige pinnen als ingang? -% -%\hspace*{\baselineskip} +Which of the four alternative computes the sum of the integers 1 to 10 (inclusive)? + +\begin{filecontents*}{\jobname a.c} +sum = 0; +for (i=0; i<10; i++) { + sum += i; +} +\end{filecontents*} +\begin{filecontents*}{\jobname b.c} +sum = 0; +for (i=1; i<11; i++) { + sum += i; +} +\end{filecontents*} +\begin{filecontents*}{\jobname c.c} +sum = 0; i = 11; +while (i>0) { + sum +- i; + i--; +} +\end{filecontents*} +\begin{filecontents*}{\jobname d.c} +sum = 0; i = 0; +do { + sum += i; + i++; +} while (i<10); +\end{filecontents*} -\begin{randomizechoices}[norandomize] - \choice \lstinline|out DDRD,0x3c| - \CorrectChoice \lstinline|ldi r20,0xc3| \par \lstinline|out DDRD,r20| - \choice \lstinline|out PORTD,0x3c| - \choice \lstinline|ldi r20,195| \par \lstinline|PORTD,r20| +\begin{randomizechoices} +\choice \lstinputlisting[caption=,frame=none,numbers=none]{\jobname a.c}\par % please use \par otherwise label get clobbered +\CorrectChoice \lstinputlisting[caption=,frame=none,numbers=none]{\jobname b.c}\par +\choice \lstinputlisting[caption=,frame=none,numbers=none]{\jobname c.c}\par +\choice \lstinputlisting[caption=,frame=none,numbers=none,belowskip=0pt]{\jobname d.c}\par \end{randomizechoices} + \end{questions} +Please note that the \texttt{\bs verb} command is also not supported by the package +but \texttt{\bs lstinline} command is. + +%% An example, translated to English from a Dutch exam +%%on the ATmega32 microcontroller chip: +%% +%%\begin{lstlisting} +%%\question[5] +%%The individual pins of Port D can be configured as input or output. +%%The single bits of Port D are called PD7, PD6, PD5, PD4, PD3, PD2, +%%PD1 and PD0. Which of the following alternatives configures PD0, PD1, +%%PD6 and PD7 as output and the remaining pins as input? +%% +%%\begin{randomizechoices} +%%\choice \lstinline|out DDRD,0x3c| +%%\CorrectChoice \lstinline|ldi r20,0xc3| \par \lstinline|out DDRD,r20| +%%\choice \lstinline|out PORTD,0x3c| +%%\choice \lstinline|ldi r20,195| \par \lstinline|PORTD,r20| +%%\end{randomizechoices} +%%\end{lstlisting} +%% +%%typesets possibly to: +%% +%%\begin{questions} +%%\setlength{\parskip}{0pt} +%%\setcounter{question}{8} +%%\question[5] +%%The individual pins of Port D can be configured as input or output. The single bits +%%of Port D are called PD7, PD6, PD5, PD4, PD3, PD2, PD1 and PD0. Which of the +%%following alternatives configures PD0, PD1, PD6 and PD7 as output and the remaining +%%pins as input? +%% +%%%%Original Dutch text +%%%%De individuele pinnen van Port D kunnen als ingang of uitgang geconfigureerd worden. De +%%%%enkelvoudige bits van Port D worden PD7, PD6, PD5, PD4, PD3, PD2, PD1, PD0 genoemd. +%%%%Welk van de volgende alternatieven configureert PD0, PD1, PD6 en PD7 als uitgang en de +%%%%overige pinnen als ingang? +%%% +%%%\hspace*{\baselineskip} +%% +%%\begin{randomizechoices}[norandomize] +%% \choice \lstinline|out DDRD,0x3c| +%% \CorrectChoice \lstinline|ldi r20,0xc3| \par \lstinline|out DDRD,r20| +%% \choice \lstinline|out PORTD,0x3c| +%% \choice \lstinline|ldi r20,195| \par \lstinline|PORTD,r20| +%%\end{randomizechoices} +%%\end{questions} + \subsection{Accessing the internal labels} Each \texttt{\bs question} command is accompanied with a label of the form \texttt{question@}$x$ as provided by the \texttt{exam} document class, where -$x$ is the decimal number of the question. A \texttt{\bs CorrectChoice} -command is provided with a label (by this package) of the form \linebreak \texttt{question@}$x$% +$x$ is the decimal number of the question. Within the the environments +\texttt{randomizechoices}, \texttt{randomizeoneparchoices}, \texttt{choices} +(if overloaded) and \texttt{oneparchoices} (if overloaded), a +\texttt{\bs CorrectChoice} command is provided with a label (by this package) +of the form \texttt{question@}$x$% \texttt{@correctchoice} where $x$ is again the decimal number of the question. The user can access these labels by using the \texttt{\bs ref} command as shown below: @@ -925,7 +1097,7 @@ which typesets to: The question number is~\ref{question@9} and the correct answer is~\ref{question@9@correctchoice}. -There is no need to change the cat code of `@'. +%There is no need to change the cat code of `@'. \subsection{Error messages} The package will throw you some error messages in case something is wrong. The @@ -1015,10 +1187,10 @@ So when the environment is used as in: \choice two \CorrectChoice three \choice four -\end{randomizechoices +\end{randomizechoices} \end{lstlisting} -the \texttt{\bs BODY} command now contains (comments and newlines are stripped): +the \texttt{\bs BODY} command now contains (comments and newlines are stripped by \TeX): \begin{lstlisting} \choice one \choice two \CorrectChoice three \choice four @@ -1117,7 +1289,7 @@ I've been using the \texttt{exam} document class for five years now. What I like is the consistent typesetting of my exams. I don't use sub parts and sub-sub parts because in my opinion this not the right way to prepare an exam. I've written a department consistent class that provides the department's cover pages and some -other typesetting trickery. This class is used by a small core \TeX\ users. Regrettably, +other typesetting trickery. This class is used by a small core of \TeX\ users. Regrettably, the majority of my colleagues use Word *cough*. \end{document} \ No newline at end of file diff --git a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.pdf b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.pdf index 23bb5f5541..557f3e7b82 100644 Binary files a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.pdf and b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.pdf differ diff --git a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.sty b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.sty index 29779b1fc6..b64ae9982c 100644 --- a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.sty +++ b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.sty @@ -1,9 +1,9 @@ %% %% exam-randomizechoices.sty %% -%% Randomize mc choices using the exam class +%% Randomize m.c. choices using the exam class %% -%% Copyright (c)2019, Jesse E. J. op den Brouw +%% Copyright (c)2021, Jesse E. J. op den Brouw %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -29,7 +29,12 @@ %% J.E.J.opdenBrouw@hhs.nl %% The newest version of this package should always be available -%% from BitBucket: https://bitbucket.org/jesseopdenbrouw/exam-randomizechoices/src/master/ +%% from GitHub: https://github.com/jesseopdenbrouw/exam-randomizechoices + +%% Version 0.1 [09/01/2019]: Initial release +%% Version 0.2 [31/07/2021]: Added \savekeylist +%% Adapted \printkeytable to accept optional range +%% Minor cosmetic changes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% @@ -38,8 +43,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e}[1994/06/01] %% Version and date -\gdef\fileversion{0.1} -\gdef\filedate{2019/01/09} +\def\fileversion{0.2} +\def\filedate{2021/07/31} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -96,10 +101,9 @@ %% %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % http://ctan.org/pkg/{environ,etoolbox,pgffor} -\@ifpackageloaded{environ}{\if@@ercdebug\PackageWarning{exam-randomizechoicces}{Package environ already loaded}\fi}{\RequirePackage{environ}} -\@ifpackageloaded{etoolbox}{\if@@ercdebug\PackageWarning{exam-randomizechoicces}{Package etoolbox already loaded}\fi}{\RequirePackage{etoolbox}} -\@ifpackageloaded{pgffor}{\if@@ercdebug\PackageWarning{exam-randomizechoicces}{Package pgffor already loaded}\fi}{\RequirePackage{pgffor}} - +\RequirePackage{environ} +\RequirePackage{etoolbox} +\RequirePackage{pgffor} %% A scratch counter \newcounter{erc@counter} @@ -276,7 +280,7 @@ \fi \fi %% - %% We travel the list items. If an item begin with the special marker + %% We travel the list items. If an item begins with the special marker %% \inaccessible, we prepend it with \correctchoice, otherwise we prepend it %% with \choice. At the end we have all the list items prepended with %% either \choice or \correctchoice. Then we append the list item to @@ -321,8 +325,8 @@ \fi %% Save choices environment - \let\@oldchoices\choices - \let\end@oldchoices\endchoices + \let\erc@oldchoices\choices + \let\enderc@oldchoices\endchoices %% Renew the choices environment \RenewEnviron{choices}[1][]{ @@ -331,10 +335,10 @@ \erc@createrandomlist[#1]% %% %% Start the choices environment - \begin{@oldchoices}% + \begin{erc@oldchoices}% % Execute the list \erc@typesetchoices% - \end{@oldchoices}% + \end{erc@oldchoices}% } \NewEnviron{randomizechoices}[1][]{ @@ -343,10 +347,10 @@ \erc@createrandomlist[#1]% %% %% Start the choices environment - \begin{@oldchoices}% + \begin{erc@oldchoices}% % Execute the list \erc@typesetchoices% - \end{@oldchoices}% + \end{erc@oldchoices}% } \else \NewEnviron{randomizechoices}[1][]{ @@ -371,8 +375,8 @@ \fi %% Save oneparchoices environment - \let\@oldoneparchoices\oneparchoices - \let\end@oldoneparchoices\endoneparchoices + \let\erc@oldoneparchoices\oneparchoices + \let\enderc@oldoneparchoices\endoneparchoices %% Renew the oneparchoices environment \RenewEnviron{oneparchoices}[1][]{ @@ -381,10 +385,10 @@ \erc@createrandomlist[#1]% %% %% Start the oneparchoices environment - \begin{@oldoneparchoices}% + \begin{erc@oldoneparchoices}% % Execute the list \erc@typesetchoices - \end{@oldoneparchoices}% + \end{erc@oldoneparchoices}% } \NewEnviron{randomizeoneparchoices}[1][]{ @@ -393,10 +397,10 @@ \erc@createrandomlist[#1]% %% %% Start the oneparchoices environment - \begin{@oldoneparchoices}% + \begin{erc@oldoneparchoices}% % Execute the list \erc@typesetchoices% - \end{@oldoneparchoices}% + \end{erc@oldoneparchoices}% } \else \NewEnviron{randomizeoneparchoices}[1][]{ @@ -421,8 +425,8 @@ \fi %% Save choices environment - \let\@oldcheckboxes\checkboxes - \let\end@oldcheckboxes\endcheckboxes + \let\erc@oldcheckboxes\checkboxes + \let\enderc@oldcheckboxes\endcheckboxes %% Renew the oneparchoices environment \RenewEnviron{checkboxes}[1][]{ @@ -431,10 +435,10 @@ \erc@createrandomlist[#1,nolabel]% %% %% Start the choices environment - \begin{@oldcheckboxes}% + \begin{erc@oldcheckboxes}% % Execute the list \erc@typesetchoices% - \end{@oldcheckboxes}% + \end{erc@oldcheckboxes}% } \NewEnviron{randomizecheckboxes}[1][]{% @@ -443,10 +447,10 @@ \erc@createrandomlist[#1,nolabel]% %% %% Start the choices environment - \begin{@oldcheckboxes}% + \begin{erc@oldcheckboxes}% % Execute the list \erc@typesetchoices% - \end{@oldcheckboxes}% + \end{erc@oldcheckboxes}% } \else \NewEnviron{randomizecheckboxes}[1][]{ @@ -471,8 +475,8 @@ \fi %% Save oneparcheckboxes environment - \let\@oldoneparcheckboxes\oneparcheckboxes - \let\end@oldoneparcheckboxes\endoneparcheckboxes + \let\erc@oldoneparcheckboxes\oneparcheckboxes + \let\enderc@oldoneparcheckboxes\endoneparcheckboxes %% Renew the oneparcheckboxes environment \RenewEnviron{oneparcheckboxes}[1][]{ @@ -481,10 +485,10 @@ \erc@createrandomlist[#1,nolabel]% %% %% Start the oneparcheckboxes environment - \begin{@oldoneparcheckboxes}% + \begin{erc@oldoneparcheckboxes}% % Execute the list \erc@typesetchoices% - \end{@oldoneparcheckboxes}% + \end{erc@oldoneparcheckboxes}% } \NewEnviron{randomizeoneparcheckboxes}[1][]{% @@ -493,10 +497,10 @@ \erc@createrandomlist[#1,nolabel]% %% %% Start the oneparcheckboxes environment - \begin{@oldoneparcheckboxes}% + \begin{erc@oldoneparcheckboxes}% % Execute the list \erc@typesetchoices% - \end{@oldoneparcheckboxes}% + \end{erc@oldoneparcheckboxes}% } \else \NewEnviron{randomizeoneparcheckboxes}[1][]{% @@ -513,13 +517,28 @@ \fi %% -%% Simple key table printer +%% Simple key table printer, with key range %% %% Building a table with \foreach from the pgffor package is hard to do. %% See https://tex.stackexchange.com/questions/367979/latex-foreach-in-tabular-environment %% So we use \gappto and \xappto to build the table. At the end, we expand the macro %% -\newcommand{\printkeytable}{% + +\newcounter{erc@printstart}\setcounter{erc@printstart}{0} +\newcounter{erc@printstop}\setcounter{erc@printstop}{0} + +\newcommand{\printkeytable}[1][-]{% + \erc@printkeytable#1\@nil% +} + +\def\erc@printkeytable#1-#2\@nil{% + %% Grab arguments + \setcounter{erc@printstart}{0#1}% + \setcounter{erc@printstop}{0#2}% + %% Sanity check + \ifnum\value{erc@printstart}<1\setcounter{erc@printstart}{1}\fi% + \ifnum\value{erc@printstop}<1\setcounter{erc@printstop}{\thequestion}\fi% + \ifnum\value{erc@printstop}>\thequestion\setcounter{erc@printstop}{\thequestion}\fi% \if@@ercdebug \PackageWarning{exam-randomizechoices}{Writing key table}% \fi @@ -527,14 +546,15 @@ \xdef\erc@keytable{}% %% %% Add the preamble of the table {regular tabular} - \gappto\erc@keytable{\begin{tabular} {|c|c|} \hline}% + \gappto\erc@keytable{\begin{tabular}[t] {|c|c|} \hline}% \xappto\erc@keytable{\erc@keylistquestionname\space & \erc@keylistkeyname}% \gappto\erc@keytable{ \\ \hline}% %% %% Write the table entries. \ifnum\thequestion=0\relax \else - \foreach \x in {1,...,\thequestion} {% +% \foreach \x in {1,...,\thequestion} {% + \foreach \x in {\arabic{erc@printstart},...,\arabic{erc@printstop}} {% %% %% Add '\ref{question@\x} & ', \x should be expandend, \ref not \gappto\erc@keytable{\ref}% @@ -611,4 +631,35 @@ \fi } +%% +%% Simple key list saver. Saves the key list in a macro +%% +\def\savekeylist{\@ifnextchar[{\erc@savekeylist}{\erc@savekeylist[\keylist]}}% +\def\erc@savekeylist[#1]{% + %% + \if@@ercdebug + \PackageWarning{exam-randomizechoices}{Saving key list to macro}% + \fi + %% + %% Create a command that has all the question numbers / question keys + %% separated by a / (but nothing if there are no questions) + \ifnum\thequestion=0\relax + \gdef\erc@keylist{}% + \else + %% Write the list entries. + \gdef\erc@keylist{\@gobble}% + \foreach \x in {1,...,\thequestion} {% + \@ifundefined{r@question@\x @correctchoice}{% + %not found + \xdef\erc@keylist{\erc@keylist,\x/?}% + }{% + %found + \xdef\erc@keylist{\erc@keylist,\x/\getrefnumber{question@\x @correctchoice}}% + }% + }% + \fi% + %% Save the keylist in the supplied macro + \expandafter\xdef\expandafter#1\expandafter{\erc@keylist}% +} + \endinput diff --git a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.tex b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.tex index fe6650496d..925ca7f04f 100644 --- a/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.tex +++ b/macros/latex/contrib/exam-randomizechoices/exam-randomizechoices.tex @@ -3,7 +3,7 @@ %% %% Randomize mc choices using the exam class -- examples %% -%% Copyright (c)2019, Jesse E. J. op den Brouw +%% Copyright (c)2021, Jesse E. J. op den Brouw %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -29,21 +29,23 @@ %% J.E.J.opdenBrouw@hhs.nl %% The newest version of this package should always be available -%% from BitBucket: https://bitbucket.org/jesseopdenbrouw/exam-randomizechoices/src/master/ +%% from GitHub: https://github.com/jesseopdenbrouw/exam-randomizechoices \documentclass[answers,addpoints]{exam} \usepackage{parskip} \usepackage[colorlinks,linkcolor=blue]{hyperref} \usepackage{mathtools} - -\usepackage[debug,randomize,nokeeplast]{exam-randomizechoices} \usepackage[a4paper]{geometry} +\usepackage[debug,randomize,nokeeplast]{exam-randomizechoices} \setrandomizerseed{999} -%%\checkboxchar{\thecheckbox} -%%\checkedchar{\thecheckbox} + + +\usepackage{amssymb} +\checkboxchar{$\square$} +\checkedchar{$\raisebox{0.3ex}{\checkmark}\hspace{-0.95em}\square$} \CorrectChoiceEmphasis{\color{red}\slshape} @@ -351,7 +353,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{oneparchoices} -%%%%%%%%21 +%%%%%%%%23 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -365,7 +367,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{randomizechoices} -%%%%%%%%22 +%%%%%%%%24 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -379,7 +381,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{randomizechoices} -%%%%%%%%23 +%%%%%%%%25 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -392,7 +394,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{choices} -%%%%%%%%24 +%%%%%%%%26 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -405,7 +407,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{randomizeoneparchoices} -%%%%%%%%25 +%%%%%%%%27 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -418,7 +420,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{oneparchoices} -%%%%%%%%26 +%%%%%%%%28 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -431,7 +433,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{randomizecheckboxes} -%%%%%27 +%%%%%29 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -444,7 +446,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{checkboxes} -%%%%%%%%28 +%%%%%%%%30 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -457,7 +459,7 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{randomizeoneparcheckboxes} -%%%%%29 +%%%%%31 \question[5] One of these things is not like the others; one of these things is not the same. Which one is different? @@ -470,6 +472,582 @@ things is not the same. Which one is different? \CorrectChoice Socrates \end{oneparcheckboxes} +%%%%%32+ +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} + +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} +\question[5] +One of these things is not like the others; one of these +things is not the same. Which one is different? + +\begin{randomizeoneparchoices} +\choice John +\choice Paul +\choice George +\choice Ringo +\CorrectChoice Socrates +\end{randomizeoneparchoices} + + %%\question %%Proceed with the next sub-questions. %%\begin{parts} @@ -527,12 +1105,15 @@ things is not the same. Which one is different? Key table -\printkeytable +\printkeytable[1-30]\quad\printkeytable[31-60]\quad\printkeytable[61-83] \writekeylist[testfile.txt]{\mykeylist} \writekeylist{\mykeylist} +\savekeylist[\yesthekeylist] +{\color{red}\ttfamily\yesthekeylist} +That's all folks! \end{document} diff --git a/macros/latex/contrib/hvlogos/Changes b/macros/latex/contrib/hvlogos/Changes new file mode 100644 index 0000000000..4658700720 --- /dev/null +++ b/macros/latex/contrib/hvlogos/Changes @@ -0,0 +1,2 @@ +hvlogos.sty: +0.01 2021-07-30 - first CTAN version diff --git a/macros/latex/contrib/hvlogos/README b/macros/latex/contrib/hvlogos/README new file mode 100644 index 0000000000..5533d66103 --- /dev/null +++ b/macros/latex/contrib/hvlogos/README @@ -0,0 +1,9 @@ + +hvlogos +Printing TeX related names as a logo + +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. + +hvoss@tug.org \ No newline at end of file diff --git a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf new file mode 100644 index 0000000000..c56c7e9522 Binary files /dev/null and b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.pdf differ diff --git a/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex new file mode 100644 index 0000000000..77e83e2b21 --- /dev/null +++ b/macros/latex/contrib/hvlogos/doc/hvlogos-doc.tex @@ -0,0 +1,133 @@ +\documentclass[a4paper,english]{article} +\usepackage{libertinus-otf} +\setmonofont[Scale=MatchLowercase,FakeStretch=0.88]{AnonymousPro} +\usepackage{hvlogos} +\usepackage{longtable, booktabs} +\usepackage{babel} +\usepackage[autostyle]{csquotes} +\MakeAutoQuote{»}{«} + +\usepackage{makeidx}\makeindex +\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}} +\def\LPack#1{\texttt{#1}\index{#1@\texttt{#1} -- package}} + +\title{\texttt{hvlogos} -- Print \TeX-related Logos} +\author{Herbert Voß} +\begin{document} +\maketitle + +The package \LPack{hvlogos} loads by default the packages +\LPack{fetamont}, \LPack{hologo}, \LPack{dantelogo}, and \LPack{xspace}. + +\bigskip +\begin{longtable}{lll}\toprule +\emph{Macro} & \emph{Alias} & \emph{Output}\\\midrule +\endfirsthead + +\multicolumn{3}{l}{\ldots\ previous page}\\\midrule +\emph{Macro} & \emph{Alias} & \emph{Output}\\\midrule +\endhead + +\midrule +\multicolumn{3}{r}{next page \ldots}\\ +\endfoot + +\bottomrule +\endlastfoot + +\Lcs{ALEPH} && \ALEPH \\[5pt] + +\Lcs{AmS} & \Lcs{AMS} & \AMS\\ +\Lcs{AmSLaTeX} && \AmSLaTeX\\ +\Lcs{amsmath} && \amsmath\\ +\Lcs{AmSTeX} && \AmSTeX\\[5pt] + +\Lcs{biber} && \biber\\ +\Lcs{Biber} && \Biber \\ +\Lcs{BibLaTeX} & \Lcs{biblatex}& \BibLaTeX \\ +\Lcs{BibTeX} && \BibTeX \\ +\Lcs{BibTeX8} & \Lcs{BibTeXacht} & \BibTeX8\\ +\Lcs{BibTool} && \BibTool \\[5pt] + +\Lcs{ConTeXt} & \Lcs{context} & \ConTeXt \\ +\Lcs{CTAN} && \CTAN\\[5pt] + +\Lcs{dante} && \dante \\ +\Lcs{Dante} && \rlap{\Dante} \\ +\Lcs{DANTE} && \DANTE \\ +\Lcs{dtk} && \dtk \\ +\Lcs{DTK}\footnote{Quotes depends on the current language setting.} && \DTK \\[5pt] + +\Lcs{emTeX} && \emTeX\\ +\Lcs{eTeX} && \eTeX\\ +\Lcs{ExTeX} && \ExTeX\\ +\Lcs{eV} && \eV \\[5pt] + +\Lcs{HanTheThanh} & \Lcs{HTT} & \HanTheThanh\\[5pt] + +\Lcs{iniTeX} && \iniTeX \\ +\Lcs{KOMAScript} && \KOMAScript \\ +\Lcs{LaTeX} && \LaTeX \\ +\Lcs{LaTeXe} && \LaTeXe \\ +\Lcs{LaTeXIII} && \LaTeXIII \\ +\Lcs{LaTeXTeX} && \LaTeXTeX\\ +\Lcs{LaTeXML} && \LaTeXML \\ +\Lcs{LuaHBTeX} & \Lcs{luahbtex}, \Lcs{LuahbTeX} & \LuaHBTeX\\ +\Lcs{LuaLaTeX}& \Lcs{lualatex} & \LuaLaTeX \\ +\Lcs{LuaTeX} & \Lcs{luatex} & \LuaTeX\\ +\Lcs{LyX} && \LyX \\[5pt] + +\Lcs{macOS} && \macOS\\ +\Lcs{mpShort} && \mpShort\\ +\Lcs{mfShort} && \mfShort\\ +\Lcs{METAFONT} & \Lcs{MF}& \METAFONT \\ +\Lcs{MetaFun} &\Lcs{MFun} & \MetaFun\\ +\Lcs{METAPOST} & \Lcs{MetaPost}, \Lcs{MP}& \METAPOST \\ +\Lcs{MiKTeX} && \MiKTeX \\[5pt] + +\Lcs{NTS} && \NTS \\[5pt] + +\Lcs{OzMF} && \OzMF \\ +\Lcs{OzMP} && \OzMP \\ +\Lcs{OzTeX} && \OzTeX \\ +\Lcs{OzTtH} && \OzTtH \\[5pt] + +\Lcs{PCTeX} && \PCTeX \\ +\Lcs{pdfTeX} & \Lcs{pdftex} & \pdfTeX  \\ +\Lcs{pdfLaTeX} & \Lcs{pdflatex} & \pdfLaTeX\\ +\Lcs{pgf/tikz} & \Lcs{pgftikz} & \pgf/tikz \\[5pt] + +\Lcs{PiC} && \PiC \\ +\Lcs{PiCTeX} && \PiCTeX \\ +\Lcs{plainTeX} && \plainTeX \\ +\Lcs{PostScript} & \Lcs{PS}& \PostScript \\ +\Lcs{PSTricks} & \Lcs{pstricks}& \PSTricks\\[5pt] + +\Lcs{SageTeX} && \SageTeX \\ +\Lcs{SLiTeX} && \SLiTeX \\[5pt] + +\Lcs{teTeX} && \teTeX \\ +\Lcs{TeXivht} && \TeX4ht \\ +\Lcs{TeXLive} && \TeXLive\\[5pt] + +\Lcs{tikz} & \Lcs{TikZ}& \tikz \\ +\Lcs{TTH} && \TTH \\ +\Lcs{TUG} && \TUG\\ +\Lcs{TUGboat} && \TUGboat \\[5pt] + +\Lcs{virTeX} && \virTeX \\ +\Lcs{VTeX} && \VTeX \\[5pt] + +\Lcs{WikipediA}& \Lcs{Wikipedia}, \Lcs{wikipedia} & \WikipediA \\[5pt] + +\Lcs{XeLaTeX} && \XeLaTeX \\ +\Lcs{XeTeX} && \XeTeX \\ + +\end{longtable} + +\printindex + +\end{document} + + +\endinput diff --git a/macros/latex/contrib/hvlogos/latex/hvlogos.sty b/macros/latex/contrib/hvlogos/latex/hvlogos.sty new file mode 100644 index 0000000000..11116a6a99 --- /dev/null +++ b/macros/latex/contrib/hvlogos/latex/hvlogos.sty @@ -0,0 +1,200 @@ +%% Paket fuer Logos +%% +%% This is file `hvlogos.sty', +%% +%% Copyright (C) 2021 +%% Herbert Voss +%% +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory macros/latex/base/lppl.txt. +% +% +% ------------------------------------- +\ProvidesPackage{hvlogos}[2021/07/28 v. 0.01 Logos (hv)] +% +\newif\if@dtk@newengine \@dtk@newenginetrue +% +\RequirePackage{fetamont,hologo,dantelogo,xspace} + +\ifluatex\else\ifxetex\else\@dtk@newenginefalse\fi\fi +\if@dtk@newengine + \RequirePackage{unicode-math} + \setmathfont{LatinModernMath-Regular} + \setmathfont[version=XITS]{XITSMath-Regular.otf} +\fi +% +\iffalse +\DeclareRobustCommand\ffmfamily{\not@math@alphabet\ffmfamily\relax + \fontencoding{T1}\fontfamily{ffm}\selectfont} +\DeclareTextFontCommand{\textffm}{\ffmfamily} +\def\MF{\textffm{META}\@dischyph\textffm{FONT}\@} +\def\MP{\textffm{META}\@dischyph\textffm{POST}\@} +\def\MT{\textffm{META}\@dischyph\textffm{TYPE1}\@} +\fi +\def\mpShort{\textffm{MP}\@} +\def\mfShort{\textffm{MF}\@} + +\def\HoLogo@La#1{% + L% + \ifx\f@family\sfdefault\kern-.15em\else\kern-.23em\fi + \begingroup + \setbox\ltx@zero\hbox{T}% + \vbox to\ht\ltx@zero{% + \hbox{% + \ltx@ifundefined{check@mathfonts}{% + \csname sevenrm\endcsname + }{% + \check@mathfonts + \fontsize\sf@size{0pt}% + \math@fontsfalse\selectfont + }% + A% + }% + \vss + }% + \endgroup +} + +%\edef\hologoList{% +% \hologoList% +% \hologoEntry{LuaHBTeX}{}{2020/07/13}% +%} + +\def\LaTeXTeX{\hologo{(La)TeX}} + +\def\AmS{\textsf{AMS}} +\let\AMS\AmS +%{\ifluatex\mathversion{XITS}\fi% +% $\mathcal{A}$\kern-.1667em\lower.5ex\hbox{$\mathcal{M}$}\kern-.125em$\mathcal{S}$}}% $ +\def\amsmath{\AMS\textsf{math}} +\def\AmSLaTeX{\mbox{\textsf{AMS}-\hologo{LaTeX}}} +\def\AmSTeX{\mbox{\textsf{AMS}-\hologo{TeX}}} +\def\biber{\textsf{biber}} +\def\Biber{\textsf{Biber}} +\def\BibTeX{\@ifnextchar8\@@BibTeX\@BibTeX} +\def\@BibTeX{{\hologoLogoSetup{BibTeX}{variant=sc}\hologo{BibTeX}}} +\def\BibTeXacht{{\hologoLogoSetup{BibTeX8}{variant=sc}\hologo{BibTeX8}}} +\def\@@BibTeX8{\hologo{BibTeX8}} +\def\ConTeXt{\hologo{ConTeXt}} +\let\context\ConTeXt +\def\emTeX{\hologo{emTeX}} +\def\eTeX{\hologo{eTeX}} +\def\ExTeX{\hologo{ExTeX}} +\def\HanTheThanh{\hologo{HanTheThanh}} +\let\HTT\HanTheThanh +\def\iniTeX{\hologo{iniTeX}} +\def\KOMAScript{\hologo{KOMAScript}} +\def\LaTeX{\hologo{LaTeX}} +\def\LaTeXe{\hologo{LaTeX2e}} +\def\LaTeXIII{\hologo{LaTeX3}} +\def\LaTeXML{\hologo{LaTeXML}} +\def\LuaLaTeX{\hologo{LuaLaTeX}} +\let\lualatex\LuaLaTeX +\def\LuaTeX{\hologo{LuaTeX}} + +\let\HoLogoHtml@LuaHBTeX\HoLogo@LuaHBTeX +\def\HoLogo@LuaHBTeX#1{% + \HOLOGO@mbox{% + LuaHB% + \hologo{TeX}% + }% +} + +\def\LuaHBTeX{\hologo{LuaHBTeX}} +\let\luahbtex\LuaHBTeX +\let\LuahbTeX\LuaHBTeX +\let\luatex\LuaTeX +\def\LyX{\hologo{LyX}} +\def\METAFONT{\hologo{METAFONT}} +\let\MF\METAFONT +\def\MetaFun{\textffm{METAFUN}} +\let\MFun\MetaFun +\def\METAPOST{\hologo{METAPOST}} +\def\MetaPost{\hologo{MetaPost}} +\let\MP\METAPOST +\def\MiKTeX{\hologo{MiKTeX}} +\def\NTS{\hologo{NTS}} +\def\OzMF{\hologo{OzMF}} +\def\OzMP{\hologo{OzMP}} +\def\OzTeX{\hologo{OzTeX}} +\def\OzTtH{\hologo{OzTtH}} +\def\PCTeX{\hologo{PCTeX}} +\def\pdfTeX{\hologo{pdfTeX}} +\let\pdftex\pdfTeX +\def\pdfLaTeX{\hologo{pdfLaTeX}} +\let\pdflatex\pdfLaTeX +\def\PiC{\hologo{PiC}} +\def\PiCTeX{\hologo{PiCTeX}} +\def\plainTeX{\hologo{plainTeX}} +\def\PostScript{Post\-Script} +\let\PS\PostScript +\def\SageTeX{\hologo{SageTeX}} +\def\SLiTeX{\hologo{SLiTeX}} +\def\teTeX{\hologo{teTeX}} +\def\TeXivht{\hologo{TeX4ht}} +\def\TTH{\hologo{TTH}} +\def\virTeX{\hologo{virTeX}} +\def\VTeX{\hologo{VTeX}} +\def\XeLaTeX{\hologo{XeLaTeX}} +\def\XeTeX{\hologo{XeTeX}} +%% +% +\newcommand\BibTool{\textsc{Bib\hskip-.1em + T\hskip-.15emo\hskip-.05emo\hskip-.05eml}\xspace} +\def\tikz{\textsf{Ti\textit{k}Z}} +\def\ALEPH{\ensuremath{\aleph}} +\let\TikZ\tikz + +\def\eV{e.\kern-0.1em V\kern-0.18em.} +\def\d@nte{\@ifnextchar.% + {\mbox{DANTE e.\kern-0.1em V\kern-0.18em}}% + {\mbox{DANTE e.\kern-0.1em V\kern-0.18em.}\xspace}% +} +\def\D@nte{\@ifnextchar.% + {DANTE, Deutschsprachige Anwendervereinigung~\mbox{\TeX~e.\kern-0.1em V\kern-0.18em}}% + {DANTE, Deutschsprachige Anwendervereinigung~\mbox{\TeX~e.\kern-0.1em V\kern-0.18em.}\xspace}% +} +\def\dante#1{% + \ifx#1\@empty + \d@nte + \else + \expandafter\d@nte#1% + \fi} + +\def\Dante#1{% + \ifx#1\@empty + \D@nte + \else + \expandafter\D@nte#1% + \fi} + +\providecommand\dtk{Die \TeX\-ni\-sche Ko\-mö\-die} +\providecommand\DTK{``\dtk''} +\providecommand\PS{Post\-Script} +\providecommand\TUG{\TeX{} Users Group} +\providecommand\TUGboat{\textsl{TUGboat}} +\let\DANTE\dantelogo +\def\pgf/tikz{\textsf{pgf/Ti\textit{k}Z}} +\def\pgftikz{\textsf{pgf/Ti\textit{k}Z}} +\def\TeXLive{\TeX{}Live\xspace} + +\def\BibLaTeX{Bib\hologo{LaTeX}} +\let\biblatex\BibLaTeX +\def\CTAN{\texttt{CTAN}\xspace} + +\def\PSTricks{\textsf{PSTricks}\xspace} +\let\pstricks\PSTricks + +\if@dtk@newengine + \newfontfamily\dtk@LinWikipedia{Linux Libertine O}% + \def\WikipediA{{\dtk@LinWikipedia\char"E02F\textsc{ikipediA}}} % hexadezimal +\else + \def\WikipediA{WikipediA}% +\fi +\let\Wikipedia\WikipediA +\let\wikipedia\WikipediA +% +\def\macOS{\textsf{macOS}\xspace} + +\endinput diff --git a/macros/latex/contrib/macrolist/README.md b/macros/latex/contrib/macrolist/README.md index 8aa1f2490a..b6aee00d3b 100644 --- a/macros/latex/contrib/macrolist/README.md +++ b/macros/latex/contrib/macrolist/README.md @@ -1,4 +1,4 @@ -# The LaTeX package macrolist - version 2.0.0 (2021/07/29) +# The LaTeX package macrolist - version 2.1.0 (2021/07/31) > Copyright (C) 2021 Dennis Chen > diff --git a/macros/latex/contrib/macrolist/macrolist.dtx b/macros/latex/contrib/macrolist/macrolist.dtx index 5074875ff0..f11af32bfd 100644 --- a/macros/latex/contrib/macrolist/macrolist.dtx +++ b/macros/latex/contrib/macrolist/macrolist.dtx @@ -16,7 +16,7 @@ %<*package> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{macrolist}[2021/07/29 v2.0.0 Create lists of macros and perform operations on them] +\ProvidesPackage{macrolist}[2021/07/31 v2.1.0 Create lists of macros and perform operations on them] \RequirePackage{pgffor} % @@ -123,7 +123,6 @@ % \fi % % \DescribeMacro{\macrolistcontains} -% % Writing |\macrolistcontains{listname}{element}{true branch}{false branch}| checks whether list \textsf{listname} contains \textsf{element}, executing \textsf{true branch} if it does and \textsf{false branch} if it does not. % % \iffalse @@ -147,7 +146,6 @@ % \fi % % \DescribeMacro{\macrolistadd} -% % To add something to the list \textsf{listname}, pass in |\macrolistadd{listname}[position]{element}|, where \textsf{position} is an optional argument. If nothing is passed in for \textsf{position}, then by default \textsf{element} will be added to the end of the list. % % \iffalse @@ -175,9 +173,35 @@ \fi } % \fi +% \changes{v2.1.0}{2021/07/31}{Add macrolisteadd} +% \DescribeMacro{\macrolisteadd} +% To fully expand |element| before adding it to list |listname|, pass in |\macrolisteadd{listname}[position]{element}|. This behaves similarly to |\edef|. % +% \iffalse +\newcommand{\macrolisteadd}[1]{ + \macrolist@exists{#1} + \def\macrolist@currlist{#1} + \macrolist@listeadd +} +\newcommand{\macrolist@listeadd}[2][]{ + \stepcounter{macrolist@list@\macrolist@currlist} + + \if\relax\detokenize{#1}\relax + \expandafter\xdef\csname macrolist@list@\macrolist@currlist\macrolistsize{\macrolist@currlist}\endcsname{#2} + \else + \expandafter\ifnum\csname themacrolist@list@\macrolist@currlist\endcsname=#1 + \expandafter\gdef\csname macrolist@list@\macrolist@currlist\macrolistsize{\macrolist@currlist}\endcsname{#2} + \else + \macrolist@inbounds{\macrolist@currlist}{#1} + \foreach \macrolist@index in {\macrolistsize{\macrolist@currlist}, ...,\the\numexpr #1+1\relax} { + \global\expandafter\let\csname macrolist@list@\macrolist@currlist\macrolist@index\expandafter\endcsname\csname macrolist@list@\macrolist@currlist\the\numexpr\macrolist@index-1\relax\endcsname + } + \expandafter\xdef\csname macrolist@list@\macrolist@currlist#1\endcsname{#2} + \fi + \fi +} +% \fi % \DescribeMacro{\macrolistremove} -% % To remove an element in a list, write |\macrolistremove{listname}{index}|. % % \iffalse @@ -197,7 +221,6 @@ % \fi % % \DescribeMacro{\macrolistremovelast} -% % To remove the last element in a list, write |\macrolistremovelast{listname}|. This behaves like C++'s |pop_back|. % % \iffalse @@ -209,7 +232,6 @@ % \fi % % \DescribeMacro{\macrolistclear} -% % To clear a list, write |\macrolistclear{listname}|. % % \iffalse @@ -225,7 +247,6 @@ % \fi % % \DescribeMacro{\macrolistsize} -% % To get the size of a list, write |\macrolistsize{listname}|. % % \iffalse @@ -237,7 +258,6 @@ % % \DescribeMacro{\macrolistforeach} % \changes{v1.1.1}{2021/07/23}{Fix foreach doc by removing incorrect begin} -% % To write a for each loop, write % \begin{verbatim} %\macrolistforeach{listname}{\element}[begin][end]{action} @@ -299,7 +319,6 @@ % \fi % % \DescribeMacro{\macrolistjoin} -% % Executing |\macrolistjoin{listname}{joiner}| returns all of the elements separated by \textsf{joiner}. This behaves like Javascript's \textsf{arr.join()}. % % \iffalse diff --git a/macros/latex/contrib/macrolist/macrolist.pdf b/macros/latex/contrib/macrolist/macrolist.pdf index 156a8323f3..300ea7518c 100644 Binary files a/macros/latex/contrib/macrolist/macrolist.pdf and b/macros/latex/contrib/macrolist/macrolist.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md index d22bc201ff..e9ff54953d 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md +++ b/macros/latex/contrib/pdfmanagement-testphase/CHANGELOG.md @@ -4,6 +4,23 @@ first release 0.95a, 2021-02-23 will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), this project uses date-based 'snapshot' version identifiers. + + +## [2021-07-31] +### Added + - \IfPDFManagementActiveTF as copy of `\pdfmanagement_if_active:TF + - \PDFManagementAdd as copy of `\pdfmanagement_add:xxx` + - Support for name trees /AP and /JavaScript in Catalog/Names + - Support to add user file names to /EmbeddedFiles (beside the existing + way with automatically generated names) + - if xcolor is loaded the colors it predefines are now predefined also for l3color + +### Changed + - Implementation of the /EmbeddedFiles name tree, it is now more in line + with the other name trees. + - \Form no longer creates xform objects -- this affected spacing and produced + empty pages. The xform objects are now only created if fields are used. + ## [2021-07-21] ### Added - key `testphase` to \DeclareDocumentMetadata to load testphase packages like diff --git a/macros/latex/contrib/pdfmanagement-testphase/README.md b/macros/latex/contrib/pdfmanagement-testphase/README.md index e521f810db..fd565a6ea6 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/README.md +++ b/macros/latex/contrib/pdfmanagement-testphase/README.md @@ -1,6 +1,6 @@ # LaTeX PDF management testphase bundle -Version: 0.95g, 2021-07-21 +Version: 0.95h, 2021-07-31 This package is used during a test phase to load the new PDF management code of LaTeX. diff --git a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty index b7765e97ed..fca7c1c3ac 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/color-ltx.sty @@ -22,7 +22,7 @@ %% This file has the LPPL maintenance status "maintained". %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{color-ltx}[2021-07-21 v0.95g +\ProvidesPackage{color-ltx}[2021-07-31 v0.95h Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2021/03/07 v1.2e) (DPC)] \edef\Gin@codes{% \catcode`\noexpand\^^A\the\catcode`\^^A\relax diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx index e3d84d6ec6..4e0296c641 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.dtx @@ -86,7 +86,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -906,9 +906,6 @@ %^^A %% \l_@@_para_tmpa_tl %^^A %% \l_@@_text_tmpa_str %^^A %% \g_@@_text_tmpa_str -%^^A %% \l_@@_CheckmarkYes_tl -%^^A %% \l_@@_CheckmarkOff_tl -%^^A %% \l_@@_RadioYes_tl %^^A %% \g_@@_bordercolormodel_tl % %^^A %% \l_@@_dest_pdfview_tl @@ -921,7 +918,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2021-07-21 v0.95g % +\ProvidesFile{hgeneric-testphase.def}[2021-07-31 v0.95h % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? @@ -2482,7 +2479,7 @@ % \end{hypkey} % \begin{hypkey}{colorurl,colorlink,colorrun,colormenu,colorfile} % \begin{hypkey}{urlcolor,linkcolor,runcolor,menucolor,filecolor} -% \begin{hypkey}{allcolor} +% \begin{hypkey}{allcolors} % \begin{macrocode} \seq_map_inline:Nn \c_@@_annot_types_seq { @@ -4215,14 +4212,9 @@ \ExplSyntaxOff \ExplSyntaxOn -\tl_new:N \l_@@_CheckmarkYes_tl -\tl_set:Nn \l_@@_CheckmarkYes_tl { @@_xform_CheckMarkYes } -\tl_new:N \l_@@_CheckmarkOff_tl -\tl_set:Nn \l_@@_CheckmarkOff_tl { @@_xform_CheckMarkOff } \def\@Form[#1] { - \@ifundefined{textcolor}{\let\textcolor\@gobble}{} \kvsetkeys{Form}{#1} \pdf@ifdraftmode{} { @@ -4240,8 +4232,7 @@ } \seq_sort:Nn \l_@@_tmpa_seq { - \int_compare:nNnTF { \pdf@strcmp{##1}{##2} } > { 0 } - %\str_compare:nNnTF {##1} > {##2} + \str_compare:nNnTF {##1} > {##2} { \sort_return_swapped: } { \sort_return_same: } } @@ -4271,64 +4262,6 @@ \pdfmanagement_remove:nn {Catalog / AcroForm }{NeedAppearances} } } - \MakeFieldObject - { - \group_begin: - \fontfamily{pzd} - \fontencoding{U} - \fontseries{m} - \fontshape{n} - \selectfont - \char123 - \group_end: - } - {@@_xform_Ding} - \MakeFieldObject - { - \group_begin: - \fontfamily{pzd} - \fontencoding{U} - \fontseries{m} - \fontshape{n} - \selectfont - \phantom{\char123} - \group_end: - } - {@@_xform_DingOff} - \MakeFieldObject - { - \group_begin: - \fontfamily{pzd} - \fontencoding{U} - \fontseries{m} - \fontshape{n} - \selectfont - \char51 - \group_end: - } - {@@_xform_CheckMarkYes} - \MakeFieldObject - { - \group_begin: - \fontfamily{pzd} - \fontencoding{U} - \fontseries{m} - \fontshape{n} - \selectfont - \phantom{\char51} %perhaps xetex needs some small glyph .. - \group_end: - } - {@@_xform_CheckMarkOff} - \MakeFieldObject - { - \fbox{\textcolor{yellow}{\textsf{Submit}}} %color? - } - {@@_xform_Submit} - \MakeFieldObject - { - \fbox{\textcolor{yellow}{\textsf{SubmitP}}} %color? - } - {@@_xform_SubmitP} } \ExplSyntaxOff \let\@endForm\ltx@empty @@ -4468,8 +4401,7 @@ }% \endgroup } -\tl_new:N \l_@@_RadioYes_tl -\tl_set:Nn \l_@@_RadioYes_tl { @@_xform_Ding } + \def\@@Radio#1{% \Fld@listcount=0~% %\show\Fld@default @@ -4484,7 +4416,21 @@ \leavevmode \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Radio - \pdfannot_box:nnnn + \pdfxform_if_exist:nF { @@_xform_Ding } + { + \pdfxform_new:nnn { @@_xform_Ding } {} + { + \group_begin: + \fontfamily{pzd} + \fontencoding{U} + \fontseries{m} + \fontshape{n} + \selectfont + \char123 + \group_end: + } + } + \pdfannot_box:nnnx {\Fld@width} {\Fld@height} {0pt} %is this correct? @@ -4494,7 +4440,7 @@ << /N << - /\@currValue\c_space_tl \pdfxform_ref:o {@@_xform_Ding} + /\@currValue\c_space_tl \pdfxform_ref:n {@@_xform_Ding} %/Off \c_space_tl \pdfxform_ref:n {@@_xform_DingOff} %hm >> >> @@ -4582,6 +4528,18 @@ \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Submit \hbox_set:Nn \l_tmpa_box { \MakeButtonField {#2}} + \pdfxform_if_exist:nF + { @@_xform_Submit } + { + \pdfxform_new:nnn { @@_xform_Submit }{} + { + \fbox{\color_select:n{yellow}\textsf{Submit}} + } + \pdfxform_new:nnn { @@_xform_SubmitP }{} + { + \fbox{\color_select:n{yellow}\textsf{SubmitP}} + } + } \pdfannot_box:nnnn {\box_wd:N\l_tmpa_box} {\box_ht:N\l_tmpa_box} @@ -4654,6 +4612,33 @@ \mode_leave_vertical: \HyAnn@AbsPageLabel \Hy@escapeform\PDFForm@Check + \pdfxform_if_exist:nF { @@_xform_CheckMarkYes } + { + \pdfxform_new:nnn + {@@_xform_CheckMarkYes}{} + { + \group_begin: + \fontfamily{pzd} + \fontencoding{U} + \fontseries{m} + \fontshape{n} + \selectfont + \char51 + \group_end: + } + \pdfxform_new:nnn + {@@_xform_CheckMarkOff}{} + { + \group_begin: + \fontfamily{pzd} + \fontencoding{U} + \fontseries{m} + \fontshape{n} + \selectfont + \phantom{\char51} %perhaps xetex needs some small glyph .. + \group_end: + } + } \pdfannot_box:nnnn {\Fld@width} {\Fld@height} @@ -4874,8 +4859,8 @@ << /N << - /Yes~\pdfxform_ref:o{\l_@@_CheckmarkYes_tl} - /Off~\pdfxform_ref:o{\l_@@_CheckmarkOff_tl} + /Yes~\pdfxform_ref:n{@@_xform_CheckMarkYes} + /Off~\pdfxform_ref:n{@@_xform_CheckMarkOff} >> >> /MK<< diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf index de4dd81f09..1ec46ba75c 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf and b/macros/latex/contrib/pdfmanagement-testphase/hyperref-generic.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty index 96e9d086a6..f948928f94 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty @@ -19,7 +19,7 @@ % % for those people who are interested. \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-07-21}{0.95g} +\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-07-31}{0.95h} {Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF} \cs_if_exist:NT \pdfmanagement_add:nnn diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx index 7b4aad8fe6..0102b1c574 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.dtx @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % @@ -56,27 +56,27 @@ % \begin{macrocode} %\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2021-07-21}{} + {l3backend-testphase-dvipdfmx.def}{2021-07-31}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} % %<*dvips> - {l3backend-testphase-dvips.def}{2021-07-21}{} + {l3backend-testphase-dvips.def}{2021-07-31}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} % %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2021-07-21}{} + {l3backend-testphase-dvisvgm.def}{2021-07-31}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} % %<*luatex> - {l3backend-testphase-luatex.def}{2021-07-21}{} + {l3backend-testphase-luatex.def}{2021-07-31}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} % %<*pdftex> - {l3backend-testphase-pdftex.def}{2021-07-21}{} + {l3backend-testphase-pdftex.def}{2021-07-31}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} % %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2021-07-21}{} + {l3backend-testphase-xetex.def}{2021-07-31}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} % % \end{macrocode} @@ -1086,116 +1086,70 @@ % \subsubsection { Special case: the /Names/EmbeddedFiles dictionary } % Entries to /Names are handled differently, in part (/Desc) it is automatic, for % other special commands like \cs{pdfnames} must be used. For EmbeddedFiles -% we need some code to push the tree if files have been added. dvips wants code -% for every file and then creates the Name tree automatically. +% dvips wants code for every file and then creates the Name tree automatically. +% Other name trees are ignored. +% TODO: Currently the code for EmbeddedFiles is still a bit +% different but this should be merged, all name trees should be handled with the +% same code. % \begin{macrocode} % pdflatex %<*pdftex> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_gpush:n #1 %array content +\cs_new_protected:Npn \@@_backend_Names_gpush:nn #1 #2 %#1 name of name tree, #2 array content { - \pdf_object_unnamed_write:nn {dict} {/Names [#1] } - \tex_pdfnames:D {/EmbeddedFiles~\pdf_object_ref_last:} + \pdf_object_unnamed_write:nn {dict} {/Names [#2] } + \tex_pdfnames:D {/#1~\pdf_object_ref_last:} } % %<*luatex> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_gpush:n #1 %array content +\cs_new_protected:Npn \@@_backend_Names_gpush:nn #1 #2 %#1 name of name tree, #2 array content { - \pdf_object_unnamed_write:nn {dict} {/Names [#1] } - \tex_pdfextension:D~names~{/EmbeddedFiles~\pdf_object_ref_last: } + \pdf_object_unnamed_write:nn {dict} {/Names [#2] } + \tex_pdfextension:D~names~ {/#1~\pdf_object_ref_last:} } % %<*dvipdfmx|xdvipdfmx> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_gpush:n #1 %array content +\cs_new_protected:Npn \@@_backend_Names_gpush:nn #1 #2 %#1 name of name tree, #2 array content { - \pdf_object_unnamed_write:nn {dict} { /Names [#1] } - %n or x? - \@@_backend:x {put~@names~<>} + \pdf_object_unnamed_write:nn {dict} {/Names [#2] } + \@@_backend:x {put~@names~<>} } % %dvips: noop %<*dvips> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_gpush:n #1 {} +\cs_new_protected:Npn \@@_backend_Names_gpush:nn #1 #2 {} % %dvisvgm: noop %<*dvisvgm> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_gpush:n #1 {} +\cs_new_protected:Npn \@@_backend_Names_gpush:nn #1 #2 {} % - -% \end{macrocode} -% Names in the EmbeddedFiles name tree must sorted alphabetically, -% so we need commands to create this names. And we need a sequence to store -% the names and the objects. We use the prefix l3ef, and we assume that at -% most 9999 files will be used. -% \begin{variable}{\g_@@_backend_EmbeddedFiles_int} -% \end{variable} -% \begin{macro}{\@@_backend_EmbeddedFiles_name:} -% \begin{macrocode} -%<*drivers> -\int_new:N \g_@@_backend_EmbeddedFiles_int -\cs_new:Npn \@@_backend_EmbeddedFiles_name: - { - ( - l3ef - \int_compare:nNnT {\g_@@_backend_EmbeddedFiles_int} < {10} - {0} - \int_compare:nNnT {\g_@@_backend_EmbeddedFiles_int} < {100} - {0} - \int_compare:nNnT {\g_@@_backend_EmbeddedFiles_int} < {1000} - {0} - \int_use:N \g_@@_backend_EmbeddedFiles_int - ) - } -% -% \end{macrocode} -% \end{macro} -% \begin{variable}{\g_@@_backend_EmbeddedFiles_seq,\g_@@_backend_EmbeddedFiles_named_prop} -% The sequence will hold the content of the array that is pushed out at then -% end (not with dvips), the prop holds the obj names-names relation. -% \end{variable} -% \begin{macrocode} -%<*drivers> -\seq_new:N \g_@@_backend_EmbeddedFiles_seq -\prop_new:N \g_@@_backend_EmbeddedFiles_named_prop -% % \end{macrocode} -% \begin{macro}{\@@_backend_NamesEmbeddedFiles_add:n} -% This command saves an object reference of a filespec dictionary in the -% EmbeddedFiles name tree. We define a prop to store the relation between -% object name and name in the name tree. +% EmbeddedFiles is a bit special. +% For once we need backend commands for dvips. +% But we want also an option to create the name on the fly. +% \begin{macro}{\@@_backend_NamesEmbeddedFiles_add:nn} +% dvips need special backend code to create the name tree. +% With the other engines it does nothing. % \begin{macrocode} %<*pdftex|luatex|dvipdfmx|xdvipdfmx> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_add:n #1 - %#1 object ref - { - \int_gincr:N \g_@@_backend_EmbeddedFiles_int - \prop_gput:Nnx \g_@@_backend_EmbeddedFiles_named_prop - { #1 } - { \@@_backend_EmbeddedFiles_name: } - \seq_gput_right:Nx \g_@@_backend_EmbeddedFiles_seq - { \@@_backend_EmbeddedFiles_name: \c_space_tl #1 } - } - +\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_add:nn #1 #2 {} % %<*dvips> -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_add:n #1 +\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_add:nn #1 #2 { - \int_gincr:N \g_@@_backend_EmbeddedFiles_int - \prop_gput:Nnx \g_@@_backend_EmbeddedFiles_named_prop - { #1 } - { \@@_backend_EmbeddedFiles_name: } \@@_backend_pdfmark:x { - /Name~\@@_backend_EmbeddedFiles_name:~ - /FS~#1~ + /Name~#1~ + /FS~#2~ /EMBED } } % %<*dvisvgm> %no op. Or is there any sensible use for it? -\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_add:n #1 +\cs_new_protected:Npn \@@_backend_NamesEmbeddedFiles_add:nn #1 #2 {} + % % \end{macrocode} % \end{macro} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf index 452b140f99..9addd760c8 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3backend-testphase.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx index 4f4778699a..8bd41b49c8 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.dtx @@ -52,7 +52,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -424,7 +424,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdfannot}{2021-07-31}{0.95h} {PDF-annotations} \RequirePackage{l3pdfdict} % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf index 88bc60c05d..d2924f459a 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfannot.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx index ef283dd664..e80d6097cb 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -212,7 +212,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdfdict}{2021-07-31}{0.95h} {Tools for PDF dictionaries (LaTeX PDF management testphase bundle)} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf index 8df8e77e73..b548db0e6a 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfdict.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx index 146214c7f1..77bf53bd85 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf index e1074881bc..8ca1a9bf06 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-action.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx index 32f2f76ffe..a1386fcc08 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.dtx @@ -68,7 +68,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf index 722ab053e6..6733f3ea39 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-checkbox.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx index f247ef5142..de162d3ab7 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf index bb9bd4816e..93a763cc9c 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-choice.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx index 3d6ee2c6c2..02889ec5e3 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.dtx @@ -59,7 +59,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf index 599400bd4e..5397bcb5e3 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-pushbutton.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx index 3a451bcead..b25b7ead14 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.dtx @@ -87,7 +87,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf index 4543748a37..045af32e84 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-radiobutton.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx index 81330a6520..1289d54de9 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf index 168a072993..1bacb22920 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield-textfield.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx index 36e4415eef..5a1d17809e 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.dtx @@ -73,7 +73,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -970,7 +970,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2021-07-21}{0.95g}% +\ProvidesExplPackage{l3pdffield-testphase}{2021-07-31}{0.95h}% {form fields} % \end{macrocode} % \subsection{hyperref specific command} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf index b9d740e9f9..c271631238 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffield.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx index 0fadfbe46f..56e927b41d 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -400,7 +400,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdffile}{2021-07-31}{0.95h} {embedding and referencing files in PDF---LaTeX PDF management testphase bundle} \RequirePackage{l3pdftools} %temporarly!! % diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf index faa18ada04..37cad7dd54 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdffile.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx index 0390980da5..c3de57b74c 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.dtx @@ -61,7 +61,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -137,9 +137,14 @@ % {\pdfmanagement_if_active:} % This conditional tests if the resource management code is active. % \end{function} -% -% \begin{function}[added = 2020-04-06] -% {\pdfmanagement_add:nnn,\pdfmanagement_add:nnx,\pdfmanagement_add:nxx} +% \begin{function}[added=2021-07-23] +% {\IfPDFManagementActiveTF} +% This is a LaTeX2e version of the conditional +% \end{function} + +% \begin{function}[added = 2020-04-06,updated=2021-07-23] +% {\pdfmanagement_add:nnn,\pdfmanagement_add:nnx,\pdfmanagement_add:nxx,\pdfmanagement_add:xxx, +% \PDFManagementAdd} % \begin{syntax} % \cs{pdfmanagement_add:nnn} \Arg{resource path} \Arg{name} \Arg{value} % \end{syntax} @@ -152,7 +157,8 @@ % keys used in PDF dictionaries (see the l3pdfdict module) the name is escaped % with \cs{str_convert_pdfname:n} when stored. % \Arg{value} should be a valid PDF value for this Name in the -% target dictionary. +% target dictionary. |\PDFManagementAdd| is a copy of |\pdfmanagement_add:xxx| +% and so expands all its arguments. % % % The code works with all major engines but not necessarily @@ -166,6 +172,10 @@ % backends. Some engines have to use labels and the aux-file to setup % the dictionaries and so need at least two compilations to put everything % in place. +% \item dvips doesn't support everything. It is for example not possible +% to add manually or through side effects +% a name tree like /AP or /JavaScript, pdfmark doesn't provide a handler +% here---at least I didn't find anything suitable. % \end{itemize} % \end{function} % @@ -549,6 +559,61 @@ % attach the file to the file panel. % \end{tabularx} % +% \paragraph{Catalog entries for name trees} +% +% \emph{Not supported in the dvips backend, pdfmark doesn't have an interface here}. +% +% In various places the PDF format allows to reference objects by name instead +% of by object reference. The relationship between a name and the object reference +% are store in so-called \emph{name trees}, which are stored in the +% Catalog/Names dictionary. The |/Dests| and the |/EmbeddedFiles| name trees are +% handled implicitly if destinations or files are added. Names to the other +% name trees can be added with |\pdfmanagement_add:nnn|, e.g. to add an value to +% the AP names (for appearance streams) use +% +% \begin{verbatim} +% \pdfmanagement_add:nnx { Catalog / Names / AP } {myAPname} {\pdf_object_ref_last:} +% \end{verbatim} +% +% Remarks: +% \begin{itemize} +% \item The name |myAPname| is processed through |\pdf_string_from_unicode:nnN{utf8/string}| +% and parentheses are added automatically. Ensure that the use of the name +% handles it in the same way. +% \item It is currently not possible to test if a name has already been used +% by another package or previous code, +% so use names where you can be confident that they are unique. +% (It would be possible to split up the first part and test, but it would slow +% down the compilation and I'm not sure if it is worth the trouble) +% \item The value is not preprocessed, it is up-to-you to ensure that it does the +% right thing. +% \item Currently the structure of the name tree is flat, it doesn't use +% Kids. But this can be changed if the need arise. +% \end{itemize} +% +% The following name trees can be filled with this method. Currently only the +% first three are activated. For the first, |EmbeddedFiles| there are two methods +% to add a value:\\ +% |\pdfmanagement_add:nnn{Catalog/Names/EmbeddedFiles}{name}{reference}| +% and +% |\pdfmanagement_add:nnn{Catalog/Names}{EmbeddedFiles}{reference}|. +% This is intended, the second methods creates a name on the fly (with the prefix l3ef) +% +% \medskip +% \noindent +% \begin{tabularx}{\linewidth}{ll>{\raggedright\arraybackslash}X} +% Catalog/Names/EmbeddedFiles & A name tree mapping name strings to file +% specifications for embedded file streams. The value should be a reference to a filespec +% dictionary\\ +% Catalog/Names/AP & A name tree mapping name strings to annotation appearance streams\\ +% Catalog/Names/JavaScript & A name tree mapping name strings to documentlevel ECMAScript actions\\ +% (inactive) Catalog/Names/Pages & A name tree mapping name strings to visible pages for use in interactive forms\\ +% (inactive) Catalog/Names/Templates & A name tree mapping name strings to invisible pages for use in interactive forms\\ +% (inactive) Catalog/Names/IDS & A name tree mapping digital identifiers to Web.Capture content sets\\ +% (inactive) Catalog/Names/URLS & A name tree mapping name strings to documentlevel ECMAScript actions\\ +% (inactive) Catalog/Names/Renditions & A name tree mapping name strings (which shall have Unicode encoding) to rendition objects +% (it is not quite clear yet, what unicode encoding means here. Perhaps this string will need special handling)\\ +% \end{tabularx} % \end{documentation} % % \begin{implementation} @@ -557,7 +622,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdfmanagement}{2021-07-31}{0.95h} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} % % \end{macrocode} @@ -576,6 +641,9 @@ \msg_new:nnn { pdfmanagement } { no-show } { It~is~not~possible~to~show~the~content~of~'#1'.} +\msg_new:nnn { pdfmanagement } { name-exist } + { The~name~'#1'~has~already~been~used~for~name~tree~'#2'.} + \msg_new:nnn { pdfmanagement } { show-dict } { The~PDF~resource~'#1'~ @@ -593,6 +661,16 @@ command~'#1'~ignored. } % \end{macrocode} +% +% \begin{variable}{\l_@@_tmpa_tl,\l_@@_tmpb_tl,\l_@@_tmpa_seq} +% Some temp variables +% \begin{macrocode} +\tl_new:N \l_@@_tmpa_tl +\tl_new:N \l_@@_tmpb_tl +\seq_new:N \l_@@_tmpa_seq +% \end{macrocode} +% \end{variable} + % \begin{variable}{\g_@@_active_bool} % This boolean will control the activation of the management code. % It is used in the hooks, and in some backend files. @@ -612,6 +690,7 @@ \prg_set_eq_conditional:NNn \pdfmanagement_if_active: \@@_if_active: { p , T , F , TF } +\cs_set_eq:NN \IfPDFManagementActiveTF\pdfmanagement_if_active:TF % \end{macrocode} % We use a hook, to collect value added before the backend is ready. % \begin{macrocode} @@ -639,7 +718,8 @@ } } -\cs_generate_variant:Nn \pdfmanagement_add:nnn {nnx,nxx} +\cs_generate_variant:Nn \pdfmanagement_add:nnn {nnx,nxx,xxx} +\cs_set_eq:NN \PDFManagementAdd \pdfmanagement_add:xxx % \end{macrocode} % \subsection{Hooks -- shipout and end of run code} % Code is executed in three places: At shipout of every page, @@ -1006,6 +1086,7 @@ % \end{variable} % \begin{macro}{ \@@_catalog_XX_gput:n } % Various commands to handle subentries and special cases. +% At first we set up a few lists of the various types. % \begin{macrocode} \pdfdict_new:n { g__pdf_Core/Catalog} @@ -1059,8 +1140,24 @@ AcroForm/CO } - - +% \end{macrocode} +% Names trees in Catalog/Names. We prepare the full list +% but activate only AP and JavaScript for now. +% /EmbeddedFiles has special code and so is not in the name list. +% \begin{macrocode} +\clist_const:Nn \c_@@_Catalog_nametree_clist + { + AP, + JavaScript, +% Pages, +% Templates, +% IDS, +% URLS, +% Renditions + } +% \end{macrocode} +% now we create the handler. The entries in the seq-list store in a seq +% \begin{macrocode} \clist_map_inline:Nn \c_@@_Catalog_seq_clist { \seq_new:c { g_@@_/Catalog/#1_seq } % new name later @@ -1070,6 +1167,10 @@ } } +% \end{macrocode} +% OCProperties/D is special: it handles a default. This is done by adding to +% the left of the seq +% \begin{macrocode} \cs_new_protected:cpn { @@_handler/Catalog/OCProperties/D_gput:n } #1 { \seq_gput_left:cn @@ -1077,6 +1178,58 @@ { #1 } } % \end{macrocode} +% The name tree keys store in a property and check for duplicates. This is done +% with an auxiliary. +% \begin{macrocode} +\cs_new_protected:Npn \@@_nametree_add_aux:nnn #1 #2 #3 + %#1 name tree, #2 sanitized name #3 value + { + \prop_get:coNTF + { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/Names/#1 }} + { #2 } + \l_@@_tmpb_tl + { + \msg_error:nnnn{pdfmanagement}{name-exist}{#2}{#1} + } + { + \prop_gput:con + { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/Names/#1 }} + { #2 } + { #3 } + } + } +% \end{macrocode} +% This is the standard handler for most names trees: +% \begin{macrocode} +\clist_map_inline:Nn \c_@@_Catalog_nametree_clist + { + \pdfdict_new:n { g__pdf_Core/Catalog/Names/#1} + \cs_new_protected:cpn { @@_handler/Catalog/Names/#1/?_gput:nn } ##1 ##2 + { + \pdf_string_from_unicode:nnN {utf8/string}{##1}\l_@@_tmpa_tl + \exp_args:Nno + \@@_nametree_add_aux:nnn {#1}{\l_@@_tmpa_tl}{##2} + } + } +% \end{macrocode} +% EmbeddedFiles is a bit special. For once there is special backend code +% needed by dvips. Beside this we also want the option to create the file name +% on the fly, so they are actually two access methods: +% |\pdfmanagement_add:nnn{Catalog/Names/EmbeddedFiles}{name}{reference}| +% and +% |\pdfmanagement_add:nnn{Catalog/Names}{EmbeddedFiles}{reference}| +% \begin{macrocode} +\pdfdict_new:n { g__pdf_Core/Catalog/Names/EmbeddedFiles} +\cs_new_protected:cpn { @@_handler/Catalog/Names/EmbeddedFiles/?_gput:nn } #1 #2 + { + \pdf_string_from_unicode:nnN {utf8/string}{#1}\l_@@_tmpa_tl + \exp_args:Nno + \@@_nametree_add_aux:nnn + {EmbeddedFiles}{\l_@@_tmpa_tl}{#2} + \exp_args:No + \__pdf_backend_NamesEmbeddedFiles_add:nn {\l_@@_tmpa_tl}{#2} + } +% \end{macrocode} % \end{macro} % % \paragraph {Building the catalog: Push order} % \begin{macro}{\@@_Catalog_gpush:} @@ -1099,7 +1252,11 @@ { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog} } \__pdf_backend_catalog_gput:nn % output names tree: - \use:c { @@_/Catalog/Names/EmbeddedFiles_gpush: } + \use:c{ @@_/Catalog/Names_gpush:n } {EmbeddedFiles} + \clist_map_inline:Nn \c_@@_Catalog_nametree_clist + { + \use:c{ @@_/Catalog/Names_gpush:n } {##1} + } } % \end{macrocode} % \end{macro} @@ -1283,12 +1440,12 @@ { 0 } { \__pdf_backend_object_new:nn { @@/Catalog/OCProperties } { dict } - \seq_gpop_left:cN { g_@@_/Catalog/OCProperties/Configs_seq} \l_tmpa_tl + \seq_gpop_left:cN { g_@@_/Catalog/OCProperties/Configs_seq} \l_@@_tmpa_tl \exp_args:Nnx \__pdf_backend_object_write:nn {@@/Catalog/OCProperties} { /OCGs~[ \seq_use:cn { g_@@_/Catalog/OCProperties/OCGs_seq } {~} ] - /D~\l_tmpa_tl~ + /D~\l_@@_tmpa_tl~ \seq_if_empty:cF { g_@@_/Catalog/OCProperties/Configs_seq } { /Configs~ @@ -1382,6 +1539,30 @@ % \begin{NOTE}{UF} % TODO access function for the name in the name tree % \end{NOTE} +% \begin{variable}{\g_@@_EmbeddedFiles_int} +% We want to create names for files on the fly. For this we use an int. +% \begin{macrocode} +\int_new:N \g_@@_EmbeddedFiles_int +% \end{macrocode} +% \end{variable} +% \begin{macro}{\@@_EmbeddedFiles_name:} +% We use the prefix l3ef, and pad numbers below 9999. +% \begin{macrocode} +\cs_new:Npn \@@_EmbeddedFiles_name: + { + ( + l3ef + \int_compare:nNnT {\g_@@_EmbeddedFiles_int} < {10} + {0} + \int_compare:nNnT {\g_@@_EmbeddedFiles_int} < {100} + {0} + \int_compare:nNnT {\g_@@_EmbeddedFiles_int} < {1000} + {0} + \int_use:N \g_@@_EmbeddedFiles_int + ) + } +% \end{macrocode} +% \end{macro} % \begin{macro}{ Handler} % EmbeddedFiles is an array and needs a special handler to add values. % \begin{macrocode} @@ -1389,25 +1570,44 @@ \cs_new_protected:cpn { @@_handler/Catalog/Names/EmbeddedFiles_gput:n } #1 { - \__pdf_backend_NamesEmbeddedFiles_add:n { #1 } + \int_gincr:N \g_@@_EmbeddedFiles_int + \exp_args:Nnx + \prop_gput:cnn + { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/Names/EmbeddedFiles }} + { \@@_EmbeddedFiles_name: } + { #1 } + \exp_args:Nx + \__pdf_backend_NamesEmbeddedFiles_add:nn {\@@_EmbeddedFiles_name:} { #1 } } % \end{macrocode} % \end{macro} -% The entry should only be added if there are actually embedded files. -% This can be tested by checking the names_seq -% \begin{macro}{\@@_/Catalog/Names/EmbeddedFiles_gpush:} +% This pushes out the other names trees (but not with dvips). +% TODO: currently it simply write in the root of the name tree. +% That is the fastest. +% If they get longer we perhaps need to build something with Kids and Limits. +% \begin{macro}{\@@_/Catalog/Names/?_gpush:} % \begin{macrocode} -% -\cs_new_protected:cpn { @@_/Catalog/Names/EmbeddedFiles_gpush: } - { - \seq_if_empty:NF \g__pdf_backend_EmbeddedFiles_seq - { - \exp_args:Nx \__pdf_backend_NamesEmbeddedFiles_gpush:n - { - \seq_use:Nn \g__pdf_backend_EmbeddedFiles_seq {~} - } - } - } +\cs_new_protected:cpn { @@_/Catalog/Names_gpush:n } #1 %#1 name of name tree + { + \pdfdict_if_empty:nF { g__pdf_Core/Catalog/Names/#1 } + { + \seq_clear:N \l_@@_tmpa_seq + \prop_map_inline:cn + {\__kernel_pdfdict_name:n { g__pdf_Core/Catalog/Names/#1 }} + { \seq_put_right:Nn \l_@@_tmpa_seq {##1~##2}} + \seq_sort:Nn \l_@@_tmpa_seq + { + \str_compare:nNnTF {##1} > {##2} + { \sort_return_swapped: } + { \sort_return_same: } + } + \exp_args:Nnx \__pdf_backend_Names_gpush:nn + {#1} + { + \seq_use:Nn \l_@@_tmpa_seq {~} + } + } + } % \end{macrocode} % \end{macro} % \begin{macro}{@@_handler/Catalog/?_show:} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf index f017471217..5e1cb6535c 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmanagement.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx index f590a2b897..3ca574f02a 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -343,7 +343,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdfmeta}{2021-07-31}{0.95h} {PDF-Standards---LaTeX PDF management testphase bundle} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf index 030b8f17d8..d85623dae6 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx index 2df7203e0f..efed778e78 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.dtx @@ -53,7 +53,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -215,7 +215,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdftools}{2021-07-31}{0.95h} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf index c322f0e976..ee977c642c 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdftools.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx index eef4ae7ee0..0591756bf0 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.dtx @@ -52,7 +52,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -136,7 +136,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2021-07-21}{0.95g} +\ProvidesExplPackage{l3pdfxform}{2021-07-31}{0.95h} {command to create xforms (beta)---LaTeX PDF management testphase bundle} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf index 7e6db80d8a..59336ced8e 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf and b/macros/latex/contrib/pdfmanagement-testphase/l3pdfxform.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx index 0679203098..4e7eecc1ab 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.dtx @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -182,7 +182,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2021-07-21}{0.95g} +\ProvidesExplPackage{ltdocinit}{2021-07-31}{0.95h} {Initialize document metadata} % % \end{macrocode} diff --git a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf index ce3ecd37bb..4d155d2c4c 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf and b/macros/latex/contrib/pdfmanagement-testphase/ltdocinit.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty index d123a70115..fdfe7b4279 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/pdflscape-ltx.sty @@ -22,7 +22,7 @@ %% This work consists of the main source file pdflscape-ltx.sty %% \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{pdflscape-ltx}{2021-07-21}{0.95g} +\ProvidesExplPackage{pdflscape-ltx}{2021-07-31}{0.95h} {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)} \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}} diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 364304de2c..1295c4b6bf 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -67,7 +67,7 @@ % |firstaidoff={name1,name2,...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2021-07-21}{0.95g} +\ProvidesExplPackage{pdfmanagement-firstaid}{2021-07-31}{0.95h} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf index 0aeab401dd..5206d4027b 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf and b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-firstaid.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx index 7d0b20ee02..37dc11f65b 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Version 0.95g, released 2021-07-21} +% \date{Version 0.95h, released 2021-07-31} % % \maketitle % \begin{documentation} @@ -384,7 +384,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2021-07-21}{0.95g} +\ProvidesExplPackage{pdfmanagement-testphase}{2021-07-31}{0.95h} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -411,7 +411,7 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-07-21}{0.95g} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-07-31}{0.95h} {PDF~management~code~(testphase)} % %<*package> diff --git a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf index 4928dea1fc..64f1d65c19 100644 Binary files a/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf and b/macros/latex/contrib/pdfmanagement-testphase/pdfmanagement-testphase.pdf differ diff --git a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty index 5151ea4ff9..e7cf7c36e5 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/transparent-ltx.sty @@ -3,7 +3,7 @@ %% a replacement for transparent sty from Heiko Oberdiek %% \NeedsTeXFormat{LaTeX2e}[2020/10/01] -\ProvidesExplPackage{transparent-ltx}{2021-07-21}{0.95g} +\ProvidesExplPackage{transparent-ltx}{2021-07-31}{0.95h} {Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}% \RequirePackage{l3opacity} diff --git a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty index 0861462d6b..12c87fdd33 100644 --- a/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty +++ b/macros/latex/contrib/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty @@ -1,6 +1,6 @@ %% LaTeX2e file `xcolor-patches.sty' %% -\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-07-21 v0.95g patch xcolor for l3color] +\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-07-31 v0.95h patch xcolor for l3color] \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{} \ExplSyntaxOn @@ -116,3 +116,21 @@ {\noexpand\xcolor@{\@@cls}{\the\toks@}{\@@mod}{\@@clr}}}% \fi}% \expandafter\endgroup\@@tmp\xglobal@stop} + +%re-predefine the colors +\definecolorset{rgb/hsb/cmyk/gray}{}{}% + {brown,.75,.5,.25/.083333,.66667,.75/0,.25,.5,.25/.5475;% + lime,.75,1,0/.20833,1,1/.25,0,1,0/.815;% + orange,1,.5,0/.083333,1,1/0,.5,1,0/.595;% + pink,1,.75,.75/0,.25,1/0,.25,.25,0/.825;% + purple,.75,0,.25/.94444,1,.75/0,.75,.5,.25/.2525;% + teal,0,.5,.5/.5,1,.5/.5,0,0,.5/.35;% + violet,.5,0,.5/.83333,1,.5/0,.5,0,.5/.205}% +\definecolorset{cmyk/rgb/hsb/gray}{}{}% + {olive,0,0,1,.5/.5,.5,0/.16667,1,.5/.39} +\definecolorset{gray/rgb/hsb/cmyk}{}{}% + {darkgray,.25/.25,.25,.25/0,0,.25/0,0,0,.75;% + gray,.5/.5,.5,.5/0,0,.5/0,0,0,.5;% + lightgray,.75/.75,.75,.75/0,0,.75/0,0,0,.25} + +\endinput -- cgit v1.2.3