summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-06-08 03:01:59 +0000
committerNorbert Preining <norbert@preining.info>2023-06-08 03:01:59 +0000
commit538e6d6e7c75b7cca5470604811205f9dbd55c03 (patch)
tree4807afb694acc9e4ecff2d466d5e37788127d6fb /macros/latex/contrib
parent5c99135c06494b236cce7fd76e346851cf8c4408 (diff)
CTAN sync 202306080301
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/examz/README.txt18
-rw-r--r--macros/latex/contrib/examz/examz.dtx1168
-rw-r--r--macros/latex/contrib/examz/examz.ins59
-rw-r--r--macros/latex/contrib/examz/examz.pdfbin0 -> 273602 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdfbin8281245 -> 8287659 bytes
-rw-r--r--macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex51
-rw-r--r--macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty53
-rw-r--r--macros/latex/contrib/postit/README.md8
-rw-r--r--macros/latex/contrib/postit/doc/postit-doc-en.pdfbin0 -> 491144 bytes
-rw-r--r--macros/latex/contrib/postit/doc/postit-doc-en.tex629
-rw-r--r--macros/latex/contrib/postit/doc/postit-doc-fr.pdf (renamed from macros/latex/contrib/postit/doc/postit-doc.pdf)bin494921 -> 498661 bytes
-rw-r--r--macros/latex/contrib/postit/doc/postit-doc-fr.tex (renamed from macros/latex/contrib/postit/doc/postit-doc.tex)14
-rw-r--r--macros/latex/contrib/postit/tex/postit.sty568
-rw-r--r--macros/latex/contrib/tagpdf/README.md4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-backend.dtx8
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-checks.dtx22
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-code.pdfbin1561747 -> 1564470 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-data.dtx18
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-roles.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-space.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-struct.dtx43
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-tree.dtx4
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf-user.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.dtx6
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.pdfbin1004170 -> 1012495 bytes
-rw-r--r--macros/latex/contrib/tagpdf/tagpdf.tex152
-rw-r--r--macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty156
30 files changed, 2670 insertions, 339 deletions
diff --git a/macros/latex/contrib/examz/README.txt b/macros/latex/contrib/examz/README.txt
new file mode 100644
index 0000000000..4ef05244e0
--- /dev/null
+++ b/macros/latex/contrib/examz/README.txt
@@ -0,0 +1,18 @@
+
+
+----------------------------------------------------------------------
+`examz' --- 2023/06/07 Version 1.0.0
+
+Copyright (C) 2023 by Christopher McClain
+E-mail: christopher.mcclain@mail.wvu.edu
+
+Released under the LaTeX Project Public License v1.3c or later
+See https://www.latex-project.org/lppl.txt
+----------------------------------------------------------------------
+
+The `examz' document class builds on the `exam' document class that
+was developed by Philip S. Hirschhorn. An author may use the class
+exactly as the `exam' class, but there are also additional features.
+The document class facilitates the writing of questions with random
+elements, the creation of multiple versions of an exam, and the use
+of separate files as question banks.
diff --git a/macros/latex/contrib/examz/examz.dtx b/macros/latex/contrib/examz/examz.dtx
new file mode 100644
index 0000000000..fe0eae0ddd
--- /dev/null
+++ b/macros/latex/contrib/examz/examz.dtx
@@ -0,0 +1,1168 @@
+% \iffalse meta-comment
+%
+% `examz' --- 2023/06/07 Version 1.0.0
+%
+% Copyright (C) 2023 by Christopher McClain
+% E-mail: christopher.mcclain@mail.wvu.edu
+% -----------------------------------------
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3c of this license or (at your option) any later
+% version. The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2008 or later.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{examz.dtx}
+%</driver>
+%<class>\NeedsTeXFormat{LaTeX2e}
+%<class>\ProvidesClass{examz}
+%<*class>
+ [2023/06/07 v1.0.0 Randomized exams with multiple versions]
+%</class>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[numbered]{hypdoc}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{examz.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \changes{v1.0.0}{2023/06/07}{First public release}
+%
+% \GetFileInfo{examz.dtx}
+%
+% \DoNotIndex{\addtocounter,\arabic,\AtBeginDocument,\AtEndDocument,\begin,
+% \BODY,\boolfalse,\booltrue,\chk@incompi,\clearcounterprefix,
+% \Collect@Body,\counterprefix,\CurrentOption,\DeclareOption,
+% \decr@latest@ques,\end,\endcoverpages,\find@latestques,\ifbool,
+% \ifnumequal,\ifnumless,\ifnumodd,\ifrandomizectr,\input,
+% \inputcountersfile,\LoadClass,\newbool,\newcommand,\newcounter,
+% \NewEnviron,\newenvironment,\newpage,\noprintanswers,
+% \norandomizectr,\notbool,\null,\opencountersfile,\parts,
+% \PassOptionsToClass,\printanswers,\ProcessOptions,\question,
+% \questions,\randomizectr,\refto@index,\relax,\renewcommand,
+% \RequirePackage,\savecounter,\setcounter,\setcounterprefix,
+% \setup@point@toks,\space,\subparts,\subsubparts,\thispagestyle,
+% \typein,\typeout,\value,\whileboolexpr,\xpatchcmd,
+% \xrandprovidecounter,\xvalue,\hrulefill,\makebox,\EnterResponse,
+% \NumberOfVersions,\endinput}
+%
+% \title{^^A
+% The \textsf{examz} class\thanks{^^A
+% This file describes version \fileversion, last revised \filedate.^^A
+% }^^A
+% }
+% \author{^^A
+% Christopher McClain\thanks{E-mail: christopher.mcclain@mail.wvu.edu}^^A
+% }
+%
+% \date{Released \filedate}
+%
+% \maketitle
+%
+%\begin{abstract}
+% The \textsf{examz} document class builds on the \textsf{exam} document class
+% that was developed by Philip S. Hirschhorn. An author may use the class
+% exactly as the \textsf{exam} class, but there are also additional features.
+% The document class facilitates the writing of questions with random elements,
+% the creation of multiple versions of an exam, and the use of separate files
+% as question banks.
+%\end{abstract}
+%
+%\tableofcontents
+%
+%\section{Introduction}
+%
+%\subsection{About}
+%
+% Since 1994, Philip Hirschhorn's \textsf{exam} document class has provided
+% authors and educators with a framework for writing exams that is both highly
+% customizable and easy to use. The \textsf{examz} document class loads the
+% \textsf{exam} class and adds some more features. Most of these new features
+% require the \textsf{counterz} package.
+%
+% First of all, the \textsf{examz} class may be loaded with new options that
+% facilitate the use of commands from the \textsf{counterz} package for writing
+% questions with random elements. Second, a new \textsf{versions} environment
+% allows for the creation of multiple versions of an exam in the same document,
+% alternating between exams and solutions, if desired. Third, the command
+% \cs{question} may now be replaced by the command \cs{questionfrombank} which
+% allows for random selection of questions from a user-defined question bank.
+% Finally, a few simple macros make it even easier to modify the customized
+% content in headers, footers, and special pages when creating new exams from
+% previous documents.
+%
+% Some commands in \textsf{exam} have been patched in order to distinctly label
+% the questions in different exam versions and their solutions (so that \LaTeX{}
+% issues no warnings about multiply-defined labels). The optional environment
+% \textsf{coverpages} has also been patched for two-sided documents so that the
+% subsequent odd arabic numerals always appear on the front pages.
+%
+%\subsection{License}
+%
+% Copyright \copyright\ 2023 Christopher McClain. This software may be copied,
+% distributed, and/or modified under the %terms of the
+% \href{https://www.latex-project.org/lppl/}{LaTeX Project Public License},
+% either version 1.3c of this license or any later version.
+%
+%\subsection{Installation}
+%
+% Run \LaTeX{} on examz.ins to generate the file examz.cls, and copy it to
+% your local texmf directory. Run (pdf)\LaTeX{} on examz.dtx to generate the
+% documentation examz.pdf. Typesetting the documentation requires the package
+% \textsf{hypdoc} which is included in \TeX\ distributions and at
+% \href{http://www.ctan.org} {The Comprehensive TeX Archive Network}.
+%
+%\section{User Guide}
+%
+% To use this document class, begin your document with the following line:
+%
+%\begin{verbatim}
+%\documentclass{examz}
+%\end{verbatim}
+%
+% \noindent
+% This document class loads the \textsf{exam} class and admits the options for
+% that class. See the documentation for the \textsf{exam} class for details. The
+% \textsf{examz} class also admits the additional options \textsf{randomize},
+% \textsf{norandomize}, \textsf{prompt}, and \textsf{complete}, all of which are
+% discussed in this guide. This document class requires the \textsf{counterz}
+% package, which is available at \href{http://www.ctan.org}
+% {The Comprehensive TeX Archive Network}.
+%
+% In addition to its parent class \textsf{exam} and the \textsf{counterz}
+% package, the \textsf{examz} class requires the following packages:
+% \textsf{xparse}, \textsf{environ}, \textsf{etoolbox}, and \textsf{makecmds}
+% (the latter two via \textsf{counterz}), all of which are included in most
+% standard \TeX\ distributions and at \href{http://www.ctan.org}{The
+% Comprehensive TeX Archive Network}.
+%
+%\subsection{Randomized Exams}\label{usr:versions}
+%
+% The \textsf{examz} class loads the \textsf{counterz} package which provides
+% commands for generating, saving, recalling, manipulating, and displaying
+% random values for counters. These commands may be incorporated into questions
+% to generate random exams. The process of saving and recalling counters may be
+% explicitly coded in the document, as described in the \textsf{counterz}
+% package documentation, but the \textsf{examz} class may instead be loaded with
+% options to automate this process.
+%
+% Loading the class with the option \textsf{randomize} will execute the commands
+% \cs{randomizectr} and \cs{opencountersfile} from the \textsf{counterz}
+% package. Loading the class with the option \textsf{norandomize} will execute
+% the commands \cs{norandomizectr} and \cs{inputcountersfile}. If neither of
+% these options are loaded, the default behavior is that of the option
+% \textsf{randomize}. The reason for this is that if the document contains no
+% randomly generated counters then this default choice will have no effect
+% anyway, and if the document does contain randomly generated counters then the
+% first typesetting must generate these counter values.
+%
+% A third option \textsf{prompt} frees the user from the burden of manually
+% changing between \textsf{randomize} and \textsf{nonrandomize} and also
+% protects against accidental overwriting of previously generated counter
+% values. This option will execute the command \cs{promptrandomexam}, which
+% is an instance of the command \cs{promptrandomizectr} from the
+% \textsf{counterz} package, followed by one of the commands
+% \cs{opencountersfile} or \cs{inputcountersfile} as appropriate. The terminal
+% dialogue of \cs{promptrandomexam} can be changed with the use of
+% \cs{renewcommand}, if desired. (See Section \ref{imp} for the implementation
+% of \cs{promptrandomexam}.) There are additional effects from this option with
+% regard to the \textsf{versions} environment, described below.
+%
+% \DescribeEnv{versions}
+% The \textsf{versions} environment uses a loop and a counter \textit{version}
+% to generate versions of the exam, incrementing the counter and updating the
+% page numbers along the way. The version number may be displayed in headers or
+% elsewhere with either \cs{theversion} or \cs{arabic}\{version\}. The
+% environment takes an optional argument: the number of desired versions, with
+% 1 being the default value. The environment is used as follows:
+%
+%\begin{verbatim}
+%\begin{versions}[<optional number>]
+% <exam content here>
+%\end{versions}
+%\end{verbatim}
+%
+%\noindent
+% where \textit{exam content} refers to the \textsf{questions} environment (as
+% defined in the \textsf{exam} package), cover pages, and anything else after
+% \cs{begin}\{document\} that is intended to appear in the exam. When the class
+% is randomized with the option \textsf{prompt}, the number provided by the
+% optional argument is not used, and so there is no reason to include it.
+% Instead, a command \cs{promptversions} inputs the number of versions using a
+% terminal dialogue. (The dialogue can be changed by using \cs{renewcommand},
+% if desired. See Section \ref{imp:versions} for the implementation of
+% \cs{promptversions}.) When the exam is not randomized, the number of versions
+% is inputted from the previously generated counters file, and so the prompt
+% does not appear.
+%
+% Recall that the \textsf{examz} class inherits the options \textsf{answers}
+% and \textsf{noanswers} from the \textsf{exam} class. The \textsf{examz} class
+% also has an additional option called \textsf{complete}. When loaded with this
+% option, the document alternately prints without and with solutions. (Note:
+% This feature only takes effect when using the \textsf{versions} environment.)
+% Moreover, when the class is loaded with the option \textsf{twoside} (inherited
+% from its grandparent class \textsf{article}), an extra blank page is inserted
+% at the end of each exam when necessary to ensure that the next exam starts on
+% a front page. An exam that begins with the line
+%
+%\begin{verbatim}
+%\documentclass{11pt,twoside,addpoints,prompt,complete}
+%\end{verbatim}
+%
+%\noindent
+% and uses the \textsf{versions} environment, for example, will ask the user
+% whether to randomize, and if so, how many versions to print. Then the typeset
+% document will include the requested number of versions, alternating between
+% exams and solutions, with correct grade tables and no warnings about
+% multiply-defined labels, and an extra blank page whenever an exam has an odd
+% number of pages.
+%
+%\subsection{Question Banks}\label{usr:banks}
+%
+% Within the \textsf{questions} environment, the \textsf{examz} package offers
+% an alternative to the command \cs{question} that allows for the random
+% selection of a question from a question bank. The command
+% \DescribeMacro{\questionfrombank}
+% \cs{questionfrombank}\oarg{points}\marg{filename} has two arguments, the first
+% of which is optional. The first (optional) argument is the point value of the
+% question, just as with the command \cs{question} from the \textsf{exam} class.
+% The second argument is the name of a \TeX{} file (without the .tex extension).
+% The second argument may include a path. Suppose, for example, that the
+% directory which contains the main exam document \textsf{Test1.tex} also
+% contains a subdirectory named \textsf{Problems} containing the files
+% \textsf{Solve\_Linear\_Equation.tex} and \textsf{State\_Capitals.tex}. Then
+% the code
+%
+%
+%\begin{verbatim}
+%\documentclass{examz}
+%\begin{document}
+%\begin{questions}
+% \questionfrombank{Problems/Solve_Linear_Equation}
+% \questionfrombank{Problems/State_Capitals}
+%\end{questions}
+%\end{document}
+%\end{verbatim}
+%
+%\noindent
+% generates an exam with two questions, one randomly selected from each of the
+% two specified files.
+%
+% When several files are contained in the same directory, the repetition of the
+% \DescribeMacro{\setquestionpath}
+% path name can be reduced by the command \cs{setquestionpath}\marg{path name},
+% as illustrated by the following code:
+%
+%\begin{verbatim}
+%\documentclass{examz}
+%\begin{document}
+% \setquestionpath{Problems/}
+%\begin{questions}
+% \questionfrombank{Solve_Linear_Equation}
+% \questionfrombank{State_Capitals}
+%\end{questions}
+%\end{document}
+%\end{verbatim}
+%
+% \noindent
+% The command \cs{setquestionpath} can be used both inside and outside of the
+% \textsf{questions} environment, and can be used to change the path multiple
+% times, if desired.
+%
+% In order for a file to function as a question bank, it must conform to a
+% specific (but very simple) structure. First of all, every question bank file
+% begins with a command \cs{setnumberofquestions}\marg{number}. Second, all of
+% \DescribeMacro{\setnumberofquestions}
+% the questions are contained within a \textsf{questionbank} environment. Third,
+% each individual question is contained within a \textsf{qbitem} environment.
+% This structure is exhibited by the following code, which could be the entire
+% contents of a file \textsf{State\_Capitals.tex} inputted by the command \cs{questionfrombank}:
+%
+%\begin{verbatim}
+%\setnumberofquestions{2}
+%\begin{questionbank}
+%\begin{qbitem}{1}
+% What is the capital of Maine?
+%\end{qbitem}
+%\begin{qbitem}{2}
+% What is the capital of Nebraska?
+%\end{qbitem}
+%\end{questionbank}
+%\end{verbatim}
+%
+% \DescribeEnv{questionbank}
+% The \textsf{questionbank} environment randomly generates an integer between 1
+% and the number specified in the preceding command \cs{setnumberofquestions}.
+% Each instance of the environment \textsf{qbitem}\marg{item number} compares
+% \DescribeEnv{qbitem}
+% its numerical argument \meta{item number} to this randomly generated number
+% and executes the environment's body of content only if the numbers match. Then
+% the \textsf{questionbank} environment ends input so that nothing in the file
+% after that environment will be included. Note that neither environment
+% includes within its body the \cs{question} command; that command is already
+% part of the command \cs{questionfrombank} which inputs the file. Also note
+% that \cs{questionfrombank} sets the counter prefix to include the file name
+% and exam version number, so authors should use the prefix versions of counters
+% commands (e.g. \cs{xprovidecounter}, \cs{xarabic}, etc.) within
+% \textsf{qbitem} environments. (See the \textsf{counterz} documentation for
+% details.)
+%
+% The \textsf{qbitem} environment allows for the inclusion of the various
+% environments for parts and solutions that are provided by the \textsf{exam}
+% class. Recall that each of the six solutions environments admits an argument
+% to specify the amount of solution space. (The argument is optional for all
+% except \textsf{solutionbox}. See the \textsf{exam} documentation for details.)
+% The \textsf{examz} class offers a command \cs{setsolutionspace}\marg{length}
+% \DescribeMacro{\setsolutionspace} and six analogous solutions environments
+% that pass \meta{length} to their \textsf{exam} counterparts. For example, the
+% \DescribeEnv{qbsolution}
+% environment \textsf{qbsolution} is equivalent to the environment
+% \textsf{solution}\oarg{length}. The advantage of this is that the command
+% \cs{setsolutionspace}\marg{length} can be included once in the file, above the
+% \textsf{questionbank} environment, for example, and any subsequent adjustment
+% of the length can be done for all of the question bank items simultaneously
+% with a single edit rather than a comprehensive search and replace. Five other
+% environments \textsf{qbsolutionbox}, \textsf{qbsolutionorbox},
+% \DescribeEnv{qbsolutionbox}
+% \textsf{qbsolutionorlines}, \textsf{qbsolutionordottedlines}, and finally
+% \DescribeEnv{qbsolutionorbox}
+% \textsf{qbsolutionorgrid} are similar analogues of the other \textsf{exam}
+% class solutions environments. Just as their \textsf{exam} counterparts, these
+% \DescribeEnv{qbsolutionorlines}
+% environments can also be used within the \textsf{parts} environment. The
+% \DescribeEnv{qbsolutionordottedlines}
+% command \cs{setsolutionspace} may be used multiple times in the same file,
+% \DescribeEnv{qbsolutionorgrid}
+% including within the \textsf{questionbank} environment, if necessary.
+%
+%\subsection{Customization Macros}
+%
+% The \textsf{exam} document class provides the means for customizing headers,
+% footers, special pages, etc. As an exam author makes changes to a document
+% between exams, courses, or academic terms, the author may require frequent
+% adjustment of certain standard content, such as the name of the exam or course
+% in a custom header. The \textsf{examz} document class offers several macros to
+% simplify such changes. For example, instead of explicitly including the text
+% ``MATH 101'' in a header, an author can use the macro \cs{coursename} which
+% can be set (and easily modified) at the beginning of the document. This is
+% especially useful when designing for many similar courses a custom
+% \textsf{.cls} file that loads the \textsf{examz} class and keeps the layout
+% and customizations ``behind the scenes''. We first list and describe these
+% macros and then provide an example of usage.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\instructorname}
+% The default replacement text for \cs{instructorname} is ``Instructor Name''.
+%
+% \noindent
+% \DescribeMacro{\setinstructorname}
+% Use the command \cs{setinstructorname}\marg{text} to change this text.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\coursename}
+% The default replacement text for \cs{coursename} is ``Course Name''.
+%
+% \noindent
+% \DescribeMacro{\setcoursename}
+% Use the command \cs{setcoursename}\marg{text} to change this text.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\examname}
+% The default replacement text for \cs{examname} is ``Exam Name''.
+%
+% \noindent
+% \DescribeMacro{\setexamname}
+% Use the command \cs{setexamname}\marg{text} to change this text.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\termname}
+% The default replacement text for \cs{termname} is ``Term Name''.
+%
+% \noindent
+% \DescribeMacro{\settermname}
+% Use the command \cs{settermname}\marg{text} to change this text.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\namespace}
+% The default expansion of \cs{namespace} is
+% ``Name:~\makebox[5cm]{\hrulefill}'' which is given by the code
+% \texttt{Name:$\sim$\cs{makebox}[5cm]\{\cs{hrulefill}\}}.
+%
+% \noindent
+% \DescribeMacro{\setnamespace}
+% Use the command \cs{setnamespace}\marg{format} to change this format.
+%
+% \medskip
+% \noindent
+%\DescribeMacro{\instructions}
+% The default replacement text for \cs{instructions} is ``Instructions Here''.
+%
+% \noindent
+% \DescribeMacro{\setinstructions}
+% Use the command \cs{setinstructions}\marg{text} to change this text, including
+% one or more paragraphs as needed.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\covernoanswers}
+% The command \cs{covernoanswers} can be used within the \textsf{coverpages}
+% environment provided by the \textsf{exam} class or simply as the first page(s)
+% of the exam. Its default expansion is empty.
+% \DescribeMacro{\setcovernoanswers}
+% Use the command \cs{setcovernoanswers}\marg{format} to change this format to
+% include special headers and footers, instructions, grade/point tables, an
+% instance of \cs{newpage}, etc.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\coveranswers}
+% The command \cs{coveranswers} can be used within the \textsf{coverpages}
+% environment provided by the \textsf{exam} class or simply as the first page(s)
+% of the exam. Its default expansion is \cs{covernoanswers}.
+% \DescribeMacro{\setcoveranswers}
+% Use the command \cs{setcoveranswers}\marg{format} to change this format to
+% include special headers and footers, instructions, grade/point tables, an
+% instance of \cs{newpage}, etc.
+%
+% \medskip
+% \noindent
+% \DescribeMacro{\printcover}%
+% The command \cs{printcover} executes either \cs{coveranswers} or
+% \cs{covernoanswers}, depending on the value of the boolean
+% \textsf{printanswers}. It can be used within the \textsf{coverpages}
+% environment that is provided by the \textsf{exam} class or simply as the first
+% page(s) of the exam.
+%
+% \medskip
+% \noindent
+%\DescribeMacro{\workspace}
+% The command \cs{workspace} is intended to provide additional work space on the
+% exam, perhaps at the end of the questions. Its default expansion is empty. Use
+% the command \cs{setworkspace}\marg{format} to add a bit of text, \cs{newpage},
+% \DescribeMacro{\setworkspace}
+% or a custom header/footer. To include the content of \cs{workspace} only when
+% the boolean \textsf{printanswers} is FALSE, use the command
+% \DescribeMacro{\printworkspace}
+% \cs{printworkspace}.
+%
+% \medskip
+% One method of streamlining the work of developing many exams that use the same
+% layout and format is to write a simple \textsf{.cls} file to use as a custom
+% instantiation of the \textsf{examz} document class, perhaps even including
+% frequently used packages:
+%
+%\begin{verbatim}
+%\NeedsTeXFormat{LaTeX2e}
+%\ProvidesClass{MYexamz}
+%\DeclareOption*{\PassOptionsToClass{\CurrentOption}{examz}}
+%\ProcessOptions\relax
+%\LoadClass{examz}
+%\RequirePackage{mathtools,amssymb}
+%\pagestyle{headandfoot}
+%\header{\coursename}{\examname}{termname}
+%\setcovernoanswers{%
+% \namespace
+%
+% \bigskip
+% \instructions
+%
+% \bigskip
+% \gradetable
+%
+% \firstpagefooter{Version \arabic{version}}{}{}
+% \newpage
+%}%
+%\setworkspace{%
+% \newpage
+% \begin{center} Extra Work Space \end{center}
+% \newpage
+%}%
+%\endinput
+%\end{verbatim}
+%
+% \noindent
+% Then use the custom document class \textsf{MYexamz} for the exam:
+%
+%\begin{verbatim}
+%\documentclass[addpoints,prompt,complete]{MYexamz}
+%
+%\setcoursename{MATH 101}
+%\setexamname{Test 1}
+%\settermname{Spring 2023}
+%\setinstructions{%
+% Read each problem carefully. Show all work.
+%}%
+%
+%\begin{document}
+%\begin{versions}
+% \printcover
+% \setquestionpath{Problems/}
+%\begin{questions}
+% \questionfrombank{Solve_Linear_Equation}
+% \questionfrombank{State_Capitals}
+%\end{questions}
+% \printworkspace
+%\end{versions}
+%\end{document}
+%\end{verbatim}
+%
+% To write a new exam Test 2 in the same course, simply change the argument of
+% \cs{setexamname} from \texttt{Test 1} to \texttt{Test 2} and use the
+% appropriate question banks. With random counters and well-developed question
+% banks, writing exams for the next term may be as simple as changing the
+% term name.
+%
+%\StopEventually{^^A
+% \PrintChanges
+% \PrintIndex
+%}
+%
+%\section{Implementation}\label{imp}
+%
+% The \textsf{examz} document class requires the packages \textsf{environ}, \textsf{xpatch}, and \textsf{counterz}, the last of which also loads the
+% packages \textsf{etoolbox} and \textsf{makecmds}.
+%
+% \begin{macrocode}
+\RequirePackage{environ}
+\RequirePackage{xpatch}
+\RequirePackage{counterz}
+% \end{macrocode}
+%
+% This class inherits all of the options available to the \textsf{exam} class,
+% including \textsf{answers}, \textsf{noanswers}, \textsf{cancelspace},
+% \textsf{nocancelspace}, and \textsf{addpoints}. The class also admits
+% several additional options, the first of which is called \textsf{complete}.
+% This option takes effect only when using the \textsf{versions} environment
+% (see Section \ref{imp:versions}) and will otherwise be ignored. With this
+% option selected, the document alternately prints each exam version with and
+% without its solutions. The default value of the associated boolean variable
+% is FALSE. Loading the option \textsf{complete} will change this value to TRUE.
+% This option is intended to take the place of the options \textsf{answers} and
+% \textsf{noanswers} and will override these two options if engaged.
+%
+% \begin{macrocode}
+\newbool{@examz@complete}
+\boolfalse{@examz@complete}
+\DeclareOption{complete}{\booltrue{@examz@complete}}
+% \end{macrocode}
+%
+% Additional options are based on features of the \textsf{counterz} package. The
+% option \textsf{randomize} will cause the command \cs{randprovidecounter} (and
+% its derivative commands) to generate new random values whereas the option
+% \textsf{norandomize} will cause these commands to input their values from a
+% file. Because this file may not exist before a first typesetting, the default
+% option is \textsf{randomize}.
+%
+% \begin{macrocode}
+\randomizectr
+\DeclareOption{randomize}{\randomizectr}
+\DeclareOption{norandomize}{\norandomizectr}
+% \end{macrocode}
+%
+%
+% Finally, the class may be loaded with an option called \textsf{prompt}.
+% Because the manual change of the option \textsf{randomize} may be forgotten,
+% resulting in the loss of counter values, the option \textsf{prompt} offers a
+% terminal-based dialogue through which randomization can be decided. This
+% action, which is executed at the beginning of the document (see below) is
+% based on the command \cs{promptranomizectr} from the \textsf{counterz}
+% package.
+%
+% \begin{macrocode}
+\newbool{@examz@prompt}
+\boolfalse{@examz@prompt}
+\DeclareOption{prompt}{\booltrue{@examz@prompt}}
+\newcommand{\promptrandomexam}{%
+ \promptrandomizectr[\EnterResponse]{%
+ ^^J Enter 1 to randomize document.
+ ^^J Enter 2 to update without new randomization.
+ }{%
+ 1%
+ }%
+}%
+% \end{macrocode}
+%
+% We now load the \textsf{exam} document class with all of these options.
+%
+% \begin{macrocode}
+\DeclareOption*{%
+ \PassOptionsToClass{\CurrentOption}{exam}
+}%
+\ProcessOptions\relax
+\LoadClass{exam}
+% \end{macrocode}
+%
+% Next, we patch the \textsf{coverpages} environment. If the document is loaded
+% with the option \textsf{twoside} (passed from the \textsf{article} class) and
+% the \textsf{coverpages} environment produces an odd number of pages, then an
+% extra blank page is inserted so that the odd arabic page numerals appear on
+% the right page (i.e. front of the page).
+%
+% \begin{macrocode}
+\xpatchcmd{\endcoverpages}{\setcounter{num@coverpages}{\value{page}}}{%
+ \ifbool{@twoside}{%
+ \ifnumodd{\value{page}}{%
+ % Do Nothing
+ }{%
+ \newpage
+ \null
+ \newpage
+ }%
+ }{%
+ % Do nothing
+ }%
+ \setcounter{num@coverpages}{\value{page}}%
+}{}{}%
+% \end{macrocode}
+% If the class is loaded with the option \textsf{prompt} then we execute the
+% command \cs{promptrandomexam}. If the user elects to not randomize the
+% document, either by terminal input via \cs{promptrandomexam} or by instead
+% loading the \textsf{norandomize} option, then we execute the command
+% \cs{inputcountersfile}. (Note that this will produce an error if no counters
+% file exists, so this option should not be used for a first typesetting.) If
+% the user does elect to randomize the document, by terminal input or by loading
+% the class with the option \textsf{randomize} or by loading the class with none
+% of the options \textsf{randomize}, \textsf{norandomize}, or \textsf{prompt},
+% then we execute the command \cs{opencountersfile}.
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \ifbool{@examz@prompt}{%
+ \promptrandomexam
+ }{%
+ }%
+ \ifrandomizectr{%
+ \opencountersfile
+ }{%
+ \inputcountersfile
+ }%
+}%
+% \end{macrocode}
+%
+%\subsection{Randomized Exams}\label{imp:versions}
+%
+% The counter \textit{numversions} determines how many versions of the exam will
+% be generated. The default value of \textit{numversions} is 1.
+%
+% \begin{macrocode}
+\newcounter{numversions}
+\setcounter{numversions}{1}
+% \end{macrocode}
+%
+%\begin{macro}{\promptversions}
+%
+% The following command is used by the \textsf{versions} environment (described
+% below) whenever the class is loaded with the \textsf{prompt} option. Note that
+% the counter is saved to the counters file. (See the documentation for the
+% \textsf{counterz} package.)
+%
+% \begin{macrocode}
+\newcommand{\promptversions}{%
+ \typein[\NumberOfVersions]{%
+ ^^J How many versions?
+ }%
+ \setcounter{numversions}{\NumberOfVersions}
+ \savecounter{numversions}
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+% The counter \textit{version} keeps track of the exam version when printing.
+% The value of \textit{version} is initialized as 1.
+%
+% \begin{macrocode}
+\newcounter{version}
+\setcounter{version}{1}
+% \end{macrocode}
+%
+% We now patch the parent class \textsf{exam} so that corresponding questions in
+% different versions will not be assigned the same question label. To accomplish
+% this, we append to the question labels the value of \textit{version}. We also
+% append an \textit{S} if the boolean \textit{answers} (from the \textsf{exam}
+% class) is TRUE, to distinguish between versions with and without solutions
+% when the class is loaded with the option \textsf{complete}.
+%
+% \begin{macrocode}
+\xpatchcmd{\find@latestques}
+ {@\arabic{question}}
+ {@\arabic{version}\ifbool{printanswers}{S}{}@\arabic{question}}
+ {}{}
+\xpatchcmd{\decr@latest@ques}
+ {question@}
+ {question@\arabic{version}\ifbool{printanswers}{S}{}@}
+ {}{}
+\xpatchcmd{\chk@incompi}
+ {question@}
+ {question@\arabic{version}\ifbool{printanswers}{S}{}@}
+ {}{}
+\xpatchcmd{\questions}
+ {@\arabic{question}}
+ {@\arabic{version}\ifbool{printanswers}{S}{}@\arabic{question}}
+ {}{}
+\xpatchcmd{\parts}
+ {@\arabic{question}}
+ {@\arabic{version}\ifbool{printanswers}{S}{}@\arabic{question}}
+ {}{}
+\xpatchcmd{\subparts}
+ {@\arabic{question}}
+ {@\arabic{version}\ifbool{printanswers}{S}{}@\arabic{question}}
+ {}{}
+\xpatchcmd{\subsubparts}
+ {@\arabic{question}}
+ {@\arabic{version}\ifbool{printanswers}{S}{}@\arabic{question}}
+ {}{}
+\xpatchcmd{\setup@point@toks}
+ {@\arabic{question}}
+ {@\arabic{version}\ifbool{printanswers}{S}{}@\arabic{question}}
+ {}{}
+\xpatchcmd{\refto@index}
+ {question@}
+ {question@\arabic{version}\ifbool{printanswers}{S}{}@}
+ {}{}
+% \end{macrocode}
+%
+%\begin{macro}{\@examz@versions}
+%
+% The \textsf{versions} environment is defined via command \cs{@examz@versions}.
+% The single argument of this command represents the user-provided exam content,
+% including the \textsf{questions} environment and any pages before or after. If
+% the class is loaded with the option \textsf{prompt} and the exam is randomized
+% then the command first executes \cs{promptversions} to attain and save the
+% value of the counter \textit{numversions}. The main action of the command is
+% to use a while loop to generate versions of the exam, updating the version
+% and page numbers along the way. When the class is loaded with the option
+% \textsf{complete}, the document alternately prints without and with solutions,
+% updating the version only after both printings. When the class is loaded with
+% the option \textsf{twoside}, an extra blank page is inserted at the end of
+% each version when necessary to ensure that the next version starts on a front
+% page.
+%
+% \begin{macrocode}
+\newcommand{\@examz@versions}[1]{%
+ \ifrandomizectr{%
+ \ifbool{@examz@prompt}{%
+ \promptversions
+ }{%
+ % Do Nothing
+ }%
+ }{%
+ % Do Nothing
+ }%
+ \ifbool{@examz@complete}{%
+ \noprintanswers
+ }{%
+ % Do Nothing
+ }%
+ \whileboolexpr{%
+ test{\ifnumless{\value{version}}{1+\value{numversions}}}
+ }{%
+ \ifbool{@twoside}{%
+ \ifnumodd{\value{page}}{%
+ % Do Nothing
+ }{%
+ \newpage
+ \null
+ \thispagestyle{empty}
+ \newpage
+ }%
+ }{%
+ % Do Nothing
+ }%
+ \setcounter{page}{1}
+ \setcounter{numquestions}{0}
+ \setcounter{numparts}{0}
+ \setcounter{numsubparts}{0}
+ \setcounter{numsubsubparts}{0}
+ \setcounter{numpoints}{0}
+ \setcounter{numbonuspoints}{0}
+ #1
+ \newpage
+ \notbool{@examz@complete}{%
+ \addtocounter{version}{1}
+ }{%
+ \notbool{printanswers}{%
+ \printanswers
+ }{%
+ \noprintanswers
+ \addtocounter{version}{1}
+ }%
+ }%
+ }%
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+%\begin{environment}{versions}
+%
+% The \textsf{versions} environment is now defined using the previous command
+% and the command \cs{Collect@Body}. The environment has an optional argument
+% with which the user may specify the number of versions. If the exam is not
+% randomized then the argument is ignored under the assumption that the needed
+% value has been inputted from the counters file after a previous randomization.
+% (If there is never any randomization, then there is no need for different
+% versions, and the environment will execute with the default number of versions
+% being one.) If the class is loaded with the option \textsf{prompt}, then this
+% optional argument will be overridden by the number provided by the user via
+% terminal prompt.
+%
+% \begin{macrocode}
+\newenvironment{versions}[1][1]{%
+ \ifrandomizectr{%
+ \setcounter{numversions}{#1}
+ \savecounter{numversions}
+ }{%
+ % Do Nothing
+ }%
+ \Collect@Body\@examz@versions
+}{%
+ % Empty
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+% The \textsf{exam} document class exam prints in the console and log file some
+% data that includes the number of questions, total points, etc. Here we add to
+% that data the number of versions of the exam and whether the solutions were
+% printed.
+%
+% \begin{macrocode}
+\AtEndDocument{%
+ \typeout{%
+ This document contains \thenumversions\space
+ version\ifnumequal{\value{numversions}}{1}{}{s} of the exam
+ \ifbool{@examz@complete}{%
+ with and without solutions.
+ }{%
+ \ifbool{printanswers}{%
+ with solutions.
+ }{%
+ without solutions.
+ }%
+ }%
+ }%
+}%
+% \end{macrocode}
+%
+%\subsection{Question Banks}\label{imp:banks}
+%
+%\begin{macro}{\@examz@questionpath}
+%\begin{macro}{\setquestionpath}
+% The default value of \cs{@examz@questionpath} is empty, but authors may use
+% the command \cs{setquestionpath}\marg{pathname} to change this.
+%
+% \begin{macrocode}
+\newcommand{\@examz@questionpath}{}
+\newcommand{\setquestionpath}[1]{%
+ \renewcommand{\@examz@questionpath}{#1}
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\questionfrombank}
+% The command \cs{questionfrombank}\oarg{points}\marg{filename} uses the
+% command \cs{question} from the \textsf{exam} class. The first (optional)
+% argument is the point value of the question, and the second argument is the
+% name of the question bank file (without the .tex extension). The input uses
+% \cs{\@examz@questionpath}. In order to avoid a conflict between question banks
+% that use the same counter names, \cs{counterprefix} is temporarily set to
+% include both the name of the file and the number of the version. (See the
+% \textsf{counterz} package for more information about \cs{setcounterprefix}.)
+%
+% \begin{macrocode}
+\newcommand{\questionfrombank}[2][]{%
+ \question[#1]
+ \setcounterprefix{#2_Version_\arabic{version}_}
+ \input{\@examz@questionpath #2}
+ \clearcounterprefix
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+%\begin{macro}{\setnumberofquestions}
+%
+% The counter \textit{@examz@qbsize} is an internal counter to represent the
+% number of questions in a question bank. The command
+% \cs{setnumberofquestions}\marg{number} is used to set this value.
+%
+% \begin{macrocode}
+\newcounter{@examz@qbsize}
+\newcommand{\setnumberofquestions}[1]{%
+ \setcounter{@examz@qbsize}{#1}
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+%\begin{environment}{questionbank}
+%
+% The \textsf{questionbank} environment begins by creating a random counter that
+% is used to determine which question will be selected and ends with the command
+% \cs{endinput} so that nothing after the environment appears in the question.
+% \begin{macrocode}
+\newenvironment{questionbank}{%
+ \xrandprovidecounter{Random_Question}{1}{\value{@examz@qbsize}}
+}{%
+ \endinput
+}
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{environment}{qbitem}
+%
+% The environment \textsf{qbitem} is a wrapper for each option in a
+% \textsf{questionbank} environment. The argument is an integer value that is
+% compared to the random counter value generated by \textsf{questionbank}. The
+% body of the environment is the content of the question. Additional counters
+% that are created and manipulated within \textsf{qbitem} should be handled by
+% the commands provided in the \textsf{counterz} package in order to use the
+% counter prefix that is created by the command \cs{questionfrombank}.
+%
+% \begin{macrocode}
+\NewEnviron{qbitem}[1]{%
+ \ifnumequal{\xvalue{Random_Question}}{#1}{%
+ \BODY
+ }{%
+ }
+}
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{macro}{\setsolutionspace}
+%
+% The command \cs{@examz@solutionspace} represents the amount of space allotted
+% to solutions, per the various solutions environments that are defined by the
+% \textsf{exam} document class. \cs{setsolutionspace}\marg{length} is used to
+% set this value.
+%
+% \begin{macrocode}
+\newcommand{\@examz@solutionspace}{1cm}
+\newcommand{\setsolutionspace}[1]{%
+ \renewcommand{\@examz@solutionspace}{#1}
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+% \noindent
+% For each of the six solutions environments provided by the \textsf{exam} class
+% there is an analogous solutions environment that automatically loads the value
+% of \cs{SolutionSpace} for the argument.
+%
+%\begin{environment}{qbsolution}
+%
+% \textsf{qbsolution} is equivalent to
+% \textsf{solution}[\cs{@examz@solutionspace}].
+%
+% \begin{macrocode}
+\NewEnviron{qbsolution}{%
+ \begin{solution}[\@examz@solutionspace]
+ \BODY
+ \end{solution}
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{environment}{qbsolutionbox}
+%
+% \textsf{qbsolutionbox} is equivalent to
+% \textsf{solutionbox}\{\cs{@examz@solutionspace}\}.
+%
+% \begin{macrocode}
+\NewEnviron{qbsolutionbox}{%
+ \begin{solutionbox}{\@examz@solutionspace}
+ \BODY
+ \end{solutionbox}
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{environment}{qbsolutionorbox}
+%
+% \textsf{qbsolutionorbox} is equivalent to
+% \textsf{solutionorbox}[\cs{@examz@solutionspace}].
+%
+% \begin{macrocode}
+\NewEnviron{qbsolutionorbox}{%
+ \begin{solutionorbox}[\@examz@solutionspace]
+ \BODY
+ \end{solutionorbox}
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{environment}{qbsolutionorlines}
+%
+% \textsf{qbsolutionorlines} is equivalent to
+% \textsf{solutionorlines}[\cs{@examz@solutionspace}].
+%
+% \begin{macrocode}
+\NewEnviron{qbsolutionorlines}{%
+ \begin{solutionorlines}[\@examz@solutionspace]
+ \BODY
+ \end{solutionorlines}
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{environment}{qbsolutionordottedlines}
+%
+% \textsf{qbsolutionordottedlines} is equal to
+% \textsf{solutionordottedlines}[\cs{@examz@solutionspace}].
+%
+% \begin{macrocode}
+\NewEnviron{qbsolutionordottedlines}{%
+ \begin{solutionordottedlines}[\@examz@solutionspace]
+ \BODY
+ \end{solutionordottedlines}
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\begin{environment}{qbsolutionorgrid}
+%
+% \textsf{qbsolutionorgrid} is equivalent to
+% \textsf{solutionorgrid}[\cs{@examz@solutionspace}].
+%
+% \begin{macrocode}
+\NewEnviron{qbsolutionorgrid}{%
+ \begin{solutionorgrid}[\@examz@solutionspace]
+ \BODY
+ \end{solutionorgrid}
+}%
+% \end{macrocode}
+%
+%\end{environment}
+%
+%\subsection{Customization Macros}
+%
+%\begin{macro}{\instructorname}
+%\begin{macro}{\coursename}
+%\begin{macro}{\examname}
+%\begin{macro}{\termname}
+%\begin{macro}{\namespace}
+%\begin{macro}{\instructions}
+%\begin{macro}{\covernoanswers}
+%\begin{macro}{\coveranswers}
+%\begin{macro}{\workspace}
+%
+% The following commands define macros, with default values, for use in
+% formatting headers, footers, and special pages. \cs{covernoanswers} and
+% \cs{workspace} are empty by default, and \cs{coveranswers} is equal to
+% \cs{covernoanswers} by default.
+%
+% \begin{macrocode}
+\newcommand{\instructorname}{Instructor Name}
+\newcommand{\coursename}{Course Name}
+\newcommand{\examname}{Exam Name}
+\newcommand{\termname}{Term Name}
+\newcommand{\namespace}{Name:~\makebox[5cm]{\hrulefill}}
+\newcommand{\instructions}{Instructions Here}
+\newcommand{\covernoanswers}{}
+\newcommand{\coveranswers}{\covernoanswers}
+\newcommand{\workspace}{}
+% \end{macrocode}
+%
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\setinstructorname}
+%\begin{macro}{\setcoursename}
+%\begin{macro}{\setexamname}
+%\begin{macro}{\settermname}
+%\begin{macro}{\setnamespace}
+%\begin{macro}{\setinstructions}
+%\begin{macro}{\setcoveranswers}
+%\begin{macro}{\setcovernoanswers}
+%\begin{macro}{\setworkspace}
+%
+% The following commands allow a user to redefine the above macros.
+% \begin{macrocode}
+\newcommand{\setinstructorname}[1]{\renewcommand{\instructorname}{#1}}
+\newcommand{\setcoursename}[1]{\renewcommand{\coursename}{#1}}
+\newcommand{\setexamname}[1]{\renewcommand{\examname}{#1}}
+\newcommand{\settermname}[1]{\renewcommand{\termname}{#1}}
+\newcommand{\setnamespace}[1]{\renewcommand{\namespace}{#1}}
+\newcommand{\setinstructions}[1]{\renewcommand{\instructions}{#1}}
+\newcommand{\setcovernoanswers}[1]{\renewcommand{\covernoanswers}{#1}}
+\newcommand{\setcoveranswers}[1]{\renewcommand{\coveranswers}{#1}}
+\newcommand{\setworkspace}[1]{\renewcommand{\workspace}{#1}}
+% \end{macrocode}
+%
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%\end{macro}
+%
+%\begin{macro}{\printcover}
+%
+% The command \cs{printcover} executes either \cs{coveranswers} or
+% \cs{covernoanswers}, depending on the value of the boolean
+% \textsf{printanswers}.
+%
+% \begin{macrocode}
+\newcommand{\printcover}{%
+ \ifbool{printanswers}{\coveranswers}{\covernoanswers}
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+%\begin{macro}{\printworkspace}
+%
+% The command \cs{printcover} executes \cs{workspace} when the boolean
+% \textsf{printanswers} is false and otherwise does nothing.
+%
+% \begin{macrocode}
+\newcommand{\printworkspace}{%
+ \ifbool{printanswers}{}{\workspace}
+}%
+% \end{macrocode}
+%
+%\end{macro}
+%
+% \Finale
+\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/examz/examz.ins b/macros/latex/contrib/examz/examz.ins
new file mode 100644
index 0000000000..4d52e93772
--- /dev/null
+++ b/macros/latex/contrib/examz/examz.ins
@@ -0,0 +1,59 @@
+%%
+%% `examz' --- 2023/05/30 Version 1.0.0
+%%
+%% Copyright (C) 2023 by Christopher McClain
+%% E-mail: christopher.mcclain@mail.wvu.edu
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. The latest version of this license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3c or later is part of all distributions of
+%% LaTeX version 2008 or later.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/examz}
+
+\preamble
+
+This is a generated file.
+
+`examz' --- 2023/05/30 Version 1.0.0
+
+Copyright (C) 2023 by Christopher McClain
+E-mail: christopher.mcclain@mail.wvu.edu
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3c or later is part of all distributions of
+LaTeX version 2008 or later.
+
+\endpreamble
+
+\generate{\file{examz.cls}{\from{examz.dtx}{class}}}
+
+\Msg{*********************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the}
+\Msg{* following file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* \space\space examz.cls}
+\Msg{*}
+\Msg{* To produce the documentation run the file examz.dtx}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*********************************************************}
+
+\endbatchfile \ No newline at end of file
diff --git a/macros/latex/contrib/examz/examz.pdf b/macros/latex/contrib/examz/examz.pdf
new file mode 100644
index 0000000000..357b153e4c
--- /dev/null
+++ b/macros/latex/contrib/examz/examz.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf
index d4451abc83..5e9fff73df 100644
--- a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf
+++ b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex
index 9f4bb4a337..e07a5b02c1 100644
--- a/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex
+++ b/macros/latex/contrib/jeuxcartes/doc/JeuxCartes-doc.tex
@@ -69,8 +69,8 @@
\setlength{\parindent}{0pt}
\definecolor{LightGray}{gray}{0.9}
-\def\TPversion{0.2.4}
-\def\TPdate{18 Mars 2023}
+\def\TPversion{0.2.5}
+\def\TPdate{06 juin 2023}
\usepackage[most]{tcolorbox}
\usepackage[outputdir=build]{minted}
@@ -209,6 +209,8 @@ Une commande pour des cartes en version \og miniatures \fg{} (individuelle, main
\part{Historique}
+{\small \bverb|v0.2.5|~:~~~~Compatibilité des \textit{Mini}-Cartes avec les cartes avec nom anglais.
+
{\small \bverb|v0.2.4|~:~~~~Ajout du style carte Poker \textsf{fr} + style Bicycle \textsf{bicycl} + ajout d'une clé \textsf{<StyleJeu>}
{\small \bverb|v0.2.3|~:~~~~Ajout d'une clé \textsf{<inverse>} + dos Uno + style \textsf{v5} pour le Poker
@@ -684,7 +686,7 @@ Ces \textit{mini-}cartes sont des figures \TikZ, alignées verticalement sur leu
\begin{codetex}[]
Si on met du texte sur la ligne du dessus, on peut voir le résultat.\\
Voilà des exemples de mini-cartes, \AffMiniCarteJeu{7.K}\AffMiniCarteJeu{1.AT}\AffMiniCarteJeu{V.K}\AffMiniCarteJeu{10.C}, intégrables dans un paragraphe.\\
-Si on met du texte sur la ligne du dessous, on peut voir le résultat.
+Si on met du texte sur la ligne du dessous, on peut voir le résultat, avec ici des mini-cartes anglaises \AffMiniCarteJeu{K.T}\AffMiniCarteJeu{JO.R}\AffMiniCarteJeu{Q.C}\AffMiniCarteJeu{J.P}.
\end{codetex}
\subsection{Noms des \textit{mini-}cartes}
@@ -693,11 +695,11 @@ Si on met du texte sur la ligne du dessous, on peut voir le résultat.
Pour des raisons internes au code, les cartes doivent être saisies suivant la nomenclature (noter l'utilisation du \ctex{.} pour séparer la hauteur de la couleur !) :
\begin{itemize}
- \item \texttt{2.C}, \texttt{3.C}, \ldots, \texttt{C.C}, \texttt{D.C}, \texttt{R.C}, \texttt{A.C}\dotfill\Cle{Cœur}
- \item \texttt{2.P}, \texttt{3.P}, \ldots, \texttt{C.P}, \texttt{D.P}, \texttt{R.P}, \texttt{A.P}\dotfill\Cle{Pique}
- \item \texttt{2.K}, \texttt{3.K}, \ldots, \texttt{C.K}, \texttt{D.K}, \texttt{R.K}, \texttt{A.K}\dotfill\Cle{Carreau}
- \item \texttt{2.T}, \texttt{3.T}, \ldots, \texttt{K.T}, \texttt{D.T}, \texttt{R.T}, \texttt{A.T}\dotfill\Cle{Trèfle}
- \item \texttt{J.N}, \texttt{J.R}\dotfill\Cle{Joker}
+ \item \texttt{2.C}, \texttt{3.C}, \ldots, \texttt{C.C}, \texttt{D.C}, \texttt{R.C}, \texttt{A.C}, \texttt{J.C}, \texttt{Q.C}, \texttt{K.C}\dotfill\Cle{Cœur}
+ \item \texttt{2.P}, \texttt{3.P}, \ldots, \texttt{C.P}, \texttt{D.P}, \texttt{R.P}, \texttt{A.P}, \texttt{J.P}, \texttt{Q.P}, \texttt{K.P}\dotfill\Cle{Pique}
+ \item \texttt{2.K}, \texttt{3.K}, \ldots, \texttt{C.K}, \texttt{D.K}, \texttt{R.K}, \texttt{A.K}, \texttt{J.K}, \texttt{Q.K}, \texttt{K.K}\dotfill\Cle{Carreau}
+ \item \texttt{2.T}, \texttt{3.T}, \ldots, \texttt{K.T}, \texttt{D.T}, \texttt{R.T}, \texttt{A.T}, \texttt{J.T}, \texttt{Q.T}, \texttt{K.T}\dotfill\Cle{Trèfle}
+ \item \cmaj{0.2.5} \texttt{JO.N}, \texttt{JO.R}\dotfill\Cle{Joker}
\item \texttt{Exc}, \texttt{1.AT}, \texttt{2.AT}, \ldots, \texttt{20.T}, \texttt{21.AT}\dotfill\Cle{Atouts}
\end{itemize}
@@ -721,6 +723,7 @@ Quelques \Cle{options} pour les \textit{mini-}cartes :
\begin{codetex}[]
\foreach \EECARTE in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}{\AffMiniCarteJeu[Largeur=0.75cm]{\EECARTE.K}}\\
+\foreach \EECARTE in {2,3,4,5,6,7,8,9,10,J,Q,K,A}{\AffMiniCarteJeu[Largeur=0.75cm]{\EECARTE.P}}\\
\AffMiniCarteJeu[FondAtout=cyan,Largeur=0.75cm]{Exc}%
\foreach \EECARTE in {1,2,...,21}{\AffMiniCarteJeu[FondAtout=cyan,Largeur=0.75cm]{\EECARTE.AT}}
\end{codetex}
@@ -738,24 +741,31 @@ Comme pour les cartes \textit{classiques}, il existe deux commandes pour des \te
\end{codetex}
\begin{codecles}
-Les \Cle{Clés} sont les mêmes que pour la commande individuelle, avec en plus :
-
+Les \Cle{Clés} sont les mêmes que pour la commande individuelle, avec en plus la clé \Cle{TypeJeu} parmi :
\begin{itemize}
- \item la clé \Cle{TypeJeu} (parmi \Cle{Poker} ou \Cle{Tarot} ou \Cle{Belote} ou \Cle{Bataille} ou \Cle{Rami}). \hfill{}défaut \Cle{Poker}
+ \item \Cle{Poker} ou \Cle{Tarot} ou \Cle{Belote} ou \Cle{Bataille} ou \Cle{Rami} pour les cartes [fr] ;
+ \item \cmaj{0.2.5} \Cle{PokerEN} ou \Cle{BeloteEN} ou \Cle{BatailleEN} ou \Cle{RamiEN} pour les cartes [en] ;
\end{itemize}
+\hfill{}défaut \Cle{Poker}
\end{codecles}
\begin{codetex}[]
\textbf{\large Saisie de mains : }\\
-\MainMiniCartesJeu{7.K § A.P § D.T § V.K § 10.C § C.T} et~
+\MainMiniCartesJeu{7.K § A.P § D.T § V.K § 10.C § C.T § JO.N} et~
\MainMiniCartesJeu{Exc § 1.AT § C.C § 8.T § 2.K § 5.AT § 2.AT § D.P § 7.T § 10.C § 19.AT § V.P}\\
\textbf{\large Poker : }\\
\MainMiniCartesJeuAleatoire{5} ou \MainMiniCartesJeuAleatoire{5} ou \MainMiniCartesJeuAleatoire{5} ou \MainMiniCartesJeuAleatoire{5}.\\
+\textbf{\large Poker [en] : }\\
+\MainMiniCartesJeuAleatoire[TypeJeu=PokerEN]{5} ou \MainMiniCartesJeuAleatoire[TypeJeu=PokerEN]{5} ou \MainMiniCartesJeuAleatoire[TypeJeu=PokerEN]{5} ou \MainMiniCartesJeuAleatoire[TypeJeu=PokerEN]{5}.\\
+
\textbf{\large Belote :}\\
\MainMiniCartesJeuAleatoire[TypeJeu=Belote]{8} ou \MainMiniCartesJeuAleatoire[TypeJeu=Belote]{8} ou \MainMiniCartesJeuAleatoire[TypeJeu=Belote]{8}.\\
+\textbf{\large Belote [en] :}\\
+\MainMiniCartesJeuAleatoire[TypeJeu=BeloteEN]{8} ou \MainMiniCartesJeuAleatoire[TypeJeu=BeloteEN]{8} ou \MainMiniCartesJeuAleatoire[TypeJeu=BeloteEN]{8}.\\
+
\textbf{\large Bataille : }\\
\MainMiniCartesJeuAleatoire[TypeJeu=Bataille]{12} ou \MainMiniCartesJeuAleatoire[TypeJeu=Bataille]{12}.\\
@@ -763,7 +773,12 @@ Les \Cle{Clés} sont les mêmes que pour la commande individuelle, avec en plus
\MainMiniCartesJeuAleatoire[TypeJeu=Tarot]{10} ou \MainMiniCartesJeuAleatoire[TypeJeu=Tarot]{10}.\\
\textbf{\large Rami : }\\
-\MainMiniCartesJeuAleatoire[TypeJeu=Rami]{15} ou \MainMiniCartesJeuAleatoire[TypeJeu=Rami]{14}.
+\MainMiniCartesJeuAleatoire[TypeJeu=Rami]{15} ou\\
+\MainMiniCartesJeuAleatoire[TypeJeu=Rami]{14}.\\
+
+\textbf{\large Rami [en] : }\\
+\MainMiniCartesJeuAleatoire[TypeJeu=RamiEN]{15} ou\\
+\MainMiniCartesJeuAleatoire[TypeJeu=RamiEN]{14}.
\end{codetex}
\pagebreak
@@ -925,15 +940,15 @@ Dos disponibles : \texttt{DosBleu} ou \texttt{DosRouge}
\subsection{MiniCartes}
-\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.P}}
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.P}} et \xintFor #1 in {J,Q,K}\do{\AffMiniCarteJeu{#1.P}}
-\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.C}}
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.C}} et \xintFor #1 in {J,Q,K}\do{\AffMiniCarteJeu{#1.C}}
-\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.K}}
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.K}} et \xintFor #1 in {J,Q,K}\do{\AffMiniCarteJeu{#1.K}}
-\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.T}}
+\xintFor #1 in {2,3,4,5,6,7,8,9,10,V,C,D,R,A}\do{\AffMiniCarteJeu{#1.T}} et \xintFor #1 in {J,Q,K}\do{\AffMiniCarteJeu{#1.T}}
-\AffMiniCarteJeu{J.N}\AffMiniCarteJeu{J.R}
+\AffMiniCarteJeu{JO.N}\AffMiniCarteJeu{JO.R}
\medskip
diff --git a/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty b/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty
index b0579a4086..ce50d3361f 100644
--- a/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty
+++ b/macros/latex/contrib/jeuxcartes/tex/JeuxCartes.sty
@@ -11,8 +11,9 @@
% Uno v1 cards Image's Licence.: MIT License https://eperezcosano.github.io/uno-part1/
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{JeuxCartes}[2023/03/18 v0.2.4 Jeux de cartes]
-% 0.2.4 Style <fr> avec carte française + <bicycl> + modification des clés avec l'ajout de <StyleJeu> + Suppression xcolor
+\ProvidesPackage{JeuxCartes}[2023/06/06 v0.2.5 Jeux de cartes]
+% 0.2.5 Correction d'un dysfonctionnement avec le J qui peut désormais être utilisé en MiniCarte avec le Joker [en] + MiniMains [en]
+% 0.2.4 Style <fr> avec cartes françaises + <bicycl> + modification des clés avec l'ajout de <StyleJeu> + Suppression xcolor
% 0.2.3 Ajout d'une option pour présenter une main "inversée" + style <v5>
% 0.2.2 Correction de 2 cartes de pokerv4
% 0.2.2 Ajout d'un style <v4> pour le poker
@@ -376,6 +377,10 @@
\end{tikzpicture}%
}
+%------commande pour remonter le Q ttfamily
+\DeclareRobustCommand*{\RaiseBoxByDepth}{%
+ \raisebox{\depth}%
+}
%------commande mini-cartes
\defKV[AffMiniCartes]{%
Largeur=\def\MiniCarteLargeur{#1},%
@@ -409,11 +414,13 @@
\IfStrEq{\csVal}{21}{\def\csVal{\scalebox{0.5}[1]{21}}}{}%
%le cas de Excuse
\IfStrEq{#2}{Exc}%
- {\def\csSymb{\ding{168}}\def\csCoul{blue}%
- \def\csVal{\scalebox{0.33}[1]{EXC}}}{}%
+ {\def\csSymb{\ding{168}}\def\csCoul{blue}\def\csVal{\scalebox{0.33}[1]{EXC}}}{}%
%le cas du Joker
- \IfStrEq{\csVal}{J}%
+ \IfStrEq{\csVal}{JO}%
{\def\csSymb{\ding{166}}\def\csVal{\scalebox{0.5}[1]{JO}}}{}%
+ %le cas de la dame [en] Q
+ \IfStrEq{\csVal}{Q}%
+ {\def\csVal{\RaiseBoxByDepth{\scalebox{1}[0.8]{Q}}}}{}%
%si c'est un coeur
\IfStrEq{\csCplt}{C}%
{\def\csSymb{\ding{170}}\def\csCoul{red}}{}%
@@ -433,7 +440,7 @@
\IfStrEq{\csCplt}{R}%
{\def\csCoul{red}}{}%
%minicarte
- \tikz[baseline=(char.base)]\node[anchor=north west,line width=0.7pt,draw=gray,rectangle,rounded corners,inner sep=1.6pt,fill=\csFond,text=\csCoul,font=\ttfamily,minimum width=\MiniCarteLargeur](char){\csVal\scalebox{0.75}[0.75]{\csSymb}};%
+ \tikz[baseline=(char.base)]\node[anchor=north west,line width=0.7pt,draw=gray,rectangle,rounded corners=3pt,inner sep=1.5pt,fill=\csFond,text=\csCoul,font=\ttfamily,minimum width=\MiniCarteLargeur](char){\vphantom{A}\csVal\scalebox{0.75}[0.75]{\csSymb}};%
}
%------commande mini-main-cartes
@@ -470,10 +477,14 @@
}
\xdef\MiniCartesJeuPoker{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K}%
+\xdef\MiniCartesJeuPokerEN{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,J.P,Q.P,K.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,J.T,Q.T,K.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,J.C,Q.C,K.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,J.K,Q.K,K.K,A.K}%
\xdef\MiniCartesJeuBelote{7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K}%
-\xdef\MiniCartesJeuBataille{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K,J.N,J.R}%
+\xdef\MiniCartesJeuBeloteEN{7.P,8.P,9.P,10.P,J.P,Q.P,K.P,A.P,7.T,8.T,9.T,10.T,J.T,Q.T,K.T,A.T,7.C,8.C,9.C,10.C,J.C,Q.C,K.C,A.C,7.K,8.K,9.K,10.K,J.K,Q.K,K.K,A.K}%
+\xdef\MiniCartesJeuBataille{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K,JO.N,JO.R}%
+\xdef\MiniCartesJeuBatailleEN{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,J.P,Q.P,K.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,J.T,Q.T,K.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,J.C,Q.C,K.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,J.K,Q.K,K.K,A.K,JO.N,JO.R}%
\xdef\MiniCartesJeuTarot{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,C.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,C.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,C.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,C.K,D.K,R.K,A.K,1.AT,2.AT,3.AT,4.AT,5.AT,6.AT,7.AT,8.AT,9.AT,10.AT,11.AT,12.AT,13.AT,14.AT,15.AT,16.AT,17.AT,18.AT,19.AT,20.AT,21.AT,Exc}%
-\xdef\MiniCartesJeuRami{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K,J.N,J.R,2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K,J.N,J.R}%
+\xdef\MiniCartesJeuRami{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K,JO.N,JO.R,2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,V.P,D.P,R.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,V.T,D.T,R.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,V.C,D.C,R.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,V.K,D.K,R.K,A.K,JO.N,JO.R}%
+\xdef\MiniCartesJeuRamiEN{2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,J.P,Q.P,K.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,J.T,Q.T,K.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,J.C,Q.C,K.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,J.K,Q.K,K.K,A.K,JO.N,JO.R,2.P,3.P,4.P,5.P,6.P,7.P,8.P,9.P,10.P,J.P,Q.P,K.P,A.P,2.T,3.T,4.T,5.T,6.T,7.T,8.T,9.T,10.T,J.T,Q.T,K.T,A.T,2.C,3.C,4.C,5.C,6.C,7.C,8.C,9.C,10.C,J.C,Q.C,K.C,A.C,2.K,3.K,4.K,5.K,6.K,7.K,8.K,9.K,10.K,J.K,Q.K,K.K,A.K,JO.N,JO.R}%
\NewList{MiniCartesJeuMelange}
\NewDocumentCommand\MainMiniCartesJeuAleatoire{ O{} m }{%1=options,2=nbcartes
@@ -481,6 +492,7 @@
\setKV[MiniMainAleaCartes]{#1}%
%melange du jeu
\ClearList{MiniCartesJeuMelange}%
+ %Cartes [fr]
\IfStrEq{\MiniMainAleaType}{Poker}%si c'est le poker
{%
\xintFor* ##1 in {\xintCSVtoList{\MiniCartesJeuPoker}}%
@@ -511,6 +523,31 @@
\do{\InsertRandomItem{MiniCartesJeuMelange}{##1}}%
}%
{}%
+ %Cartes [en]
+ \IfStrEq{\MiniMainAleaType}{PokerEN}%si c'est le poker
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\MiniCartesJeuPokerEN}}%
+ \do{\InsertRandomItem{MiniCartesJeuMelange}{##1}}%
+ }%
+ {}%
+ \IfStrEq{\MiniMainAleaType}{BatailleEN}%si c'est la bataille
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\MiniCartesJeuBatailleEN}}%
+ \do{\InsertRandomItem{MiniCartesJeuMelange}{##1}}%
+ }%
+ {}%
+ \IfStrEq{\MiniMainAleaType}{BeloteEN}%si c'est le belote
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\MiniCartesJeuBeloteEN}}%
+ \do{\InsertRandomItem{MiniCartesJeuMelange}{##1}}%
+ }%
+ {}%
+ \IfStrEq{\MiniMainAleaType}{RamiEN}%si c'est le rami
+ {%
+ \xintFor* ##1 in {\xintCSVtoList{\MiniCartesJeuRamiEN}}%
+ \do{\InsertRandomItem{MiniCartesJeuMelange}{##1}}%
+ }%
+ {}%
%création de la main
\foreach \i in {1,2,...,#2}{%
\GetItem{MiniCartesJeuMelange}{\inteval{\i-1}}{MiniCarteMainChoisie}%
diff --git a/macros/latex/contrib/postit/README.md b/macros/latex/contrib/postit/README.md
index 23ae2d9f15..8cdc5fec2f 100644
--- a/macros/latex/contrib/postit/README.md
+++ b/macros/latex/contrib/postit/README.md
@@ -1,7 +1,7 @@
-postit is a package to work with post-it.
---------------------------------------------------
-positi est un package pour travailler des post-it.
---------------------------------------------------
+postit is a package to work with post-it with [fr] or [en] syntax.
+---------------------------------------------------------------------------------
+postit est un package pour travailler des post-it avec commandes en [fr] ou [en].
+---------------------------------------------------------------------------------
Author : Cédric Pierquet
email : cpierquet@outlook.fr
Licence : Released under the LaTeX Project Public License v1.3c or later, see http://www.latex-project.org/lppl.txt \ No newline at end of file
diff --git a/macros/latex/contrib/postit/doc/postit-doc-en.pdf b/macros/latex/contrib/postit/doc/postit-doc-en.pdf
new file mode 100644
index 0000000000..808e152c71
--- /dev/null
+++ b/macros/latex/contrib/postit/doc/postit-doc-en.pdf
Binary files differ
diff --git a/macros/latex/contrib/postit/doc/postit-doc-en.tex b/macros/latex/contrib/postit/doc/postit-doc-en.tex
new file mode 100644
index 0000000000..933ecc8390
--- /dev/null
+++ b/macros/latex/contrib/postit/doc/postit-doc-en.tex
@@ -0,0 +1,629 @@
+% !TeX TXS-program:compile = txs:///arara
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode}
+% arara: pdflatex: {shell: yes, synctex: no, interaction: batchmode} if found('log', '(undefined references|Please rerun|Rerun to get)')
+
+\documentclass[english,a4paper,11pt]{article}
+\usepackage[margin=2cm,includefoot]{geometry}
+\def\TPversion{0.1.2}
+\def\TPdate{06/06/2023}
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+\usepackage{amsmath,amssymb}
+\usepackage{postit}
+\usepackage{awesomebox}
+\usepackage{fontawesome5}
+\usepackage{footnote}
+\makesavenoteenv{tabular}
+\usepackage{enumitem}
+\usepackage{tabularray}
+\usepackage{wrapstuff}
+\usepackage{lipsum}
+\usepackage{fancyvrb}
+\usepackage{fancyhdr}
+\fancyhf{}
+\renewcommand{\headrulewidth}{0pt}
+\lfoot{\sffamily\small [postit]}
+\cfoot{\sffamily\small - \thepage{} -}
+\rfoot{\hyperlink{matoc}{\small\faArrowAltCircleUp[regular]}}
+
+%\usepackage{hvlogos}
+\usepackage{hologo}
+\usepackage{xspace}
+\providecommand\tikzlogo{Ti\textit{k}Z}
+\providecommand\TeXLive{\TeX{}Live\xspace}
+\providecommand\PSTricks{\textsf{PSTricks}\xspace}
+\let\pstricks\PSTricks
+\let\TikZ\tikzlogo
+\newcommand\TableauDocumentation{%
+ \begin{tblr}{width=\linewidth,colspec={X[c]X[c]X[c]X[c]X[c]X[c]},cells={font=\sffamily}}
+ {\LARGE \LaTeX} & & & & &\\
+ & {\LARGE \hologo{pdfLaTeX}} & & & & \\
+ & & {\LARGE \hologo{LuaLaTeX}} & & & \\
+ & & & {\LARGE \TikZ} & & \\
+ & & & & {\LARGE \TeXLive} & \\
+ & & & & & {\LARGE \hologo{MiKTeX}} \\
+ \end{tblr}
+}
+
+\usepackage{hyperref}
+\urlstyle{same}
+\hypersetup{pdfborder=0 0 0}
+\setlength{\parindent}{0pt}
+\definecolor{LightGray}{gray}{0.9}
+
+\usepackage{babel}
+%\AddThinSpaceBeforeFootnotes
+%\FrenchFootnotes
+
+\usepackage{listings}
+
+\usepackage{newverbs}
+\newverbcommand{\motcletex}{\color{cyan!75!black}}{}
+\newverbcommand{\packagetex}{\color{violet!75!black}}{}
+
+\tcbuselibrary{listingsutf8}
+\newtcblisting{DemoCode}[1][]{%
+ enhanced,width=0.95\linewidth,center,%
+ bicolor,size=title,%
+ colback=cyan!2!white,%
+ colbacklower=cyan!1!white,%
+ colframe=cyan!75!black,%
+ listing options={%
+ breaklines=true,%
+ breakatwhitespace=true,%
+ style=tcblatex,basicstyle=\small\ttfamily,%
+ tabsize=4,%
+ commentstyle={\itshape\color{gray}},
+ keywordstyle={\color{blue}},%
+ classoffset=0,%
+ keywords={},%
+ alsoletter={-},%
+ keywordstyle={\color{blue}},%
+ classoffset=1,%
+ alsoletter={-},%
+ morekeywords={center,right,justify,left,\lipsum},%
+ keywordstyle={\color{violet}},%
+ classoffset=2,%
+ alsoletter={-},%
+ morekeywords={PostItNote,\MiniPostIt},%
+ keywordstyle={\color{green!50!black}},%
+ classoffset=3,%
+ morekeywords={Color,PinColor,Pin,Width,Hieght,Rotate,Shadow,Corner,PinShift,AlignH,AlignV,AlignPostIt,Border,ExtraRightMargin,Render,Title,FontTitle},%
+ keywordstyle={\color{orange}}
+ },%
+ #1
+}
+
+\tcbset{vignettes/.style={%
+ nobeforeafter,box align=base,boxsep=0pt,enhanced,sharp corners=all,rounded corners=southeast,%
+ boxrule=0.75pt,left=7pt,right=1pt,top=0pt,bottom=0.25pt,%
+ }
+}
+
+\tcbset{vignetteMaJ/.style={%
+ fontupper={\vphantom{pf}\footnotesize\ttfamily},
+ vignettes,colframe=purple!50!black,coltitle=white,colback=purple!10,%
+ overlay={\begin{tcbclipinterior}%
+ \fill[fill=purple!75]($(interior.south west)$) rectangle node[rotate=90]{\tiny \sffamily{\textcolor{black}{\scalebox{0.66}[0.66]{\textbf{MàJ}}}}} ($(interior.north west)+(5pt,0pt)$);%
+ \end{tcbclipinterior}}
+ }
+}
+
+\newcommand\Cle[1]{{\small\sffamily\textlangle \textcolor{orange}{#1}\textrangle}}
+\newcommand\cmaj[1]{\tcbox[vignetteMaJ]{#1}\xspace}
+
+\begin{document}
+
+\setlength{\aweboxleftmargin}{0.07\linewidth}
+\setlength{\aweboxcontentwidth}{0.93\linewidth}
+\setlength{\aweboxvskip}{8pt}
+
+\pagestyle{fancy}
+
+\thispagestyle{empty}
+
+\vspace{2cm}
+
+\begin{center}
+ \begin{minipage}{0.75\linewidth}
+ \begin{tcolorbox}[colframe=yellow,colback=yellow!15]
+ \begin{center}
+ \begin{tabular}{c}
+ {\Huge \texttt{postit} [en]}\\
+ \\
+ {\LARGE Small Post-It notes,} \\
+ \\
+ {\LARGE with \textsf{tcolorbox} or \textsf{Ti\textit{k}Z}.} \\
+ \end{tabular}
+
+ \bigskip
+
+ {\small \texttt{Version \TPversion{} -- \TPdate}}
+ \end{center}
+ \end{tcolorbox}
+\end{minipage}
+\end{center}
+
+\begin{center}
+ \begin{tabular}{c}
+ \texttt{Cédric Pierquet}\\
+ {\ttfamily c pierquet -- at -- outlook . fr}\\
+ \texttt{\url{https://github.com/cpierquet/postit}}
+\end{tabular}
+\end{center}
+
+\vspace{0.25cm}
+
+{$\blacktriangleright$~~Display and customize Post-It or \textit{mini-}Post-It.}
+
+\vspace{0.25cm}
+
+{$\blacktriangleright$~~Custom width, height, rotation, decoration\ldots}
+
+\vspace{1cm}
+
+\begin{PostItNote}<center>
+ This is a small Post-It ! For example \[(a+b)^2=a^2+2ab+b^2.\]
+\end{PostItNote}
+
+\begin{PostItNote}[Render=tikz,Width=8cm,Color=orange,Pin=Paperclip,PinColor=blue,Rotate=-5,AlignPostIt=center,Title={- With a title -},FontTitle={\color{blue!50!black}\bfseries\small\sffamily}]
+\lipsum[1][1-4]
+\end{PostItNote}
+\hfill
+\begin{PostItNote}[Height=6cm,AlignV=center,Color=pink,Pin=Scotch,Rotate=15,Corner,AlignPostIt=center,]
+\lipsum[1][1-4]
+\end{PostItNote}
+
+\vspace{0.5cm}
+
+%\hfill{}\textit{Merci à Denis Bitouzé et à Gilles Le Bourhis pour leurs retours et idées !}
+
+\smallskip
+
+\vfill
+
+\hrule
+
+\medskip
+
+\TableauDocumentation
+
+\medskip
+
+\hrule
+
+\medskip
+
+\newpage
+
+\phantomsection
+\hypertarget{matoc}{}
+
+\tableofcontents
+
+\vfill
+
+\section{History}
+
+\verb|v0.1.2|~:~~~~English version.
+
+\verb|v0.1.1|~:~~~~\motcletex!\vphantom! for \textit{mini-}Post-It + Bugfixes + \TikZ{} rendering + optional title .
+
+\verb|v0.1.0|~:~~~~Initial version.
+
+\newpage
+
+\section{The package postit}
+
+\subsection{Introduction}
+
+\begin{noteblock}
+The package proposes small Post-It notes, in a \textsf{tex} doc, created with \packagetex!tcolorbox! or \packagetex!tikz!, with option(s) in order to :
+
+\begin{itemize}
+ \item change dimensions orcolor ;
+ \item use pin deocration like Paperclip, Pushpin or Scotch ;
+ \item customize border and/or corner.
+\end{itemize}
+
+The package propose a command to display \textit{mini-}Post-It (created with \motcletex!tcbox!), with color and shadow customization.
+\end{noteblock}
+
+\subsection{Loading of the package, and option}
+
+\begin{importantblock}
+The package Scrabble loads within the preamble.
+
+There's no option, and \packagetex!xcolor! isn't loaded.
+\end{importantblock}
+
+\begin{DemoCode}[listing only]
+\documentclass{article}
+\usepackage{postit}
+
+\end{DemoCode}
+
+\begin{noteblock}
+\packagetex!postit! loads the following packages and libraries :
+
+\begin{itemize}
+ \item \packagetex!tcolorbox! with library \packagetex!tcbox.skins! ;
+ \item \packagetex!tikz! libraries :
+ \begin{itemize}
+ \item \packagetex!tikz.calc! ;
+ \item \packagetex!tikz.decorations! ;
+ \item \packagetex!tikz.decorations.pathmorphing! ;
+ \end{itemize}
+ \item \packagetex!settobox!, \packagetex!xstring! and \packagetex!simplekv!.
+\end{itemize}
+
+It’s mostly compatible with \textsf{latex}, \textsf{pdflatex}, \textsf{lualatex} or \textsf{xelatex} compilation !
+\end{noteblock}
+
+\subsection{Compatibility}
+
+\begin{cautionblock}
+If an other package loads \packagetex!tcolorbox!, with \Cle{[most]} option, it's better to load \packagetex!postit! after, to avoid \motcletex!option clash error...!.
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\documentclass{article}
+\usepackage[<librairies>]{tcolorbox}
+\usepackage{postit}
+...
+
+\end{DemoCode}
+
+\vfill~
+
+\pagebreak
+
+\section{Post-It Environment}
+
+\subsection{Environment}
+
+\begin{cautionblock}
+The environment to display a Post-It note is \packagetex!PostItNote!.
+
+It works with keys, between \texttt{[...]} and, with \texttt{<...>}, it's possible to parse options to the \motcletex!tcbox! (not necessary with \motcletex!tikz!) !
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\begin{PostIt}[keys]<options tcbox>
+...
+...
+\end{PostIt}
+\end{DemoCode}
+
+\begin{noteblock}
+As mentionned in the introduction, the Post-It note is create with a \motcletex!tcbox! or a \motcletex!tikzpicture!.
+
+Most of the \motcletex!tcbox!/\motcletex!tikzpicture! parameters are fixed by the code, but some of them are configurable !
+\end{noteblock}
+
+\begin{DemoCode}[]
+%default rendering (tcbox), with lipsum paragraph
+\begin{PostItNote}
+\lipsum[1][1-2]
+\end{PostItNote}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+%tikz rendering, with lipsum paragraph
+\begin{PostItNote}[Render=tikz]
+\lipsum[1][1-2]
+\end{PostItNote}
+%tikzv2 rendering, with lipsum paragraph
+\begin{PostItNote}[Render=tikzv2]
+\lipsum[1][1-2]
+\end{PostItNote}
+\end{DemoCode}
+
+\begin{tipblock}
+The colors must be used as \textit{single}, without \textit{mixes} (with \motcletex|CouleurA!...!CouleurB|) proposed by \packagetex!xcolor!.
+
+
+However, every predefined color can be used within the Post-It.
+\end{tipblock}
+
+\begin{tipblock}
+The Post-It can be used with a \motcletex!minipage! or a \motcletex!wrapstuff! if needed.
+
+For horizontal alignement, \motcletex!\hfill! or \motcletex!flush...! can be used.
+\end{tipblock}
+
+\begin{warningblock}
+With a overlapping pin and the \textsf{tcbox} rendering, a vertical spacing before can be necessary, like \motcletex!\vspace! or \motcletex!\bigskip!\ldots
+\end{warningblock}
+
+\subsection{Clés et options}
+
+\begin{tipblock}
+The first argument, mandatory and between \texttt{[...]}, proposes the following \Cle{keys} :
+
+\begin{itemize}
+ \item \Cle{Width} : width (in cm) of the Post-It ; \hfill{}default : \Cle{6cm}
+ \item \Cle{Color} : color of the Post-It (border is a bit darker) ; \hfill{}default : \Cle{yellow}
+ \item \Cle{Height} : hieght (in cm, if needed) of the Post-It (\textit{automatic} by default) ;
+
+ \hfill{}default : \Cle{auto}
+ \item \cmaj{0.1.1} \Cle{Render} : engine, within \Cle{tcbox / tikz / tikv2} ; \hfill{}default : \Cle{tcbox}
+ \item \Cle{Rotation} : rotation of the Post-It ; \hfill{}default : \Cle{0}
+ \item \Cle{Shadow} : boolean for shadow ; \hfill{}default : \Cle{true}
+ \item \Cle{Border} : boolean for a thin border ; \hfill{}default : \Cle{true}
+ \item \Cle{Corner} : boolean to the corner decoration (\motcletex!tcbox!) ; \hfill{}default : \Cle{false}
+ \item \Cle{Pin} : decoration, within \Cle{Paperclip / Pushpin / None / Scotch} ;
+
+ \hfill{}default : \Cle{Pushpin}
+ \item \Cle{PinColor} : color of the pin ; \hfill{}default : \Cle{red}
+ \item \Cle{PinsShift} : horizontal shift (without unity, but in cm) of the orginal position of the pin \hfill{}default : \Cle{0}
+ \item \cmaj{0.1.1} \Cle{Title} : add a title (1st line and/or under the pin) ; \hfill{}default : \Cle{empty}
+ \item \cmaj{0.1.1} \Cle{Fonttitle} : font of the titel ; \hfill{}default : \Cle{\textbackslash normalfont\textbackslash normalfont}
+ \item \cmaj{0.1.1} \Cle{ExtraRightMargin} : add (with \packagetex!tikz! rendering, and in cm) à right margin ;
+
+ \hfill{}default : \Cle{0cm}
+ \item \Cle{AlignV} : vertical alignement in the Post-It (within \Cle{top/center/bottom}) ;
+
+ \hfill{}default : \Cle{top}
+ \item \Cle{AlignH} : horizontal alignment in the Post-It (within \Cle{left/center/right/justify}) ;
+
+ \hfill{}default : \Cle{justify}
+ \item \Cle{AlignPostIt} : vertical alignemnt of the Post-It (within \Cle{top/center/bottom}).
+
+ \hfill{}default : \Cle{bottom}
+\end{itemize}
+\vspace*{-\baselineskip}\leavevmode
+\end{tipblock}
+
+\begin{tipblock}
+The second argument, optional and between \texttt{<...>} is used to parse options to the \motcletex!tcolorbox!.
+
+They can be used to modify locally options not present in the keys.
+\end{tipblock}
+
+\begin{DemoCode}[]
+\begin{PostItNote}%tcbox rendering
+ [Color=cyan,Pin=Paperclip,Width=10cm,Rotate=10]<center,right=1.5cm>
+\lipsum[1][1-3]
+\end{PostItNote}
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\hfill\begin{PostItNote}%tikz rendering
+ [Render=tikz,Color=violet,Width=9cm,Rotate=-10,Pin=Paperclip,
+ PinColor=black,ExtraRightMargin=1cm,Title={Small title},
+ FontTitle={\color{white}\bfseries\small\sffamily}]
+\lipsum[1][1-3]
+\end{PostItNote}\hfill~
+\end{DemoCode}
+
+\begin{DemoCode}[]
+\hfill\begin{PostItNote}%tikzv2 rendering
+ [Render=tikzv2,Color=orange,Width=9cm,rotate=-10,Pin=Scotch, Title={Try},
+ FontTitle={\color{blue!50!black}\bfseries\itshape\small\ttfamily}]
+\lipsum[1][1-3]
+\end{PostItNote}\hfill~
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Examples}
+
+\begin{DemoCode}[]
+%usepackage{wrapstuff}
+\begin{wrapstuff}[r,top=1]
+\begin{PostItNote}[Rotate=5,Corner,Color=pink,PinkColor=blue,Border=false]
+\lipsum[1][1-2]
+\end{PostItNote}
+\end{wrapstuff}
+
+\lipsum[1]
+\end{DemoCode}
+
+\begin{DemoCode}[]
+%usepackage{wrapstuff}
+\begin{wrapstuff}[r,top=1]
+\begin{PostItNote}[Rotate=5,Render=tikz,Color=pink, PinkColor=blue,Border=false]
+\lipsum[1][1-2]
+\end{PostItNote}
+\end{wrapstuff}
+
+\lipsum[1]
+\end{DemoCode}
+
+\begin{DemoCode}[]
+%usepackage{wrapstuff}
+\begin{wrapstuff}[r,top=1]
+\begin{PostItNote}[Rotate=5,Render=tikzv2,Pin=Scotch,Color=pink]
+\lipsum[1][1-2]
+\end{PostItNote}
+\end{wrapstuff}
+
+\lipsum[1]
+\end{DemoCode}
+
+\begin{DemoCode}[]
+A small Post-It, and vertically aligned :
+%
+\hfill\begin{PostItNote}[Rotate=-10,Color=orange,Width=5cm,Height=5cm, AlignV=center,Corner,PinColor=yellow, PinShift=-1,AlignPostIt=center]
+
+\textsf{\small\lipsum[1][1-2]}
+\[\mathsf{\displaystyle\sum_{k=1}^{n} k = \dfrac{n(n+1)}{2}}\]
+\end{PostItNote}
+\end{DemoCode}
+
+\pagebreak
+
+\section{Simple inline Post-It Note}
+
+\subsection{Command}
+
+\begin{cautionblock}
+The inline \textit{mini-}Post-It note is \motcletex!MiniPostIt!.
+
+The only optional paramater for the \motcletex!tcbox! Post-It is the color
+
+\smallskip
+
+Dimensions can't be changed, a \motcletex!\vphantom! is insered at beginning to prevent different heights.
+\end{cautionblock}
+
+\begin{DemoCode}[listing only]
+\MiniPostIt(*)[color]{text}
+\end{DemoCode}
+
+\subsection{Arguments}
+
+\begin{noteblock}
+The starred version show the shadow og the \textit{mini-}Post-It.
+
+The color (\Cle{yellow}), is the only optional argument, between \texttt{[...]}.
+\end{noteblock}
+
+\subsection{Examples}
+
+\begin{DemoCode}[]
+To solve Diophantine equations, we can use \MiniPostIt*[orange]{Bezout's thorem}, and \MiniPostIt{Gauss' theorem}, with the \MiniPostIt*[cyan]{reciprocal}.
+
+It's classic and good to know !
+\end{DemoCode}
+
+\pagebreak
+
+\section{Gallery of styles}
+
+\subsection{Render by tcbox}
+
+\begin{DemoCode}[text only]
+\hfill\begin{PostItNote}
+\texttt{Shadow/PushPin/Border}
+\end{PostItNote}
+\begin{PostIt}[Shadow=false]
+\texttt{Pin/Border}
+\end{PostIt}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Border=false]
+\texttt{Shadow/Pushpin}
+\end{PostItNote}
+\begin{PostItNote}[Border=false,Shadow=false]
+\texttt{Pushpin}
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Pin=Paperclip]
+\texttt{Shadow/Paperclip/Border}\\
+~
+\end{PostItNote}
+\begin{PostItNote}[Pin=Scotch]
+\texttt{Shadow/Scotch/Border}\\
+~
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Pin=None]
+\texttt{Shadow/Border}
+\end{PostItNote}
+\begin{PostItNote}[Corner,Pin=None]
+\texttt{Shadow/Border/Corner}
+\end{PostItNote}\hfill~
+
+\vspace{1cm}
+
+\hfill\begin{PostItNote}[Title={Lipsum[1][1-4]},FontTitle={\large\sffamily},Rotate=5,Color=pink,Height=6cm,Pin=Scotch,AlignV=center,Corner]
+\lipsum[1][1-4]
+\end{PostItNote}\hfill~
+\end{DemoCode}
+
+\pagebreak
+
+\subsection{Render by tikz}
+
+\begin{DemoCode}[text only]
+\hfill\begin{PostItNote}[Render=tikz]
+\texttt{Shadow/Pushpin/Border}
+\end{PostItNote}
+\begin{PostItNote}[Shadow=false,Render=tikz]
+\texttt{Pushpin/Border}
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Border=false,Render=tikz]
+\texttt{Shadow/Pushpin}
+\end{PostItNote}
+\begin{PostItNote}[Border=false,Shadow=false,Render=tikz]
+\texttt{Pushpin}
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Pin=Paperclip,Render=tikz]
+\texttt{Shadow/Paperclip/Border}\\
+~
+\end{PostItNote}
+\begin{PostItNote}[Pin=Scotch,Render=tikz]
+\texttt{Shadow/Scotch/Border}\\
+~
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Pin=None,Render=tikz]
+\texttt{Shadow/Border}
+\end{PostItNote}\hfill~
+
+\vspace{1cm}
+
+\hfill\begin{PostItNote}[Render=tikz,Title={Lipsum[1][1-4]},FontTitle={\large\sffamily},Rotate=5,Color=pink,Height=6cm,Pin=Scotch,AlignV=center,Corner]
+\lipsum[1][1-4]
+\end{PostItNote}\hfill~
+\end{DemoCode}
+
+\subsection{Render by tikzv2}
+
+\begin{DemoCode}[text only]
+\hfill\begin{PostItNote}[Render=tikzv2]
+\texttt{Shadow/Pushpin/Border}
+\end{PostItNote}
+\begin{PostItNote}[Shadow=false,Render=tikzv2]
+\texttt{Pushpin/Border}
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Border=false,Render=tikzv2]
+\texttt{Shadow/Pushpin}
+\end{PostItNote}
+\begin{PostItNote}[Border=false,Shadow=false,Render=tikzv2]
+\texttt{Pushpin}
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Pin=Paperclip,Render=tikzv2]
+\texttt{Shadow/Paperclip/Border}\\
+~
+\end{PostItNote}
+\begin{PostItNote}[Pin=Scotch,Render=tikzv2]
+\texttt{Shadow/Scotch/Border}\\
+~
+\end{PostItNote}\hfill~
+
+\medskip
+
+\hfill\begin{PostItNote}[Pin=None,Render=tikzv2]
+\texttt{Shadow/Border}
+\end{PostItNote}\hfill~
+
+\vspace{1cm}
+
+\hfill\begin{PostItNote}[Render=tikzv2,Title={Lipsum[1][1-4]},FontTitle={\large\sffamily},Rotate=5,Color=pink,Height=6cm,Pin=Scotch,AlignV=center,Corner]
+\lipsum[1][1-4]
+\end{PostItNote}\hfill~
+\end{DemoCode}
+
+\end{document} \ No newline at end of file
diff --git a/macros/latex/contrib/postit/doc/postit-doc.pdf b/macros/latex/contrib/postit/doc/postit-doc-fr.pdf
index 369fc1219d..cd0466ba1f 100644
--- a/macros/latex/contrib/postit/doc/postit-doc.pdf
+++ b/macros/latex/contrib/postit/doc/postit-doc-fr.pdf
Binary files differ
diff --git a/macros/latex/contrib/postit/doc/postit-doc.tex b/macros/latex/contrib/postit/doc/postit-doc-fr.tex
index f9ee072286..9cc78fa4ba 100644
--- a/macros/latex/contrib/postit/doc/postit-doc.tex
+++ b/macros/latex/contrib/postit/doc/postit-doc-fr.tex
@@ -4,8 +4,8 @@
\documentclass[french,a4paper,11pt]{article}
\usepackage[margin=2cm,includefoot]{geometry}
-\def\TPversion{0.1.1}
-\def\TPdate{5 juin 2023}
+\def\TPversion{0.1.2}
+\def\TPdate{6 juin 2023}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
@@ -128,7 +128,7 @@
\begin{tcolorbox}[colframe=yellow,colback=yellow!15]
\begin{center}
\begin{tabular}{c}
- {\Huge \texttt{postit}}\\
+ {\Huge \texttt{postit} [fr]}\\
\\
{\LARGE Des petits Post-It,} \\
\\
@@ -169,7 +169,7 @@
\lipsum[1][1-4]
\end{PostIt}
\hfill
-\begin{PostIt}[Hauteur=6cm,AlignementV=center,Couleur=pink,Attache=Non,CouleurAttache=blue,Inclinaison=15,Coin,AlignementPostIt=center,Attache=Scotch]
+\begin{PostIt}[Hauteur=6cm,AlignementV=center,Couleur=pink,CouleurAttache=blue,Inclinaison=15,Coin,AlignementPostIt=center,Attache=Scotch]
\lipsum[1][1-4]
\end{PostIt}
@@ -204,6 +204,8 @@
\section{Historique}
+\verb|v0.1.2|~:~~~~Ajout des clés en langue anglaise.
+
\verb|v0.1.1|~:~~~~Ajout d'un \motcletex!\vphantom! pour les \textit{mini-}Post-It (hauteur \textit{uniforme}) + Correction de bugs.
\verb| |~:~~~~Moteurs de rendu alternatif en \TikZ{} + Ajout d'un titre éventuel .
@@ -350,7 +352,7 @@ Le premier argument, optionnel et entre \texttt{[...]}, propose les \Cle{clés}
\item \Cle{Ombre} : booléen pour afficher une ombre portée ; \hfill{}défaut : \Cle{true}
\item \Cle{Bordure} : booléen pour afficher une fine bordure ; \hfill{}défaut : \Cle{true}
\item \Cle{Coin} : booléen pour afficher un coin corné ; \hfill{}défaut : \Cle{false}
- \item \Cle{Attache} : choix de la décoration, parmi \Cle{Trombone / Punaise / Non} ;
+ \item \cmaj{0.1.1} \Cle{Attache} : choix de la décoration, parmi \Cle{Trombone / Punaise / Non / Scotch} ;
\hfill{}défaut : \Cle{Punaise}
\item \Cle{CouleurAttache} : couleur de l'attache ; \hfill{}défaut : \Cle{red}
@@ -471,7 +473,7 @@ Un petit Post-It aligné à droite, et centré verticalement :
\subsection{Commande et fonctionnement global}
\begin{cautionblock}
-La commande dédiée à la création du \textit{mini-}Post-It est \texttt{MiniPostIt}.
+La commande dédiée à la création du \textit{mini-}Post-It est \motcletex!MiniPostIt!.
Elle fonctionne sous forme autonome, avec uniquement la couleur en \Cle{option}.
diff --git a/macros/latex/contrib/postit/tex/postit.sty b/macros/latex/contrib/postit/tex/postit.sty
index 13dbd10ace..eb52909d99 100644
--- a/macros/latex/contrib/postit/tex/postit.sty
+++ b/macros/latex/contrib/postit/tex/postit.sty
@@ -3,7 +3,8 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{postit}[2023/06/05 0.1.1 Utiliser des post-it]
+\ProvidesPackage{postit}[2023/06/06 0.1.2 Display sticky notes in a doc]
+%0.1.2 English version (keys & command)
%0.1.1 Ajout d'un \vphantom pour les mini-post-it + moteur de rendu tikz en supplément
%0.1.0 Version initiale
@@ -30,6 +31,45 @@
\def\HauteurScotch{1}
\def\PostItBorder{0.1mm}
+%======Décorations
+%------Gestion du coin
+\NewDocumentCommand\CoinPostIt{ }{%
+ \path[line width=\PostItBorder,fill=\PostItCoul!66] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+ \path[line width=\PostItBorder,draw=\PostItCoul!50!black,shorten <=-0.05mm,shorten >=-0.05mm,color=\PostItCoul!50!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
+}
+
+%------Gestion du trombone
+\NewDocumentCommand\TrombonePostIt{ }{%
+ \begin{scope}[shift={([xshift={-1cm+\PostItDeclClip cm}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round]
+ \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
+ \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
+ \end{scope}
+}
+
+%------Gestion du scotch
+\NewDocumentCommand\ScotchPostIt{ }{%
+ \begin{scope}[shift={([xshift=\PostItDeclClip cm]frame.north)},scale={\PostItCoulScaleClip*0.65},line cap=round,rotate=3]
+ \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ;
+ \end{scope}
+}
+
+%------Gestion de la punaise
+\NewDocumentCommand\EpinglePostIt{ }{%
+ \begin{scope}[shift={([xshift=\PostItDeclClip cm,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40]
+ \begin{scope}[rotate=-35]
+ \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
+ \end{scope}
+ \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
+ \end{scope}
+}
+
+%======[FR]
%------Clés
\defKV[postit]{%
Largeur=\def\PostItLarg{#1},%
@@ -81,43 +121,6 @@
}%
}
-%------Gestion du coin
-\NewDocumentCommand\CoinPostIt{ }{%
- \path[line width=\PostItBorder,fill=\PostItCoul!66] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
- \path[line width=\PostItBorder,draw=\PostItCoul!50!black,shorten <=-0.05mm,shorten >=-0.05mm,color=\PostItCoul!50!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);
-}
-
-%------Gestion du trombone
-\NewDocumentCommand\TrombonePostIt{ }{%
- \begin{scope}[shift={([xshift={-1cm+\PostItDeclClip cm}]frame.north east)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round]
- \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
- \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
- \end{scope}
-}
-
-%------Gestion du scotch
-\NewDocumentCommand\ScotchPostIt{ }{%
- \begin{scope}[shift={([xshift=\PostItDeclClip cm]frame.north)},scale={\PostItCoulScaleClip*0.65},line cap=round,rotate=3]
- \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ;
- \end{scope}
-}
-
-%------Gestion de la punaise
-\NewDocumentCommand\EpinglePostIt{ }{%
- \begin{scope}[shift={([xshift=\PostItDeclClip cm,yshift=-0.5cm]frame.north)},scale={\PostItCoulScaleClip*0.55},rotate=-40]
- \begin{scope}[rotate=-35]
- \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
- \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
- \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
- \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
- \end{scope}
- \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
- \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
- \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
- \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
- \end{scope}
-}
-
%------Environnement principal
\NewDocumentEnvironment{PostIt}{ O{} D<>{} +b }%
{%
@@ -576,4 +579,493 @@
IfBooleanTF={#1}{ombreminipostit}{}
}
+%======[EN]
+
+%------Clés
+\defKV[postitnote]{%
+ Width=\def\PostItLarg{#1},%
+ Color=\def\PostItCoul{#1},%
+ PinColor=\def\PostItCoulClip{#1},%
+ PinScale=\def\PostItCoulScaleClip{#1},%
+ Rotate=\def\PostItIncline{#1},%
+ Height=\def\PostItHauteur{#1},%
+ PinShift=\def\PostItDeclClip{#1},%
+ Pin=\def\PostItDeco{#1},%
+ AlignV=\def\PostItAlignV{#1},%
+ AlignH=\def\PostItAlignH{#1},%
+ AlignPostIt=\def\PostItAlignPostIt{#1},%
+ Render=\def\PostItRender{#1},%
+ ExtraRightMargin=\def\PostItExtraMargin{#1},%
+ Title=\def\PostItTitre{#1},%
+ FontTitle=\def\PostItPoliceTitre{#1}
+}
+
+\setKVdefault[postitnote]{%
+ Width=6cm,%
+ Color=yellow,%
+ PinColor=red,%
+ Rotate=0,%
+ PinScale=1,%
+ Shadow=true,%
+ Height=auto,%
+ PinShift=0,%
+ Pin=Pushpin,%
+ AlignV=top,%
+ AlignH=justify,%
+ AlignPostIt=bottom,%
+ Border=true,%
+ Corner=false,%
+ Render=tcbox,%
+ ExtraRightMargin=0cm,%
+ Title={},%
+ FontTitle=\normalfont\normalsize
+}
+
+%------Style principal tcolorbox
+\tcbset{testpostitnote/.style={%
+ on line,enhanced,colframe=\PostItCoul!50!black,boxrule=\PostItBorder,width=\PostItLarg,sharp corners,halign=\PostItAlignH,valign=\PostItAlignV,%
+ %colback=\PostItCoul!50,%
+ finish={\CommandeDecoration},tikz={rotate=\PostItIncline,transform shape},%
+ box align=\PostItAlignPostIt,%
+ interior style={top color=\PostItCoul!50,bottom color=\PostItCoul!33},%
+ nobeforeafter
+ }%
+}
+
+%------Environnement principal
+\NewDocumentEnvironment{PostItNote}{ O{} D<>{} +b }%
+{%
+ \restoreKV[postitnote]%
+ \setKV[postitnote]{#1}%
+ \IfStrEq{\PostItRender}{tcbox}%
+ {%
+ %choix de la déco et paramètrage
+ \def\CommandeDecoration{\EpinglePostIt}%
+ \def\MarginOffsetV{4mm}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {\def\CommandeDecoration{\TrombonePostIt}\def\MarginOffsetV{0mm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {\def\CommandeDecoration{\ScotchPostIt}\def\MarginOffsetV{1mm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {\def\CommandeDecoration{}\def\MarginOffsetV{0mm}}%
+ {}%
+ %cas de la bordure
+ \ifboolKV[postitnote]{Border}%
+ {%
+ \def\PostItBorder{0.1mm}%
+ \tcbset{bordure/.style={}}%
+ }%
+ {%
+ \def\PostItBorder{0mm}%
+ \tcbset{bordure/.style={frame hidden}}%
+ }%
+ %cas du coin
+ \ifboolKV[postitnote]{Corner}%
+ {%
+ \tcbset{coincoin/.style={rounded corners=southeast,arc is angular,arc=3mm,underlay={\CoinPostIt}}}%
+ }%
+ {%
+ \tcbset{coincoin/.style={}}%
+ }%
+ %en fonction de hauteur auto ou non
+ \IfStrEq{\PostItHauteur}{auto}%
+ {%
+ \ifboolKV[postitnote]{Shadow}%
+ {\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,drop fuzzy shadow,top={2mm+\MarginOffsetV}]}%
+ {\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,top={2mm+\MarginOffsetV}]}%
+ }%
+ {%
+ \ifboolKV[postitnote]{Shadow}%
+ {\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,drop fuzzy shadow,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}%
+ {\begin{tcolorbox}[testpostitnote,#2,bordure,coincoin,height=\PostItHauteur,top={2mm+\MarginOffsetV}]}%
+ }%
+ \IfStrEq{\PostItTitre}{}%
+ {}%
+ {%
+ \hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\%
+ }%
+ #3%
+ \end{tcolorbox}%
+ }{}%
+ \IfStrEq{\PostItRender}{tikz}%
+ {%
+ \StrDel{\PostItLarg}{cm}[\PostItLarg]%
+ \StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]%
+ \def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}%
+ \def\TextePostIt{%
+ \IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\}%
+ #3%
+ }%
+ \IfStrEq{\PostItHauteur}{auto}%
+ {%
+ \sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}%
+ \settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}%
+ \addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {\addtolength\HauteurEssaiTexte{0.4cm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {\addtolength\HauteurEssaiTexte{0.2cm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {\addtolength\HauteurEssaiTexte{0.6cm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {\addtolength\HauteurEssaiTexte{0.2cm}}%
+ {}%
+ \def\hauteur{\the\HauteurEssaiTexte}%
+ }%
+ {%
+ \def\hauteur{\PostItHauteur}%
+ }%
+ \def\OptionTikzPostIt{current bounding box.south}%
+ \IfStrEq{\PostItAlignPostIt}{center}%
+ {\def\OptionTikzPostIt{current bounding box.center}}{}%
+ \IfStrEq{\PostItAlignPostIt}{top}%
+ {\def\OptionTikzPostIt{current bounding box.north}}{}%
+ \begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round]
+ %tracé
+ %ombre1/2/3
+ \ifboolKV[postitnote]{Shadow}%
+ {%
+ \draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreA,-\OffsetOmbreA)$)
+ to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})
+ -- cycle ;
+ \draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreB,-\OffsetOmbreB)$)
+ to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})
+ -- cycle ;
+ \draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=104] ++ ($({0.15},{-\hauteur+0.15})+(\OffsetOmbreC,-\OffsetOmbreC)$)
+ to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})
+ -- cycle ;
+ }%
+ {}%
+ %postit
+ \ifboolKV[postitnote]{Shadow}
+ {%
+ \shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15})
+ to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})
+ -- cycle ;
+ }%
+ {%
+ \shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=104] ++ ({0.15},{-\hauteur+0.15})
+ to[out=182,in=-2] ++ ({-0.15-\PostItLarg-\PostItExtraMargin},{0.13})
+ -- cycle ;
+ }%
+ \IfStrEq{\PostItHauteur}{auto}%
+ {%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ {%
+ \IfStrEq{\PostItAlignV}{top}
+ {%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ {}%
+ \IfStrEq{\PostItAlignV}{center}
+ {%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ {}%
+ \IfStrEq{\PostItAlignV}{bottom}
+ {%
+ \draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ %affichage de la punaise
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40]
+ \begin{scope}[rotate=-35]
+ \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
+ \end{scope}
+ \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
+ \end{scope}
+ }%
+ {}%
+ %affichage du trombone
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round]
+ \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
+ \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
+ \end{scope}
+ }%
+ {}%
+ %affichage du scotch
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round]
+ \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ;
+ \end{scope}
+ }%
+ {}%
+ \end{tikzpicture}%
+ }{}%
+ \IfStrEq{\PostItRender}{tikzv2}%
+ {%
+ \StrDel{\PostItLarg}{cm}[\PostItLarg]%
+ \StrDel{\PostItExtraMargin}{cm}[\PostItExtraMargin]%
+ \def\LargeurTextePostIt{\fpeval{\PostItLarg-\MarginHGPostIt-\MarginHDPostIt}}%
+ \def\TextePostIt{%
+ \IfStrEq{\PostItTitre}{}{}{\hfill{}{\PostItPoliceTitre\PostItTitre}\hfill~\\}%
+ #3%
+ }%
+ \IfStrEq{\PostItHauteur}{auto}%
+ {%
+ \sbox{\maboitepostit}{\parbox{\LargeurTextePostIt cm}{\TextePostIt}}%
+ \settoboxtotalheight{\HauteurEssaiTexte}{\maboitepostit}%
+ \addtolength\HauteurEssaiTexte{\MarginVHPostIt}\addtolength\HauteurEssaiTexte{\MarginVBPostIt}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {\addtolength\HauteurEssaiTexte{0.4cm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {\addtolength\HauteurEssaiTexte{0.2cm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {\addtolength\HauteurEssaiTexte{0.6cm}}%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {\addtolength\HauteurEssaiTexte{0.2cm}}%
+ {}%
+ \def\hauteur{\the\HauteurEssaiTexte}%
+ }%
+ {%
+ \def\hauteur{\PostItHauteur}%
+ }%
+ \def\OptionTikzPostIt{current bounding box.south}%
+ \IfStrEq{\PostItAlignPostIt}{center}%
+ {\def\OptionTikzPostIt{current bounding box.center}}{}%
+ \IfStrEq{\PostItAlignPostIt}{top}%
+ {\def\OptionTikzPostIt{current bounding box.north}}{}%
+ \begin{tikzpicture}[baseline=(\OptionTikzPostIt),rotate=\PostItIncline,line join=bevel,line cap=round]
+ %tracé
+ %ombre1/2/3
+ \ifboolKV[postitnote]{Shadow}%
+ {%
+ \draw[draw=none,fill=gray,semithick,fill=gray,fill opacity=0.5]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(2pt,-2pt)$)
+ --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-4pt,0)$)
+ to[out=89,in=-90] (0,0) ;
+ \draw[draw=none,fill=gray!50!black,semithick,fill=gray!50!black,fill opacity=0.5]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(1.25pt,-1.25pt)$)
+ --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-2.5pt,0)$)
+ to[out=89,in=-90] (0,0) ;
+ \draw[draw=none,fill=black,semithick,fill=black,fill opacity=0.5]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=91] ++ ($({0.05},{-\hauteur-0.05})+(0.5pt,-0.5pt)$)
+ --++ ($({-\PostItLarg-\PostItExtraMargin-0.1},{0})+(-1pt,0)$)
+ to[out=89,in=-90] (0,0) ;
+ }%
+ {}%
+ %postit
+ \ifboolKV[postitnote]{Border}
+ {%
+ \shadedraw[draw=\PostItCoul!50!black,line width=0.1mm,top color=\PostItCoul!50,bottom color=\PostItCoul!33]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05})
+ --++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0})
+ to[out=89,in=-90] (0,0) ;
+ }%
+ {%
+ \shadedraw[draw=none,top color=\PostItCoul!50,bottom color=\PostItCoul!33]
+ (0,0) --++ ({\PostItLarg+\PostItExtraMargin},0)
+ to[out=-90,in=91] ++ ({0.05},{-\hauteur-0.05})
+ --++ ({-\PostItLarg-\PostItExtraMargin-0.1},{0})
+ to[out=89,in=-90] (0,0) ;
+ }%
+ \IfStrEq{\PostItHauteur}{auto}%
+ {%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ {%
+ \IfStrEq{\PostItAlignV}{top}
+ {%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.4cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \draw ({0.5*\PostItLarg},{-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,below,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ {}%
+ \IfStrEq{\PostItAlignV}{center}
+ {%
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur-\MarginVHPostIt-0.2cm}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{None}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \draw ({0.5*\PostItLarg},{-0.5*\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ {}%
+ \IfStrEq{\PostItAlignV}{bottom}
+ {%
+ \draw ({0.5*\PostItLarg},{-\hauteur}) node[text width=\LargeurTextePostIt cm,rotate=\PostItIncline,above=0.6cm,align=\PostItAlignH,inner sep=0pt] {\TextePostIt} ;
+ }%
+ {}%
+ }%
+ %affichage de la punaise
+ \IfStrEq{\PostItDeco}{Pushpin}%
+ {%
+ \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,-0.49)},scale={0.55},rotate=-40]
+ \begin{scope}[rotate=-35]
+ \draw[blue!10!gray,line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
+ \fill[blue!10!gray,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
+ \end{scope}
+ \draw[line cap=round,line width=2pt] (0,0) -- ++(90:0.85);
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ellipse (.65cm and .3cm) ;
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.4) ellipse (.2 and .4);
+ \fill[ball color=\PostItCoulClip!66,scale=0.5] (90:0.85) ++(0,0.8) ellipse (.4 and .3);
+ \end{scope}
+ }%
+ {}%
+ %affichage du trombone
+ \IfStrEq{\PostItDeco}{Paperclip}%
+ {%
+ \begin{scope}[shift={(\PostItLarg+\PostItExtraMargin-1+\PostItDeclClip,0)},rotate=-15,scale={\PostItCoulScaleClip*0.55},line cap=round]
+ \draw[line width=0.81mm,draw=\PostItCoulClip!66] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
+ \draw[line width=0.27mm,draw=\PostItCoulClip!33] (0,0) --++ (0,0.0) arc (180:0:3.5mm) --++ (0,-1.75) arc (0:-180:3mm) --++ (0,1.25) ;
+ \end{scope}
+ }%
+ {}%
+ %affichage du scotch
+ \IfStrEq{\PostItDeco}{Scotch}%
+ {%
+ \begin{scope}[shift={(0.5*\PostItLarg+0.5*\PostItExtraMargin+\PostItDeclClip,0)},scale={0.65},rotate=3,line cap=round]
+ \draw[thin,gray!50,fill=lightgray,fill opacity=0.75] ({-0.5*\LargeurStotch},{-0.5*\HauteurScotch}) to ({0.5*\LargeurStotch},{-0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to ({0.5*\LargeurStotch},{0.5*\HauteurScotch})} to ({-0.5*\LargeurStotch},{0.5*\HauteurScotch}) decorate [decoration={zigzag,segment length=2pt,amplitude=0.5pt}] {to cycle} ;
+ \end{scope}
+ }%
+ {}%
+ \end{tikzpicture}%
+ }{}%
+}%
+{}%
+
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/tagpdf/README.md b/macros/latex/contrib/tagpdf/README.md
index 52a80b7f48..5b4a1b211f 100644
--- a/macros/latex/contrib/tagpdf/README.md
+++ b/macros/latex/contrib/tagpdf/README.md
@@ -1,6 +1,6 @@
#tagpdf — A package to create tagged pdf
-Packageversion: 0.98g
-Packagedate: 2023/05/16
+Packageversion: 0.98h
+Packagedate: 2023/06/06
Author: Ulrike Fischer
## License
diff --git a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
index 2f0e0fa8b9..5b6acbf34f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-backend.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*luatex>
-\ProvidesExplFile {tagpdf-luatex.def} {2023-05-16} {0.98g}
+\ProvidesExplFile {tagpdf-luatex.def} {2023-06-06} {0.98h}
{tagpdf~driver~for~luatex}
% \end{macrocode}
% \section{Loading the lua}
@@ -158,8 +158,8 @@
local ProvidesLuaModule = {
name = "tagpdf",
- version = "0.98g", --TAGVERSION
- date = "2023-05-16", --TAGDATE
+ version = "0.98h", --TAGVERSION
+ date = "2023-06-06", --TAGDATE
description = "tagpdf lua code",
license = "The LATEX Project Public License 1.3c"
}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
index 830e667b52..39b786ee41 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-checks.dtx
@@ -48,7 +48,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \section{Commands}
@@ -151,6 +151,11 @@
% & error
% & in struct module
% \\
+% |\@@_struct_write_obj:n|
+% & |struct-orphan|
+% & warning
+% & in struct module
+% \\
% |\tag_struct_begin:n|
% & |struct-faulty-nesting|
% & error
@@ -295,7 +300,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-checks-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-checks-code} {2023-06-06} {0.98h}
{part of tagpdf - code related to checks, conditionals, debugging and messages}
%</header>
% \end{macrocode}
@@ -370,6 +375,19 @@
\msg_new:nnn { tag } {struct-no-objnum} { objnum~missing~for~structure~#1 }
% \end{macrocode}
% \end{macro}
+% \begin{macro}{struct-orphan}
+% This indicates that there is a structure which has kids but no parent.
+% This can happen if a structure is stashed but then not used.
+% \begin{macrocode}
+\msg_new:nnn { tag } {struct-orphan}
+ {
+ Structure~#1~has~#2~kids~but~no~parent.\\
+ It~is~turned~into~an~artifact.\\
+ Did~you~stashed~a~structure~and~then~didn't~use~it?
+ }
+
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{struct-faulty-nesting}
% This indicates that there is somewhere one |\tag_struct_end:| too much.
% This should be normally an error.
diff --git a/macros/latex/contrib/tagpdf/tagpdf-code.pdf b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
index 96903459f9..8fd8bc7541 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-code.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf-data.dtx b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
index b2955c8a94..e66712cc7f 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-data.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-data.dtx
@@ -47,7 +47,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% This files contains a various data files which are read in
@@ -60,7 +60,7 @@
% It lists the new tag, the rolemap and the namespace of the rolemap.
% \begin{macrocode}
%<*ns-latex>
-%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex.def} {2023-06-06} {0.98h}
%% {latex} {https://www.latex-project.org/ns/dflt/2022}{}
title, Title, pdf2,
part, Title, pdf2,
@@ -92,7 +92,7 @@ text, P, pdf2,
% It is bound to change
% \begin{macrocode}
%<*ns-latex-book>
-%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex-book.def} {2023-06-06} {0.98h}
%% {latex-book} {https://www.latex-project.org/ns/book/2022}{}
chapter, H1,pdf2,
section, H2,pdf2,
@@ -108,7 +108,7 @@ subparagraph, H6,pdf2,
% It is bound to change a lot!
% \begin{macrocode}
%<*ns-latex-inline>
-%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-latex-inline.def} {2023-06-06} {0.98h}
%% {latex-inline} {https://www.latex-project.org/ns/inline/2022}{}
chapter, Span, pdf2,
section, Span, pdf2,
@@ -122,7 +122,7 @@ P, Span, pdf2,
% \section{The pdf namespace data}
% \begin{macrocode}
%<*ns-pdf>
-%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-pdf.def} {2023-06-06} {0.98h}
%% {pdf} {http://iso.org/pdf/ssn}{}
StructTreeRoot,StructTreeRoot,pdf,D,
Document,Document,pdf,D,
@@ -190,7 +190,7 @@ Strong,Span,pdf,I,
% \section{The pdf 2.0 namespace data}
% \begin{macrocode}
%<*ns-pdf2>
-%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-pdf2.def} {2023-06-06} {0.98h}
%% {pdf2} {http://iso.org/pdf2/ssn}{}
Document,Document,pdf2,D,
Part,Part,pdf2,G,
@@ -246,7 +246,7 @@ Strong,Strong,pdf2,I,
% \section{The mathml namespace data}
% \begin{macrocode}
%<*ns-mathml>
-%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-ns-mathml.def} {2023-06-06} {0.98h}
% {mathml}{http://www.w3.org/1998/Math/MathML}{}
abs,abs,mathml,
and,and,mathml,
@@ -481,7 +481,7 @@ xor,xor,mathml,
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child>
-%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-parent-child.csv} {2023-06-06} {0.98h}
,,,StructTreeRoot,Document,Art,Part,Div,Sect,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,MC
Document,both,document level,1,0..n,∅,‡,‡,∅,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅
Art,1.7,grouping,∅,0..n,∅,‡,‡,0..n,0..n,‡,∅,∅,∅,0..n,∅,0..n,∅,∅,∅,0..1,0..1,∅,∅,∅,0..n,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅,∅,0..n,0..n,∅,∅,∅,0..n,0..n,∅,∅
@@ -536,7 +536,7 @@ MC,both,---,∅,∅,∅,∅,∅,∅,0..n,‡,∅,∅,∅,0..n,0..n,0..n,0..n,0..
% This will perhaps change in future.
% \begin{macrocode}
%<*parent-child-2>
-%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-05-16} {0.98g}
+%% \ProvidesExplFile {tagpdf-parent-child-2.csv} {2023-06-06} {0.98h}
,,,StructTreeRoot,Document,DocumentFragment,Art,Part,Div,Sect,Aside,BlockQuote,NonStruct,TOC,TOCI,Index,Private,Title,Sub,Quote,Note,Reference,BibEntry,P,Hn,H,Lbl,Code,Em,Strong,Span,Link,Annot,Form,Ruby,RB,RT,RP,Warichu,WT,WP,FENote,L,LI,LBody,Table,TR,TH,TD,THead,TBody,TFoot,Caption,Figure,Formula,math,mathml,Artifact,MC
Document,both,document level,1,0..n,0..n,∅,‡,‡,∅,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,0..n,∅
DocumentFragment,2.0,document level,∅,0..n,0..n,0..n,‡,‡,0..n,0..n,0..n,‡,∅,∅,∅,0..n,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅*,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅,∅*,∅,∅,∅,∅,0..n,∅
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
index 68479088a5..a82cb68524 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-generic.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \end{documentation}
@@ -55,11 +55,11 @@
% \begin{macrocode}
%<@@=tag>
%<*generic>
-\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-generic} {2023-06-06} {0.98h}
{part of tagpdf - code related to marking chunks - generic mode}
%</generic>
%<*debug>
-\ProvidesExplPackage {tagpdf-debug-generic} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-debug-generic} {2023-06-06} {0.98h}
{part of tagpdf - debugging code related to marking chunks - generic mode}
%</debug>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
index a4f61192df..cf70950a28 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-luacode.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{implementation}
% The code is splitted into three parts: code shared by all engines,
@@ -86,7 +86,7 @@
% \begin{macrocode}
%<@@=tag>
%<*luamode>
-\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-lua} {2023-06-06} {0.98h}
{tagpdf - mc code only for the luamode }
%</luamode>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
index cdc0aaa5a3..2096e11d30 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-mc-shared.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -174,7 +174,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-mc-code-shared} {2023-06-06} {0.98h}
{part of tagpdf - code related to marking chunks -
code shared by generic and luamode }
%</header>
diff --git a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
index ce860d71fa..5876c4ba32 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-roles.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \begin{function}
@@ -98,7 +98,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-roles-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-roles-code} {2023-06-06} {0.98h}
{part of tagpdf - code related to roles and structure names}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-space.dtx b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
index e8c1edfd5c..6e751618ee 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-space.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-space.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \begin{function}{interwordspace (setup-key)}
@@ -64,7 +64,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-space-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-space-code} {2023-06-06} {0.98h}
{part of tagpdf - code related to real space chars}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
index 81211bd445..542671bd15 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-struct.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \section{Public Commands}
@@ -247,7 +247,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-struct-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-struct-code} {2023-06-06} {0.98h}
{part of tagpdf - code related to storing structure}
%</header>
% \end{macrocode}
@@ -837,16 +837,35 @@
{
\pdf_object_if_exist:nTF { @@/struct/#1 }
{
+% \end{macrocode}
+% It can happen that a structure is not used and so has not parent.
+% Simply ignoring it is problematic as it is also recorded in
+% the IDTree, so we make an artifact out of it.
+% \begin{macrocode}
+ \prop_get:cnNF { g_@@_struct_#1_prop } {P}\l_@@_tmpb_tl
+ {
+ \prop_gput:cnx { g_@@_struct_#1_prop } {P}{\pdf_object_ref:n { @@/struct/0 }}
+ \prop_gput:cnx { g_@@_struct_#1_prop } {S}{/Artifact}
+ \seq_if_empty:cF {g_@@_struct_kids_#1_seq}
+ {
+ \msg_warning:nnxx
+ {tag}
+ {struct-orphan}
+ { #1 }
+ {\seq_count:c{g_@@_struct_kids_#1_seq}}
+ }
+ }
\@@_struct_fill_kid_key:n { #1 }
\@@_struct_get_dict_content:nN { #1 } \l_@@_tmpa_tl
\exp_args:Nx
- \pdf_object_write:nnx
- { @@/struct/#1 }
- {dict}
- {
- \l_@@_tmpa_tl\c_space_tl
- /ID~\@@_struct_get_id:n{#1}
- }
+ \pdf_object_write:nnx
+ { @@/struct/#1 }
+ {dict}
+ {
+ \l_@@_tmpa_tl\c_space_tl
+ /ID~\@@_struct_get_id:n{#1}
+ }
+
}
{
\msg_error:nnn { tag } { struct-no-objnum } { #1}
@@ -1470,6 +1489,10 @@
{
\tl_gset:Nx \g_@@_struct_tag_tl
{ \exp_last_unbraced:NV\use_i:nn \l_@@_tmpa_tl }
+ \prop_get:NVNT\g_@@_role_tags_NS_prop \g_@@_struct_tag_tl\l_@@_tmpa_tl
+ {
+ \tl_gset:Nx \g_@@_struct_tag_NS_tl { \l_@@_tmpa_tl }
+ }
}
%<debug>\@@_debug_struct_end_insert:
}
@@ -1703,7 +1726,7 @@
% \section{Attributes and attribute classes}
% \begin{macrocode}
%<*header>
-\ProvidesExplPackage {tagpdf-attr-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-attr-code} {2023-06-06} {0.98h}
{part of tagpdf - code related to attributes and attribute classes}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
index decc64928f..61f6db544a 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-tree.dtx
@@ -47,13 +47,13 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{implementation}
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-tree-code} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-tree-code} {2023-06-06} {0.98h}
{part of tagpdf - code related to writing trees and dictionaries to the pdf}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf-user.dtx b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
index 36da045bba..8ebd1813dd 100644
--- a/macros/latex/contrib/tagpdf/tagpdf-user.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf-user.dtx
@@ -46,7 +46,7 @@
% }^^A
% }
%
-% \date{Version 0.98g, released 2023-05-16}
+% \date{Version 0.98h, released 2023-06-06}
% \maketitle
% \begin{documentation}
% \section{Setup commands}
@@ -68,7 +68,7 @@
% \begin{syntax}
% \cs{tag_tool:n}\Arg{key val}
% \end{syntax}
-% The tagging of basic document elements will require a variaty of small commands
+% The tagging of basic document elements will require a variety of small commands
% to configure and adapt the tagging. This command will collect them under a command
% interface. The argument is \emph{one} key-value like string. This is work in progress
% and both syntax, known arguments and implementation can change!
@@ -250,7 +250,7 @@
% \begin{macrocode}
%<@@=tag>
%<*header>
-\ProvidesExplPackage {tagpdf-user} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-user} {2023-06-06} {0.98h}
{tagpdf - user commands}
%</header>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.dtx b/macros/latex/contrib/tagpdf/tagpdf.dtx
index e9a394b5d4..b4c9e55090 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.dtx
+++ b/macros/latex/contrib/tagpdf/tagpdf.dtx
@@ -92,7 +92,7 @@
% \begin{macrocode}
%<@@=tag>
%<*package>
-\ProvidesExplPackage {tagpdf} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf} {2023-06-06} {0.98h}
{ A package to experiment with pdf tagging }
\bool_if:nF
@@ -118,7 +118,7 @@
% \end{macrocode}
%<*debug>
% \begin{macrocode}
-\ProvidesExplPackage {tagpdf-debug} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-debug} {2023-06-06} {0.98h}
{ debug code for tagpdf }
\@ifpackageloaded{tagpdf}{}{\PackageWarning{tagpdf-debug}{tagpdf~not~loaded,~quitting}\endinput}
% \end{macrocode}
@@ -141,7 +141,7 @@
% we define a base package with dummy functions
% \begin{macrocode}
%<*base>
-\ProvidesExplPackage {tagpdf-base} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdf-base} {2023-06-06} {0.98h}
{part of tagpdf - provide base, no-op versions of the user commands }
%</base>
% \end{macrocode}
diff --git a/macros/latex/contrib/tagpdf/tagpdf.pdf b/macros/latex/contrib/tagpdf/tagpdf.pdf
index f5f890701e..a75c6a78db 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.pdf
+++ b/macros/latex/contrib/tagpdf/tagpdf.pdf
Binary files differ
diff --git a/macros/latex/contrib/tagpdf/tagpdf.tex b/macros/latex/contrib/tagpdf/tagpdf.tex
index cc3295488e..27cd1d128d 100644
--- a/macros/latex/contrib/tagpdf/tagpdf.tex
+++ b/macros/latex/contrib/tagpdf/tagpdf.tex
@@ -10,35 +10,33 @@
\DocumentMetadata
{
% comment the following line to compile an untagged documentation:
- testphase=phase-III,testphase=graphics,
+ testphase=phase-III,
pdfversion=2.0,lang=en-UK,pdfstandard=a-4,
+ %uncompress
}
\DebugBlocksOff
\makeatletter
-\def\UlrikeFischer@package@version{0.98g}
-\def\UlrikeFischer@package@date{2023-05-16}
+\def\UlrikeFischer@package@version{0.98h}
+\def\UlrikeFischer@package@date{2023-06-06}
\makeatother
-\documentclass[DIV=12,parskip=half-,bibliography=totoc,a4paper]{article}
+\documentclass[bibliography=totoc,a4paper]{article}
\usepackage{geometry}
\usepackage[english]{babel}
\usepackage{unicode-math}
\setmainfont{Heuristica}
\usepackage[nopatch]{microtype}
-\makeatletter
-% see https://github.com/schlcht/microtype/issues/8
-%\patchcmd{\MT@get@prot}{\noindent}{\RawNoindent}{}{\fail}
-\makeatother
-%\usepackage{scrlayer-scrpage}
\usepackage[autostyle]{csquotes}
-\usepackage[style=numeric,hyperref=false]{biblatex}
+\usepackage[style=numeric]{biblatex}
\addbibresource{tagpdf.bib}
\usepackage[noparboxrestore]{marginnote}
-\makeatletter \renewcommand*{\mn@parboxrestore}{\tagpdfparaOff}%
+\makeatletter
+\renewcommand*{\mn@parboxrestore}{\tagpdfparaOff}%
+\makeatother
\reversemarginpar
\usepackage{tcolorbox}
@@ -89,11 +87,6 @@
\usepackage{tagpdfdocu-patches}
-
-%\cfoot*{\pagemark}
-
-%
-
\newcommand\PDF{PDF}
\title{The \pkg{tagpdf} package, v\csname UlrikeFischer@package@version\endcsname}
@@ -128,12 +121,12 @@ This package is not meant for normal document production. It is mainly a tool to
tagging.
You need a very current \LaTeX{} format.
- You need a very current L3 programming layer.
- You need the new \LaTeX{} PDF management bundle.
+You need a very current L3 programming layer.
+You need the new \LaTeX{} PDF management bundle.
This package is incomplete, experimental and quite probably contains bugs. It is in parts
quite slow as the code prefers readability over speed.
- At some time it will disappear when the code has been integrated into the \LaTeX{} format.
+At some time it will disappear when the code has been integrated into the \LaTeX{} format.
This package can change in an incompatible way.
@@ -160,45 +153,47 @@ Issues, comments, suggestions should be added as issues to the github tracker:
\section{Introduction}
-Since many years the creation of accessible \PDF{}-files with \LaTeX\ which conform to the PDF/UA standard has been on the agenda of \TeX-meetings. Many people agree that this is important and Ross Moore has done quite some work on it. There is also a TUG-mailing list and a webpage \parencite{tugaccess} dedicated to this theme.
-
-But in my opinion missing were means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a \PDF{} works e.g. with a screen reader. Without such experiments it is imho quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted.
+Since many years the creation of accessible, tagged \PDF{}-files with \LaTeX\ which conform to the PDF/UA standard has been on the agenda of \TeX-meetings. Many people agree that this is important and Ross Moore has done quite some work on it. There is also a TUG-mailing list and a web page \parencite{tugaccess} dedicated to this theme.
+In my opinion missing were means to \emph{experiment} with tagging and accessibility. Means to try out, how difficult it is to tag some structures, means to try out, how much tagging is really needed (standards and validators don't need to be right \ldots), means to test what else is needed so that a \PDF{} works e.g. with a screen reader, means to try out how core \LaTeX\ commands behave if tagging is used. Without such experiments it is in my opinion
+quite difficult to get a feeling about what has to be done, which kernel changes are needed, how packages should be adapted.
-This package were developped to close this gap by offering \emph{core} commands to tag a \PDF{}%
+This package was developed to close this gap by offering \emph{core} commands to tag a \PDF{}%
\footnote{In case you don't know what this means: there will be some explanations later on.}.
-My hope was that the knowledge gained by the use of this package will at the end allow to decide if and how code to do tagging should be part of the \LaTeX\ kernel.
+My hope was that the knowledge gained by the use of this package will at the end
+allow to decide if and how code to do tagging should be part of the \LaTeX\ kernel.
-The code has been written with the goal to extend \LaTeX{} itself.
-It therefore quite does not patch commands from other packages and is also not an aim of the package to develop such patches. While at the end changes to various commands in many classes and packages will be needed to get tagged \PDF{} files -- and the examples accompanying the package try (or will try) to show various strategies -- these changes should in my opinion be done by the class, package and document writers themselves using a sensible API provided by the kernel and not by some external package that adds patches everywhere and would need constant maintenance -- one only need to look at packages like tex4ht or bidi or hyperref to see how difficult and sometimes fragile this is.
-
+The code has been written so that it can be added as module to the \LaTeX{} kernel itself if it turns out to be usable.
+It therefore avoid to patch commands from other packages and is also not an aim of the package to develop such patches. While at the end changes to various commands in many classes and packages will be needed to get tagged \PDF{} files
+these changes should be done by the class, package and document writers themselves using a sensible API provided by the kernel and not by some external package that adds patches everywhere and would need constant maintenance -- one only need to look at packages like tex4ht or bidi or hyperref to see how difficult and sometimes fragile this is.
The package is now a part of the Tagged PDF project and triggered already various changes in the LaTeX kernel and the engines: There is a new PDF management,
the new para hooks allows to automatically tag paragraphs, after changes in the output routine
page breaks and header and footer are handled correctly, the engines support
-now structure destinations.
+now structure destinations. More changes are in the latex-lab bundle and can be loaded through testphase keys.
-I'm sure that it still has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}.
+I'm sure that tagpdf still has bugs. Bugs reports, suggestions and comments can be added to the issue tracker on github. \url{https://github.com/u-fischer/tagpdf}.
-Please also check the github site for new examples and improvements.
+Please also check the github site and latex-lab for new examples and improvements.
\subsection{Tagging and accessibility}
-While the package is named \texttt{tagpdf} the goal is actually \emph{accessible} \PDF{}-files. Tagging is \emph{one} requirement for accessibility but there are others. I will mention some later on in this documentation, and -- if sensible -- I will also try to add code, keys or tips for them.
+While the package is named \texttt{tagpdf} the goal is also \emph{accessible} \PDF{}-files. Tagging is \emph{one} (the most difficult) requirement for accessibility but there are others. I will mention some later on in this documentation, and -- if sensible -- I will also try to add code, keys or tips for them.
So the name of the package is a bit wrong. As excuse I can only say that it is shorter and easier to pronounce.
\subsection{Engines and modes}
-The package theoretically with all engines,
-But the xelatex and the latex-dvips-route are not much tested and they also don't support
-real space glyphs. lualatex is the most powerful and safe modus, but pdflatex works ok too.
+The package works theoretically with all engines,
+but the xelatex and the latex-dvips-route are basically untested tested and they also don't support
+real space glyphs so I don't recommend them.
+lualatex is the most powerful and safe modus and should be used for new documents, it is slower than pdflatex but requires less compilations to get tagging. pdflatex works ok and can be used for legacy documents; it needs more compilations to resolve all cross references needed for the tagging.
The package has two modes: the \emph{generic mode} which should work in theory with every engine and the \emph{lua mode} which works only with lualatex.
-I implemented the generic mode first. Mostly because my tex skills are much better than my lua skills and I wanted to get the tex side right before starting to fight with attributes and node traversing.
+I implemented the generic mode first. Mostly because my \TeX\ skills are much better than my lua skills and I wanted to get the \TeX\ side right before starting to fight with attributes and node traversing.
While the generic mode is not bad and I spent quite some time to get it working I nevertheless think that the lua mode is the future and the only one that will be usable for larger documents. \PDF{} is a page orientated format and so the ability of luatex to manipulate pages and nodes after the \TeX-processing is really useful here. Also with luatex characters are normally already given as unicode.
@@ -208,18 +203,37 @@ at best at least once or twice more often then normal.
\subsection{References and target PDF version}
-My main reference for the first versions of this package
-was the free reference for \PDF{} 1.7. \parencite{pdfreference} and so the package also targetted this version.
+My main reference for the first versions of this package was the free
+reference for \PDF{} 1.7. \parencite{pdfreference} and so the first versions
+of the package implemented only \PDF{} 1.7.
+
+In 2018 \PDF{} 2.0. has been released. The reference can be bought at no cost
+through the PDF association.
+
+\PDF{} 2.0 has a number of features that are really needed for good tagging:
+it knows more structure types, it allows to add associated files to
+structures---these are small, embedded files which can for example contain
+the mathML or source code of an equation---, it knows structure destinations
+which allows to link to a structure.
+
-In 2018 \PDF{} 2.0. has been released, and since 2020 all engines can set the version to 2.0. So the package will
-now target \PDF{} 2.0. This doesn't mean that 2.0 will be required, but that the code and the options will be extended to
-support \PDF{} 2.0. One example is the support for associated files, another the support for name spaces in version 0.82.
+\PDF{}~2.0 features are currently (mid 2023) not well supported by
+\PDF~consumer. No PDF viewer (including Acrobat) for example can handle name
+spaces and associated files. PAC~3 even crashes if one tries to load a \PDF{}
+2.0 file, and pdftk will create a \PDF{}~1.0 from it.
-The package doesn't try to suppress all 2.0 features if an older \PDF{} version is produced. It normally doesn't harm if a \PDF{} contains keys unknown in its version and it makes the code faster and easier to maintain if there aren't too many tests and code pathes; so for example associated files will always be added. But tests could be added in case this leads to incompabilities.
+Nevertheless \LaTeX{} targets \PDF{} 2.0, tagpdf has added support for
+associated files, for name spaces and other \PDF{} 2.0 features tagpdf and we
+recommend to use \PDF{} 2.0 if possible and then to complain to the PDF{}
+consumer if something doesn't work.
+
+The package doesn't try to suppress all 2.0 features if an older \PDF{}
+version is produced. It normally doesn't harm if a \PDF{} contains keys
+unknown in its version and it makes the code faster and easier to maintain if
+there aren't too many tests and code pathes; so for example associated files
+will always be added. But tests could be added in case this leads to
+incompabilities.
-It should be noted that some tools don't like \PDF{}~2.0. PAC~3 for example
-simply crashes, and pdftk will create a \PDF{}~1.0 from it. This makes
-testing \PDF{}~2.0 files a bit of a challenge.
\subsection{Validation}
@@ -228,11 +242,14 @@ testing \PDF{}~2.0 files a bit of a challenge.
\begin{itemize}
\item
- One must check that the \PDF{} is \emph{syntactically} correct. It is rather easy to create broken \PDF{}:
- e.g. if a chunk is opened on one page but closed on the next page or if the document isn't compiled often enough.
+ One must check that the \PDF{} is \emph{syntactically} correct.
+ It is rather easy to create broken \PDF{}:
+ e.g. if a chunk is opened on one page but closed
+ on the next page or if the document isn't compiled often enough.
-\item
-One must check how good the requirements of the PDF/UA standard are followed \emph{formally}.
+\item One must check how good the requirements of the PDF/UA standard are
+ followed \emph{formally}\footnote{The PDF/UA-2 standard for \PDF~2.0
+ will hopefully be released in 2023}.
\item
One must check how good the accessibility is \emph{practically}.
@@ -241,26 +258,33 @@ One must check how good the accessibility is \emph{practically}.
Syntax validation and formal standard validation can be done with preflight
of the (non-free) adobe acrobat. It can also be done also with the free
-\PDF{} Accessibility Checker (PAC~3) \parencite{pac3}. There is also the
+\PDF{} Accessibility Checker (PAC~2021) \parencite{pac3}. There is also the
validator veraPDF \parencite{verapdf}. A rather new and quite useful tool is
\enquote{Next Generation PDF} \parencite{ngpdf}, a browser application which
converts a tagged PDF to html, allows to inspect its structure and also to
edit the structure.
-Practical validation is naturally the more complicated part. It needs screen reader, users which actually knows how to handle them, can test documents and can report where a \PDF{} has real accessibility problems.
+Practical validation is naturally the more complicated part.
+It needs screen reader, users which actually knows how to handle them,
+can test documents and can report where a \PDF{} has real accessibility problems.
\minisec{Preflight woes}
-Sadly validators can not be always trusted. As an example for an reason that I don't understand the adobe preflight don't like the list structure \texttt{L}.
-It is also possible that validators contradict: that the one says everything is okay, while the other complains.
+Sadly validators can not be always trusted.
+As an example for an reason that I don't understand the adobe preflight
+don't like the list structure \texttt{L}.
+It is also possible that validators contradict: that the one says everything is okay,
+while the other complains.
\subsection{Examples wanted!}
-To make the package usable examples are needed: examples that demonstrate how various structures can be tagged and which patches are needed, examples for the test suite, examples that demonstrates problems.
+To make the package usable examples are needed:
+examples that demonstrate how various structures can be tagged and which patches are needed,
+examples for the test suite, examples that demonstrates problems.
\begin{tcolorbox}
@@ -269,7 +293,8 @@ Feedback, contribuations and corrections are welcome!
All examples should use the \cs{DocumentMetadata} key \PrintKeyName{uncompress}
-so that uncompressed \PDF{} are created and the internal objects and structures can be inspected and -- hopefully soon -- be compared by the l3build checks.%
+so that uncompressed \PDF{} are created and the internal objects and
+structures can be inspected and be compared by the l3build checks.%
\section{Changes}
@@ -1232,19 +1257,14 @@ This solves the \enquote{interruption} problem, but has its price: Material inse
must be properly guarded. For example
\begin{taglstlisting}
-\RequirePackage{pdfmanagement-testphase}
-\DeclareDocumentMetadata{uncompress}
+\DocumentMetadata{uncompress}
\documentclass{article}
-\usepackage{tagpdf}
-\tagpdfsetup{activate,interwordspace=true}
\pagestyle{headings}
\begin{document}
-\tagstructbegin{tag=Document}
\sectionmark{HEADER}
\AddToHook{shipout/background}{\put(5cm,-5cm){BACKGROUND}}
\tagmcbegin{tag=P}Page 1\newpage Page 2\tagmcend
-\tagstructend
\end{document}
\end{taglstlisting}
@@ -1255,13 +1275,11 @@ like.
\includegraphics[alt=Show tags of examples]{global-ex}
-It is therefore from now on important to correctly markup such code. Header and footer typically should be
-artifacts. The LaTeX kernel hasn't yet suitable hooks around header and footer to allow to automate
-this, but a first draft has been added with \pkg{pdfmanagement-testphase}. Starting with version 0.92
-header and footer are marked as (simple) artifacts.
-If they contain code which needs a different markup it still must be added explicitly.
-With packages like \pkg{fancyhdr} or \pkg{scrlayer-scrpage} it is quite easy to add
-the needed code.
+It is therefore from now on important to correctly markup such code. Header
+and footer are now marked as artifacts (see below). If they contain code
+which needs a different markup it still must be added explicitly. With
+packages like \pkg{fancyhdr} or \pkg{scrlayer-scrpage} it is quite easy to
+add the needed code.
\subsubsection{Tips}
diff --git a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
index 527d7bec01..4f14e73b1a 100644
--- a/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
+++ b/macros/latex/contrib/tagpdf/tagpdfdocu-patches.sty
@@ -1,25 +1,17 @@
%\RequirePackage[enable-debug]{expl3}[2018/06/14]
-\ProvidesExplPackage {tagpdfdocu-patches} {2023-05-16} {0.98g}
+\ProvidesExplPackage {tagpdfdocu-patches} {2023-06-06} {0.98h}
{patches/commands for the tagpdf documentation}
\RequirePackage{etoolbox,xpatch}
%Logos
-
+% only spacing changes:
\ExplSyntaxOn
\DeclareRobustCommand\TeX{
\leavevmode
- \tag_mc_end_push:
- \tag_struct_begin:n{tag=Span,actualtext=TeX}
- \tagmcbegin{}
T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -.125em
- \tagmcend
- \tag_struct_end:
- \tag_mc_begin_pop:n{}}
+ }
\DeclareRobustCommand{\LaTeX}{
\leavevmode
- \tag_mc_end_push:
- \tag_struct_begin:n{tag=Span,actualtext=LaTeX}
- \tagmcbegin{}
L\kern-.25em % %changed from -0.36em
\sbox\z@ T%
\vbox to\ht\z@{\hbox{\check@mathfonts
@@ -29,24 +21,7 @@
\vss}%
\kern-.1em % %changed from 0.15em
T\kern-.1667em\lower.5ex\hbox{E}\kern-.05emX\@ %changed from -0.125
- \tagmcend
- \tag_struct_end:
- \tag_mc_begin_pop:n{}
- }
-% textbf
-
-\AddToHook{cmd/textbf/before}
- {\leavevmode\tag_mc_end_push:\tag_struct_begin:n{tag=Strong}\tagmcbegin{}}
-
-\AddToHook{cmd/textbf/after}
- {\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
-
-% emph
-\AddToHook{cmd/emph/before}
- {\leavevmode\tag_mc_end_push:\tag_struct_begin:n{tag=Em}\tagmcbegin{}}
-
-\AddToHook{cmd/emph/after}
- {\tag_mc_end:\tag_struct_end:\tag_mc_begin_pop:n{}}
+ }
% minisec, correct tagging is still unclear.
\newcommand\minisec[1]{%
@@ -173,128 +148,5 @@
%====== floats ========
-\tagpdfsetup{add-new-tag=float/Div}
-\makeatletter
-\def\@xfloat #1[#2]{%
- \@nodocument
- \def \@captype {#1}%
- \def \@fps {#2}%
- \@onelevel@sanitize \@fps
- \def \reserved@b {!}%
- \ifx \reserved@b \@fps
- \@fpsadddefault
- \else
- \ifx \@fps \@empty
- \@fpsadddefault
- \fi
- \fi
- \ifhmode
- \@bsphack
- \tagmcend%end P
- \@floatpenalty -\@Mii
- \else
- \@floatpenalty-\@Miii
- \fi
- \ifinner
- \@parmoderr\@floatpenalty\z@
- \else
- \@next\@currbox\@freelist
- {%
- \@tempcnta \sixt@@n
- \expandafter \@tfor \expandafter \reserved@a
- \expandafter :\expandafter =\@fps
- \do
- {%
- \if \reserved@a h%
- \ifodd \@tempcnta
- \else
- \advance \@tempcnta \@ne
- \fi
- \else\if \reserved@a t%
- \@setfpsbit \tw@
- \else\if \reserved@a b%
- \@setfpsbit 4%
- \else\if \reserved@a p%
- \@setfpsbit 8%
- \else\if \reserved@a !%
- \ifnum \@tempcnta>15
- \advance\@tempcnta -\sixt@@n\relax
- \fi
- \else
- \@latex@error{Unknown float option `\reserved@a'}%
- {Option `\reserved@a' ignored and `p' used.}%
- \@setfpsbit 8%
- \fi\fi\fi\fi\fi
- }%
- \@tempcntb \csname ftype@\@captype \endcsname
- \multiply \@tempcntb \@xxxii
- \advance \@tempcnta \@tempcntb
- \global \count\@currbox \@tempcnta
- }%
- \@fltovf
- \fi
- \tagstructbegin{tag=float}%float
- \edef\@current@float@struct{\csname tag_get:n\endcsname{struct_num}}%
- \typeout{Float structure: \@current@float@struct}
- \global \setbox\@currbox
- \color@vbox
- \normalcolor
- \vbox \bgroup
- \hsize\columnwidth
- \@parboxrestore
- \@floatboxreset
-}%
-
-\def\end@float{%
- \@endfloatbox
- \tagstructend %end div
- \ifnum\@floatpenalty <\z@
- \@largefloatcheck
- \@cons\@currlist\@currbox
- \ifnum\@floatpenalty <-\@Mii
- \penalty -\@Miv
- \@tempdima\prevdepth
- \vbox{}%
- \prevdepth\@tempdima
- \penalty\@floatpenalty
- \else
- \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
- \tagmcbegin{tag=P}%restart P Safe here??
- \fi
- \fi
-}
-
-\ExplSyntaxOn
-\long\def\@makecaption#1#2{%
- \vskip\abovecaptionskip
- \tagtool{para=false}
- \sbox\@tempboxa{#1:~#2}%
- \tag_struct_begin:n{tag=Caption}
- \ifdim \wd\@tempboxa >\hsize
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n{}
- #1:~
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n{}
- #2\par
- \tag_mc_end:
- \else
- \global \@minipagefalse
- \hb@xt@\hsize{\hfil
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n{}
- #1:~
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n{}
- #2\par
- \tag_mc_end:\hfil}%
- \fi
- \tagstructend %caption
- \vskip\belowcaptionskip}
-\ExplSyntaxOff
-
-
\endinput