summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/acrotex/README.md18
-rw-r--r--macros/latex/contrib/acrotex/doc/aeb_man.pdfbin1364576 -> 1499729 bytes
-rw-r--r--macros/latex/contrib/acrotex/doc/aeb_man.tex63
-rw-r--r--macros/latex/contrib/acrotex/doc/eformman.pdfbin991820 -> 987217 bytes
-rw-r--r--macros/latex/contrib/acrotex/doc/eformman.tex63
-rw-r--r--macros/latex/contrib/acrotex/eforms.dtx88
-rw-r--r--macros/latex/contrib/acrotex/examples/webeqtst.pdfbin484582 -> 494990 bytes
-rw-r--r--macros/latex/contrib/acrotex/exerquiz.dtx3862
-rw-r--r--macros/latex/contrib/acrotex/insdljs.dtx1032
-rw-r--r--macros/latex/contrib/acrotex/web.dtx3917
-rw-r--r--macros/latex/contrib/moderncv/CHANGELOG11
-rw-r--r--macros/latex/contrib/moderncv/KNOWN_BUGS4
-rw-r--r--macros/latex/contrib/moderncv/LICENSE.txt415
-rw-r--r--macros/latex/contrib/moderncv/README16
-rw-r--r--macros/latex/contrib/moderncv/README.md17
-rw-r--r--macros/latex/contrib/moderncv/examples/Makefile18
-rw-r--r--macros/latex/contrib/moderncv/examples/template-es.pdfbin36050 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template-es.tex131
-rw-r--r--macros/latex/contrib/moderncv/examples/template-multibib.pdfbin99683 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template-multibib.tex165
-rw-r--r--macros/latex/contrib/moderncv/examples/template-zh.pdfbin239848 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template-zh.tex130
-rw-r--r--macros/latex/contrib/moderncv/examples/template_banking_red-fullrules-center.pdfbin108721 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_banking_red-norules.pdfbin91945 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_banking_red-shortrules-right.pdfbin105870 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_banking_red.pdfbin108599 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_casual_orange-left.pdfbin99448 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_casual_orange.pdfbin99451 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_classic_green-right.pdfbin279661 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_classic_green.pdfbin279661 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_fancy_purple.pdfbin90269 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/examples/template_oldstyle_grey.pdfbin70822 -> 0 bytes
-rw-r--r--macros/latex/contrib/moderncv/manual/moderncv_userguide.pdfbin0 -> 320611 bytes
-rw-r--r--macros/latex/contrib/moderncv/manual/moderncv_userguide.tex462
-rw-r--r--macros/latex/contrib/moderncv/moderncv.cls174
-rw-r--r--macros/latex/contrib/moderncv/moderncvbodyi.sty10
l---------[-rw-r--r--]macros/latex/contrib/moderncv/moderncvbodyii.sty175
-rw-r--r--macros/latex/contrib/moderncv/moderncvbodyiii.sty27
-rw-r--r--macros/latex/contrib/moderncv/moderncvbodyiv.sty9
-rw-r--r--macros/latex/contrib/moderncv/moderncvbodyv.sty19
-rw-r--r--macros/latex/contrib/moderncv/moderncvcollection.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorblack.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorblue.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorburgundy.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorgreen.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorgrey.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolororange.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorpurple.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcolorred.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvcompatibility.sty7
-rw-r--r--macros/latex/contrib/moderncv/moderncvdebugtools.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvfooti.sty8
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadi.sty11
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadii.sty8
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadiii.sty20
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadiv.sty13
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadv.sty10
-rw-r--r--macros/latex/contrib/moderncv/moderncvheadvi.sty6
-rw-r--r--macros/latex/contrib/moderncv/moderncviconsawesome.sty39
-rw-r--r--macros/latex/contrib/moderncv/moderncviconsletters.sty32
-rw-r--r--macros/latex/contrib/moderncv/moderncviconsmarvosym.sty46
-rw-r--r--macros/latex/contrib/moderncv/moderncvskillmatrix.sty1051
-rw-r--r--macros/latex/contrib/moderncv/moderncvstylebanking.sty11
-rw-r--r--macros/latex/contrib/moderncv/moderncvstylecasual.sty11
-rw-r--r--macros/latex/contrib/moderncv/moderncvstyleclassic.sty11
-rw-r--r--macros/latex/contrib/moderncv/moderncvstyleempty.sty4
-rw-r--r--macros/latex/contrib/moderncv/moderncvstylefancy.sty11
-rw-r--r--macros/latex/contrib/moderncv/moderncvstyleoldstyle.sty4
-rw-r--r--macros/latex/contrib/moderncv/picture.eps (renamed from macros/latex/contrib/moderncv/examples/picture.eps)0
-rw-r--r--macros/latex/contrib/moderncv/picture.jpg (renamed from macros/latex/contrib/moderncv/examples/picture.jpg)bin1645 -> 1645 bytes
-rw-r--r--macros/latex/contrib/moderncv/publications.bib (renamed from macros/latex/contrib/moderncv/examples/publications.bib)0
-rw-r--r--macros/latex/contrib/moderncv/template.tex (renamed from macros/latex/contrib/moderncv/examples/template.tex)98
-rw-r--r--macros/latex/contrib/moderncv/tweaklist.sty4
73 files changed, 6985 insertions, 5286 deletions
diff --git a/macros/latex/contrib/acrotex/README.md b/macros/latex/contrib/acrotex/README.md
index c4c3e1edd7..98c419c802 100644
--- a/macros/latex/contrib/acrotex/README.md
+++ b/macros/latex/contrib/acrotex/README.md
@@ -1,6 +1,6 @@
The AcroTeX eDucation Bundle
Author: D. P. Story
-Dated: 2020-11-20
+Dated: 2021-01-20
AeB contains the following:
@@ -18,6 +18,22 @@ AeB contains the following:
6) Documentation for AeB (AcroTeX eDucatation Bundle) and eForms
(including insdljs and dljslib).
+
+What's New (2021-01-20) Defined two commands \doNotRandomizeChoices
+ and \allowRandomizedChoices; these turn off and turn on the randomization
+ of choices in MC and MS questions.
+
+What's New (2020-12-30)
+ exerquiz: Minor bug fixes; converted some inline JS to JS in
+ the defineJS env.
+ eforms: New keys for option list of form macros: \rectW, \rectH,
+ \width, \height, \scalefactor. Also introduced are \textFontDefault,
+ \textSizeDefault, and \btnSpcr. All form fields and link annotations
+ now obey \pdfSpacesOn (and \pdfSpacesOff).
+ insdljs: Added \Thread and \Launch actions; \dfnJSCR and \dfnJSCRDef.
+ New options of defineJS: \makecmt and \typeset. Improved the defineJS
+ environment. Refer to http://www.acrotex.net/blog/?p=1442
+ for a full discussion of the defineJS and all its features.
What's New (2020-11-20) Fixed minor, yet critical, bug converning duplicate
definition of \URI.
diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.pdf b/macros/latex/contrib/acrotex/doc/aeb_man.pdf
index 1e6d223e3c..c62c427b52 100644
--- a/macros/latex/contrib/acrotex/doc/aeb_man.pdf
+++ b/macros/latex/contrib/acrotex/doc/aeb_man.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/doc/aeb_man.tex b/macros/latex/contrib/acrotex/doc/aeb_man.tex
index dd5cead2f7..cf08a13258 100644
--- a/macros/latex/contrib/acrotex/doc/aeb_man.tex
+++ b/macros/latex/contrib/acrotex/doc/aeb_man.tex
@@ -233,10 +233,10 @@
\university{{\AcroT} Software Development Team}
\email{dpstory@acrotex.net}
\versionLabel{Dated:}
-\version{2020/11/11}
+\version{2021/01/20}
\copyrightyears{1999-\the\year}
\nocopyright
-\prepared{2020/11/11}
+\prepared{2021/01/20}
\revisionLabel{Distribution Dated:}
\copyrightStatus{True}
@@ -698,9 +698,9 @@ writing to this document level. For those who use the
In this section, we describe how to insert document level
Java\-Scripts into a \textsf{PDF} file, prepared from a
-\LaTeX{} source that uses the \texttt{exerquiz} package. Even
+\LaTeX{} source that uses the \pkg{exerquiz} package. Even
though the handling and insertion of document level JavaScript is
-done with the package \textsf{insdljs}, a little care must be
+done with the package \pkg{insdljs}, a little care must be
taken, at least in the Distiller case, when building your
{\PDF} document.
@@ -6971,25 +6971,24 @@ how to use the ``every'' command.\footnote{eforms manual on Web:
\subsubsection{Change color of Correction Marks}
-The colors used to mark the quiz can be changed by redefining the
-commands \cs{check\-Color}, \cs{crossColor} and \cs{correctColor} in
-the \textit{preamble} or before. Below are the
-defaults:
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\renewcommand\checkColor{["RGB", 0, .6, 0]}
-\renewcommand\crossColor{color.red}
-\renewcommand\correctColor{["RGB", 0, .6, 0]} % webgreen
+The colors used to mark quizzes are changed in the \textit{preamble} by
+redefining the commands listed below. The default definitions are,
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()]
+\newcommand\rghtColorJSDef{["RGB",!,0,!,.6,!,0]} %!textsf( color for right response)
+\newcommand\wrngColorJSDef{color.red} %!textsf( color for wrong response)
+\newcommand\partialColorJSDef{color.blue} %!textsf( color for partial credit)
+\newcommand\defaultColorJSDef{color.black} %!textsf( reset color)
\end{Verbatim}
\noindent The colors are inserted into the field using JavaScript, so the color definitions
-are in the color space of the JavaScript object model.
+are in the color space of the JavaScript color object model.
\subsubsection{The `Correction' Button}\label{sss:CorrButton}
The `Correction' button is defined by the \cs{CorrButton} has two
parameters.
-\begin{Verbatim}[xleftmargin=\amtIndent]
-\CorrButton[mod_appear]{field_name}
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\CorrButton[!ameta(mod_appear)]{!ameta(field_name)}
\end{Verbatim}
The second parameter is the field name that contains the total score for the
quiz (see the above examples). It also has one optional argument that can be
@@ -9305,10 +9304,12 @@ for example, it could read \cs{randomi=132088850}, then use
\end{Verbatim}
Of course comment out \cs{inputRandomSeed}.
-\settowidth{\aebdimen}{\cs{obeyLocalRandomize}}%
+\settowidth{\aebdimen}{\cs{allowRandomizedChoices}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\turnOnRandomize
\obeyLocalRandomize
+\doNotRandomizeChoices
+\allowRandomizedChoices
\end{dCmd}
\newtopic\indent The command \cs{turnOnRandomize} overrides all local settings of \cs{bChoices}
@@ -9340,22 +9341,30 @@ the choices will not be randomized, because the \texttt{random}
option was not specified; or they will be randomized if the
\texttt{random} option is used.
-\newtopic\textcolor{red}{Limitations:} There are natural limitations on the use
-of \cs{bChoices} and \cs{eChoices} and consequently, there are
-limitations on the randomization. The content between \cs{Ans} and
-\cs{eAns} cannot have any verbatim text. This is usually not a
-problem for mathematical content, but could be a limitation for
-computer science where questions about syntax may be posed. I have
-in mind a work-around, but haven't pursued the problem as of yet.
+\newtopic\indent The command \cs{doNotRandomizeChoices} overrides the
+\opt{allowrandomize} option; when in effect, randomization of the choices
+does not occur. The companion command \cs{allowRandomizedChoices} restores the
+authority of the \opt{allowrandomize} option.
+
+\newtopic\textcolor{red}{Limitations:} There are natural limitations on the
+use of \cs{bChoices} and \cs{eChoices} and consequently, there are
+limitations on the randomization. The content between \cs{Ans} and \cs{eAns}
+cannot have any verbatim text. This is usually not a problem for mathematical
+content, but could be a limitation for computer science where questions about
+syntax may be posed.
+
+% I have in mind a work-around, but haven't pursued the
+% problem as of yet.
\section{Creating a Quiz Summary Table}\label{s:sumrytbl}
This feature is designed for a \texttt{quiz} (as opposed to a
\texttt{shortquiz}) and is probably most useful for a long quiz, spanning
-several pages. The \cs{displaySumryTbl} command creates a table that summarizes
-the user's effort for the quiz; \cs{displaySumryTbl} must follow the final
-\verb!\end{questions}! and \emph{must be on a separate page} from the last question of the quiz.
-An example of the generated table is shown below in \hyperref[fig:qzSumryTbl]{Figure~\ref*{fig:qzSumryTbl}}.
+several pages. The \cs{displaySumryTbl} command creates a table that
+summarizes the user's effort for the quiz; \cs{displaySumryTbl} must follow
+the final \verb!\end{questions}! and \emph{must be on a separate page} from
+the last question of the quiz. An example of the generated table is shown
+below in \hyperref[fig:qzSumryTbl]{Figure~\ref*{fig:qzSumryTbl}}.
\exAeBBlogPDF{p=377} The demo file for this section is
\texttt{\href{\urlAcroTeXBlog/?p=377}{sumry\_tbl.pdf}}, found
diff --git a/macros/latex/contrib/acrotex/doc/eformman.pdf b/macros/latex/contrib/acrotex/doc/eformman.pdf
index 788d0683c5..03a576d453 100644
--- a/macros/latex/contrib/acrotex/doc/eformman.pdf
+++ b/macros/latex/contrib/acrotex/doc/eformman.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/doc/eformman.tex b/macros/latex/contrib/acrotex/doc/eformman.tex
index ef8d90a37c..881a9f4090 100644
--- a/macros/latex/contrib/acrotex/doc/eformman.tex
+++ b/macros/latex/contrib/acrotex/doc/eformman.tex
@@ -27,6 +27,7 @@
\def\mSTRUT{\makebox[0pt][l]{\phantom{$\frac00$}}}
\let\vrbnormal\sffamily
\let\uif\sffamily
+\let\key\texttt
%\makeatletter
@@ -79,7 +80,7 @@
subject={Documentation for the eforms and insdljs packages},
talksite={\url{www.acrotex.net}},
version={2.0},
- prepared={2020/11/11},
+ prepared={2021/01/20},
preparedLabel={Distribution Dated:},
keywords={LaTeX, hyperref, PDF, exercises, quizzes},
copyrightStatus=True,
@@ -1206,10 +1207,10 @@ places message in the console when the field is signed.
\item The \cs{Lock} key can be used to lock various fields when the document
is signed.
-\begin{Verbatim}[xleftmargin=\amtIndent,numbers=left]
+\begin{Verbatim}[xleftmargin=\amtIndent,numbers=left,commandchars=!()]
\Lock{/Action/All}
-\Lock{/Action/Include/Fields [(field1)(field2)...]}
-\Lock{/Action/Exclude/Fields [(field1)(field2)...]}
+\Lock{/Action/IncludeFields{!ameta(field!SUB1),!ameta(field!SUB2),...}}
+\Lock{/Action/ExcludeFields{!ameta(field!SUB1),!ameta(field!SUB2),...}}
\end{Verbatim}
\begin{itemize}
\item In (1), all fields are locked when the signature field is signed.
@@ -1218,7 +1219,7 @@ is signed.
\item In (3), all fields, except the ones listed, are locked when the
signature field is signed.
\end{itemize}
-The \texttt{/Fields} key is required when the action is either \texttt{/Include} or \texttt{/Exclude}.
+%The \texttt{/Fields} key is required when the action is either \texttt{/Include} or \texttt{/Exclude}.
\end{itemize}
@@ -2672,20 +2673,22 @@ JavaScript code (\anglemeta{script}).
\settowidth{\aebdimen}{\ttfamily lock=\darg{\anglemeta{PDF KV-pairs}}}
\def\1{\llap{\Cs{Lock}\hspace{\marginparsep}}}%Lock
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
-!1lock={!anglemeta(PDF KV-pairs)}
+!1lock={!anglemeta(KV-pairs)}
\end{dCmd}
-\CmdDescription The \texttt{lock} key is used with signature fields, currently, there is
- no nice user interface to this key. Typical entries are
-\begin{Verbatim}[xleftmargin=\amtIndent]
-lock={/Action/All} % lock all fields in the doc
-lock={/Action/Include % lock all fields listed in Fields
- /Fields [(field1)(field2)...]}
-lock={/Action/Exclude % lock all fields not listed in Fields
- /Fields [(field1)(field2)...]}
+\CmdDescription The \texttt{lock} key is used with signature fields; use the
+\key{action} key (with supported values of \texttt{all}, \texttt{include}, and \texttt{exclude})
+and the \key{fields} key to determine the lock action.
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+%!sffamily lock all fields in the doc
+lock={action=all}
+% !sffamily lock all fields listed by !texttt(fields) key
+lock={action=include,fields={!ameta(field!SUB1),!ameta(field!SUB2),...}}
+% !sffamily lock all fields not listed by !texttt(fields) key
+lock={action=exclude,fields={!ameta(field!SUB1),!ameta(field!SUB2),...}}
\end{Verbatim}
-\newtopic Another option that is included in the Signed tab is titled ``This script executes
+\newtopic Another option that is included in the \uif{Signed tab} is titled ``This script executes
when field is signed.''
This is an option that, through the user interface, is mutually exclusive from
@@ -2883,12 +2886,12 @@ required to have \app{Acrobat}~5.0 (or later).
\section{Package Options}
The \textsf{insdljs} supports five common ``drivers'': \texttt{dvipsone},
-\texttt{dvips}, \texttt{pdftex} (including the executable \textsf{lu(la)tex}), \texttt{dvipdfm},
-\texttt{dvipdfmx}, \texttt{xetex}, and \texttt{tex\-tures}. When using
-\texttt{dvipsone} or \texttt{dvips}, \app{Acrobat} Distiller and \app{Acrobat}
-(version 5.0 or later) are required to embed the JavaScripts at the
-document level. The other drivers have primitives that allow the embedding
-of the JavaScripts.
+\texttt{dvips}, \texttt{pdftex} (including the executable
+\textsf{lu(la)tex}), \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex}, and
+\texttt{tex\-tures}. When using \texttt{dvips}, \app{Acrobat} Distiller and
+\app{Acrobat} (version 5.0 or later) are required to embed the JavaScripts at
+the document level. The other drivers have primitives that allow the
+embedding of the JavaScripts.
\newtopic Other options are discussed in the following paragraphs.
\begin{description}\def\NH{\hspace{-\labelsep}}
@@ -3417,12 +3420,12 @@ console.println("Exiting the button area");
\AAMouseExit{\JS{\JSAAX}}}
]{myButton}{30bp}{15bp}
\end{dCmd*}
-\newtopic The code lines of \cs{JSAAE} and \cs{JSAAX} are so simple, \texttt{defineJS} environment
+\newtopic The code lines of \cs{JSAAE} and \cs{JSAAX} are so simple, \env{defineJS} environment
was really not needed.
\newtopic See \Nameref{lengthyJS} for an additional example of the use of the \texttt{defineJS} environment.
-The \pkg{insdljs} package defines two ``silent'' versions of \env{defineJS},
+The \pkg{insdljs} package defines two ``silent'' versions of \env{defineJS}, these are
\env{@defineJS} and \env{defineJS*}.
\settowidth{\aebdimen}{\ttfamily\string\begin\darg{@defineJS}[\ameta{chngCats}]\darg{\cs{\ameta{cmd}}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
@@ -3485,6 +3488,11 @@ stream; this keeps the declaration local. The \hyperlink{cmd}{\cs{cmd}} key is d
\hyperref[supportedKVs]{Appendix~\ref*{supportedKVs}}, titled `\nameref{supportedKVs}', beginning on \pageref*{supportedKVs}; specifically,
\cs{cmd} is listed in under the heading \textcolor{blue}{Specialized, non-PDF Spec commands}.
+%http://www.acrotex.net/blog/?p=1442
+
+\exAeBBlogPDF{p=1442} A comprehensive discussion of the features to the \env{defineJS}
+environment is found in the article titled \href{\urlAcroTeXBlog/?p=1442}{\relax{\protect\pkg{insdljs}}: Exploring the {\protect\env{defineJS}} environment} from the {\AcroBlog}
+website.\footnote{\url{http://www.acrotex.net/blog/?p=1442}}
\newpage
%\appendix
@@ -3605,6 +3613,15 @@ your system, you can use \emph{named colors} to specify color for the
\end{Verbatim}
then each of the following is valid: \verb!\textColor{myBlue}! (for specifying text color for text fields), \verb!\BG{myBlue}! (for specifying the background color of a field), \verb!\BC{myBlue}! (for specifying the border color of a field), and \verb!\Color{myBlue}! (for specifying the border color of a link).
+
+\paragraph*{Setting some defaults.} Before getting to the specification of
+the key-values, there are two convenience commands for setting the default
+text font and text size. These are
+\cs{textFontDefault\darg{\ameta{font-spec}}}
+(\cs{textFontDefault\darg{Helv}}) for setting the default text font and
+\cs{textSizeDefault\darg{\ameta{size}}} (\cs{textSizeDefault\darg{9}}) for
+setting the default text size.
+
\newpage
\begingroup
\setlength{\extrarowheight}{3mm}\setlength{\tabcolsep}{3pt}
diff --git a/macros/latex/contrib/acrotex/eforms.dtx b/macros/latex/contrib/acrotex/eforms.dtx
index 1d51969496..bc21d96c72 100644
--- a/macros/latex/contrib/acrotex/eforms.dtx
+++ b/macros/latex/contrib/acrotex/eforms.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{eforms}
-%<package> [2020/11/20 v2.3.5 Provides general eforms support (dps)]
+%<package> [2020/12/14 v2.4.1 Provides general eforms support (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}[2012/10/12]
@@ -33,6 +33,7 @@
\let\opt\texttt
\let\app\textsf
\let\key\texttt
+\let\uif\textsf
\def\visispace{\symbol{32}}
\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
\def\meta#1{\textsl{\texttt{#1}}}
@@ -1189,16 +1190,26 @@
\def\@eqDA#1{\def\eq@DA{#1}}
\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
% \end{macrocode}
-% \DescribeMacro{\textFont} PDF form font
+% \DescribeMacro{\textFont} PDF form font. This is a simple assignment; we define
+% \DescribeMacro{\textFontDefault}\cs{textFontDefault} to conveniently change the default font over
+% all form fields, with the exception of checkboxes and radio button fields. The default
+% is \uif{Helv}.
+% \changes{v2.4.1}{2020/12/14}{Defined \string\cs{eqtextFontDefault}}
% \begin{macrocode}
\def\@eqtextFont#1{\def\eq@textFont{/#1}}
-\def\eq@textFont{/Helv}
+\def\textFontDefault#1{\def\eq@textFontDefault{#1}
+ \def\eq@textFont{/#1}}
+\textFontDefault{Helv}
% \end{macrocode}
-% \DescribeMacro{\textSize} PDF form text size
+% \DescribeMacro{\textSize} PDF form text size. This is a simple assignment; we define
+% \DescribeMacro{\textSizeDefault}\cs{textSizeDefault} to conveniently change the default font size for all
+% form fields, including checkboxes and radio buttons. The default is 9 (points).
+% \changes{v2.4.1}{2020/12/14}{Defined \string\cs{eqtextSizeDefault}}
% \begin{macrocode}
\def\@eqtextSize#1{\def\eq@textSize{#1}}
-\def\eq@textSizeDefault{9}
-\edef\eq@textSize{\eq@textSizeDefault}
+\def\textSizeDefault#1{\def\eq@textSizeDefault{#1}
+ \def\eq@textSize{#1}}
+\textSizeDefault{9}
% \end{macrocode}
% \DescribeMacro{\RV} Rich text value
%\changes{v2.5l}{2011/01/28}{%
@@ -1266,8 +1277,6 @@
% of the combo box (only), the code below \cs{let}s \cs{eq@DV} to \cs{@empty} in enhanced
% preview mode, for combo boxes only.
% \begin{macrocode}
-% \ifx\annot@type\annot@type@combobox
-% \ifefpmpv\let\eq@DV\@empty\fi\fi
\makespecialJS\fi\fi}\def\eq@DV{}
% \end{macrocode}
% \DescribeMacro{\nuDV} \cs{@eqnuDV} is the old definition of DV. This version does not
@@ -2420,7 +2429,6 @@
%
% \begin{macro}{\JS}
% \begin{macro}{\Named}
-% \begin{macro}{\URI}
% \begin{macro}{\Next}
% \begin{macro}{\toggleAttachmentsPanel}
% Convenience commands for writing JavaScript and for executing named events.
@@ -2439,7 +2447,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
% When entering triggers into the AA dictionary, use these commands (all the ones of
% the form \cs{AA<Name>}. These all have one argument, the action to take, usually
% a JavaScript action. There is now a routine in the parsing of the AA dictionary
@@ -3114,6 +3121,9 @@
\ef@pdfstrCLOpti}
% \end{macrocode}
% \subsubsection{List Box}\label{listbox}
+%
+%\changes{v2.4}{2020/11/28}{Allow \cs{list@@Box} to obey \string\cs{pdfStringsOn}}
+%
% The main list box code that can be used to build list box commands, such as
% \cs{listBox}, defined below. Within
% the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
@@ -3131,7 +3141,10 @@
%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@listbox{listbox}
-\newcommand\list@@Box[8]{\begingroup
+\bgroup\obeyspaces
+\gdef\list@@Box{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\list@@@Box}\egroup
+\newcommand\list@@@Box[8]{\endgroup\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
\edef\annot@type{\annot@type@listbox}%
\pdfstringdef\Fld@name{#2}\dl@paramlocal
@@ -3177,6 +3190,9 @@
% \end{macrocode}
% \end{macro}
% \subsubsection{Combo Box}\label{combobox}
+%
+%\changes{v2.4}{2020/11/28}{Allow \cs{combo@@Box} to obey \string\cs{pdfStringsOn}}
+%
% Within the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
% and \cs{tops} for \cs{texorpdfstring}.
%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
@@ -3192,7 +3208,10 @@
%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@combobox{combobox}
-\newcommand\combo@@Box[8]{\begingroup
+\bgroup\obeyspaces
+\gdef\combo@@Box{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\combo@@@Box}\egroup
+\newcommand\combo@@@Box[8]{\endgroup\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
\edef\annot@type{\annot@type@combobox}%
\@eqFf{\FfCombo}\pdfstringdef\Fld@name{#2}\dl@paramlocal
@@ -3353,6 +3372,7 @@
% when setting the dimensions of this widget. Made the same
% changes for all AcroForm elements and for linking.
%}
+%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{push@@Button} to support \string\cs{pdfSpacesOn}}
%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
%commandchars=!(),codes={\catcode`\%=9}]
%#1 = !textsf(optional, used to enter any modification of the appearance/actions)
@@ -3365,15 +3385,19 @@
%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@button{pushbtn}
-\newcommand\push@@Button[7]{\begingroup
- \let\nameuse\@nameuse\let\tops\texorpdfstring
+\bgroup\obeyspaces
+\gdef\push@@Button{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\push@@@Button}\egroup
+\newcommand\push@@@Button[7]{\endgroup\begingroup
+ \let\nameuse\@nameuse\let\tops\texorpdfstring%
\edef\annot@type{\annot@type@button}%
- \pdfstringdef\Fld@name{#2}\dl@paramlocal
- \makeJSspecials\ef@preProcDefns
+ \pdfstringdef\Fld@name{#2}\dl@paramlocal%
+ \makeJSspecials\ef@preProcDefns%
\def\eq@Ff{/Ff \FfPushButton}%
\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}%
\eqf@setDimens{#3}{#4}%
\@processEvery#7\end\noindent#5#6{#1}}
+
% \end{macrocode}
% \begin{macro}{\pushButton}
% \hskip-\marginparsep\texttt{[\ameta{options}]\darg{\ameta{fld-name}}\darg{\ameta{wd}}\darg{\ameta{ht}}}
@@ -3410,6 +3434,7 @@
% The basic command for creating check boxes. For \emph{enhanced preview} we define
% \DescribeMacro\pmpvMrk\cs{pmpvMrk\darg{mrk}}, which defines \cs{pmpv@mrk} that is eventually
% used in the core of \cs{ef@Bbox}.
+%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{check@@Box} to support \string\cs{pdfSpacesOn}}
% \begin{macrocode}
\def\pmpvMrk#1{\def\pmpv@mrk{#1}}
\pmpvMrk{X}
@@ -3427,7 +3452,10 @@
%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@checkbox{checkbox}
-\newcommand\check@@Box[8]{\begingroup
+\bgroup\obeyspaces
+\gdef\check@@Box{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\check@@@Box}\egroup
+\newcommand\check@@@Box[8]{\endgroup\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
\let\#\ef@Hx\edef\annot@type{\annot@type@checkbox}%
\pdfstringdef\Fld@name{#2}\@eqAS{Off}\dl@paramlocal
@@ -3493,6 +3521,7 @@
% Use the default setting (\cmd{\useNewRadiosOff}) when you will view the PDF in AA/AR and save it; otherwise, if the PDF is to be viewed in non-conforming
% PDF readers, never having been saved using AA/AR, use the \cmd{\useNewRadiosOn} setting.
% \changes{v2.3}{2019/06/14}{Rewrote radio buttons so they work in non-conforming PDF readers}
+% \changes{v2.4}{2020/11/28}{Rewrite of \string\cs{radio@@Button} to support \string\cs{pdfSpacesOn}}
%
% \medskip\noindent\textbf{Discussion.} The default scheme is to create the radio buttons \begin{quote}\footnotesize
% \cs{radioButton\darg{\ameta{name}}\darg{\ameta{width}}\darg{\ameta{height}}} ...\\
@@ -3626,7 +3655,10 @@
%#8 = !textsf(every macros)
%\end{Verbatim}
% \begin{macrocode}
-\newcommand\radio@@Button[8]{\begingroup\let\#\ef@Hx
+\bgroup\obeyspaces
+\gdef\radio@@Button{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\radio@@@Button}\egroup
+\newcommand\radio@@@Button[8]{\endgroup\begingroup\let\#\ef@Hx
\let\nameuse\@nameuse\let\tops\texorpdfstring
\edef\annot@type{\annot@type@radio}%
\pdfstringdef\Fld@name{#2}%
@@ -3720,6 +3752,7 @@
% The template for a text field. Within
% the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
% and \cs{tops} for \cs{texorpdfstring}.
+%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{text@@Field} to support \string\cs{pdfSpacesOn}}
% \begin{macrocode}
\def\common@TextFieldCode
{%
@@ -3754,7 +3787,10 @@
%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@text{textfld}
-\newcommand\text@@Field[7]{\begingroup
+\bgroup\obeyspaces
+\gdef\text@@Field{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\text@@@Field}\egroup
+\newcommand\text@@@Field[7]{\endgroup\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
\edef\annot@type{\annot@type@text}%
\pdfstringdef\Fld@name{#2}\dl@paramlocal
@@ -3802,6 +3838,7 @@
% The template for a signature field. Within
% the optional argument, the following aliases are used: \cs{nameuse} for \cs{@nameuse}
% and \cs{tops} for \cs{texorpdfstring}.
+%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{sig@@Field} to support \string\cs{pdfSpacesOn}}
% \begin{macrocode}
\def\common@SigFieldCode
{%
@@ -3832,7 +3869,10 @@
%\end{Verbatim}
% \begin{macrocode}
\def\annot@type@sig{sigfld}
-\newcommand\sig@@Field[7]{\begingroup
+\bgroup\obeyspaces
+\gdef\sig@@Field{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\sig@@@Field}\egroup
+\newcommand\sig@@@Field[7]{\endgroup\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
\edef\annot@type{\annot@type@sig}%
\pdfstringdef\Fld@name{#2}\dl@paramlocal
@@ -3871,6 +3911,7 @@
% allow actions other than jumping. I've included a general link
% that increases the usage of the links provided by
% \textsf{hyperref}.
+%\changes{v2.4}{2020/11/28}{Rewrite of \string\cs{set@@Link} to support \string\cs{pdfSpacesOn}}
% \paragraph{Common Link Code.} All the link commands eventually come back
% to this template for constructing a link annotation.
% \begin{macrocode}
@@ -3896,7 +3937,10 @@
%\end{enumerate}
% \begin{macrocode}
\def\annot@type@link{link}
-\newcommand\set@@Link[7]{\begingroup
+\bgroup\obeyspaces
+\gdef\set@@Link{\begingroup\global\let =\pdfSP
+\ef@sanitize@toks\set@@@Link}\egroup
+\newcommand\set@@@Link[7]{\endgroup\begingroup
\let\nameuse\@nameuse\let\tops\texorpdfstring
\dl@paramlocal
\makeJSspecials
@@ -4885,7 +4929,7 @@
% The \texttt{js}\IndexKey{js} key is used to execute JavaScript actions on a mouse up trigger.
% The argument is a JavaScript text string: |js={app.alert("Hello World!"}|.
% The value of \texttt{js} may be a macro containing JavaScript, which would include
-% a macro created by the \texttt{defineJS} environment of \textsf{insdljs}.
+% a macro created by the \env{defineJS} environment of \textsf{insdljs}.
% \begin{macrocode}
\define@key{eforms}{js}[]{\@eqA{\JS{#1}}}
% \end{macrocode}
diff --git a/macros/latex/contrib/acrotex/examples/webeqtst.pdf b/macros/latex/contrib/acrotex/examples/webeqtst.pdf
index 7044adc54b..31a2cd68c3 100644
--- a/macros/latex/contrib/acrotex/examples/webeqtst.pdf
+++ b/macros/latex/contrib/acrotex/examples/webeqtst.pdf
Binary files differ
diff --git a/macros/latex/contrib/acrotex/exerquiz.dtx b/macros/latex/contrib/acrotex/exerquiz.dtx
index a5c4c18451..f478c87fe8 100644
--- a/macros/latex/contrib/acrotex/exerquiz.dtx
+++ b/macros/latex/contrib/acrotex/exerquiz.dtx
@@ -22,7 +22,7 @@
%<randomize>\ProvidesFile{aebrandom.def}
%<sumrytbls>\ProvidesFile{aebsumrytbls.def}
%<template>\ProvidesFile{template.def}
-%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2020/11/11 v8.5.11 %
+%<package|driver|aebjs|eqexam|randomize|sumrytbls|template> [2021/01/20 v8.6.2 %
%<package> Exerquiz: Exercises and Quizzes for LaTeX/PDF package (dps)]
%<driver> Exerquiz documentation driver file (dps)]
%<aebjs> Exerquiz document level JavaScript (dps)]
@@ -51,6 +51,7 @@
\let\env\texttt
\let\opt\texttt
\let\app\textsf
+\let\uif\textsf
\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
\def\visispace{\symbol{32}}
\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
@@ -98,15 +99,21 @@
% \end{macrocode}
%\changes{v8.2.8}{2018/12/13}{The SOL file is now written entirely when there is no solution option specified}
% (v8.0 dated 2017/08/08) This version introduces multi-letter variables and what I'll term `alternate appearances'.
-% This is a major addition, changes are marked by \texttt{dps17} for future reference in case something goes wrong.
% \changes{v8.0}{2017/08/08}{Introduce multi-letter variables and alternate appearances. Changes
% made are marked by `\texttt{dps17}' throughout the DTX.}
% \changes{v7.7k}{2016/04/18}{Minor bug fixes, improved driver recognition}
% \changes{v7.7j}{2016/04/05}{Change in eforms to 2016/04/05 v2.8f}
%
+% \section{Introduction}
+%
+% The \pkg{exerquiz} package provides support for the creation of exercises and quizzes
+% with or without solutions. These are PDF form and link based. The packages provides ``intelligent'' evaluation
+% of the students' responses. This package also provides code for the \pkg{eqexam} package so that these
+% two packages are consistent in their approach.
+%
% \section{Package options and setup}\label{options}
%
-% Introduce a number of useful options for \textsl{exerquiz}.
+% Introduce a number of useful options for \pkg{exerquiz}.
% \subsection{Options for paper, solutions, JavaScript and preview}
% \begin{macrocode}
% Begin package segment
@@ -121,16 +128,17 @@
\RequirePackage{ifluatex}
\@ifundefined{exqtable}{\def\exqtable{table}}{}
\IfFileExists{xcolor.sty}{%
- \def\eq@ColorPackage{xcolor}%
- \PassOptionsToPackage{\exqtable,hyperref}{xcolor}}
- {\def\eq@ColorPackage{color}}
+ \def\eq@ColorPackage{xcolor}%
+ \PassOptionsToPackage{\exqtable,hyperref}{xcolor}}
+ {\def\eq@ColorPackage{color}}
% \end{macrocode}
-% \IndexOpt{noxcolor} An option to force
+% \leavevmode\IndexOpt{noxcolor}^^A
+% An option to force
% the use of the \textsf{color} package.
% \begin{macrocode}
\DeclareOption{noxcolor}{\def\eq@ColorPackage{color}}
% \end{macrocode}
-% \IndexOpt{forpaper}\IndexOpt{forcolorpaper}
+% \leavevmode\IndexOpt{forpaper}\IndexOpt{forcolorpaper}^^A
% Pass the |monochrome| option to the color package
%\changes{v6.06a}{2007/04/09}
%{
@@ -146,7 +154,7 @@
\AtBeginDocument{\ifnum\eq@drivernum=4 \else\AllowPeeking\fi}
}
% \end{macrocode}
-% \IndexOpt{preview}
+% \leavevmode\IndexOpt{preview}^^A
% With this option, the bounding boxes of all form fields appear in the
% dvi preview. Use this option of properly positioning your fields, then
% remove this option on the final build of the document. This option is no
@@ -154,13 +162,13 @@
% \begin{macrocode}
\DeclareOption{preview}{\PassOptionsToPackage{preview}{eforms}}
% \end{macrocode}
-% \IndexOpt{nosolutions}
+% \leavevmode\IndexOpt{nosolutions}^^A
% With the option, the solutions to the exercises are not
% included in the typeset document.
% \begin{macrocode}
\DeclareOption{nosolutions}{\eq@nosolutionstrue\eq@nolinktrue}
% \end{macrocode}
-% \IndexOpt{noquizolutions}
+% \leavevmode\IndexOpt{noquizolutions}^^A
% No solutions for quizzes (shortquiz and quiz environments).
% \begin{macrocode}
\DeclareOption{noquizsolutions}{\eq@noquizsolutionstrue\eq@nolinktrue}
@@ -177,7 +185,7 @@
\DeclareOption{online}{\let\eq@online\eq@YES}
\let\eq@online\eq@NO
% \end{macrocode}
-% \IndexOpt{nohiddensolutions}\IndexOpt{noHiddensolutions}
+% \leavevmode\IndexOpt{nohiddensolutions}\IndexOpt{noHiddensolutions}^^A
% Overrides any hidden solutions specified with the \texttt{exercise}
% environment.
% \begin{macrocode}
@@ -185,12 +193,12 @@
\DeclareOption{noHiddensolutions}%
{\eq@globalshowsolutionstrue\AtBeginDocument{\def\Hidesymbol{h}}}
% \end{macrocode}
-% \IndexOpt{solutionsafter}
+% \leavevmode\IndexOpt{solutionsafter}^^A
% Solutions will appear after the statement of the exercise.
% \begin{macrocode}
\DeclareOption{solutionsafter}{\eq@solutionsaftertrue\eq@nolinktrue}
% \end{macrocode}
-% \IndexOpt{solutionsonly}
+% \leavevmode\IndexOpt{solutionsonly}^^A
% Here is a highly specialized option, put in at the request of a former friend.
%\changes{v6.2f}{2007/12/21}{Added a solutionsonly option}
% \begin{macrocode}
@@ -202,7 +210,7 @@
\newif\ifsolutionsonly\solutionsonlyfalse
\@ifundefined{ifanswerkey}{\newif\ifanswerkey\answerkeyfalse}{}
% \end{macrocode}
-% \IndexOpt{contsolns}
+% \leavevmode\IndexOpt{contsolns}^^A
% This option requires both \textsf{web} and \textsf{exerquiz}. The package
% tests for the presence of the \textsf{web} and whether webheadings pagestyle
% is used.
@@ -214,25 +222,25 @@
\def\contsolnsErrorMsg{\PackageWarning{exerquiz}{contsolns option,
cannot find file contsolns.def}}
% \end{macrocode}
-% \IndexOpt{nocorrections}
+% \leavevmode\IndexOpt{nocorrections}^^A
% The code for correcting the |quiz| environment is
% not written; this results in a smaller file.
% \begin{macrocode}
\DeclareOption{nocorrections}{\nocorrectionstrue}
% \end{macrocode}
-% \IndexOpt{proofing}
+% \leavevmode\IndexOpt{proofing}^^A
% An option for marking the correct answers for shortquiz and quiz
% \begin{macrocode}
\DeclareOption{proofing}{\eq@proofingtrue}
% \end{macrocode}
-% \IndexOpt{showgrayletters}
+% \leavevmode\IndexOpt{showgrayletters}^^A
% When this option is in effect, capital letters in gray appear under
% the multiple choice question boxes of quizzes.
% \begin{macrocode}
\newif\ifaebshowgrayletters\aebshowgraylettersfalse
\DeclareOption{showgrayletters}{\aebshowgrayletterstrue}
% \end{macrocode}
-% \IndexOpt{vspacewithsolns}
+% \leavevmode\IndexOpt{vspacewithsolns}^^A
% This is for the \texttt{vspacewithsolns} option designed for
% \textsf{eqexam}, but can be used in \textsf{exerquiz}. The switch
% \cs{ifvspacewithsolns} is defined in \textsf{eqexam}, and we only
@@ -253,7 +261,7 @@
\providecommand\displayworkareaOn{\displayworkareatrue}
\providecommand\displayworkareaOff{\displayworkareafalse}
% \end{macrocode}
-% \IndexOpt{nodljs}
+% \leavevmode\IndexOpt{nodljs}^^A
% An option for excluding all DLJS from the document. Useful with the
% \texttt{forpaper} option, or a document destined to be printed. Pass
% on to insdljs package.
@@ -261,24 +269,24 @@
\DeclareOption{nodljs}{\PassOptionsToPackage{nodljs}{insdljs}%
\AtEndOfPackage{\let\importdljs\eq@YES}}
% \end{macrocode}
-% \IndexOpt{execAfter}
+% \leavevmode\IndexOpt{execAfter}^^A
% Execute any JS defined within the \texttt{execJS} environment. Works only for
% authors using Acrobat 5.0 or Acrobat Approval.
% \begin{macrocode}
\DeclareOption{execJS}{\PassOptionsToPackage{execJS}{insdljs}}
% \end{macrocode}
-% \IndexOpt{exercisesonly}
+% \leavevmode\IndexOpt{exercisesonly}^^A
% If the document author wants only to create a series of exercises, no quizzes, there is no
% need for the Document-level JavaScript. So, we have a couple of convenience options.
% \begin{macrocode}
\DeclareOption{exercisesonly}{\PassOptionsToPackage{nodljs}{insdljs}}
% \end{macrocode}
-% \IndexOpt{debug}
+% \leavevmode\IndexOpt{debug}^^A
% An option for debugging JavaScript. Pass on to insdljs package.
% \begin{macrocode}
\DeclareOption{debug}{\PassOptionsToPackage{debug}{insdljs}}
% \end{macrocode}
-% \IndexOpt{allowrandomize}
+% \leavevmode\IndexOpt{allowrandomize}^^A
% Beginning with version 6.1 of \textsf{exerquiz}, it is possible to randomize
% the choices in a multiple choice question. These choices must be set off
% by the command \cs{bChoices}/\cs{eChoices} pair. The command \cs{bChoices} now has
@@ -289,7 +297,8 @@
{\PackageInfo{exerquiz}{inputting aebrandom.def}}
{cannot find aebrandom.def}}
% \end{macrocode}
-% \IndexOpt{usesumrytbls}
+% \leavevmode\IndexOpt{usesumrytbls}^^A
+% The declare the use of summary tables
% \begin{macrocode}
\newif \ifusesumrytbls \usesumrytblsfalse
\DeclareOption{usesumrytbls}{\usesumrytblstrue
@@ -365,7 +374,7 @@
\PassOptionsToPackage{xetex}{eforms}%
}
% \end{macrocode}
-% \IndexOpt{textures}
+% \leavevmode\IndexOpt{textures}^^A
% This option, and testing are due to Ross Moore 3/6/02
% \begin{macrocode}
\DeclareOption{textures}{\def\eq@drivernum{3}%
@@ -374,7 +383,7 @@
\PassOptionsToPackage{textures}{eforms}%
}
% \end{macrocode}
-% \IndexOpt{dviwindo}
+% \leavevmode\IndexOpt{dviwindo}^^A
% Set \cmd{\eq@noformstrue}, this inserts an \cmd{\endinput} just after
% the end of the |exercise| environment. No quizzes for
% \texttt{dviwindo}.
@@ -388,7 +397,7 @@
% \def\eq@drivernum{5}
% \def\eq@driver{dvipsone/dvips}
% \def\eq@driver{no driver specified}
-% \IndexOpt{unicode}
+% \leavevmode\IndexOpt{unicode}^^A
% Passes the unicode option to \textsf{hyperref}.
% \changes{v6.3}{2008/03/19}
% {
@@ -397,7 +406,7 @@
% \begin{macrocode}
\DeclareOption{unicode}{\PassOptionsToPackage{unicode}{hyperref}}
% \end{macrocode}
-% \IndexOpt{useui}
+% \leavevmode\IndexOpt{useui}^^A
% Passes the useui option to eforms. With this option,
% the key-value pairs \textsl{\'{a} la xkeyval} can be used.
% \changes{v6.3}{2008/03/19}
@@ -419,7 +428,7 @@
% \begin{macrocode}
\let\LangRedefinitions\relax
% \end{macrocode}
-% \IndexOpt{french}
+% \leavevmode\IndexOpt{french}^^A
% Translations due to Jean-Michel SARLAT.
% \begin{macrocode}
\DeclareOption{french}{%
@@ -428,7 +437,7 @@
{\PackageInfo{exerquiz}{French Option: Cannot find the file
eqfr.def, using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{german}
+% \leavevmode\IndexOpt{german}^^A
% Translation due to Michael Wiedmann.
% \begin{macrocode}
\DeclareOption{german}{%
@@ -437,7 +446,7 @@
{\PackageInfo{exerquiz}{German Option: Kann die Datei eqde.def
nicht finden, benutze Default, Englisch.}}}}
% \end{macrocode}
-% \IndexOpt{norsk}
+% \leavevmode\IndexOpt{norsk}^^A
% Translation due to Hans Fredrik Nordhaug.
% \begin{macrocode}
\DeclareOption{norsk}{%
@@ -446,7 +455,7 @@
{\PackageInfo{exerquiz}{Norsk Option: Cannot find the file eqno.def,
using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{dutch}
+% \leavevmode\IndexOpt{dutch}^^A
% Translation due to Henny Wilbrink
% \begin{macrocode}
\DeclareOption{dutch}{%
@@ -455,7 +464,7 @@
{\PackageInfo{exerquiz}{Dutch Option: Kan bestand eqnl.def niet
vinden, gebruik default, Engels.}}}}
% \end{macrocode}
-% \IndexOpt{spanish}
+% \leavevmode\IndexOpt{spanish}^^A
% Translation due to Pedro Luis Luque
% \begin{macrocode}
\DeclareOption{spanish}{%
@@ -464,7 +473,7 @@
{\PackageInfo{exerquiz}{Spanish Option: Opci\'on Espa\~nola: no puede
encontrar el fichero eqes.def, usar\'a por defecto, English.}}}}
% \end{macrocode}
-% \IndexOpt{italian}
+% \leavevmode\IndexOpt{italian}^^A
% Translation due to PierLuigi Zezza
% \begin{macrocode}
\DeclareOption{italian}{%
@@ -473,7 +482,7 @@
{\PackageInfo{exerquiz}{pzione Italiano: Non trovo il file eqit.def,
utilizzo quello di default, English.}}}}
% \end{macrocode}
-% \IndexOpt{russian}
+% \leavevmode\IndexOpt{russian}^^A
% Translation due to Sergei V. Znamenskii
% \begin{macrocode}
\DeclareOption{russian}{%
@@ -486,7 +495,7 @@
{\PackageInfo{exerquiz}{Russian Option: Cannot find the file
eqru.def, using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{dansk}
+% \leavevmode\IndexOpt{dansk}^^A
% Translation due to Erik Leimand
% \begin{macrocode}
\DeclareOption{dansk}{%
@@ -495,7 +504,7 @@
{\PackageInfo{exerquiz}{Dansk Option: Cannot find the file eqda.def,
using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{polish}
+% \leavevmode\IndexOpt{polish}^^A
% Translation due to Jerzy Mycielski
% \begin{macrocode}
\DeclareOption{polish}{%
@@ -504,7 +513,7 @@
{\PackageInfo{exerquiz}{Polish Option: Cannot find the file
eqpo.def, using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{finnish}
+% \leavevmode\IndexOpt{finnish}^^A
% Translation due to Paivi Porras
% \begin{macrocode}
\DeclareOption{finnish}{%
@@ -513,7 +522,7 @@
{\PackageInfo{exerquiz}{Finnish Option: Cannot find the file
eqfin.def, using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{catalan}
+% \leavevmode\IndexOpt{catalan}^^A
% Translation due to Ramon Ballester
% \begin{macrocode}
\DeclareOption{catalan}{%
@@ -522,7 +531,7 @@
{\PackageInfo{exerquiz}{Catalan Option: Cannot find the file
eqcat.def, using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{czech}
+% \leavevmode\IndexOpt{czech}^^A
% Translation due to Robert Marik
% \begin{macrocode}
\DeclareOption{czech}{%
@@ -531,7 +540,7 @@
{\PackageInfo{exerquiz}{Czech Option: Cannot find the file eqcz.def,
using the default, English.}}}}
% \end{macrocode}
-% \IndexOpt{brazil}
+% \leavevmode\IndexOpt{brazil}^^A
% Translation due to Koichi Sameshima
% \begin{macrocode}
\DeclareOption{brazil}{%
@@ -541,7 +550,7 @@
n\~ao foi poss\'ivel encontrar o arquivo eqbr.def, usaremos
o padr\~ao, English.}}}}
% \end{macrocode}
-% \IndexOpt{turkish}
+% \leavevmode\IndexOpt{turkish}^^A
% Translation due to Mahmut Ko\c{c}ak
% \begin{macrocode}
\DeclareOption{turkish}{%
@@ -690,6 +699,7 @@
% \begin{macrocode}
\newif\ifeq@randomizeChoices \eq@randomizeChoicesfalse
\newif\ifeq@randomizeallChoices \eq@randomizeallChoicesfalse
+\newif\if@DoNotRandomize \@DoNotRandomizefalse
% \end{macrocode}
% \begin{macro}{\turnOnRandomize}
% \begin{macro}{\obeyLocalRandomize}
@@ -705,6 +715,20 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \begin{macro}{\doNotRandomizeChoices}
+% \begin{macro}{\allowRandomizedChoices}
+% These two commands allow for finer control over whether to randomize choices
+% or not. Expanding \cs{doNoRandomizeChoices} overrides the \opt{allowrandomize}
+% option; whereas \cs{allowRandomizedChoices} restores the original behavior
+% set by the \opt{allowrandomize} option.
+% \changes{v8.6.2}{2021/01/20}{Added \string\cs{doNoRandomizeChoices} and
+% \string\cs{allowRandomizedChoices}}
+% \begin{macrocode}
+\def\doNotRandomizeChoices{\@DoNotRandomizetrue}
+\def\allowRandomizedChoices{\@DoNotRandomizefalse}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% These\DescribeMacro{\saveRandomSeed}\DescribeMacro{\inputRandomSeed} two
% commands are used when the \texttt{allowrandomize} option is in effect, Until
% then, they do nothing. See the definition in \autoref{randomize}.
@@ -3717,8 +3741,8 @@
% \section{Common code for quizzes.}
% Here, we include a few commands common to both
% quiz environments.
-%
-% Colors used by \textsf{exerquiz}: \texttt{webgreen} normally defined in \textsf{web}
+%\medskip\par\noindent
+% Colors used by \textsf{exerquiz}: \texttt{webgreen} normally defined in \textsf{web}.
% \begin{macrocode}
\definecolor{webgreen}{rgb}{0,.6,0}
% \end{macrocode}
@@ -3786,23 +3810,25 @@
\define@key{props@ques}{labelwidth}[]{\def\propQ@labelwidth{#1}}
\let\propQ@labelwidth\@empty
% \end{macrocode}
-% \IndexKey{topsep}\texttt{topsep}, \IndexKey{partopsep}\texttt{partopsep},
+% \leavevmode\IndexKey{topsep}^^A
+% \texttt{topsep}, \IndexKey{partopsep}\texttt{partopsep},
% \IndexKey{parsep}\texttt{parsep}, and \IndexKey{itemsep}\texttt{itemsep}.
% \begin{macrocode}
\define@key{props@ques}{topsep}[\the\topsep]{\edef\propQ@topsep{#1}}
\define@key{props@ques}{partopsep}[\the\partopsep]%
- {\edef\propQ@partopsep{#1}}
+ {\edef\propQ@partopsep{#1}}
\define@key{props@ques}{parsep}[\the\parsep]{\edef\propQ@parsep{#1}}
\define@key{props@ques}{itemsep}[\the\itemsep]{\edef\propQ@itemsep{#1}}
% \end{macrocode}
-% \IndexKey{labelsepTo}\texttt{labelsepTo} and \IndexKey{labelsep}\texttt{labelsep}
+% \leavevmode\IndexKey{labelsepTo}\texttt{labelsepTo} and \IndexKey{labelsep}\texttt{labelsep}
% \begin{macrocode}
\define@key{props@ques}{labelsepTo}[\normalsize\normalfont\ ]%
- {\def\propQ@labelsepTo{#1}}
+ {\def\propQ@labelsepTo{#1}}
\define@key{props@ques}{labelsep}[\@empty]{\def\propQ@labelsep{#1}}
\let\propQ@labelsep\@empty
% \end{macrocode}
-% \IndexKey{color}\texttt{color}
+% \leavevmode\IndexKey{color}^^A
+% A color key set the color of the numbers in a question environment.
% \begin{macrocode}
\define@key{props@ques}{color}[blue]{\quesNumColor{#1}}
% \end{macrocode}
@@ -3814,42 +3840,41 @@
% Now we begin the \texttt{questions} environment. There is an optional parameter
% wherein we pass the key-value pairs defined above.
% \begin{macrocode}
-\newenvironment{questions}[1][]
-{%
- \ifnum\@eqquestiondepth>\tw@\@toodeep\else
- \advance\@eqquestiondepth\@ne\fi
- \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}%
- \toks@=\expandafter\expandafter\expandafter{#1}\expandafter
- \xdef\csname quesOpts\@quesctr\endcsname{\the\toks@}%
- \edef\tempexp{\noexpand\setkeys{props@ques}{\the\toks@}}\tempexp
- \list{\qMark@Hook\prior@questionsHook
- \insE@rlyAtQues\gdef\eqPTs{1}%
- \global\let\eqQT\eq@na%
+\newenvironment{questions}[1][]{%
+ \ifnum\@eqquestiondepth>\tw@\@toodeep\else
+ \advance\@eqquestiondepth\@ne\fi
+ \def\@quesctr{eqquestionno\romannumeral\the\@eqquestiondepth}%
+ \toks@=\expandafter\expandafter\expandafter{#1}\expandafter
+ \xdef\csname quesOpts\@quesctr\endcsname{\the\toks@}%
+ \edef\tempexp{\noexpand\setkeys{props@ques}{\the\toks@}}\tempexp
+ \list{\qMark@Hook\prior@questionsHook
+ \insE@rlyAtQues\gdef\eqPTs{1}%
+ \global\let\eqQT\eq@na%
% \end{macrocode}
% (06/06/10) We create a macro \cs{@currentQues} that holds the current
% problem number 2(a)(i), for example.
% \begin{macrocode}
- {\@tempcnta=0 \let\@thispr@b\@empty
- \@whilenum\@tempcnta<\@eqquestiondepth\do{\advance\@tempcnta\@ne
- \ifx\@thispr@b\@empty\edef\@thispr@b{%
- \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\else
- \edef\@thispr@b{\@thispr@b%
- \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\fi
- }\xdef\@currentQues{\@thispr@b}}%
- \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}%
- \xdef\eq@pageThisQ{\the\c@page}%
- \post@questionsHook}{\usecounter{\@quesctr}%
+ {\@tempcnta=0 \let\@thispr@b\@empty
+ \@whilenum\@tempcnta<\@eqquestiondepth\do{\advance\@tempcnta\@ne
+ \ifx\@thispr@b\@empty\edef\@thispr@b{%
+ \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\else
+ \edef\@thispr@b{\@thispr@b%
+ \csname theeqquestionno\romannumeral\the\@tempcnta\endcsname}\fi
+ }\xdef\@currentQues{\@thispr@b}}%
+ \makebox[\labelwidth][r]{\normalfont\@nameuse{label\@quesctr}}%
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \post@questionsHook}{\usecounter{\@quesctr}%
% \end{macrocode}
% We set the list parameter for the \texttt{questions} environment.
% \begin{macrocode}
\ifx\propQ@labelsep\@empty
- \settowidth{\labelsep}{\propQ@labelsepTo}\else
- \setlength{\labelsep}{\propQ@labelsep}\fi
+ \settowidth{\labelsep}{\propQ@labelsepTo}\else
+ \setlength{\labelsep}{\propQ@labelsep}\fi
\ifx\propQ@labelwidth\@empty
- \settowidth{\labelwidth}%
- {\propQ@labelwidthTo\hspace{\labelsep}}\else
- \settowidth{\labelwidth}{\hspace{\propQ@labelwidth}%
- \hspace{\labelsep}}\fi
+ \settowidth{\labelwidth}%
+ {\propQ@labelwidthTo\hspace{\labelsep}}\else
+ \settowidth{\labelwidth}{\hspace{\propQ@labelwidth}%
+ \hspace{\labelsep}}\fi
\setlength{\topsep}{\propQ@topsep}%
\setlength{\partopsep}{\propQ@partopsep}%
\ifdim\parskip>\z@\addtolength{\topsep}{-\parskip}\fi
@@ -3951,10 +3976,10 @@
% \begin{macrocode}
\newenvironment{shortquiz*}
{%
- \xdef\eq@pageThisQ{\the\c@page}%
- {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne
- \xdef\@shortquizCnt{\the\eqtmpcnta}}%
- \sqForms\@shortquiz
+ \xdef\eq@pageThisQ{\the\c@page}%
+ {\eqtmpcnta\@shortquizCnt\relax\advance\eqtmpcnta\@ne
+ \xdef\@shortquizCnt{\the\eqtmpcnta}}%
+ \sqForms\@shortquiz
}{\aeb@endshortquiz}
% \end{macrocode}
% Determines if the next argument is optional, if yes, we pass to
@@ -3962,7 +3987,7 @@
% continue to \cs{@@shortquiz}.
% \begin{macrocode}
\def\@shortquiz{\@ifnextchar[%
- {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}}
+ {\@@shortquiz}{\@@shortquiz[\@sqGenBaseName]}}
% \end{macrocode}
% \end{environment}
% \cs{@@shortquiz} continues the parsing of \texttt{shortquiz} and \texttt{shortquiz*}.
@@ -3970,8 +3995,8 @@
% as a delimited parameter \texttt{\#1}.
% \begin{macrocode}
\def\sq@setCLN#1{\ifx\aebTitleQuiz\@empty
- \protected@edef\@currentlabelname{#1}\else
- \protected@edef\@currentlabelname{\@currentlabelname}\fi
+ \protected@edef\@currentlabelname{#1}\else
+ \protected@edef\@currentlabelname{\@currentlabelname}\fi
}
% \end{macrocode}
% (2013/09/29) Added \cs{isQZ} and \cs{isSQZ}
@@ -3979,37 +4004,53 @@
\let\isQZ=q \let\isSQZ=s
%</package|eqexam>
%<*package>
-\def\sq@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
- \S{S}\textSize{0}\Ff{\FfReadOnly}
- \AA{\AAFormat{%
- if (typeof \oField=="undefined")\r\t
- var \oField=new Object;\r
- \oField.Grp={};
- \ifx\defaultColorJSLoc\@empty\else\r
- \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
- \ifx\rghtColorJSLoc\@empty\else\r
- \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
- \ifx\wrngColorJSLoc\@empty\else\r
- \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
- \ifx\rghtAnsSymbJSLoc\@empty\else\r
- \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
- \ifx\wrngAnsSymbJSLoc\@empty\else\r
- \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
-}}]{sqID\oField}{2bp}{2bp}}%
-}
-\def\qz@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
+% \end{macrocode}
+% The hidden ID field for a short-quiz
+% \begin{macrocode}
+\def\sq@IDTxtField{\makebox[0pt][l]{%
+ \textField[\autoCenter{n}\BC{}\BG{}
\S{S}\textSize{0}\Ff{\FfReadOnly}
- \AA{\AAFormat{if(typeof aQuizzesInDoc=="undefined")\r\t
- var aQuizzesInDoc=new Array();\r
- if (aQuizzesInDoc.indexOf("\oField"))
- aQuizzesInDoc.push("\oField");\r
+ \AA{\AAFormat{%
+ if\eqSP(typeof\eqSP\oField=="undefined")\eqSP
+ var\eqSP\oField=new\eqSP Object;\r
+ \oField.Grp={};%
+ \ifx\defaultColorJSLoc\@empty\else\r
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\r
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\r
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\r
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\r
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ }}]{sqID\oField}{2bp}{2bp}}%
+}
+% \end{macrocode}
+% The \uif{Format} code for the hidden quiz ID text field.
+%\changes{v8.6}{2020/11/29}{\string\cs{qz@IDTxtField}: Format code now in \string\env{defineJS}}
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\!\makecmt\%]{\qzIDFmt}
+if(typeof aQuizzesInDoc=="undefined")
+ var aQuizzesInDoc=new Array();
+if (aQuizzesInDoc.indexOf("!oField"))
+ aQuizzesInDoc.push("!oField");
% \end{macrocode}
% (2019/06/22) Added in declaration of quiz object.
%\changes{v8.2.12}{2019/06/22}{Added declaration of quiz object}
% \begin{macrocode}
- if (typeof \oField=="undefined")\r\t
- var \oField=new Object;\r
- }}]{qzID\oField}{2bp}{2bp}}}
+if (typeof !oField=="undefined")
+ var !oField=new Object;
+\end{defineJS}
+% \end{macrocode}
+% The hidden text field for quizzes. The role of this field is to initialize things
+% for the associated quiz. This field has \uif{Format} code (\cs{qzIDFmt}), and the \app{Reader} will
+% execute this code when the page is opened. The code creates a new array \texttt{aQuizzesInDoc}, if needed,
+% and adds this quiz to the list of quizzes in the doc. Refer to \cs{qzIDFmt} above.
+% \begin{macrocode}
+\def\qz@IDTxtField{\makebox[0pt][l]{\textField[\autoCenter{n}\BC{}\BG{}
+ \S{S}\textSize{0}\Ff{\FfReadOnly}
+ \AA{\AAFormat{\qzIDFmt}}]{qzID\oField}{2bp}{2bp}}}
%</package>
%<*package|eqexam>
\let\eqQuizType\relax
@@ -4030,7 +4071,7 @@
\let\@Ans\Ans@sq@f
\ifx\oField\@empty
\typeout{^^JExerquiz: Base field name required when using
- shortquiz with '*' option}%
+ shortquiz with '*' option}%
\PackageInfo{exerquiz}{Assuming link style^^J}%
\let\@Ans\Ans@sq@l
\fi
@@ -4060,21 +4101,21 @@
% a \cs{@gobbletwo}, this eats up the next two tokens that immediately
% follow \cs{sqlabel} in the beginning of the \texttt{shortquiz} environment.
% \begin{macrocode}
- \def\sqlabel{\aebtitleQuiz\@gobbletwo}%
+ \def\sqlabel{\aebtitleQuiz\@gobbletwo}%
\fi
% \end{macrocode}
% When the online (or email) options are used in eqexam, the \cs{hypertarget}
% command is adding vertical space. Normally \cs{sqlabel} is empty, so we don't
% need \cs{hypertarget} in this case here.
% \begin{macrocode}
- \sq@aboveskip\sq@priorhook
- \@ifundefined{PointsOnLeft}%
- {\sq@setCLN{\eq@defaultShortQuizLabelName}%
- \ifx\sqlabel\@empty\else\noindent\fi
- \hypertarget{sqH\@currentHref}{}\sq@IDTxtField
- \ifx\sqlabel\@empty\else\expandafter
- \sqlabel\expandafter\sqhspace\fi
- {\set@typeset@protect\aebtitleQuiz}}{}\ignorespaces
+ \sq@aboveskip\sq@priorhook
+ \@ifundefined{PointsOnLeft}%
+ {\sq@setCLN{\eq@defaultShortQuizLabelName}%
+ \ifx\sqlabel\@empty\else\noindent\fi
+ \hypertarget{sqH\@currentHref}{}\sq@IDTxtField
+ \ifx\sqlabel\@empty\else\expandafter
+ \sqlabel\expandafter\sqhspace\fi
+ {\set@typeset@protect\aebtitleQuiz}}{}\ignorespaces
%</package>
%<eqexam> \sq@aboveskip\sq@priorhook\ignorespaces
%<*package|eqexam>
@@ -4336,19 +4377,19 @@
% \begin{macrocode}
\let\prior@quizSolnHeaderHook\@empty
\newcommand\quizSolnHeader[3][]{%
- \prior@quizSolnHeaderHook
- \ifeqforpaper\else\webnewpage\fi\noindent
+ \prior@quizSolnHeaderHook
+ \ifeqforpaper\else\webnewpage\fi\noindent
%</package|eqexam>
%<*package>
- \def\eq@argi{#1}%
- \ifx\eq@argi\@empty\else\noPeek#1\fi
- \hypertarget{#2}{#3}\relax
+ \def\eq@argi{#1}%
+ \ifx\eq@argi\@empty\else\noPeek#1\fi
+ \hypertarget{#2}{#3}\relax
%</package>
%<*eqexam>
- #2%
+ #2%
%</eqexam>
%<*package|eqexam>
- \solnspace
+ \solnspace
}
%</package|eqexam>
%<*package>
@@ -4378,7 +4419,7 @@
% when he is not authorized to).
% \begin{macrocode}
\def\noPeekAction#1#2{%
- /AA <</O<</S/JavaScript/JS(noPeek("#1",#2))>> >>
+ /AA <</O<</S/JavaScript/JS(noPeek("#1",#2))>> >>
}
%</package>
%<*package|eqexam>
@@ -4399,14 +4440,14 @@
% \cmd{\relax}.
% \begin{macrocode}
\def\includequizsolutions{\@ifstar
- {\let\resetQZtsolns\relax\includequizsolutionsi}
- {\def\resetQZtsolns{\global\let\include@quizsolutions\relax}%
- \includequizsolutionsi}}
+ {\let\resetQZtsolns\relax\includequizsolutionsi}
+ {\def\resetQZtsolns{\global\let\include@quizsolutions\relax}%
+ \includequizsolutionsi}}
\newcommand{\includequizsolutionsi}[1][]{%
- \filterFor{#1}\includequizsolutionsii}
+ \filterFor{#1}\includequizsolutionsii}
\def\includequizsolutionsii{\include@quizsolutions
- \resetQZtsolns
- \let\eqFilterArg\@empty}
+ \resetQZtsolns
+ \let\eqFilterArg\@empty}
%</package|eqexam>
%<*package>
% \end{macrocode}
@@ -4460,11 +4501,11 @@
% \begin{macrocode}
\newcommand{\quizSolnInput}
{%
- \global\let\webnewpage\relax
- \bgroup\OKToWriteExamDatatrue
- \writeT@QzSolns{\string\endinput}\egroup
- \immediate\closeout\quiz@solns
- \ifeq@noquizsolutions\else
+ \global\let\webnewpage\relax
+ \bgroup\OKToWriteExamDatatrue
+ \writeT@QzSolns{\string\endinput}\egroup
+ \immediate\closeout\quiz@solns
+ \ifeq@noquizsolutions\else
% \end{macrocode}
% If there are quiz solutions, we start a new page, and clear the right mark.
% We execute \cmd{\eq@normallheader} which sets the running left header,
@@ -4473,30 +4514,30 @@
% with \cmd{\sqslsecrunhead}, makes it easier to define running headers
% when solutions are filtered.
% \begin{macrocode}
- \iftherearequizsolutions\newpage\markright{}%
- \eq@normallheader\markright{\sqslsecrunhead}%
- \ifx\webnewpage\relax
- \def\webnewpage{\global\let\webnewpage\newpage}\fi
+ \iftherearequizsolutions\newpage\markright{}%
+ \eq@normallheader\markright{\sqslsecrunhead}%
+ \ifx\webnewpage\relax
+ \def\webnewpage{\global\let\webnewpage\newpage}\fi
% \end{macrocode}
% Here we have various prior commands, and the setting of the
% section title.
% \begin{macrocode}
- \priorsqslsectitle\quizSolnsHeadnToc\priorsqslinput
+ \priorsqslsectitle\quizSolnsHeadnToc\priorsqslinput
% \end{macrocode}
% Now input the solution file \cmd{\jobname.qsl}.
% \begin{macrocode}
- \InputIfFileExists{\jobname.qsl}{}%
- {!!! Solutions to quizzes not found}
+ \InputIfFileExists{\jobname.qsl}{}%
+ {!!! Solutions to quizzes not found}
% \end{macrocode}
% A hook for hanging things
% \begin{macrocode}
- \eqqzsolutionshook
+ \eqqzsolutionshook
% \end{macrocode}
% Reset the running header cleanly
% \begin{macrocode}
- \newpage\eq@defaultlheader
- \fi
+ \newpage\eq@defaultlheader
\fi
+ \fi
}
% \end{macrocode}
% The internal command that insert solutions. This command
@@ -4540,35 +4581,35 @@
% \cs{defaultquiztype}.
% \begin{macrocode}
\newcommand{\quiztype}[1]{%
- \def\@quiztype{#1}\def\aeb@FLOverride{#1}}
+ \def\@quiztype{#1}\def\aeb@FLOverride{#1}}
\let\@quiztype\@empty
\newcommand{\defaultquiztype}{\let\@quiztype\@empty
- \let\aeb@FLOverride\relax}
+ \let\aeb@FLOverride\relax}
\let\aeb@FLOverride\relax
% \end{macrocode}
% \end{macro}
% \end{macro}
% \begin{macrocode}
\def\@setFormLinkType{%
- \if\qstar*%
- \ifx\aeb@FLOverride\relax%
- \def\@@quiztype{f}%
- \else
- \if\aeb@FLOverride l\def\@@quiztype{l}\else
- \def\@@quiztype{f}\fi
- \fi
+ \if\qstar*%
+ \ifx\aeb@FLOverride\relax%
+ \def\@@quiztype{f}%
\else
- \ifx\aeb@FLOverride\relax
- \def\@@quiztype{l}%
- \else
- \if\aeb@FLOverride f\def\@@quiztype{f}\else
- \def\@@quiztype{l}\fi
- \fi
+ \if\aeb@FLOverride l\def\@@quiztype{l}\else
+ \def\@@quiztype{f}\fi
+ \fi
+ \else
+ \ifx\aeb@FLOverride\relax
+ \def\@@quiztype{l}%
+ \else
+ \if\aeb@FLOverride f\def\@@quiztype{f}\else
+ \def\@@quiztype{l}\fi
\fi
+ \fi
}
\def\setdefault@Ans{\@setFormLinkType
- \expandafter\global\expandafter
- \let\expandafter\@Ans\expandafter=\csname Ans@\@@quiztype\endcsname
+ \expandafter\global\expandafter
+ \let\expandafter\@Ans\expandafter=\csname Ans@\@@quiztype\endcsname
}
% \end{macrocode}
% \begin{macro}{\useForms}
@@ -4626,36 +4667,36 @@
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
% the \texttt{oQuestion} and \texttt{shortquiz} environments.
% \begin{macrocode}
- \xdef\eq@pageThisQ{\the\c@page}%
- \let\@currentQues\@empty
- \global\let\eqQzQuesList\@empty
- \global\let\pointValuesArray\@empty
+ \xdef\eq@pageThisQ{\the\c@page}%
+ \let\@currentQues\@empty
+ \global\let\eqQzQuesList\@empty
+ \global\let\pointValuesArray\@empty
% \end{macrocode}
% Initialize \texttt{ptypeArray} to track problem types better
% \changes{v7.7m}{2016/07/04}{Initialize \string\texttt{ptypeArray} to track problem types better}
% \begin{macrocode}
- \global\let\ptypeArray\@empty
+ \global\let\ptypeArray\@empty
% \end{macrocode}
% Initialize \texttt{corrAnsArray} to track the correct answers
% \changes{v7.7n}{2016/07/06}{Initialize \string\texttt{ptypeArray} to track problem types better}
% \begin{macrocode}
- \global\let\corrAnsArray\@empty
+ \global\let\corrAnsArray\@empty
% \end{macrocode}
% Update the internal quiz counter.
% \begin{macrocode}
- {\eqtmpcnta\@quizCnt\advance\eqtmpcnta\@ne
- \xdef\@quizCnt{\the\eqtmpcnta}}%
+ {\eqtmpcnta\@quizCnt\advance\eqtmpcnta\@ne
+ \xdef\@quizCnt{\the\eqtmpcnta}}%
% \end{macrocode}
% We try to support {\LaTeX}'s cross-referencing system by defining
% \cs{@currentlabel}, \cs{@currentHlabel}, and \cs{@currentlabelname}.
% \begin{macrocode}
- \edef\@currentlabel{\@quizCnt}%
- \edef\@currentHref{quiz.\@quizCnt}%
- \sq@setCLN{\eq@defaultQuizLabelName}%
- \setcounter{eqpointvalue}{0}\setcounter{questionno}{0}%
- \eq@initializeServerSubmit
- \global\let\eqQuizType\isQZ %\tabcolsep=0pt
- \gdef\eqPTs{1}\global\let\eqQT\eq@na
+ \edef\@currentlabel{\@quizCnt}%
+ \edef\@currentHref{quiz.\@quizCnt}%
+ \sq@setCLN{\eq@defaultQuizLabelName}%
+ \setcounter{eqpointvalue}{0}\setcounter{questionno}{0}%
+ \eq@initializeServerSubmit
+ \global\let\eqQuizType\isQZ %\tabcolsep=0pt
+ \gdef\eqPTs{1}\global\let\eqQT\eq@na
% \end{macrocode}
% \changes{v6.3u}{2010/11/04}{%
% Added \cs{xdef}\cs{oField}\texttt{\{\#2\}}, this is
@@ -4663,31 +4704,32 @@
% Add \cs{listOfQuizNames} to track quizzes
% \changes{v7.8k}{2017/07/25}{Added \string\cs{listOfQuizNames} to track quizzes}
% \begin{macrocode}
- \g@addto@macro\ListOfQuizNames{,#2}%
- \gdef\quiz@total{#2}\xdef\curr@quiz{#2}\xdef\oField{#2}%
- \xdef\currQuiz{#2}\xdef\currQuizStartPage{\thepage}%
- \xdef\aPointType{0}%
+ \g@addto@macro\ListOfQuizNames{,#2}%
+ \gdef\quiz@total{#2}\xdef\curr@quiz{#2}\xdef\oField{#2}%
+ \xdef\currQuiz{#2}\xdef\currQuizStartPage{\thepage}%
+ \xdef\aPointType{0}%
% \end{macrocode}
% (2013/12/20) Pass \cs{bqlabelISO} through \cs{pdfstringdef}.
% \begin{macrocode}
- \def\fieldJSStr@CMD{\flJSStr*[noquotes]\bqlabelISO}%
- \expandafter\fieldJSStr@CMD\expandafter{\bqlabelISO}%
- \ifx\@quiztype\@empty\gdef\@@quiztype{#1}\else
- \xdef\@@quiztype{\@quiztype}\fi
- \let\@qzsolndest\@empty
- \let\answers\answers@q\let\endanswers\endanswers@q
- \let\manswers\manswers@q\let\endmanswers\endanswers@q
- \let\solution\solution@sq\let\endsolution\endsolution@sq
- \expandafter%
- \xdef\csname titleOf\currQuiz\endcsname{\aebTitleQuiz}%
+ \def\fieldJSStr@CMD{\flJSStr*[noquotes]\bqlabelISO}%
+ \expandafter\fieldJSStr@CMD\expandafter{\bqlabelISO}%
+ \ifx\@quiztype\@empty\gdef\@@quiztype{#1}\else
+ \xdef\@@quiztype{\@quiztype}\fi
+ \let\@qzsolndest\@empty
+ \let\answers\answers@q\let\endanswers\endanswers@q
+ \let\manswers\manswers@q\let\endmanswers\endanswers@q
+ \let\solution\solution@sq\let\endsolution\endsolution@sq
+ \expandafter
+ \xdef\csname titleOf\currQuiz\endcsname{\aebTitleQuiz}%
% \end{macrocode}
% Modified the destination name of \cs{hypertarget} to avoid deplicate
% destinations. Did the same thing for the \texttt{shortquiz}.
% \changes{v7.8a}{2016/12/07}{Modified destination name of \string\cs{hypertarget}}
% \begin{macrocode}
- \q@aboveskip\q@priorhook\noindent\hypertarget{qzH\@currentHref}{}%
- \eq@beginQuiz\qhspace{\set@typeset@protect\aebtitleQuiz}%
- \ignorespaces}
+ \q@aboveskip\q@priorhook\noindent\hypertarget{qzH\@currentHref}{}%
+ \eq@beginQuiz\qhspace{\set@typeset@protect\aebtitleQuiz}%
+ \ignorespaces
+}
% \end{macrocode}
% Here is the end for the \texttt{quiz} and \texttt{quiz*} environments. The
% \cs{eq@prior@endQuiz} can be used for whatever purposes a
@@ -4740,78 +4782,114 @@
% Use a button instead of a link for begin quiz
% \begin{macrocode}
\newcommand\useBeginQuizButton[1][]
- {\renewcommand\eq@beginQuiz{\eq@BeginQuizButton[#1]}}
+ {\renewcommand\eq@beginQuiz{\eq@BeginQuizButton[#1]}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\useEndQuizButton}
% Use a button instead of a link for end quiz
% \begin{macrocode}
\newcommand\useEndQuizButton[1][]
- {\renewcommand\eq@endQuiz{\eq@EndQuizButton[#1]}}
+ {\renewcommand\eq@endQuiz{\eq@EndQuizButton[#1]}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\useBeginQuizLink}
% Use a link begin quiz (the default)
% \begin{macrocode}
\newcommand\useBeginQuizLink
- {\renewcommand\eq@beginQuiz{\eq@BeginQuizLink}}
+ {\renewcommand\eq@beginQuiz{\eq@BeginQuizLink}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\useEndQuizLink}
% Use a link end quiz (the default)
% \begin{macrocode}
\newcommand\useEndQuizLink
- {\renewcommand\eq@endQuiz{\eq@EndQuizLink}}
+ {\renewcommand\eq@endQuiz{\eq@EndQuizLink}}
% \end{macrocode}
% \end{macro}
-% \begin{macrocode}
-%\def\listOfQuizzes{}
-%\def\listOfSubmitQuizzes{}
-%\def\initializeAllSubmitQuizzes{}
-% \end{macrocode}
% \begin{macro}{\@initQuiz}
-% \begin{macro}{\priorInitQuiz}
-% \begin{macro}{\postInitQuiz}
% \cs{@initQuiz} is executed when you click on `Begin Quiz'. Included here are some
% macro hooks for insert code prior to, and after the quiz initialization. This
% command appears in the commands \cs{eq@@BeginQuizLinkActions} and \cs{eq@@BeginQuizButtonActions} below.
%\changes{v7.0}{2014/11/05}{Added some JS: lstOfQuizzes is an object
% listing all quizzes in the document, the value is the quiz object. We add properties
% isSubmitted and initializeWith to the quiz object.}
+%\changes{v8.6.1}{2020/12/30}{Changed the comparison method for \string\cs{priorInitQuiz} and
+% \string\cs{postInitQuiz} to reflect their \string\cs{newcommand} definition.}
% \begin{macrocode}
\newcommand\@initQuiz{%
- var \curr@quiz=new Object();\jsR
- lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
- \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
- \curr@quiz.Grp={};
- \ifx\defaultColorJSLoc\@empty\else\jsR
- \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
- \ifx\rghtColorJSLoc\@empty\else\jsR
- \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
- \ifx\wrngColorJSLoc\@empty\else\jsR
- \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
- \ifx\partialColorJSLoc\@empty\else\jsR
- \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
- \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
- \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
- \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
- \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
- \ifx\corrAnsSymbJSLoc\@empty\else\jsR
- \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
- \ifx\eqGradeScaleLoc\@empty\else\jsR
- \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
- \ifx\eqCorrLocalChoiceFully\@empty\else\jsR % dpsf07
- \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
- \ifx\priorInitQuiz\@empty\else\jsR\priorInitQuiz\fi %\jsR
- InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);
- \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
- \jsR\curr@quiz.isSubmitted=true;\fi
- \jsR\curr@quiz.initializeWith=%
-'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);'
- \ifx\postInitQuiz\@empty\else\jsR\postInitQuiz\fi
-}
-% \end{macrocode}
-% \cs{priorInitQuiz} and \cs{postInitQuiz} are hooks that allow a document author to
+ var\eqSP\curr@quiz=new Object();\jsR
+ lstOfQuizzes["\curr@quiz"]=\curr@quiz;\jsR
+ \curr@quiz.oAlertCheck={bAfterValue:false};\jsR
+ \curr@quiz.Grp={};%
+ \ifx\defaultColorJSLoc\@empty\else\jsR
+ \oField.DefaultColorJSLoc=\defaultColorJSLoc;\fi
+ \ifx\rghtColorJSLoc\@empty\else\jsR
+ \oField.RightColorJSLoc=\rghtColorJSLoc;\fi
+ \ifx\wrngColorJSLoc\@empty\else\jsR
+ \oField.WrongColorJSLoc=\wrngColorJSLoc;\fi
+ \ifx\partialColorJSLoc\@empty\else\jsR
+ \oField.PartialColorJSLoc=\partialColorJSLoc;\fi
+ \ifx\rghtAnsSymbJSLoc\@empty\else\jsR
+ \oField.RightAnsSymbJSLoc=\rghtAnsSymbJSLoc;\fi
+ \ifx\wrngAnsSymbJSLoc\@empty\else\jsR
+ \oField.WrongAnsSymbJSLoc=\wrngAnsSymbJSLoc;\fi
+ \ifx\corrAnsSymbJSLoc\@empty\else\jsR
+ \oField.CorrAnsSymbJSLoc=\corrAnsSymbJSLoc;\fi
+ \ifx\eqGradeScaleLoc\@empty\else\jsR
+ \oField.GradeScaleLoc=new Array(\eqGradeScaleLoc);\fi
+ \ifx\eqCorrLocalChoiceFully\@empty\else\jsR
+ \oField.fullyCorrectLoc=\eqCorrLocalChoiceFully;\fi
+ \if$\priorInitQuiz$\else\jsR\priorInitQuiz\fi\jsR
+ InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);%
+ \ifx\eq@CGI\@empty\jsR\curr@quiz.isSubmitted=false;\else
+ \jsR\curr@quiz.isSubmitted=true;\fi
+ \jsR\curr@quiz.initializeWith=%
+ 'InitializeQuiz("\curr@quiz",\ifnocorrections0\else1\fi);';%
+ \if$\postInitQuiz$\else\jsR\postInitQuiz\fi%
+}
+% \end{macrocode}
+% The following is the \env{defineJS} version of \cs{@initQuiz}. This is experiemental
+% for now, not yet implemented.
+%\begin{verbatim}
+%\begin{defineJS}[\makeesc\!\makecmt\%]{\@initQuiz}
+%var !curr@quiz=new Object();
+%lstOfQuizzes["!curr@quiz"]=!curr@quiz;
+%!curr@quiz.oAlertCheck={bAfterValue:false};
+%!curr@quiz.Grp={};%
+%!ifx!defaultColorJSLoc!@empty!else
+%!oField.DefaultColorJSLoc=!defaultColorJSLoc;!fi%
+%!ifx!rghtColorJSLoc!@empty!else
+%!oField.RightColorJSLoc=!rghtColorJSLoc;!fi%
+%!ifx!wrngColorJSLoc!@empty!else
+%!oField.WrongColorJSLoc=!wrngColorJSLoc;!fi%
+%!ifx!partialColorJSLoc!@empty!else
+%!oField.PartialColorJSLoc=!partialColorJSLoc;!fi%
+%!ifx!rghtAnsSymbJSLoc!@empty!else
+%!oField.RightAnsSymbJSLoc=!rghtAnsSymbJSLoc;!fi%
+%!ifx!wrngAnsSymbJSLoc!@empty!else
+%!oField.WrongAnsSymbJSLoc=!wrngAnsSymbJSLoc;!fi%
+%!ifx!corrAnsSymbJSLoc!@empty!else
+%!oField.CorrAnsSymbJSLoc=!corrAnsSymbJSLoc;!fi%
+%!ifx!eqGradeScaleLoc!@empty!else
+%!oField.GradeScaleLoc=new Array(!eqGradeScaleLoc);!fi%
+%!ifx!eqCorrLocalChoiceFully!@empty!else
+%!oField.fullyCorrectLoc=!eqCorrLocalChoiceFully;!fi%
+%!if$!priorInitQuiz$!else
+%!priorInitQuiz!fi%
+%InitializeQuiz("!curr@quiz",!ifnocorrections0!else1!fi);%
+%!ifx!eq@CGI!@empty
+%!curr@quiz.isSubmitted=false;!else
+%!curr@quiz.isSubmitted=true;!fi
+%!curr@quiz.initializeWith=%
+%'InitializeQuiz("!curr@quiz",!ifnocorrections0!else1!fi);';%
+%!if$!postInitQuiz$!else
+%!postInitQuiz!fi
+%\end{defineJS}
+%\end{verbatim}
+% \end{macro}
+% \begin{macro}{\priorInitQuiz}
+% \begin{macro}{\postInitQuiz}
+% These two commands are hooks that allow a document author to
% execute JavaScript just prior to initializing the quiz and just after. These appear in
% \cs{eq@@BeginQuizLinkActions} and \cs{eq@@BeginQuizButtonActions} below.
% \begin{macrocode}
@@ -4820,24 +4898,32 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \end{macro}
-% Here are a couple of macros used with `End Quiz', and are used for
+% Here are a couple\DescribeMacro{\eq@submitURL}\DescribeMacro{\eq@insertHiddenFields}{}
+% of macros that appear in `\uif{End Quiz}', and are used for
% submitting quiz results to a web server.
% \begin{macrocode}
\let\eq@submitURL\@empty
\let\eq@insertHiddenFields\@empty
% \end{macrocode}
+% \begin{macro}{\priorSubmitQuiz}
+% \begin{macro}{\postSubmitQuiz}
+% These two commands are defined in this package, but are use in \pkg{eq2db}.
+% \begin{macrocode}
+\newcommand\priorSubmitQuiz{}
+\newcommand\postSubmitQuiz{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
%
% \subsubsection{With Links}
%
% \begin{macro}{\eq@BeginQuizLink}
-% Begin quiz with links
+% `\uif{Begin Quiz}' with links
% \begin{macrocode}
\def\eq@@BeginQuizLinkActions{\A{\JS{\@initQuiz}}}
\def\eq@BeginQuizLinkDefaults{\Border{0 0 0}}
\let\bqlabelFmt\@empty
-\def\eq@BeginQuizLink{%
- \qz@IDTxtField
+\def\eq@BeginQuizLink{\qz@IDTxtField
\set@@Link{}{}{}{\color{\@linkcolor}\bqlabelFmt\bqlabel}{}%
{\eq@setWidgetProps\setLink@driver}%
{\eq@BeginQuizLinkDefaults\eq@@BeginQuizLinkActions\every@Link}%
@@ -4846,47 +4932,22 @@
% \end{macro}
% \begin{macro}{\eq@EndQuizLink}
% Code the the link version of `End Quiz'.
+% \changes{v8.6}{2020/11/29}{Action for End Quiz Lnk now a \string\env{defineJS} env}
% \begin{macrocode}
-\newcommand\priorSubmitQuiz{}
-\newcommand\postSubmitQuiz{}
-\def\eq@@EndQuizLinkActions{\A{\JS{%
- if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
- eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
- else {\jsR\jsT
- if (\minQuizResp(\thequestionno)) {\jsR\jsT\jsT
- \curr@quiz.PtValues=new %
- Array(\pointValuesArray);\jsR\jsT\jsT
- ProbType = [\ptypeArray];\jsR\jsT\jsT
-\if@inclkey
- \curr@quiz.CorrAns=(new %
- Array(\corrAnsArray));\jsR\jsT\jsT
-\fi
- DisplayQuizResults("\curr@quiz",\theeqpointvalue,%
- \thequestionno);\jsR\jsT\jsT
- var h=this.getField("ScoreData.\curr@quiz");\jsR\jsT\jsT
- h.value=Score+";"+NQuestions+";"%
- +ptScore+";"+NPointTotal;\jsR\jsT\jsT
- \eq@submitURL
- \postSubmitQuiz
- \jsT\jsT resetQuiz("\curr@quiz");\jsR\jsT
- }\jsR
- }}}%
-}
+\def\eq@@EndQuizLinkActions{\A{\JS{\eQzBtnActns}}}
\def\eq@EndQuizLinkDefaults{\Border{0 0 0}}
\let\eqlabelFmt\@empty
-\def\eq@EndQuizLink
-{%
- \ifx\eq@CGI\@empty
- \let\eq@submitURL\@empty
- \let\eq@insertHiddenFields\@empty
- \fi
- \set@@Link{}{}{}{\color{\@linkcolor}\eqlabelFmt\eqlabel}{}%
- {\eq@setWidgetProps\setLink@driver}%
- {\eq@EndQuizLinkDefaults\eq@@EndQuizLinkActions\every@Link}%
- \makebox[0pt][r]{\textField[\BC{}\autoCenter{n}]%
- {htxtfld.\curr@quiz}{2bp}{2bp}}%
- \makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
- \global\let\eq@CGI\@empty\ignorespaces
+\def\eq@EndQuizLink{%
+ \ifx\eq@CGI\@empty
+ \let\eq@submitURL\@empty
+ \let\eq@insertHiddenFields\@empty\fi
+ \set@@Link{}{}{}{\color{\@linkcolor}\eqlabelFmt\eqlabel}{}%
+ {\eq@setWidgetProps\setLink@driver}%
+ {\eq@EndQuizLinkDefaults\eq@@EndQuizLinkActions\every@Link}%
+ \makebox[0pt][r]{\textField[\BC{}\autoCenter{n}]%
+ {htxtfld.\curr@quiz}{2bp}{2bp}}%
+ \makebox[0pt][r]{\eq@hiddenScoreData\eq@insertHiddenFields}%
+ \global\let\eq@CGI\@empty\ignorespaces
}
% \end{macrocode}
% \end{macro}
@@ -4896,10 +4957,11 @@
% \begin{macro}{\eq@BeginQuizButton}
% This is the button when the user wants button rather than link for the
% \texttt{quiz} environment.
+% \changes{v8.6}{2020/11/29}{Action for End Quiz Btn now a \string\env{defineJS} env}
% \begin{macrocode}
\def\BeginQuizButtonDefaults{%
- \CA{\bqlabel}\H{P}\F{\FPrint}
- \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}}
+ \CA{\bqlabel}\H{P}\F{\FPrint}
+ \BC{1 0 0}\BG{.7529 .7529 .7529}\W{1}\S{B}}
\def\eq@@BeginQuizButtonActions{\A{\JS{\@initQuiz}}}
\newcommand\eq@BeginQuizButton[1][]{%
\mbox{\qz@IDTxtField\push@@Button{#1}{beginQuiz.\curr@quiz}{}%
@@ -4910,41 +4972,41 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\eq@EndQuizButton}
-% The `End Quiz' code for Links
-% \begin{macrocode}
-\def\EndQuizButtonDefaults{%
- \CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
- \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}}
-\def\eq@@EndQuizButtonActions{\A{\JS{%
- if (!isQuizInitialized("\curr@quiz"))\jsR\jsT
- eqAppAlert(InitMsg("\bqlabelISO"),3);\jsR
- else {\jsR\jsT
- if (\minQuizResp(\thequestionno)&&_ModalNotOn){\jsR\jsT\jsT
- \curr@quiz.PtValues=(new %
- Array(\pointValuesArray));\jsR\jsT\jsT
- ProbType=[\ptypeArray];\jsR\jsT\jsT
-\if@inclkey
- \curr@quiz.CorrAns=(new %
- Array(\corrAnsArray));\jsR\jsT\jsT
-\fi
- DisplayQuizResults("\curr@quiz",\theeqpointvalue,%
- \thequestionno);\jsR\jsT\jsT
- var h=this.getField("ScoreData.\curr@quiz");\jsR\jsT\jsT
- h.value=Score+";"+NQuestions+";"%
- +ptScore+";"+NPointTotal;\jsR\jsT\jsT
- \eq@submitURL
- \postSubmitQuiz
- \jsT\jsT resetQuiz("\curr@quiz");\jsR\jsT
- }\jsR
- }}}%
+% The `End Quiz' code
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\eQzBtnActns}
+if (!isQuizInitialized("*curr@quiz"))
+ eqAppAlert(InitMsg("*bqlabelISO"),3);
+else {
+ if (*minQuizResp(*thequestionno)&&_ModalNotOn){
+ *curr@quiz.PtValues=new Array(*pointValuesArray);
+ ProbType=[*ptypeArray];%
+*if@inclkey
+ *curr@quiz.CorrAns=new Array(*corrAnsArray);*fi
+ DisplayQuizResults("*curr@quiz",*theeqpointvalue,%
+*thequestionno);
+ var h=this.getField("ScoreData.*curr@quiz");
+ h.value=Score+";"+NQuestions+";"%
++ptScore+";"+NPointTotal;%
+*ifx*eq@submitURL*empty*else
+ *eq@submitURL*fi%
+*if$*postSubmitQuiz$*else
+ *postSubmitQuiz*fi
+ resetQuiz("*curr@quiz");
+ }
}
+\end{defineJS}
+\def\EndQuizButtonDefaults{%
+ \CA{\eqlabel}\F{\FPrint}\BC{1 0 0}
+ \BG{.7529 .7529 .7529}\W{1}\S{B}\H{P}}
+\def\eq@@EndQuizButtonActions{%
+ \A{\JS{\eQzBtnActns}}}
\newcommand{\eq@hiddenScoreData}{\makebox[0pt][r]{%
\textField[\BC{}\F{\FHidden}]{ScoreData.\curr@quiz}{2bp}{2bp}}}
\newcommand\eq@EndQuizButton[1][]{%
\ifx\eq@CGI\@empty
\let\eq@submitURL\@empty
- \let\eq@insertHiddenFields\@empty
- \fi
+ \let\eq@insertHiddenFields\@empty\fi
\mbox{\push@@Button{#1}{endQuiz.\curr@quiz}{}%
{\DefaultHeightOfWidget}{\eq@protect\A}%
{\eq@setButtonProps\eq@Button@driver}%
@@ -4959,8 +5021,8 @@
% \begin{macro}{\eqCGI}
% \begin{macro}{\eqSubmit}
% These four commands give general support for submitting quiz data
-% to a web server for storage in a database. Use in my \textsf{eq2db} Package
-% which I have not completed yet. (2014/09/14) Sanitized first argument of \cs{eqSubmit}.
+% to a web server for storage in a database. Use in the \pkg{eq2db} package.
+% (2014/09/14) Sanitized first argument of \cs{eqSubmit}.
% \begin{macrocode}
\newcommand\databaseName[1]{\gdef\db@Name{#1}}\def\db@Name{}
\newcommand\tableName[1]{\gdef\db@Table{#1}}\def\db@Table{}
@@ -5974,24 +6036,22 @@ if (isEndQuizPushed("@eqBaseName")){
% here, then goes to |\Ans@sq@l@driver| the rest of the code that depends on the
% driver.
% \begin{macrocode}
-\def\sqWrongRespJS{OnBlurRespBox( false, "\oField" );}
-\def\sqRightRespJS{OnBlurRespBox( true, "\oField" );}
+\def\sqWrongRespJS{OnBlurRespBox(false,"\oField");}
+\def\sqRightRespJS{OnBlurRespBox(true,"\oField");}
\def\Ans@sq@l@Actions
{%
- \A{\if\Ans@choice1
- \JS{\sqRightRespJS}
- \ifx\@qzsolndest\@empty\else
- \ifeq@solutionsafter\else
- /Next <</S/GoTo/D(\@qzsolndest)>>
- \fi
+ \A{\if\Ans@choice\eq@One\JS{\sqRightRespJS}
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@solutionsafter\else
+ /Next <</S/GoTo/D(\@qzsolndest)>>
\fi
+ \fi
\else
\JS{\sqWrongRespJS\jsR
\ifx\oField\@empty\else
- updateTally("\oField.\thequestionno");
- \fi}%
+ updateTally("\oField.\thequestionno");\fi}%
\fi
- }%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -6047,6 +6107,7 @@ if (isEndQuizPushed("@eqBaseName")){
% \end{macrocode}
% \end{macro}
% \subsubsection{Form Style}
+% \subsubsection{Answers for the \texttt{answers} and \texttt{manswers} Environment}
% \begin{macro}{\Ans@sq@f}
% For the link multiple choice type question. The driver independent stuff starts
% here, then goes to |\Ans@sq@f@driver| the rest of the code that depends on the
@@ -6073,28 +6134,46 @@ if (isEndQuizPushed("@eqBaseName")){
\def\sqNoCorrections{\let\@sqAlertsOnly\eq@One}
\def\sqCorrections{\let\@sqAlertsOnly\eq@Zero}
\sqNoCorrections
-\def\Ans@sq@f@ActionsTrue{%
- \if\@sqTurnOffAlerts1OnBlurRespBox(true,"\oField");\jsR\fi
- \ifx\@qzsolndest\@empty\else\ifeq@solutionsafter\else
- jmpToNamedDest("\oField","\@qzsolndest",%
- \if\@sqTurnOffAlerts00\else1\fi);\fi
- \fi\eqAddAAMouseUpMC}
-\def\Ans@sq@f@ActionsFalse{%
- \if\@sqTurnOffAlerts1OnBlurRespBox(false,"\oField" );\jsR\fi
- \ifx\oField\@empty\else
- updateTally("\oField.\thequestionno");
- \fi\jsR\eqAddAAMouseUpMC}
+% \end{macrocode}
+% JavaScript code for the mouse up action for the \emph{correct} choice of the radio button field
+% (\texttt{mc.\ameta{fld-name}.\ameta{q-num}}) for the form version of a multiple choice question of a \texttt{shortquiz}.
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@sq@f@ActionsTrue}
+*ifx*@sqTurnOffAlerts*eq@One%
+OnBlurRespBox(true,"*oField");
+*fi%
+var qzSolnDest="*@qzsolndest";
+var solnAfter=*ifeq@solutionsafter%
+true*else%
+false*fi;
+if ((qzSolnDest!="") && !solnAfter) %
+jmpToNamedDest("*oField","*@qzsolndest",%
+*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
+*ifx*eqAddAAMouseUpMC*empty*else
+*eqAddAAMouseUpMC*fi
+\end{defineJS}
+% \end{macrocode}
+% JavaScript code for the mouse up action for the \emph{incorrect} choice of the radio button field
+% (\texttt{mc.\ameta{fld-name}.q-num}) for the form version of a multiple choice question of a \texttt{shortquiz}.
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@sq@f@ActionsFalse}
+*ifx*@sqTurnOffAlerts*eq@One%
+OnBlurRespBox(false,"*oField");
+*fi%
+var qzSolnDest="*@qzsolndest";
+if( qzSolnDest!="") updateTally("*oField.*thequestionno");%
+*ifx*eqAddAAMouseUpMC*empty*else
+*eqAddAAMouseUpMC*fi
+\end{defineJS}
% \end{macrocode}
% The actions for the form version of a multiple choice question of a \texttt{shortquiz}.
% \begin{macrocode}
-\def\Ans@sq@f@Actions{\A{\if\Ans@choice\eq@One
- \JS{\Ans@sq@f@ActionsTrue}\else
- \JS{\Ans@sq@f@ActionsFalse}\fi}%
- \AAmousedown{updateTally.downState=!!event.target.isBoxChecked%
- (\arabic{quizno}-1);}}
+\def\Ans@sq@f@Actions{\AAmouseup{\if\Ans@choice\eq@One
+ \Ans@sq@f@ActionsTrue\else\Ans@sq@f@ActionsFalse\fi}
+ \AAmousedown{updateTally.downState=!!event.target.isBoxChecked%
+ (\arabic{quizno}-1);}}
\def\Ans@proofing#1{\ifeq@proofing\if\Ans@choice1\relax
- \llap{\@proofingsymbol\,\hskip#1\relax}%
- \fi\fi}
+ \llap{\@proofingsymbol\,\hskip#1\relax}\fi\fi}
% \end{macrocode}
%\DescribeMacro{\sqRghtSymbChoice}\DescribeMacro{\sqRghtSymbColor} for the \texttt{shortquiz}
% environment, these first two commands assign the right symbol (default check) and
@@ -6102,19 +6181,19 @@ if (isEndQuizPushed("@eqBaseName")){
% does the same thing for the wrong answer.
% \begin{macrocode}
\def\sqRghtSymbChoice#1{\chooseJSsymbol*{#1}%
- \ifx\eq@retnStyle\@empty
- \edef\sq@corrsymch{\sqRghtSymbChoiceDef}\else
- \edef\sq@corrsymch{#1}\fi}
+ \ifx\eq@retnStyle\@empty
+ \edef\sq@corrsymch{\sqRghtSymbChoiceDef}\else
+ \edef\sq@corrsymch{#1}\fi}
\def\sqRghtSymbColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
- \edef\sq@corrsymcol{\sqRghtSymbColorDef}\else
- \edef\sq@corrsymcol{#1}\fi}
+ \edef\sq@corrsymcol{\sqRghtSymbColorDef}\else
+ \edef\sq@corrsymcol{#1}\fi}
\def\sqWrngSymbChoice#1{\chooseJSsymbol*{#1}%
- \ifx\eq@retnStyle\@empty
- \edef\sq@wrgsymch{\sqWrngSymbChoiceDef}\else
- \edef\sq@wrgsymch{#1}\fi}
+ \ifx\eq@retnStyle\@empty
+ \edef\sq@wrgsymch{\sqWrngSymbChoiceDef}\else
+ \edef\sq@wrgsymch{#1}\fi}
\def\sqWrngSymbColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
- \edef\sq@wrgsymcol{\sqWrngSymbColorDef}\else
- \edef\sq@wrgsymcol{#1}\fi}
+ \edef\sq@wrgsymcol{\sqWrngSymbColorDef}\else
+ \edef\sq@wrgsymcol{#1}\fi}
\def\sqRghtSymbChoiceDef{check}
\def\sqRghtSymbColorDef{0 .6 0 rg}
\def\sqWrngSymbChoiceDef{cross}
@@ -6124,8 +6203,8 @@ if (isEndQuizPushed("@eqBaseName")){
\edef\sq@wrgsymch{\sqWrngSymbChoiceDef}
\edef\sq@wrgsymcol{\sqWrngSymbColorDef}
\def\sqResetSymbToDef{%
- \sqRghtSymbChoice{}\sqRghtSymbColor{}%
- \sqWrngSymbChoice{}\sqWrngSymbColor{}%
+ \sqRghtSymbChoice{}\sqRghtSymbColor{}%
+ \sqWrngSymbChoice{}\sqWrngSymbColor{}%
}
% \end{macrocode}
%\DescribeMacro{\qChoiceSymb}\DescribeMacro{\qChoiceColor} for the \texttt{quiz}
@@ -6133,12 +6212,12 @@ if (isEndQuizPushed("@eqBaseName")){
% color (default webgreen).
% \begin{macrocode}
\def\qChoiceSymb#1{\chooseJSsymbol*{#1}%
- \ifx\eq@retnStyle\@empty
- \edef\qz@chksymb{\qChoiceSymbDef}\else
- \edef\qz@chksymb{#1}\fi}
+ \ifx\eq@retnStyle\@empty
+ \edef\qz@chksymb{\qChoiceSymbDef}\else
+ \edef\qz@chksymb{#1}\fi}
\def\qChoiceColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty
- \edef\qz@chksymbcol{\qChoiceColorDef}\else
- \edef\qz@chksymbcol{#1}\fi}
+ \edef\qz@chksymbcol{\qChoiceColorDef}\else
+ \edef\qz@chksymbcol{#1}\fi}
\def\qChoiceSymbDef{check}
\def\qChoiceColorDef{0 0 0 rg}
\edef\qz@chksymb{\qChoiceSymbDef}
@@ -6146,43 +6225,44 @@ if (isEndQuizPushed("@eqBaseName")){
%</package>
%<*package|eqexam>
\let\rbf@Opts\@empty
-\def\Ans@sq@f{%
- \if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
- {\ifwithinsoldoc\stepcounter{quizno}\else
- \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+\def\Ans@sq@f{\if\eq@listType\eq@One
+ \stepcounter{quizno}\else
+ \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
+ {\ifwithinsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi
+ \PBS\raggedright
%</package|eqexam>
% \end{macrocode}
%\changes{v6.7d}{2013/05/27}{added \cs{rbf@Opts} to hardwire choices.}
% \begin{macrocode}
%<*package>
- \if\Ans@choice\eq@One
- \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
- \textColor{\sq@corrsymcol}}\else
- \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
- \textColor{\sq@wrgsymcol}}\fi
+ \if\Ans@choice\eq@One
+ \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
+ \textColor{\sq@corrsymcol}}\else
+ \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
+ \textColor{\sq@wrgsymcol}}\fi
%</package>
%<*package|eqexam>
- \settowidth{\eq@tmplength}{\eq@lw@f}%
- \eq@tmpdima=\wd\eq@tmpbox%
- \hangindent=\eq@tmplength\hangafter=1\relax
- \insertGrayLetters % 6.3d
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \eq@tmpdima=\wd\eq@tmpbox%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \insertGrayLetters
%</package|eqexam>
%<*eqexam>
- \Ans@sq@f@driver
+ \Ans@sq@f@driver
%</eqexam>
%<*package>
- \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
- {mc.\oField.\thequestionno}%
- {\RadioFieldSize}{\RadioFieldSize}%
- {\Ans@choice\alph{quizno}}{\eq@protect\A}%
- {\eq@setWidgetProps\eq@Radio@driver}%
- {\@@Ans@sq@f@Defaults\Ans@sq@f@Actions\every@RadioButton
- \every@sqRadioButton}}%
- \Ans@proofing{\RadioFieldSize}%
+ \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
+ {mc.\oField.\thequestionno}%
+ {\RadioFieldSize}{\RadioFieldSize}%
+ {\Ans@choice\alph{quizno}}{\eq@protect\A}%
+ {\eq@setWidgetProps\eq@Radio@driver}%
+ {\@@Ans@sq@f@Defaults\Ans@sq@f@Actions\every@RadioButton
+ \every@sqRadioButton}}%
+ \Ans@proofing{\RadioFieldSize}%
%</package>
%<*package|eqexam>
-\eq@hspanner\ignorespaces}
+ \eq@hspanner\ignorespaces}
%</package|eqexam>
%<*package>
% \end{macrocode}
@@ -6194,87 +6274,108 @@ if (isEndQuizPushed("@eqBaseName")){
%
%</package>
%<*eqexam>
-% dps 4/16/05
\let\Ans@ck@sq@f\Ans@sq@f
%</eqexam>
%<*package>
-\def\@@Ans@ck@sq@f@Defaults
-{%
- \BC{0 0 0}\Ff{\FfNoToggleToOff}
- \F{\FPrint}\textSize{12}\textColor{0 g}\W{1}
+\def\@@Ans@ck@sq@f@Defaults{%
+ \BC{0 0 0}\Ff{\FfNoToggleToOff}
+ \F{\FPrint}\textSize{12}\textColor{0 g}\W{1}
}
\begingroup
\catcode`\&=12
\gdef\eq@AND{&&}
\endgroup
-\def\Ans@ck@sq@f@ActionsTrue{%
- var fName=event.target.name;\jsR
- var g=this.getField("mc.\oField.\thequestionno");\jsR
- var a=g.getArray();\jsR
- for (var i=0; i<a.length; i++)\jsR\jsT
- if ( a[i].isBoxChecked(0) \eq@AND\space
- a[i].value.charAt(0)==0)\jsR\jsT\jsT
- a[i].checkThisBox(0,false);\jsR
- \if\@sqTurnOffAlerts1OnBlurRespBox(%
- true,"\oField");\jsR\fi
- \ifx\@qzsolndest\@empty\else
- \ifeq@solutionsafter\else
- % if all correct answers are check, jump to solution
- for (var i=0; i<a.length; i++){\jsR\jsT
- if ( a[i].exportValues[0].charAt(0)==1 \eq@AND\space
- !a[i].isBoxChecked(0))\jsR\jsT\jsT
- break;\jsR
- }\jsR
- if (i>=a.length) jmpToNamedDest("\oField","\@qzsolndest",%
- \if\@sqTurnOffAlerts00\else1\fi);
- \fi
- \fi\eqAddAAMouseUpMS}
-\def\Ans@ck@sq@f@ActionsFalse{%
- var fName=event.target.name;\jsR
- var g=this.getField("mc.\oField.\thequestionno");\jsR
- var a=g.getArray();\jsR
- for (var i=0; i<a.length; i++)\jsR
- {\jsR\jsT
- if (a[i].value.charAt(0)==0) {\jsR\jsT\jsT
- if ( fName != a[i].name )\jsR\jsT\jsT\jsT
- a[i].checkThisBox(0,false);\jsR\jsT
- }\jsR
- }\jsR
- \if\@sqTurnOffAlerts1OnBlurRespBox( false, "\oField" );\fi
- \ifx\oField\@empty\else
- updateTally("\oField.\thequestionno");
- \fi\eqAddAAMouseUpMS}
+% \end{macrocode}
+% Mouse up action for a \emph{correct answer box} (a checkbox) to MS question of short-quiz
+% (field name: \texttt{mc.\ameta{fld-name}.\ameta{ques-num}}.\ameta{choice-num})
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@ck@sq@f@ActionsTrue}
+var fName=event.target.name;
+var g=this.getField("mc.*oField.*thequestionno");
+var a=g.getArray();
+for (var i=0; i<a.length; i++)
+ if ( (a[i].isBoxChecked(0)) && %
+(a[i].value.charAt(0)==0) )
+ a[i].checkThisBox(0,false);%
+*ifx*@sqTurnOffAlerts*eq@One%
+OnBlurRespBox(true,"*oField");
+*fi%
+var qzSolnDest="*@qzsolndest";
+var solnAfter=*ifeq@solutionsafter%
+true*else%
+false*fi;
+if ( (qzSolnDest != "") && !solnAfter ) {
+ for (var i=0; i<a.length; i++){
+ if ((a[i].exportValues[0].charAt(0)==1) && %
+(!a[i].isBoxChecked(0))) break;
+ }
+}
+if (i>=a.length) jmpToNamedDest("*oField","*@qzsolndest",%
+*ifx*@sqTurnOffAlerts*eq@Zero0*else1*fi);%
+*ifx*eqAddAAMouseUpMS*empty*else
+*eqAddAAMouseUpMS*fi
+\end{defineJS}
+% \end{macrocode}
+% Mouse up action for a \emph{incorrect answer box} (a checkbox) to MS question of short-quiz
+% (field name: \texttt{mc.\ameta{fld-name}.\ameta{ques-num}}.\ameta{choice-num})
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\Ans@ck@sq@f@ActionsFalse}
+var fName=event.target.name;
+var g=this.getField("mc.*oField.*thequestionno");
+var a=g.getArray();
+for (var i=0; i<a.length; i++) {
+ if (a[i].value.charAt(0)==0) {
+ if ( fName != a[i].name )
+ a[i].checkThisBox(0,false);
+ }
+}%
+*ifx*@sqTurnOffAlerts*eq@One%
+OnBlurRespBox(false,"*oField");
+*fi%
+*ifx*oField*@empty*else
+updateTally("*oField.*thequestionno");*fi%
+*ifx*eqAddAAMouseUpMS*empty*else
+*eqAddAAMouseUpMS*fi
+\end{defineJS}
+% \end{macrocode}
+% Set all actions for check box for a MS question of a short-quiz
+% (field name: \texttt{mc.\ameta{fld-name}.\ameta{ques-num}}.\ameta{choice-num})
+% \begin{macrocode}
\def\Ans@ck@sq@f@Actions{%
- \A{\if\Ans@choice\eq@One
- \JS{\Ans@ck@sq@f@ActionsTrue}\else
- \JS{\Ans@ck@sq@f@ActionsFalse}\fi}%
+ \AAmouseup{\if\Ans@choice\eq@One
+ \Ans@ck@sq@f@ActionsTrue\else
+ \Ans@ck@sq@f@ActionsFalse\fi}
\AAmousedown{updateTally.downState=!!event.target.isBoxChecked(0);}}
-\def\Ans@ck@sq@f{%
- \if\eq@listType\eq@One\stepcounter{quizno}\else
- \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
- {\ifwithinsoldoc\stepcounter{quizno}\else
- \refstepcounter{quizno}\fi}\fi\PBS\raggedright
- \if\Ans@choice1%
- \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
- \textColor{\sq@corrsymcol}}\else
- \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
- \textColor{\sq@wrgsymcol}}\fi
- \settowidth{\eq@tmplength}{\eq@lw@f}%
- \eq@tmpdima=\wd\eq@tmpbox%
- \hangindent=\eq@tmplength\hangafter=1\relax
- \insertGrayLetters % 6.3d
- \mbox{\expandafter\check@@Box\expandafter{\rbf@Opts}%
- {mc.\oField.\thequestionno.\arabic{quizno}}%
- {\RadioFieldSize}{\RadioFieldSize}
- {\Ans@choice\alph{quizno}}{\eq@protect\A}%
- {\eq@setWidgetProps\eq@Check@driver}%
- {\@@Ans@ck@sq@f@Defaults\Ans@ck@sq@f@Actions\every@CheckBox
- \every@sqCheckBox}}%
- \Ans@proofing{\RadioFieldSize}%
-\eq@hspanner\ignorespaces}
% \end{macrocode}
-% \end{macro}
-% \subsection{For \texttt{quiz}}
+% The check boxes to a MS question in an \env{manswers} environment of a short-quiz; the name of this field
+% |mc.\oField.\thequestionno.\arabic{quizno}|.
+% \begin{macrocode}
+\def\Ans@ck@sq@f{\if\eq@listType\eq@One
+ \stepcounter{quizno}\else
+ \@ifundefined{ifwithinsoldoc}{\refstepcounter{quizno}}
+ {\ifwithinsoldoc\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi}\fi\PBS\raggedright
+ \if\Ans@choice\eq@One
+ \def\rbf@Opts{\symbolchoice{\sq@corrsymch}%
+ \textColor{\sq@corrsymcol}}\else
+ \def\rbf@Opts{\symbolchoice{\sq@wrgsymch}%
+ \textColor{\sq@wrgsymcol}}\fi
+ \settowidth{\eq@tmplength}{\eq@lw@f}\eq@tmpdima\wd\eq@tmpbox
+ \hangindent\eq@tmplength\hangafter\@ne % dps
+ \insertGrayLetters % 6.3d
+ \mbox{\expandafter\check@@Box\expandafter{\rbf@Opts}%
+ {mc.\oField.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}
+ {\Ans@choice\alph{quizno}}{\eq@protect\A}%
+ {\eq@setWidgetProps\eq@Check@driver}%
+ {\@@Ans@ck@sq@f@Defaults\Ans@ck@sq@f@Actions\every@CheckBox
+ \every@sqCheckBox}}%
+ \Ans@proofing{\RadioFieldSize}%
+ \eq@hspanner\ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
+% \subsection{For the \texttt{quiz} environment}
% \subsubsection{The \texttt{answers} and \texttt{manswers} Environment}
% \begin{macro}{answers}
% This is the answers environment for the \texttt{quiz}
@@ -6304,51 +6405,51 @@ if (isEndQuizPushed("@eqBaseName")){
\newif\ifeqshowOutOf \eqshowOutOffalse
\def\showOutOfinSmryTbl{false}
\def\eq@recordThesePTs{%
- \ifx\pointValuesArray\@empty
- \edef\ptsValue{\showOutOfinSmryTbl,\eqPTs}\else
- \edef\ptsValue{,\eqPTs}\fi
- \expandafter\g@addto@macro\expandafter\pointValuesArray
- \expandafter{\ptsValue}}
+ \ifx\pointValuesArray\@empty
+ \edef\ptsValue{\showOutOfinSmryTbl,\eqPTs}\else
+ \edef\ptsValue{,\eqPTs}\fi
+ \expandafter\g@addto@macro\expandafter\pointValuesArray
+ \expandafter{\ptsValue}}
% \end{macrocode}
% \changes{v7.7m}{2016/07/04}{Added \string\texttt{ptypeArray} to track problem types better}
% \begin{macrocode}
\let\ptypeArray\@empty
\def\eq@recordProbType{%
- \ifx\ptypeArray\@empty
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\ptypeArray{null,"\eqQT"}}\else
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\ptypeArray{,"\eqQT"}}\fi
- \tmp@exp
+ \ifx\ptypeArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\ptypeArray{null,"\eqQT"}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\ptypeArray{,"\eqQT"}}\fi
+ \tmp@exp
}
\let\corrAnsArray\@empty
\def\eq@recordCorrAns#1{%
- \ifx\corrAnsArray\@empty
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\corrAnsArray{null,#1}}\else
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\corrAnsArray{,#1}}\fi
- \tmp@exp
+ \ifx\corrAnsArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\corrAnsArray{null,#1}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\corrAnsArray{,#1}}\fi
+ \tmp@exp
}
\def\aeb@answerType@r{r}
\def\aeb@answerType@c{c}
\newcommand\answers@q{%
- \eq@AddProbToQzQuesList
- \def\aeb@answerType{r}\setdefault@Ans\eq@recordThesePTs
- \eq@recordProbType
- \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
- \def\aeb@thisType{"mc"}\@ifnextchar[{\answers@@q}%
- {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
+ \eq@AddProbToQzQuesList
+ \def\aeb@answerType{r}\setdefault@Ans\eq@recordThesePTs
+ \eq@recordProbType
+ \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
+ \def\aeb@thisType{"mc"}\@ifnextchar[{\answers@@q}%
+ {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
}
\def\answers@@q[#1]#2{\global\let\eq@ansChoiceArray\@empty
- \xdef\aeb@numCols{#2}\edef\eqtmp{\aPointType}%
- \xdef\aPointType{\eqtmp,[\eqPTs,\aeb@thisType]}%
- \ifx\q@hwdest\@empty
- \xdef\@qzsolndest{#1}\else
- \gdef\@qzsolndest{\q@hwdest}\fi
- \ifnum\aeb@numCols=1
- \gdef\eq@listType{1}\expandafter\answers@q@list\else
- \gdef\eq@listType{0}\expandafter\answers@q@tabular\fi{\aeb@numCols}%
+ \xdef\aeb@numCols{#2}\edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,\aeb@thisType]}%
+ \ifx\q@hwdest\@empty
+ \xdef\@qzsolndest{#1}\else
+ \gdef\@qzsolndest{\q@hwdest}\fi
+ \ifnum\aeb@numCols=1
+ \gdef\eq@listType{1}\expandafter\answers@q@list\else
+ \gdef\eq@listType{0}\expandafter\answers@q@tabular\fi{\aeb@numCols}%
}
% \end{macrocode}
% \end{macro}
@@ -6372,59 +6473,58 @@ if (isEndQuizPushed("@eqBaseName")){
% #2 = number of columns in the tabular environment
%\end{verbatim}
% \begin{macrocode}
-\newcommand\manswers@q
-{%
- \eq@AddProbToQzQuesList
- \def\aeb@answerType{c}\@setFormLinkType
- \global\expandafter\let\expandafter\@Ans
- \expandafter=\csname Ans@ck@\@@quiztype\endcsname
- \eq@recordThesePTs\eq@recordProbType
- \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
- \def\aeb@thisType{"ms"}\@ifnextchar[{\answers@@q}%
- {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
+\newcommand\manswers@q{%
+ \eq@AddProbToQzQuesList
+ \def\aeb@answerType{c}\@setFormLinkType
+ \global\expandafter\let\expandafter\@Ans
+ \expandafter=\csname Ans@ck@\@@quiztype\endcsname
+ \eq@recordThesePTs\eq@recordProbType
+ \addtocounter{eqpointvalue}{\eqPTs}\stepcounter{questionno}%
+ \def\aeb@thisType{"ms"}\@ifnextchar[{\answers@@q}%
+ {\@ifstar{\answers@@q[\curr@quiz.\thequestionno]}{\answers@@q[]}}%
}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\newenvironment{answers@q@list}[1]{%
- \ifx\aeb@answerType\eq@r
- \let\endanswers\endanswers@q@list\else
- \let\endmanswers\endanswers@q@list\fi
- \list{\strut\@Ans}{%
- \if\qstar*\relax
- \if\aeb@FLOverride\eq@l
- \settowidth{\labelwidth}{\eq@lw@l}\else
- \settowidth{\labelwidth}{\eq@lw@f}\fi
- \else
- \if\aeb@FLOverride\eq@f
- \settowidth{\labelwidth}{\eq@lw@f}\else
- \settowidth{\labelwidth}{\eq@lw@l}\fi
- \fi
- \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
- \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
- \setlength{\listparindent}{\parindent}%
- \setlength{\leftmargin}{\labelwidth}%
- \setlength{\labelsep}{0pt}%
- \def\Ans{\Ans@list}%
- }%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@q@list\else
+ \let\endmanswers\endanswers@q@list\fi
+ \list{\strut\@Ans}{%
+ \if\qstar*\relax
+ \if\aeb@FLOverride\eq@l
+ \settowidth{\labelwidth}{\eq@lw@l}\else
+ \settowidth{\labelwidth}{\eq@lw@f}\fi
+ \else
+ \if\aeb@FLOverride\eq@f
+ \settowidth{\labelwidth}{\eq@lw@f}\else
+ \settowidth{\labelwidth}{\eq@lw@l}\fi
+ \fi
+ \setlength{\topsep}{-\parskip+\aboveanswersSkip}%
+ \setlength{\parsep}{0pt}\setlength{\itemindent}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \setlength{\labelsep}{0pt}%
+ \def\Ans{\Ans@list}%
+ }%
}{\endlist\setcounter{quizno}{0}%
- \eq@answersEndHook
- \setdefault@Ans
- \ifx\aeb@answerType\aeb@answerType@r
+ \eq@answersEndHook
+ \setdefault@Ans
+ \ifx\aeb@answerType\aeb@answerType@r
% \end{macrocode}
% If this is a MC question, we record the author's correct answer
% \begin{macrocode}
- \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
+ \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
% \end{macrocode}
% If within a \cs{bMCFI}/\cs{eMCFI} command pair, we also record
% the author's correct answer.
% \begin{macrocode}
- \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
+ \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
% \end{macrocode}
% If this is a MS question, we record the author's correct answer as an array
% \begin{macrocode}
- \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
- \global\let\eqlimselTo\@empty
+ \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
+ \global\let\eqlimselTo\@empty
}
% \end{macrocode}
% \begin{macrocode}
@@ -6433,52 +6533,50 @@ if (isEndQuizPushed("@eqBaseName")){
\qztabsep{1.5pt}
\def\qzTabPos#1{\def\qz@TabPos{[#1]}}\qzTabPos{}
\def\answers@q@tabular#1{%
- \ifinner\else\par\removelastparskip\vspace{\aboveanswersSkip}\fi
- \eq@tmpdima=\linewidth
- \@tempcnta#1\relax
+ \ifinner\else\par\removelastparskip\vspace{\aboveanswersSkip}\fi
+ \eq@tmpdima=\linewidth
+ \@tempcnta#1\relax
% n-1
- \advance\@tempcnta-1\relax
+ \advance\@tempcnta\m@ne
% 2(n-1)
- \multiply\@tempcnta by2
- \@tempdima\qz@tabsep\relax
+ \multiply\@tempcnta\tw@
+ \@tempdima\qz@tabsep\relax
% 2*(n-1)*\qz@tabsep
- \multiply\@tempdima\@tempcnta
+ \multiply\@tempdima\@tempcnta
% \linewidth-(n-1)*\qz@tabsep
- \advance\eq@tmpdima-\@tempdima
+ \advance\eq@tmpdima-\@tempdima
% (\linewidth-(n-1)*\qz@tabsep)/n
- \divide\eq@tmpdima by#1
-% \begin{macrocode}
- \tabcolsep\qz@tabsep\relax
- \def\Ans{\Ans@tabular}%
- \ifx\aeb@answerType\eq@r
- \let\endanswers\endanswers@q@tabular\else
- \let\endmanswers\endanswers@q@tabular\fi
- \noindent\expandafter
- \tabular\qz@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}%
+ \divide\eq@tmpdima by#1
+ \tabcolsep\qz@tabsep\relax
+ \def\Ans{\Ans@tabular}%
+ \ifx\aeb@answerType\eq@r
+ \let\endanswers\endanswers@q@tabular\else
+ \let\endmanswers\endanswers@q@tabular\fi
+ \noindent\expandafter
+ \tabular\qz@TabPos{@{}*{#1}{p{\eq@tmpdima}}@{}}%
}
% \end{macrocode}
% \begin{macro}{\endanswers}
% Again, we put \verb+\let\endanswers=\endanswers@q+.
% \begin{macrocode}
-\def\endanswers@q@tabular
-{%
- \endtabular\setcounter{quizno}{0}%
- \eq@answersEndHook
- \setdefault@Ans
- \ifx\aeb@answerType\aeb@answerType@r
+\def\endanswers@q@tabular{%
+ \endtabular\setcounter{quizno}{0}%
+ \eq@answersEndHook
+ \setdefault@Ans
+ \ifx\aeb@answerType\aeb@answerType@r
% \end{macrocode}
% If this is a MC question, we record the author's correct answer
% \begin{macrocode}
- \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
+ \eq@recordCorrAns{\eq@ansChoiceArray}\ifwithinMCFI
% \end{macrocode}
% If within the MCFI command pair, we record the author's fill-in as well.
% \begin{macrocode}
- \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
+ \eq@recordCorrAns{\s@veCorrAnsMCFI}\fi\else
% \end{macrocode}
% If this is a MS question, we record the author's correct answer as an array
% \begin{macrocode}
- \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
- \global\let\eqlimselTo\@empty
+ \eq@recordCorrAns{[\eq@ansChoiceArray]}\fi
+ \global\let\eqlimselTo\@empty
}
% \end{macrocode}
% \end{macro}
@@ -6489,75 +6587,73 @@ if (isEndQuizPushed("@eqBaseName")){
% \begin{macrocode}
\let\qRadionActionsHook\@empty
\def\Ans@@l@Actions{\A{\JS{%
- this.getField("mc.\curr@quiz.\thequestionno").value
- = "\Ans@choice\alph{quizno}";\jsR
+ this.getField("mc.\curr@quiz.\thequestionno").value\eqSP
+ =\eqSP"\Ans@choice\alph{quizno}";\jsR
RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
RecordProblemType("\eqQT",\thequestionno);\jsR
ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
-\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
-"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
-\ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}%
+ \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+ "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}%
}
-\def\Ans@r@l@Defaults
-{%
- \BC{}\S{S}\W{1}\Ff{\FfNoToggleToOff}\F{\FPrint}
- \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+\def\Ans@r@l@Defaults{%
+ \BC{}\S{S}\W{1}\Ff{\FfNoToggleToOff}\F{\FPrint}
+ \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
}
\def\Ans@l{\leavevmode\if\eq@listType1\stepcounter{quizno}%
- \else\refstepcounter{quizno}\fi\PBS\raggedright
- \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
- \hangindent=\eq@tmplength\hangafter=1\relax
- \eq@tmpdima=\wd\eq@tmpbox
- \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
-% begin dps changes 12/19/03
-% \end{macrocode}
-% (2013/10/24) Imperative that radio button has no boundary line.
-% \begin{macrocode}
- \def\late@options{\BC{}}%
-\if\Ans@choice1\relax\eq@recordAnsChoice\fi
- \makebox[0pt][l]{\radio@@Button{}{mc.\curr@quiz.\thequestionno}%
- {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
- {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
- {\Ans@r@l@Defaults\every@RadioButton
- \every@qRadioButton\late@options}}%
-% end dps changes 12/19/03
- \set@@Link{}{}{}%
+ \else\refstepcounter{quizno}\fi\PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \hangindent=\eq@tmplength\hangafter=1\relax
+ \eq@tmpdima=\wd\eq@tmpbox
+ \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
+% \end{macrocode}
+% (2013/10/24) Imperative that radio button have no boundary line.
+% \begin{macrocode}
+ \def\late@options{\BC{}}%
+ \if\Ans@choice\eq@One\relax\eq@recordAnsChoice\fi
+ \makebox[0pt][l]{\radio@@Button{}{mc.\curr@quiz.\thequestionno}%
+ {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@r@l@Defaults\every@RadioButton
+ \every@qRadioButton\late@options}}%
+ \set@@Link{}{}{}%
{\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}%
{\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
{\set@LinkTextDefaults\Ans@@l@Actions\every@Link}%
- \ifnocorrections\else
- \if\Ans@choice1\relax
- \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
- \ifx\@qzsolndest\@empty
- \noexpand\Ff{\FfReadOnly}%
- \else % there is a solution
- \ifeq@noquizsolutions
- \noexpand\Ff{\FfReadOnly}%
- \else
- \noexpand\A{\noexpand\quiz@SolutionActionHook}%
- \fi
- \fi
- }%
- \else
- \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
- \fi
- \def\late@options{\BC{}}%
- \if\Ans@choice1\relax
- \ifx\@qzsolndest\@empty\else
- \ifeq@noquizsolutions\else
- \edef\late@options{\noexpand\BC{\solution@Color}}%
- \fi
- \fi
+ \ifnocorrections\else
+ \if\Ans@choice\eq@One
+ \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty
+ \noexpand\Ff{\FfReadOnly}%
+ \else % there is a solution
+ \ifeq@noquizsolutions\noexpand
+ \Ff{\FfReadOnly}%
+ \else\noexpand
+ \A{\noexpand\quiz@SolutionActionHook}%
+ \fi
+ \fi
+ }%
+ \else
+ \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
+ \fi
+ \def\late@options{\BC{}}%
+ \if\Ans@choice\eq@One
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
+ \fi
\fi
- \makebox[0pt][r]{\check@@Box{}%
- {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
- {\eq@tmpdima}{0pt}{Yes}{}% \@tempdimb
- {\eq@setWidgetProps\eq@l@check@driver}%
- {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
- \every@qRadioButton\late@options}}%
\fi
- \Ans@proofing{\eq@tmpdima}%
-\eq@hspanner\ignorespaces}
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{0pt}{Yes}{}% \@tempdimb
+ {\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
+ \every@qRadioButton\late@options}}%
+ \fi
+ \Ans@proofing{\eq@tmpdima}\eq@hspanner
+ \ignorespaces
+}
% \end{macrocode}
% \end{macro}
% Now for the code to support the \texttt{manswers} environment for link style.
@@ -6566,74 +6662,75 @@ if (isEndQuizPushed("@eqBaseName")){
% a checkbox, on top of that a link (that the user interacts with) and on top another check box.
% \begin{macrocode}
\def\Ans@ck@@l@Actions{\A{\JS{%
- var ckfName="mck.\curr@quiz.\thequestionno.\arabic{quizno}";\jsR
- var ckf = this.getField(ckfName);\jsR
- ckf.checkThisBox(0,!ckf.isBoxChecked(0));\jsR
- var _bOK=true;\jsR
-\ifx\eqlimselTo\@empty\else _bOK = LimitSelection(\eqlimselTo,%
-"mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
-if (_bOK) {\jsR\jsT
- var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
-\thequestionno,\arabic{quizno},"\curr@quiz",\eqPTs,\eq@pPTs);\jsR\jsT
- RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
- ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
-\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
-"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
-\ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
-}
- }}
-}
-\def\Ans@ck@l@Defaults
-{%
- \BC{}\S{S}\W{1}\H{N}\Ff{\FfNoToggleToOff}
- \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+ var\eqSP ckfName="mck.\curr@quiz.\thequestionno.\arabic{quizno}";\jsR
+ var\eqSP ckf = this.getField(ckfName);\jsR
+ ckf.checkThisBox(0,!ckf.isBoxChecked(0));\jsR
+ var\eqSP _bOK=true;\jsR
+\ifx\eqlimselTo\@empty\else
+ _bOK=LimitSelection(\eqlimselTo,%
+ "mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR
+\fi
+ if(_bOK)\eqSP{\jsR\jsT
+ var\eqSP aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
+ \thequestionno,\arabic{quizno},"\curr@quiz",%
+ \eqPTs,\eq@pPTs);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
+ \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+ "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
+ }}}%
}
-\def\Ans@ck@l{%
- \leavevmode\if\eq@listType1\stepcounter{quizno}%
- \else\refstepcounter{quizno}\fi
- \if\Ans@choice1\eq@recordAnsChoice\fi\PBS\raggedright
- \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
- \hangindent=\eq@tmplength\hangafter=1\relax
- \eq@tmpdima=\wd\eq@tmpbox
- \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
-% begin dps changes 12/19/03
- \makebox[0pt][l]{%
- \check@@Box{}{mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
- {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
- {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
- {\Ans@ck@l@Defaults\every@RadioButton
- \every@qckCheckbox}}%
-% end dps changes 12/19/03
- \set@@Link{}{}{}%
+\def\Ans@ck@l@Defaults{%
+ \BC{}\S{S}\W{1}\H{N}\Ff{\FfNoToggleToOff}
+ \textSize{12}\textColor{0 g}\Ff{\FfReadOnly}
+}
+\def\Ans@ck@l{\leavevmode
+ \if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \if\Ans@choice\eq@One\eq@recordAnsChoice\fi
+ \PBS\raggedright
+ \settowidth{\eq@tmplength}{\eq@lw@l}\sbox{\eq@tmpbox}{\eq@l@l}%
+ \hangindent\eq@tmplength\hangafter\@ne
+ \eq@tmpdima\wd\eq@tmpbox
+ \def\link@@Content{(\hfil\linkContentFormat\hfil)}%
+ \makebox[0pt][l]{%
+ \check@@Box{}{mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@ck@l@Defaults\every@RadioButton
+ \every@qckCheckbox}}%
+ \set@@Link{}{}{}%
{\makebox[\eq@tmpdima]{\color{\@linkcolor}\link@@Content}}%
{\eq@protect\A}{\eq@setWidgetProps\setLink@driver}%
{\set@LinkTextDefaults\Ans@ck@@l@Actions\every@Link}%
- \ifnocorrections\else
- \if\Ans@choice1\relax
- \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
- \ifx\@qzsolndest\@empty\noexpand\BC{}%
- \noexpand\Ff{\FfReadOnly}%
- \else % there is a solution
- \ifeq@noquizsolutions
- \noexpand\BC{}\noexpand\Ff{\FfReadOnly}%
- \else
- \noexpand\BC{\solution@Color}%
- \noexpand\A{\noexpand\quiz@SolutionActionHook}%
- \fi
- \fi
- }%
- \else
- \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
+ \ifnocorrections\else
+ \if\Ans@choice\eq@One
+ \edef\Ans@c@l@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\BC{}%
+ \noexpand\Ff{\FfReadOnly}%
+ \else % there is a solution
+ \ifeq@noquizsolutions
+ \noexpand\BC{}\noexpand\Ff{\FfReadOnly}%
+ \else
+ \noexpand\BC{\solution@Color}%
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}%
+ \fi
\fi
- \makebox[0pt][r]{\check@@Box{}%
- {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
- {\eq@tmpdima}{0pt}{Yes}{}%
- {\eq@setWidgetProps\eq@l@check@driver}%
- {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
- \every@qRadioButton}}%
+ }%
+ \else
+ \def\Ans@c@l@Choice{\Ff{\FfReadOnly}\BC{}}%
\fi
- \Ans@proofing{\eq@tmpdima}%
-\eq@hspanner\ignorespaces}
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\eq@tmpdima}{0pt}{Yes}{}%
+ {\eq@setWidgetProps\eq@l@check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@l@Choice\every@RadioButton
+ \every@qRadioButton}}%
+ \fi
+ \Ans@proofing{\eq@tmpdima}\eq@hspanner
+ \ignorespaces
+}
% \end{macrocode}
% \end{macro}
% \subsubsection{Form Style}
@@ -6642,32 +6739,35 @@ if (_bOK) {\jsR\jsT
% here, then goes to |\Ans@f@driver| the rest of the code that depends on the
% driver.
% \begin{macrocode}
-\def\Ans@f{\leavevmode\if\eq@listType1\stepcounter{quizno}%
- \else\refstepcounter{quizno}\fi
- \PBS\raggedright\Ans@@f}
-\def\Ans@r@f@Defaults
-{%
- \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
- \F{\FPrint}\textSize{12}\textColor{0 g}
+\def\Ans@f{\leavevmode
+ \if\eq@listType1\stepcounter{quizno}\else
+ \refstepcounter{quizno}\fi
+ \PBS\raggedright\Ans@@f}
+\def\Ans@r@f@Defaults{%
+ \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
+ \F{\FPrint}\textSize{12}\textColor{0 g}
}
+% \end{macrocode}
% Action of the radio button field
+% \begin{macrocode}
\def\Ans@r@f@Actions{\A{\JS{%
- RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
- RecordProblemType("\eqQT",\thequestionno);\jsR
- ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
- \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
- "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
- \ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}
+ RecordPointValue([0,\eqPTs,\eq@pPTs],\thequestionno);\jsR
+ RecordProblemType("\eqQT",\thequestionno);\jsR
+ ProcessQuestion(\Ans@choice,"\alph{quizno}",\thequestionno,%
+ \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+ "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else,1\fi\fi\fi);\qRadionActionsHook}}
}
+% \end{macrocode}
% Action of the check box underlying the radio button field
+% \begin{macrocode}
\def\quiz@SolutionActionHook{%
- /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
- ["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
+ /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
+ ["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
}
-\def\Ans@c@f@Defaults
-{%
- \BC{0 0 0}\S{S}\W{1}\F{\FHidden}\textSize{12}
- \textColor{0 g}\symbolchoice{circle}
+\def\Ans@c@f@Defaults{%
+ \BC{0 0 0}\S{S}\W{1}\F{\FHidden}\textSize{12}
+ \textColor{0 g}\symbolchoice{circle}
}
% \end{macrocode}
% \changes{v6.05d}{2007/04/14}
@@ -6687,64 +6787,60 @@ if (_bOK) {\jsR\jsT
% \begin{macrocode}
\providecommand\graylettersColor{gray}
\def\insertGrayLetters{\ifaebshowgrayletters
- \rlap{\makebox[\RadioFieldSize]%
- {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
+ \rlap{\makebox[\RadioFieldSize]%
+ {\textcolor{\graylettersColor}{\Alph{quizno}}}}\else\relax\fi}
%</package|eqexam>
%<*package>
-\def\Ans@@f
-{%
- \settowidth{\eq@tmplength}{\eq@lw@f}%
- \hangindent=\eq@tmplength\hangafter=1
- \bottomOfAnsfStack\insertGrayLetters
-% dps add
- \edef\rbf@Opts{\ifaeb@usecircles\else
- \noexpand\symbolchoice{\qz@chksymb}\fi
- \noexpand\textColor{\qz@chksymbcol}}%
- \if\Ans@choice1\eq@recordAnsChoice\fi
- \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
- {mc.\curr@quiz.\thequestionno}%
- {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
- {\eq@protect\A}{\eq@setWidgetProps\eq@Radio@driver}%
- {\Ans@r@f@Defaults\Ans@r@f@Actions\every@RadioButton
- \every@qRadioButton\insert@circlesymbol}}%
- \let\late@options\@empty
- \ifnocorrections\else
- \if\Ans@choice1\relax
- \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
- \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}%
- \else
- \ifeq@noquizsolutions
- \noexpand\Ff{\FfReadOnly}%
- \else
- \noexpand\A{\noexpand\quiz@SolutionActionHook}%
- \fi
- \fi
- }%
- \else
- \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+\def\Ans@@f{%
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \hangindent=\eq@tmplength\hangafter=1
+ \bottomOfAnsfStack\insertGrayLetters
+ \edef\rbf@Opts{\ifaeb@usecircles\else
+ \noexpand\symbolchoice{\qz@chksymb}\fi
+ \noexpand\textColor{\qz@chksymbcol}}%
+ \if\Ans@choice\eq@One\eq@recordAnsChoice\fi
+ \mbox{\expandafter\radio@@Button\expandafter{\rbf@Opts}%
+ {mc.\curr@quiz.\thequestionno}%
+ {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@Radio@driver}%
+ {\Ans@r@f@Defaults\Ans@r@f@Actions\every@RadioButton
+ \every@qRadioButton\insert@circlesymbol}}%
+ \let\late@options\@empty
+ \ifnocorrections\else
+ \if\Ans@choice\eq@One
+ \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}\else
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}\else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}\fi
\fi
+ }%
+ \else
+ \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+ \fi
% \end{macrocode}
% \changes{v6.7h}{2013/08/19}{When the \cs{useMCCircles} is used, the boundary
% color is transparent. We try a fix for this to show the colored solution
% boundary. The fix uses the \cs{late@options} commands.}
% \begin{macrocode}
- \ifaeb@usecircles\def\late@options{\BC{}}\fi
- \if\Ans@choice1\relax
- \ifx\@qzsolndest\@empty\else
- \ifeq@noquizsolutions\else
- \edef\late@options{\noexpand\BC{\solution@Color}}%
- \fi
- \fi
+ \ifaeb@usecircles\def\late@options{\BC{}}\fi
+ \if\Ans@choice\eq@One
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}%
\fi
- \makebox[0pt][r]{\check@@Box{}%
- {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
- {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
- {\eq@setWidgetProps\eq@Check@driver}%
- {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
- \every@qCheckBox\late@options}}%
+ \fi
\fi
- \Ans@proofing{\RadioFieldSize}%
-\eq@hspanner\ignorespaces}
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@Check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
+ \every@qCheckBox\late@options}}%
+ \fi
+ \Ans@proofing{\RadioFieldSize}\eq@hspanner
+ \ignorespaces
+}
% \end{macrocode}
% \DescribeMacro{\limitSelectionTo} limits the selection to the number specified
% by its argument for multiple selection questions.
@@ -6755,108 +6851,108 @@ if (_bOK) {\jsR\jsT
% \begin{macro}{\Ans@ck@f}
% The support for multiple selection answers within the \texttt{manswers} environment.
% \begin{macrocode}
-\def\Ans@ck@f{\leavevmode\if\eq@listType1\stepcounter{quizno}%
- \else\refstepcounter{quizno}\fi
- \if\Ans@choice1\eq@recordAnsChoice\fi
- \PBS\raggedright\Ans@@ck@f}
-\def\Ans@ck@f@Defaults
-{%
- \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
- \textSize{12}\textColor{0 g}
+\def\Ans@ck@f{\leavevmode
+ \if\eq@listType1\stepcounter{quizno}%
+ \else\refstepcounter{quizno}\fi
+ \if\Ans@choice\eq@One\eq@recordAnsChoice\fi
+ \PBS\raggedright\Ans@@ck@f}
+\def\Ans@ck@f@Defaults{%
+ \BC{0 0 0}\S{S}\W{1}\Ff{\FfNoToggleToOff}
+ \textSize{12}\textColor{0 g}
}
+% \end{macrocode}
% Action of the radio button field
-\def\Ans@ck@f@Actions
-{%
- \A{\JS{%
+% \begin{macrocode}
+\def\Ans@ck@f@Actions{%
+ \A{\JS{%
% \end{macrocode}
% Here is limit the number of selections. If \cs{eqlimselTo} is nonempty,
% we call \texttt{LimitSelection()} to count the number of checks in this
% current field. If too many, we uncheck the current effort and inform the
% user.
% \begin{macrocode}
- var _bOK=true;\jsR
-\ifx\eqlimselTo\@empty\else _bOK = LimitSelection(\eqlimselTo,%
-"mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
+ var\eqSP_bOK=true;\jsR
+\ifx\eqlimselTo\@empty\else
+ _bOK\eqSP=\eqSP LimitSelection(\eqlimselTo,%
+ "mck.\curr@quiz.\thequestionno","\arabic{quizno}");\jsR\fi
% \end{macrocode}
% As a result of the previous changes, we make this a condition:
% if the JavaScript function \texttt{LimitSelection()} returns false, we do not execute. The default
% value is \texttt{\_bOK=true}.
% \begin{macrocode}
-if (_bOK) {\jsR\jsT
- var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
-\thequestionno,\arabic{quizno},"\curr@quiz",\eqPTs,\eq@pPTs);\jsR\jsT
- RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
- ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
-\arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
-"\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
-\ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
-}}}%
+ if(_bOK)\eqSP{\jsR\jsT
+ var aPMSretn=ProcessMultiSelection(\Ans@choice,"\alph{quizno}",%
+ \thequestionno,\arabic{quizno},"\curr@quiz",%
+ \eqPTs,\eq@pPTs);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR\jsT
+ ProcessQuestion(aPMSretn[0],aPMSretn[1],\thequestionno,%
+ \arabic{quizno},"\curr@quiz",0,\ifnocorrections0\else1\fi,%
+ "\bqlabelISO"\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions\else,1\fi\fi\fi);\jsR
+ }}}%
}
+% \end{macrocode}
% Action of the check box underlying the radio button field
-\def\quiz@SolutionActionHook{%
- /S/GoTo/D(\@qzsolndest)/Next<<\JS{this.resetForm(%
-["mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
+% \begin{macrocode}
+\def\quiz@SolutionActionHook{/S/GoTo/D(\@qzsolndest)%
+ /Next<<\JS{this.resetForm([%
+ "mcq.\curr@quiz.\thequestionno.\arabic{quizno}"]);}>>
}
% \end{macrocode}
% \cs{Ans@@ck@f} is the definition of the \cs{Ans} command within the
% \texttt{manswers} environment.
% \begin{macrocode}
-\def\Ans@@ck@f
-{%
- \settowidth{\eq@tmplength}{\eq@lw@f}%
- \hangindent=\eq@tmplength\hangafter=1
- \bottomOfAnsfStack\insertGrayLetters
+\def\Ans@@ck@f{%
+ \settowidth{\eq@tmplength}{\eq@lw@f}%
+ \hangindent\eq@tmplength\hangafter\@ne
+ \bottomOfAnsfStack\insertGrayLetters
% \end{macrocode}
% The bottom most checkbox
% \begin{macrocode}
- \bottomOfAnsfStack\insertGrayLetters
-% dps add
-\def\cbf@Opts{\symbolchoice{\qz@chksymb}%
+ \bottomOfAnsfStack\insertGrayLetters
+ \def\cbf@Opts{\symbolchoice{\qz@chksymb}%
\textColor{\qz@chksymbcol}}%
- \mbox{\expandafter\check@@Box\expandafter{\cbf@Opts}%
- {mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
- {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
- {\eq@protect\A}{\eq@setWidgetProps\eq@Check@driver}%
- {\Ans@ck@f@Defaults\Ans@ck@f@Actions\every@RadioButton
- \every@qckCheckbox}}%
- \ifnocorrections\else
- \if\Ans@choice1\relax
- \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
- \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}%
- \else
- \ifeq@noquizsolutions
- \noexpand\Ff{\FfReadOnly}%
- \else
- \noexpand\A{\noexpand\quiz@SolutionActionHook}%
- \fi
- \fi
- }%
- \else
- \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
- \fi
- \let\late@options\@empty
- \if\Ans@choice1\relax
- \ifx\@qzsolndest\@empty\else
- \ifeq@noquizsolutions\else
- \edef\late@options{\noexpand\BC{\solution@Color}}%
- \fi
- \fi
+ \mbox{\expandafter\check@@Box\expandafter{\cbf@Opts}%
+ {mck.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{\Ans@choice\alph{quizno}}%
+ {\eq@protect\A}{\eq@setWidgetProps\eq@Check@driver}%
+ {\Ans@ck@f@Defaults\Ans@ck@f@Actions\every@RadioButton
+ \every@qckCheckbox}}%
+ \ifnocorrections\else
+ \if\Ans@choice\eq@One
+ \edef\Ans@c@f@Choice{\noexpand\DV{Yes}%
+ \ifx\@qzsolndest\@empty\noexpand\Ff{\FfReadOnly}\else
+ \ifeq@noquizsolutions
+ \noexpand\Ff{\FfReadOnly}\else
+ \noexpand\A{\noexpand\quiz@SolutionActionHook}\fi
\fi
+ }%
+ \else
+ \def\Ans@c@f@Choice{\Ff{\FfReadOnly}}%
+ \fi
+ \let\late@options\@empty
+ \if\Ans@choice\eq@One
+ \ifx\@qzsolndest\@empty\else
+ \ifeq@noquizsolutions\else
+ \edef\late@options{\noexpand\BC{\solution@Color}}\fi
+ \fi
+ \fi
% \end{macrocode}
% The top most checkbox
% \begin{macrocode}
- \makebox[0pt][r]{\check@@Box{}%
- {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
- {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
- {\eq@setWidgetProps\eq@Check@driver}%
- {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
+ \makebox[0pt][r]{\check@@Box{}%
+ {mcq.\curr@quiz.\thequestionno.\arabic{quizno}}%
+ {\RadioFieldSize}{\RadioFieldSize}{Yes}{}%
+ {\eq@setWidgetProps\eq@Check@driver}%
+ {\Ans@c@f@Defaults\Ans@c@f@Choice\every@CheckBox
% \end{macrocode}
% (2012/12/22) Replace \cs{every@qRadioButton} with \cs{every@qCheckBox}.
% \begin{macrocode}
- \every@qCheckBox\late@options}}%
- \fi
- \Ans@proofing{\RadioFieldSize}%
-\eq@hspanner\ignorespaces}
+ \every@qCheckBox\late@options}}%
+ \fi
+ \Ans@proofing{\RadioFieldSize}\eq@hspanner
+ \ignorespaces
+}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
@@ -6914,9 +7010,9 @@ if (_bOK) {\jsR\jsT
% \begin{macrocode}
\define@key{bchoice}{nCols}{\def\bChoiceNumCols{#1}}
\@for\eqi:=1,2,3,4,5,6,7,8,9,10 \do{\edef\temp@expand@def{%
- \noexpand\define@key{bchoice}{\eqi}[\eqi]{%
- \noexpand\def\noexpand\bChoiceNumCols{\eqi}}%
- }\temp@expand@def
+ \noexpand\define@key{bchoice}{\eqi}[\eqi]{%
+ \noexpand\def\noexpand\bChoiceNumCols{\eqi}}%
+ }\temp@expand@def
}
% \end{macrocode}
% The number of columns specified in the answers environment is saved as the value
@@ -6927,8 +7023,8 @@ if (_bOK) {\jsR\jsT
% This is the definition of the random key\IndexKey{random}, a boolean.
% \begin{macrocode}
\define@key{bchoice}{random}[true]{%
- \csname if#1\endcsname\eq@randomizeChoicestrue
- \else\eq@randomizeChoicesfalse\fi
+ \csname if#1\endcsname\eq@randomizeChoicestrue
+ \else\eq@randomizeChoicesfalse\fi
}
% \end{macrocode}
% \changes{v6.3x}{2011/04/05}{%
@@ -6949,20 +7045,19 @@ if (_bOK) {\jsR\jsT
% \end{macrocode}
% If \cs{numCols} is $1$, we use a list environment, otherwise, a tabular is used.
% \begin{macrocode}
-\def\@ansChoices[#1]%
-{%
+\def\@ansChoices[#1]{%
% \end{macrocode}
% We initialize some variables that the new label option uses.
% \begin{macrocode}
- \global\let\@tempholdSaveAns\@empty %4/5
- \global\let\@tempholdSaveChoice\@empty %4/5
- \global\let\bChoiceLabel\@empty %4/5
- \setkeys{bchoice}{#1}%
- \global\eq@tabColCnt=0
- \ifnum\aeb@numCols=1 % list mode
- \def\eq@next{\@layoutListAns}\else % tabular mode
- \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi
- \eq@next
+ \global\let\@tempholdSaveAns\@empty %4/5
+ \global\let\@tempholdSaveChoice\@empty %4/5
+ \global\let\bChoiceLabel\@empty %4/5
+ \setkeys{bchoice}{#1}%
+ \global\eq@tabColCnt=\z@
+ \ifnum\aeb@numCols=\@ne % list mode
+ \def\eq@next{\@layoutListAns}\else % tabular mode
+ \def\eq@next{\@layoutTabularAns{\bChoiceNumCols}}\fi
+ \eq@next
}
\let\eChoices\relax
% \end{macrocode}
@@ -6973,7 +7068,7 @@ if (_bOK) {\jsR\jsT
% should be \cs{eChoices}.)
% \begin{macrocode}
\def\@layoutListAns{\@ifnextchar\Ans{\@getListAns}%
- {\@lookforendansChoices{\@layoutListAns}}%
+ {\@lookforendansChoices{\@layoutListAns}}%
}
% \end{macrocode}
% \changes{v6.3x}{2011/04/05}{%
@@ -6989,11 +7084,11 @@ if (_bOK) {\jsR\jsT
% to \cs{@@@SaveAns}; otherwise, it gobbles all leftovers.
% \begin{macrocode}
\newcommand{\eq@saveAns}[2][]{%
- \let\eq@next\@@@SaveAnsGobbleAns
- \ifx\bChoiceLabel\@empty\else
- \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}%
- \if\eq@savedAnsZO1 \let\eq@next\@@@SaveAns\fi
- \fi\eq@next
+ \let\eq@next\@@@SaveAnsGobbleAns
+ \ifx\bChoiceLabel\@empty\else
+ \def\eq@savedAnsOpt{#1}\def\eq@savedAnsZO{#2}%
+ \if\eq@savedAnsZO1\let\eq@next\@@@SaveAns\fi
+ \fi\eq@next
}
% \end{macrocode}
% \cs{@@@SaveAns} collects the answer to the problem, and placed
@@ -7001,21 +7096,21 @@ if (_bOK) {\jsR\jsT
% the alternative letter as well in \cs{@tempholdSaveChoice}.
% \begin{macrocode}
\long\def\@@@SaveAns#1\eAns{% 4/5
- \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}%
+ \g@addto@macro\@tempholdSaveAns{\\{\ignorespaces#1}}%
% \end{macrocode}
% This code is expanded before the \cs{Ans} command is, so we'll simulate
% incrementing the \texttt{quizno} counter, \dots
% \begin{macrocode}
- \addtocounter{quizno}{1}%
- \edef\temp@expand{\noexpand\g@addto@macro\noexpand
+ \addtocounter{quizno}{1}%
+ \edef\temp@expand{\noexpand\g@addto@macro\noexpand
\@tempholdSaveChoice{%
- \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else
- \ifaebshowgrayletters\Alph{quizno}\else
- \linkContentFormat\fi\fi}}}\temp@expand
+ \noexpand\\{\ifx\sqstar\@empty\aebChoiceAltFmt\else
+ \ifaebshowgrayletters\Alph{quizno}\else
+ \linkContentFormat\fi\fi}}}\temp@expand
% \end{macrocode}
% and decrement when we are finished adding to the token list.
% \begin{macrocode}
- \addtocounter{quizno}{-1}%
+ \addtocounter{quizno}{-1}%
}
% \end{macrocode}
% \cs{eq@displayAns} is \cs{let} to \verb!\\!. Definition and name may change.
@@ -7035,29 +7130,30 @@ if (_bOK) {\jsR\jsT
\def\oxfordCommaOn{\oxfordcommatrue}
\def\oxfordCommaOff{\oxfordcommafalse}
\def\eq@insertComma{%
- \ifx\eq@comma\@empty
- \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
- \def\eq@comma{,}\fi
- \else\ifx\eq@insertAnd\@empty\eq@comma\space
- \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}%
- \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space
- \fi
+ \ifx\eq@comma\@empty
+ \ifnum\@nameuse{NumAns\eq@namearg}>\tw@
+ \def\eq@comma{,}\fi
+ \else\ifx\eq@insertAnd\@empty\eq@comma\space
+ \else\ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}%
+ \ifoxfordcomma\eq@comma\fi\else\eq@comma\fi\space
\fi
+ \fi
}
\newcommand\eqAnd{and}\def\eq@insertAnd{%
- \ifnum\@nameuse{NumAns\eq@namearg}<2\relax\else
- \ifnum\@nameuse{NumAns\eq@namearg}>2\relax
- \else\leavevmode\space\fi\eqAnd\space\fi}
-\long\def\eq@displayAns#1{\advance\@tempcnta1\relax
- \eq@insertComma
- \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
+ \ifnum\@nameuse{NumAns\eq@namearg}<\tw@\else
+ \ifnum\@nameuse{NumAns\eq@namearg}>\tw@\relax
+ \else\leavevmode\space\fi\eqAnd\space\fi
+}
+\long\def\eq@displayAns#1{\advance\@tempcnta\@ne
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
\def\eq@displayAlts#1{\advance\@tempcnta1
- \eq@insertComma
- \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi
- \savedAltFmt{#1}}
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi
+ \savedAltFmt{#1}}
\def\eq@displayAltsAns#1{\advance\@tempcnta1\relax
- \eq@insertComma
- \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
+ \eq@insertComma
+ \ifnum\@tempcnta=\@nameuse{NumAns\eq@namearg}\eq@insertAnd\fi#1}
% \end{macrocode}
% \begin{macro}{\useSavedAns}
% \begin{macro}{\useSavedAlts}
@@ -7073,35 +7169,35 @@ if (_bOK) {\jsR\jsT
% \begin{macrocode}
\newcommand{\savedAltFmt}[1]{(#1)}
\newcommand{\useSavedAns}{\bgroup\@ifstar{\useSavedAns@i}
- {\let\eq@insertAnd\@empty\useSavedAns@i}}
+ {\let\eq@insertAnd\@empty\useSavedAns@i}}
\newcommand{\useSavedAns@i}[2][]{\@tempcnta=0\relax
- \def\eq@namearg{#2}\let\label\@gobble
- \def\eq@argi{#1}\ifx\eq@argi\@empty
- \let\eq@comma\@empty
- \let\\\eq@displayAns\@nameuse{SavedAns#2}\else
- \@nameuse{SavedAns#2-Idx#1}\fi
- \egroup
+ \def\eq@namearg{#2}\let\label\@gobble
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAns\@nameuse{SavedAns#2}\else
+ \@nameuse{SavedAns#2-Idx#1}\fi
+ \egroup
}
\newcommand{\useSavedAlts}{\bgroup\@ifstar{\useSavedAlts@i}
- {\let\eq@insertAnd\@empty\useSavedAlts@i}}
+ {\let\eq@insertAnd\@empty\useSavedAlts@i}}
\newcommand{\useSavedAlts@i}[2][]{\@tempcnta=0\relax
- \def\eq@namearg{#2}\@nameuse{caseFor#2}%
- \def\eq@argi{#1}\ifx\eq@argi\@empty
- \let\eq@comma\@empty
- \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else
- \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi
- \egroup
+ \def\eq@namearg{#2}\@nameuse{caseFor#2}%
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAlts\@nameuse{SavedAlts#2}\else
+ \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}\fi
+ \egroup
}
\newcommand{\useSavedAltsAns}{\bgroup\@ifstar{\useSavedAltsAns@i}
- {\let\eq@insertAnd\@empty\useSavedAltsAns@i}}
+ {\let\eq@insertAnd\@empty\useSavedAltsAns@i}}
\newcommand{\useSavedAltsAns@i}[2][]{\@tempcnta=0\relax
- \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble
- \def\eq@argi{#1}\ifx\eq@argi\@empty
- \let\eq@comma\@empty
- \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else
- \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}
- \@nameuse{SavedAns#2-Idx#1}\fi
- \egroup
+ \def\eq@namearg{#2}\@nameuse{caseFor#2}\let\label\@gobble
+ \def\eq@argi{#1}\ifx\eq@argi\@empty
+ \let\eq@comma\@empty
+ \let\\\eq@displayAltsAns\@nameuse{SavedAltsAns#2}\else
+ \savedAltFmt{\@nameuse{SavedAlts#2-Idx#1}}
+ \@nameuse{SavedAns#2-Idx#1}\fi
+ \egroup
}
\newcommand{\useSavedNumAns}[1]{\@nameuse{NumAns#1}}
% \end{macrocode}
@@ -7110,21 +7206,21 @@ if (_bOK) {\jsR\jsT
% \end{macro}
% \end{macro}
% \begin{macrocode}
-\long\def\@@@SaveAnsGobbleAns#1\eAns{} % 4/5
+\long\def\@@@SaveAnsGobbleAns#1\eAns{}
% \end{macrocode}
% This command gets, and sets the list of alternatives
% \begin{macrocode}
-\long\def\@getListAns\Ans#1\eAns{%\@@par %start new paragraph
+\long\def\@getListAns\Ans#1\eAns{%\@@par
% \end{macrocode}
% We record the list as we process each item.
% \begin{macrocode}
- \eq@saveAns#1\eAns % 4/5
- \Ans#1\vspace{\@rowskip}%
- \@layoutListAns
+ \eq@saveAns#1\eAns
+ \Ans#1\vspace{\@rowskip}%
+ \@layoutListAns
}
\long\def\@lookforendansChoices#1{%
- \@ifnextchar\eChoices{\rowsep{\rowsep@default}%
- \expandafter\@findendans\@gobble}{\expandafter#1\@gobble}%
+ \@ifnextchar\eChoices{\rowsep{\rowsep@default}%
+ \expandafter\@findendans\@gobble}{\expandafter#1\@gobble}%
}
% \end{macrocode}
% The argument is the number of columns to typeset, this number
@@ -7132,10 +7228,10 @@ if (_bOK) {\jsR\jsT
% environment.
% \begin{macrocode}
\def\@layoutTabularAns#1{%
- \let\eq@tabSep\@empty
- \xdef\numShortCols{#1}%
- \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi
- \@@layoutTabularAns
+ \let\eq@tabSep\@empty
+ \xdef\numShortCols{#1}%
+ \ifnum#1>\aeb@numCols \xdef\numShortCols{\aeb@numCols}\fi
+ \@@layoutTabularAns
}
% \end{macrocode}
% If the next token is \cs{Ans} we grab its all stuff between
@@ -7145,98 +7241,99 @@ if (_bOK) {\jsR\jsT
% should be \cs{eChoices}.)
% \begin{macrocode}
\def\@@layoutTabularAns{%
- \@ifnextchar\Ans{\@getTabAns}%
- {\@lookforendansChoices{\@@layoutTabularAns}}%
+ \@ifnextchar\Ans{\@getTabAns}%
+ {\@lookforendansChoices{\@@layoutTabularAns}}%
}
\def\rowsep#1{\gdef\@rowsep{[#1]}\gdef\@rowskip{#1}}%
\rowsep{\rowsep@default}
\def\rowsepDefault#1{\def\rowsep@default{#1}}
\def\rowsep@default{0pt}
\long\def\@getTabAns\Ans#1\eAns{%
- \eq@saveAns#1\eAns
- \global\advance\eq@tabColCnt1
- \let\@save@tabSep=\eq@tabSep
- \ifnum\eq@tabColCnt=\numShortCols
- \global\eq@tabColCnt=0
- \xdef\eq@tabSep{\noexpand\\\noalign{\kern\@rowskip\relax}}%
- \else
- \gdef\eq@tabSep{&}%
- \fi
- \@ifnextchar\eChoices{\@save@tabSep\Ans#1\rowsep{\rowsep@default}
- \expandafter\@findendans\@gobble}%
- {\@save@tabSep\Ans#1\@@layoutTabularAns}%
+ \eq@saveAns#1\eAns
+ \global\advance\eq@tabColCnt1
+ \let\@save@tabSep=\eq@tabSep
+ \ifnum\eq@tabColCnt=\numShortCols
+ \global\eq@tabColCnt=0
+ \xdef\eq@tabSep{\noexpand\\\noalign{\kern\@rowskip\relax}}%
+ \else
+ \gdef\eq@tabSep{&}%
+ \fi
+ \@ifnextchar\eChoices{\@save@tabSep\Ans#1\rowsep{\rowsep@default}
+ \expandafter\@findendans\@gobble}%
+ {\@save@tabSep\Ans#1\@@layoutTabularAns}%
}
% \end{macrocode}
% This command, I think, is executed after we've found the \cs{eChoices}.
% \begin{macrocode}
-\def\@findendans{\@ifnextchar\end{% 4/5
+\def\@findendans{\@ifnextchar\end{%
% \end{macrocode}
% If there is a \cs{bChoiceLabel} we process the alternatives.
% \begin{macrocode}
- \ifx\bChoiceLabel\@empty\else
- \processLabeledAns\fi
- }{\expandafter\@findendans\@gobble}}%
+ \ifx\bChoiceLabel\@empty\else
+ \processLabeledAns\fi
+ }{\expandafter\@findendans\@gobble}}%
% \end{macrocode}
% The command that processes the alternatives.
% \changes{v6.7g}{2013/08/09}{Changed \texttt{\#1} to \cs{the}\cs{@temptokena} Fixing
% a nasty bug. Reported by Christopher C.}
% \begin{macrocode}
\def\defineEachAns#1{\advance\eqtmpcnta\@ne
- \@temptokena={#1}\csarg\xdef
- {SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}{\the\@temptokena}%
- \ifsolutionsonly\else
- {\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}%
- {\the\@temptokena}}}\fi
+ \@temptokena={#1}\csarg\xdef
+ {SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}{\the\@temptokena}%
+ \ifsolutionsonly\else
+ {\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAns\bChoiceLabel-Idx\the\eqtmpcnta}%
+ {\the\@temptokena}}}%
+ \fi
}
\def\defineEachChoice#1{\advance\eqtmpcnta\@ne
- \@temptokena={#1}\csarg\xdef
- {SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}%
- {\the\@temptokena}\ifsolutionsonly\else
- {\let\\\relax\eq@IWDefs{\string
- \csarg\string
- \gdef{SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}%
- {\the\@temptokena}}}\fi
+ \@temptokena={#1}\csarg\xdef
+ {SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}%
+ {\the\@temptokena}\ifsolutionsonly\else
+ {\let\\\relax\eq@IWDefs{\string
+ \csarg\string
+ \gdef{SavedAlts\bChoiceLabel-Idx\the\eqtmpcnta}%
+ {\the\@temptokena}}}\fi
}
\def\processLabeledAns{%
- \bgroup
- \let\label\@gobble
+ \bgroup
+ \let\label\@gobble
% \end{macrocode}
% \changes{v7.7c}{2015/10/08}{Added memory for the case}
% \begin{macrocode}
-\if\aeb@FLOverride\eq@l
- \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\else
- \ifaebshowgrayletters
+ \if\aeb@FLOverride\eq@l
+ \global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\else
+ \ifaebshowgrayletters
\global\@namedef{caseFor\bChoiceLabel}{\graylettersOn}\else
\global\@namedef{caseFor\bChoiceLabel}{\graylettersOff}\fi
-\fi
- \toks@=\expandafter{\@tempholdSaveAns}\csarg
- \xdef{SavedAns\bChoiceLabel}{\the\toks@}%
- \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi
- \eqtmpcnta\z@\let\\\defineEachAns\the\toks@
- \xdef\@currNCntAns{\the\eqtmpcnta}\csarg
- \xdef{NumAns\bChoiceLabel}{\@currNCntAns}%
- \ifsolutionsonly\else{\eq@IWDefs{\string
- \csarg\string\gdef{NumAns\bChoiceLabel}{\the\eqtmpcnta}}}\fi
- \toks@=\expandafter{\@tempholdSaveChoice}\csarg
- \xdef{SavedAlts\bChoiceLabel}{\the\toks@}%
- \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAlts\bChoiceLabel}{\the\toks@}}}\fi
- \eqtmpcnta\z@\relax\let\\\defineEachChoice\the\toks@
- \eqtmpcnta\@ne\toks@={}%{\ignorespaces\@gobble}%
- \loop
- \edef\temp@exp{\the\toks@\noexpand\\{%
- \noexpand\useSavedAlts[\the\eqtmpcnta]{\bChoiceLabel}
- \noexpand\useSavedAns[\the\eqtmpcnta]{\bChoiceLabel}}}%
- \toks@=\expandafter{\temp@exp}%
- \ifnum\eqtmpcnta<\@currNCntAns\relax
- \advance\eqtmpcnta\@ne
- \repeat
- \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}%
- \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
- \csarg\string\gdef{SavedAltsAns\bChoiceLabel}{\the\toks@}}}\fi
- \egroup
+ \fi
+ \toks@=\expandafter{\@tempholdSaveAns}\csarg
+ \xdef{SavedAns\bChoiceLabel}{\the\toks@}%
+ \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAns\bChoiceLabel}{\the\toks@}}}\fi
+ \eqtmpcnta\z@\let\\\defineEachAns\the\toks@
+ \xdef\@currNCntAns{\the\eqtmpcnta}\csarg
+ \xdef{NumAns\bChoiceLabel}{\@currNCntAns}%
+ \ifsolutionsonly\else{\eq@IWDefs{\string
+ \csarg\string\gdef{NumAns\bChoiceLabel}{\the\eqtmpcnta}}}\fi
+ \toks@=\expandafter{\@tempholdSaveChoice}\csarg
+ \xdef{SavedAlts\bChoiceLabel}{\the\toks@}%
+ \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAlts\bChoiceLabel}{\the\toks@}}}\fi
+ \eqtmpcnta\z@\relax\let\\\defineEachChoice\the\toks@
+ \eqtmpcnta\@ne\toks@={}%{\ignorespaces\@gobble}%
+ \loop
+ \edef\temp@exp{\the\toks@\noexpand\\{%
+ \noexpand\useSavedAlts[\the\eqtmpcnta]{\bChoiceLabel}
+ \noexpand\useSavedAns[\the\eqtmpcnta]{\bChoiceLabel}}}%
+ \toks@=\expandafter{\temp@exp}%
+ \ifnum\eqtmpcnta<\@currNCntAns\relax
+ \advance\eqtmpcnta\@ne
+ \repeat
+ \csarg\xdef{SavedAltsAns\bChoiceLabel}{\the\toks@}%
+ \ifsolutionsonly\else{\let\\\relax\eq@IWDefs{\string
+ \csarg\string\gdef{SavedAltsAns\bChoiceLabel}{\the\toks@}}}\fi
+ \egroup
}
% \end{macrocode}
% \end{macro}
@@ -7264,7 +7361,7 @@ if (_bOK) {\jsR\jsT
% We redefine \cs{nextrandom} from \texttt{random.tex} to save the initializing seed.
% \begin{macrocode}
\def\nextrandom{\begingroup
- \ifnum\randomi<\@ne % then initialize with time
+ \ifnum\randomi<\@ne % then initialize with time
\global\randomi\time
\global\multiply\randomi388 \global\advance\randomi\year
\global\multiply\randomi31 \global\advance\randomi\day
@@ -7276,16 +7373,16 @@ if (_bOK) {\jsR\jsT
% \changes{v6.7f}{2013/08/03}{Save the initial seed value to \cs{eqInitSeedValue}.}
% \begin{macrocode}
\xdef\InitSeedValue{\the\randomi}%
- \fi
- \count@ii\randomi
- \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836
- \count@\count@ii
- \multiply\count@ii 127773
- \global\advance\randomi-\count@ii % random mod 127773
- \global\multiply\randomi 16807
- \multiply\count@ 2836
- \global\advance\randomi-\count@
- \ifnum\randomi<\z@ \global\advance\randomi 2147483647\relax\fi
+ \fi
+ \count@ii\randomi
+ \divide\count@ii 127773 % modulus = multiplier * 127773 + 2836
+ \count@\count@ii
+ \multiply\count@ii 127773
+ \global\advance\randomi-\count@ii % random mod 127773
+ \global\multiply\randomi 16807
+ \multiply\count@ 2836
+ \global\advance\randomi-\count@
+ \ifnum\randomi<\z@\global\advance\randomi 2147483647\relax\fi
\endgroup
}
% \end{macrocode}
@@ -7311,29 +7408,31 @@ if (_bOK) {\jsR\jsT
% Added support for randomizing the multiple choices, requires the use of \cs{bChoices}
% and \cs{eChoices}.
% }
-% \begin{macrocode}
-\def\@ansChoices[#1]%
-{%
- \global\let\@tempholdSaveAns\@empty % 5/24
- \global\let\@tempholdSaveChoice\@empty % 5/24
- \global\let\bChoiceLabel\@empty % 5/24
- \ifeq@randomizeallChoices
- \setkeys{bchoice}{#1,random=true}\else
- \setkeys{bchoice}{#1}\fi
- \global\eq@tabColCnt=0
- \ifeq@randomizeChoices\expandafter\@@bChoices
- \else\expandafter\@@ansChoices\fi
+% \changes{v8.6.2}{2021/01/20}{Incorporated \string\cs{if@DoNotRandomize}
+% into the \string\cs{@ansChoices} macro for MC and MS questions}
+% \begin{macrocode}
+\def\@ansChoices[#1]{%
+ \global\let\@tempholdSaveAns\@empty
+ \global\let\@tempholdSaveChoice\@empty
+ \global\let\bChoiceLabel\@empty
+ \ifeq@randomizeallChoices
+ \setkeys{bchoice}{#1,random=true}\else
+ \setkeys{bchoice}{#1}\fi
+ \global\eq@tabColCnt=\z@
+ \if@DoNotRandomize\eq@randomizeChoicesfalse\fi
+ \ifeq@randomizeChoices\expandafter\@@bChoices
+ \else\expandafter\@@ansChoices\fi
}
% \end{macrocode}
% This is actually the old \cs{@ansChoices} only slightly modified.
% \begin{macrocode}
\def\@@ansChoices{%
- \ifnum\aeb@numCols=1 % list mode
- \def\eq@next{\@layoutListAns}%
- \else % tabular mode
- \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}%
- \fi
- \eq@next
+ \ifnum\aeb@numCols=\@ne % list mode
+ \def\eq@next{\@layoutListAns}%
+ \else % tabular mode
+ \edef\eq@next{\noexpand\@layoutTabularAns{\bChoiceNumCols}}%
+ \fi
+ \eq@next
}
% \end{macrocode}
% The following are some registers to hold integers and tokens.
@@ -7348,21 +7447,21 @@ if (_bOK) {\jsR\jsT
% otherwise, we're finished.
% \begin{macrocode}
\def\@@bChoices{\gdef\@temphold{}\gdef\@tempholdrandom{}%
- \gdef\@tempholdfreeze{}\aeb@searchfortoken{\@getAns}%
+ \gdef\@tempholdfreeze{}\aeb@searchfortoken{\@getAns}%
}
\def\aeb@searchfortoken#1{%
- \@ifnextchar\Ans{\advance\aeb@numChoices1\relax#1}
- {\@ifnextchar\eFreeze{\expandafter\@getFreezeAns\@gobble}
- {\@ifnextchar\par{\def\@@temp{\aeb@searchfortoken{#1}}%
- \expandafter\@@temp\@gobble}{\@eChoices}}}%
+ \@ifnextchar\Ans{\advance\aeb@numChoices1\relax#1}
+ {\@ifnextchar\eFreeze{\expandafter\@getFreezeAns\@gobble}
+ {\@ifnextchar\par{\def\@@temp{\aeb@searchfortoken{#1}}%
+ \expandafter\@@temp\@gobble}{\@eChoices}}}%
}
% \end{macrocode}
% The non-frozen questions will be held in the macro \cs{@temphold}.
% We keep track of the number of choices using the counter \cs{aeb@numChoices}.
% \begin{macrocode}
\long\def\@getAns\Ans#1\eAns{%
- \g@addto@macro\@temphold{{\Ans#1\eAns}}%
- \aeb@searchfortoken{\@getAns}%
+ \g@addto@macro\@temphold{{\Ans#1\eAns}}%
+ \aeb@searchfortoken{\@getAns}%
}
% \end{macrocode}
% We've encountered \cs{eFreeze}, if the next token is \cs{Ans}, go get the
@@ -7374,14 +7473,14 @@ if (_bOK) {\jsR\jsT
% in the macro \cs{@tempholdfreeze}.
% \begin{macrocode}
\long\def\@@getFreezeAns\Ans#1\eAns{%
- \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}%
- \aeb@searchfortoken{\@@getFreezeAns}%
+ \g@addto@macro\@tempholdfreeze{\Ans#1\eAns}%
+ \aeb@searchfortoken{\@@getFreezeAns}%
}
% \end{macrocode}
% When we are finished finding all the choices, we come here to randomize the choices.
% \begin{macrocode}
\long\def\@eChoices#1\eChoices{%
- \aeb@randomizeChoices{\the\aeb@numChoices}%
+ \aeb@randomizeChoices{\the\aeb@numChoices}%
}
% \end{macrocode}
% The routine that randomizes the choices. Basically, we use \texttt{random.tex} to get
@@ -7391,46 +7490,46 @@ if (_bOK) {\jsR\jsT
% here \cs{aeb@hold} is used as a scratch token register.
% \begin{macrocode}
\def\aeb@randomizeChoices#1{%
- \setrannum{\aeb@ranChoice}{1}{#1}
- \eqtmpcnta\z@\aeb@hold=\expandafter{\@temphold}\def\@temphold{}%
- \expandafter\@tfor\expandafter
- \@temp\expandafter:\expandafter=\the\aeb@hold \do {%
- \advance\eqtmpcnta\@ne
- \ifnum\eqtmpcnta=\aeb@ranChoice\relax
- \aeb@hold=\expandafter\expandafter\expandafter
- {\expandafter\@tempholdrandom\@temp}%
- \edef\@tempholdrandom{\the\aeb@hold}%
- \else
- \aeb@hold=\expandafter\expandafter\expandafter
- {\expandafter\@temphold\expandafter{\@temp}}%
- \edef\@temphold{\the\aeb@hold}%
- \fi
- }%
+ \setrannum{\aeb@ranChoice}{1}{#1}
+ \eqtmpcnta\z@\aeb@hold=\expandafter{\@temphold}\def\@temphold{}%
+ \expandafter\@tfor\expandafter
+ \@temp\expandafter:\expandafter=\the\aeb@hold \do {%
+ \advance\eqtmpcnta\@ne
+ \ifnum\eqtmpcnta=\aeb@ranChoice\relax
+ \aeb@hold=\expandafter\expandafter\expandafter
+ {\expandafter\@tempholdrandom\@temp}%
+ \edef\@tempholdrandom{\the\aeb@hold}%
+ \else
+ \aeb@hold=\expandafter\expandafter\expandafter
+ {\expandafter\@temphold\expandafter{\@temp}}%
+ \edef\@temphold{\the\aeb@hold}%
+ \fi
+ }%
% \end{macrocode}
% We repeat this process a total of \cs{aeb@numChoices}, the original count of the number
% of choices. Once finished, we go to \cs{aeb@finishedRandomizing} to lay out the
% randomized choices for typesetting.
% \begin{macrocode}
- \aeb@numChoices=#1
- \advance\aeb@numChoices-1
- \ifnum\aeb@numChoices=0\relax
- \def\aeb@next{\aeb@finishedRandomizing}\else
- \def\aeb@next{\aeb@randomizeChoices{\the\aeb@numChoices}}\fi
- \aeb@next
+ \aeb@numChoices=#1
+ \advance\aeb@numChoices\m@ne
+ \ifnum\aeb@numChoices=\z@
+ \def\aeb@next{\aeb@finishedRandomizing}\else
+ \def\aeb@next{\aeb@randomizeChoices{\the\aeb@numChoices}}\fi
+ \aeb@next
}
% \end{macrocode}
% This command assembles the questions held in random order in the command \cs{@tempholdrandom} and
% the frozen ones held in \cs{@tempholdfreeze}, and lays out the choices for typesetting.
% \begin{macrocode}
\def\aeb@finishedRandomizing{%
- \aeb@hold=\expandafter\expandafter\expandafter
- {\expandafter\@tempholdrandom\@tempholdfreeze}%
- \gdef\@temphold{}\gdef\@tempholdrandom{}\gdef\@tempholdfreeze{}%
- \edef\finished@Randomizing{%
- \noexpand\@@ansChoices
- \the\aeb@hold
- \noexpand\eChoices}%
- \finished@Randomizing
+ \aeb@hold=\expandafter\expandafter\expandafter
+ {\expandafter\@tempholdrandom\@tempholdfreeze}%
+ \gdef\@temphold{}\gdef\@tempholdrandom{}\gdef\@tempholdfreeze{}%
+ \edef\finished@Randomizing{%
+ \noexpand\@@ansChoices
+ \the\aeb@hold
+ \noexpand\eChoices}%
+ \finished@Randomizing
}
% \end{macrocode}
% \begin{macro}{\saveRandomSeed}
@@ -7455,21 +7554,20 @@ if (_bOK) {\jsR\jsT
% by \textsf{ran\_toks}. Now, there share a common aux file and common initial and final
% seeds.
% \begin{macrocode}
-%\def\saveRandomSeed{\AtEndDocument{\eq@writeRandomData}}
\def\saveRandomSeed{\PackageInfo{exerquiz}
- {The command \string\saveRandomSeed\space
- is deprecated.\MessageBreak Seed automatically saved}}
+ {The command \string\saveRandomSeed\space
+ is deprecated.\MessageBreak Seed automatically saved}}
% \end{macrocode}
% I \cs{let} the commands in this file to the companion commands in \textsf{ran\_toks} file.
% The user can use either set of commands \cs{inputRandomSeed} or \cs{useLastSeed} as one
% pair and \cs{useRandomSeed} and \cs{useThisSeed} as the other pair.
% \begin{macrocode}
\@ifpackageloaded{ran_toks}{%
- \let\inputRandomSeed\useLastAsSeed
- \let\useRandomSeed\useThisSeed
+ \let\inputRandomSeed\useLastAsSeed
+ \let\useRandomSeed\useThisSeed
}{%
- \def\inputRandomSeed{\eq@readRandomData}%
- \def\useRandomSeed#1{\saveseedfalse\randomi=#1}%
+ \def\inputRandomSeed{\eq@readRandomData}%
+ \def\useRandomSeed#1{\saveseedfalse\randomi=#1}%
}
\def\InitSeedValue{\the\randomi} % dps
\@ifundefined{ifsaveseed}{\newif\ifsaveseed\saveseedtrue}{} % dps
@@ -7478,40 +7576,39 @@ if (_bOK) {\jsR\jsT
% \end{macro}
% \end{macro}
% \begin{macrocode}
-\def\eq@writeRandomData
-{%
- \ifsaveseed
- \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{}
- \immediate\openout \saveseedinfo \jobname_rt.sav
- \let\verbatim@out\saveseedinfo
- \def\eqrt@msgi{initializing seed value}%
- \def\eqrt@msgii{last random number used}%
- \uccode`c=`\%\uppercase{%
- \immediate\write\verbatim@out
- {\InitSeedValue\space c \eqrt@msgi}%
- \immediate\write\verbatim@out
- {\the\randomi\space c \eqrt@msgii}%
- }\immediate\closeout\saveseedinfo
- \fi
+\def\eq@writeRandomData{%
+ \ifsaveseed
+ \@ifundefined{saveseedinfo}{\newwrite\saveseedinfo}{}
+ \immediate\openout \saveseedinfo \jobname_rt.sav
+ \let\verbatim@out\saveseedinfo
+ \def\eqrt@msgi{initializing seed value}%
+ \def\eqrt@msgii{last random number used}%
+ \uccode`c=`\%\uppercase{%
+ \immediate\write\verbatim@out
+ {\InitSeedValue\space c \eqrt@msgi}%
+ \immediate\write\verbatim@out
+ {\the\randomi\space c \eqrt@msgii}%
+ }\immediate\closeout\saveseedinfo
+ \fi
}
\AtEndDocument{\eq@writeRandomData}
% \end{macrocode}
% Save the data to the file \cs{jobname\_ran.sav}.
% \begin{macrocode}
\def\eq@readRandomData{\IfFileExists{\jobname_rt.sav}{%
- \PackageInfo{exerquiz}{Inputting \jobname_rt.sav}%
- \@ifundefined{readsavfile}{\newread\readsavfile}{}%
- \openin\readsavfile=\jobname_rt.sav
- \read\readsavfile to \InitSeedValue
- \read\readsavfile to \eqlastRandomNum
- \closein\readsavfile
- \randomi=\eqlastRandomNum
- \xdef\InitSeedValue{\the\randomi}%
- \immediate\closeout\readsavfile
+ \PackageInfo{exerquiz}{Inputting \jobname_rt.sav}%
+ \@ifundefined{readsavfile}{\newread\readsavfile}{}%
+ \openin\readsavfile=\jobname_rt.sav
+ \read\readsavfile to \InitSeedValue
+ \read\readsavfile to \eqlastRandomNum
+ \closein\readsavfile
+ \randomi=\eqlastRandomNum
+ \xdef\InitSeedValue{\the\randomi}%
+ \immediate\closeout\readsavfile
}{%
- \PackageInfo{exerquiz}{\jobname_rt.sav cannot
- be found, \MessageBreak
- using the random initializer}%
+ \PackageInfo{exerquiz}{\jobname_rt.sav cannot
+ be found, \MessageBreak
+ using the random initializer}%
}}
% \end{macrocode}
% \begin{macrocode}
@@ -7551,27 +7648,27 @@ if (_bOK) {\jsR\jsT
%}
% \begin{macrocode}
\def\REF{\@ifstar{\let\isREFstar\eq@One\aeb@REFstar}
- {\let\isREFstar\eq@Zero\aeb@REF}}
+ {\let\isREFstar\eq@Zero\aeb@REF}}
\def\aeb@REFstar#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}}
- {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
- \else\ref*{#1}\fi}%
+ {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
+ \else\ref*{#1}\fi}%
}
\def\aeb@REF#1{\@ifundefined{r@#1}{\hbox{\reset@font\bfseries ??}}
- {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
- \else\ref{#1}\fi}%
+ {\ifaebshowgrayletters\aeb@buildUpperCaseRef{#1}%
+ \else\ref{#1}\fi}%
}
%</package|eqexam>
%<*eqexam>
\def\aeb@buildUpperCaseRef#1{%
- \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}%
- \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand
+ \xdef\tmp@expand{\aeb@exiii\@firstoftwo\csname r@#1\endcsname}%
+ \xdef\tmp@expand{\uppercase{\tmp@expand}}\tmp@expand
}
%</eqexam>
%<*package>
\def\aeb@buildUpperCaseRef#1{%
- \xdef\tmp@expand{\aeb@exiii\@firstoffive\csname r@#1\endcsname}%
- \xdef\tmp@expand{\uppercase{\tmp@expand}}%
- \if\isREFstar\eq@One\tmp@expand\else\hyperref[#1]{\tmp@expand}\fi
+ \xdef\tmp@expand{\aeb@exiii\@firstoffive\csname r@#1\endcsname}%
+ \xdef\tmp@expand{\uppercase{\tmp@expand}}%
+ \if\isREFstar\eq@One\tmp@expand\else\hyperref[#1]{\tmp@expand}\fi
}
% \end{macrocode}
% \end{macro}
@@ -7600,10 +7697,10 @@ if (_bOK) {\jsR\jsT
% \begin{macrocode}
\let\insert@circlesymbol\@empty
\def\useMCCircles{\useForms
- \ifaeb@usecircles\else
- \global\aeb@usecirclestrue
- \gdef\insert@circlesymbol{\symbolchoice{circle}}%
- \fi
+ \ifaeb@usecircles\else
+ \global\aeb@usecirclestrue
+ \gdef\insert@circlesymbol{\symbolchoice{circle}}%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -7613,9 +7710,9 @@ if (_bOK) {\jsR\jsT
% to their values prior to the last invocation of \cs{useMCCircles}.
% \begin{macrocode}
\def\useMCRects{\useForms
- \ifaeb@usecircles\global\aeb@usecirclesfalse
- \global\let\insert@circlesymbol\@empty
- \fi
+ \ifaeb@usecircles\global\aeb@usecirclesfalse
+ \global\let\insert@circlesymbol\@empty
+ \fi
}
\let\useMCCRects\useMCRects
% \end{macrocode}
@@ -7667,26 +7764,25 @@ if (_bOK) {\jsR\jsT
% question label, i.e., \texttt{2(a)(ii)}. These two lines are repeated for
% the \texttt{shortquiz} and \texttt{quiz} environments.
% \begin{macrocode}
- \let\@currentQues\@empty
- \xdef\eq@pageThisQ{\the\c@page}%
- \global\let\eqQzQuesList\@empty
- \xdef\oField{#1}\xdef\curr@quiz{#1}\xdef\currQuiz{#1}%
- \g@addto@macro\ListOfSQuizNames{,#1}\let\@qzsolndest\@empty
-% \stepcounter{questionno}%
- \let\eqQuizType\isSQZ\gdef\eqPTs{1}\global\let\eqQT\eq@na
- \let\answers\answers@sq
- \let\endanswers\endanswers@sq
- \let\manswers\manswers@sq
- \let\endmanswers\endmanswers@sq
- \let\solution\solution@sq
- \let\endsolution\endsolution@sq
- \noindent\oqpriorhook\sq@IDTxtField\ifx\aebTitleQuiz\@empty
- \else\aebtitleQuiz\fi\ignorespaces
+ \let\@currentQues\@empty
+ \xdef\eq@pageThisQ{\the\c@page}\global
+ \let\eqQzQuesList\@empty
+ \xdef\oField{#1}\xdef\curr@quiz{#1}\xdef\currQuiz{#1}%
+ \g@addto@macro\ListOfSQuizNames{,#1}\let\@qzsolndest\@empty
+ \let\eqQuizType\isSQZ\gdef\eqPTs{1}\global\let\eqQT\eq@na
+ \let\answers\answers@sq
+ \let\endanswers\endanswers@sq
+ \let\manswers\manswers@sq
+ \let\endmanswers\endmanswers@sq
+ \let\solution\solution@sq
+ \let\endsolution\endsolution@sq
+ \noindent\oqpriorhook\sq@IDTxtField\ifx\aebTitleQuiz\@empty
+ \else\aebtitleQuiz\fi\ignorespaces
}{%
- \global\let\aebtitleQuiz\@empty
- \global\let\aebTitleQuiz\@empty
- \global\let\eq@tq@star\relax
- \aftergroup\ignorespaces
+ \global\let\aebtitleQuiz\@empty
+ \global\let\aebTitleQuiz\@empty
+ \global\let\eq@tq@star\relax
+ \aftergroup\ignorespaces
}
\def\oSolution#1{\edef\@qzsolndest{#1}}
% \end{macrocode}
@@ -7833,11 +7929,11 @@ if (_bOK) {\jsR\jsT
% \begin{macrocode}
\def\eq@rpl#1#2{_rplVarsBy('#1','#2')@} % dps17
% \end{macrocode}
-% A variation on the objective style math problem, is to initially populate the response box with an
+% \textbf{Correcting an incorrect entry.} A variation on the objective style math problem is to initially populate the response box with an
% incorrect answer and ask the student to correct it. (Good for future teachers.) The problem type set
% straightforward when multi-variables are not used, just specify the \cs{V} and \cs{DV} keys in the
-% optional argument of \cs{RespBoxMath}. When multi-variables are used, we have to precede the question
-% with \DescribeMacro{\setInitAltAppr}\cs{setInitAltAppr}. There are two variations, the first is for
+% optional argument of \cs{RespBoxMath}. When multi-variables are used, we enclose the question
+% with \DescribeMacro{\bInitAltAppr}\cs{bInitAltAppr}/\allowbreak\DescribeMacro{\eInitAltAppr}\cs{eInitAltAppr}. There are two variations, the first is for
% a non-\app{dvips/Distiller} workflow (document JavaScript are embedded at the creation of the PDF;
% the second variation is with Distiller, where the document JavaScript is embedded with \app{Acrobat}
% after the creation of the PDF. In the latter case, the JavaScript functions used below (\texttt{processMathVars},
@@ -7845,13 +7941,17 @@ if (_bOK) {\jsR\jsT
% opened in \app{Acrobat}. As a result, an exception is thrown. When the exception is thrown,
% \texttt{app.setTimeOut} gives a delay and the field is reset after 25 milliseconds, this causes
% the \emph{initial} alternate appearance to appear, if that is desired.
-% \changes{v8.1a}{2017/09/03}{Add \string\cs{setInitAltAppr} for setting the initial alternate appearance}
+% \changes{v8.1a}{2017/09/03}{Added \string\cs{bInitAltAppr}/\string\allowbreak\string\cs{eInitAltAppr}
+% command pair for setting the initial alternate appearance}
+% \begin{macrocode}
+\ifnum\eq@drivernum=\z@
+ \def\RorRT{\r\t}\else\def\RorRT{\r}\fi
+% \end{macrocode}
+% The following commands are in support of the \cs{bInitAltAppr}/\allowbreak\cs{eInitAltAppr} command pair.
% \begin{macrocode}
-\ifnum\eq@drivernum=0\def\RorRT{\r\t}\else\def\RorRT{\r}\fi
\def\toAltApprCnt{0}\def\toAltApprVar{_toAltAppr\toAltApprCnt}
\def\toAltApprCntInc{{\@tempcnta=\toAltApprCnt\relax
- \advance\@tempcnta1\relax
- \xdef\toAltApprCnt{\the\@tempcnta}}}
+ \advance\@tempcnta\@ne\xdef\toAltApprCnt{\the\@tempcnta}}}
\def\setCoreInitAltAppr{%
var\eqSP_substVars=\indepVars;\RorRT
var\eqSP_mathVars=processMathVars(_substVars);\RorRT
@@ -7859,10 +7959,18 @@ if (_bOK) {\jsR\jsT
event.value=RespBoxAppr(event);\RorRT
getSubstValue.aSubsts=[];%
}
+% \end{macrocode}
+% \leavevmode\DescribeMacro{\bInitAltAppr}\DescribeMacro{\eInitAltAppr} This command pair
+% are used to set the initial value of a \cs{RespBoxMath} field.
+% See the {Acro\negthinspace\TeX} article \url{http://www.acrotex.net/blog/?p=1335}
+% for a discussion of the use of \cs{bInitAltAppr}/\allowbreak
+% \cs{bInitAltAppr}.
+% An alternate method is to use \cs{formatInitAltApprs} directly
+% \begin{macrocode}
\def\bInitAltAppr{\ifShowAppr
\def\ShowApprSAVE{true}\toAltApprCntInc\ShowApprfalse
- \def\eqAddAAFormat{\ifnum\eq@drivernum=0try\eqLBr\RorRT\fi
- \setCoreInitAltAppr\ifnum\eq@drivernum=0 \r\eqRBr catch(e){\RorRT
+ \def\eqAddAAFormat{\ifnum\eq@drivernum=\z@ try\eqLBr\RorRT\fi
+ \setCoreInitAltAppr\ifnum\eq@drivernum=\z@\r\eqRBr catch(e){\RorRT
var\eqSP\toAltApprVar=%
app.setTimeOut('this.resetForm("'+event.target.name+'");%
app.clearTimeOut(\toAltApprVar);',250);\r}\fi}\else
@@ -7875,61 +7983,85 @@ if (_bOK) {\jsR\jsT
% \changes{v6.4c}{2011/07/01}{\cs{RespBoxMath} now records its lists of
% independent variables under the global variable \texttt{\_mathVars}.}
% \begin{macrocode}
-\def\AAKqRespBoxMath{%
+\begin{defineJS}[\makeesc\*\makecmt\%]{\AAKqRespBoxMath}
% \end{macrocode}
% \cs{AAKqRespBoxMath} is the default keystroke action script for \cs{RespBoxMath}
% \begin{macrocode}
- if(event.willCommit){\r\t
- RecordPointValue(\eqPTs,\thequestionno\ifx\grpquestions1,%
-\thegrpquestionno,\grpPointValue,\grpTotalWeight,%
-"\grpEvalFunction"\fi);\r\t
- RecordProblemType("\eqQT",\thequestionno);\r\t
+if(event.willCommit){
+ RecordPointValue(*eqPTs,*thequestionno*ifx*grpquestions*eq@One,%
+*thegrpquestionno,*grpPointValue,*grpTotalWeight,%
+"*grpEvalFunction"*fi);
+ RecordProblemType("*eqQT",*thequestionno);
% \end{macrocode}
% If there are substitute variables, \cs{ifSubstVars} is true, and the script below
% are the lines developed in support of multi-letter variables.
% \begin{macrocode}
-\ifSubstVars % dps17
- var\eqSP_substVars=\indepVars;\r\t
- var\eqSP_mathVars=processMathVars(_substVars);\r\t
- var\eqSP_substValue=getSubstValue(_substVars,event.value);\r\t
- var\eqSP_substAns=getSubstValue(_substVars,"\eqCorrectAns");\r\t
- var\eqSP retn=\processJSfunc(\rbArgs,%
- \compareJSfunc,_substValue);\r\t
-\else
- var\eqSP_mathVars=\indepVars;\r\t
- var\eqSP retn=\processJSfunc(\rbArgs,\compareJSfunc);\r\t
-\fi
- ProcUserResp(retn,event.value,\thequestionno,%
-0\ifx\grpquestions1,\thegrpquestionno\fi);\r
- }\r
- if (!isQuizInitialized("\currQuiz")) {\r\t
- \eqObjAlert eqAppAlert(InitMsg("\bqlabelISO"),3);\r\t
- event.rc = false;\r
- }
+*ifSubstVars%
+ var _substVars=*indepVars;
+ var _mathVars=processMathVars(_substVars);
+ var _substValue=getSubstValue(_substVars,event.value);
+ var _substAns=getSubstValue(_substVars,"*eqCorrectAns");
+ var retn=*processJSfunc(*rbArgs,%
+ *compareJSfunc,_substValue);*else%
+ var _mathVars=*indepVars;
+ var retn=*processJSfunc(*rbArgs,*compareJSfunc);*fi
+ ProcUserResp(retn,event.value,*thequestionno,0%
+*ifx*grpquestions*eq@One,*thegrpquestionno*fi);
+}
+if (!isQuizInitialized("*currQuiz")) {
+ *eqObjAlert*eqAppAlert(InitMsg("*bqlabelISO"),3);
+ event.rc = false;%
+*ifx*eqAddAAKeystroke*@empty*else
+*eqAddAAKeystroke*fi
}
-\def\RespBoxMathDefaults
-{%
- \BC{0 0 0}\S{S}\textColor{0 g}\F{\FPrint}\W{1}
+\end{defineJS}
+\def\RespBoxMathDefaults{%
+ \BC{0 0 0}\S{S}\textColor{0 g}\F{\FPrint}\W{1}
}
-\def\moreRespBoxMathDefaults
-{%
- \edef\@moreRespBoxMathDefaults{%
- \if\eqQuizType\isQZ\ifx\eq@online\eq@YES
- \ifeq@noquizsolutions
- \else\noexpand\Ff{\FfReadOnly}\fi\fi\fi
- }%
+\def\moreRespBoxMathDefaults{%
+ \edef\@moreRespBoxMathDefaults{%
+ \if\eqQuizType\isQZ\ifx\eq@online\eq@YES
+ \ifeq@noquizsolutions
+ \else\noexpand\Ff{\FfReadOnly}\fi\fi\fi
+ }%
}
\let\eqAddAAFormat\@empty
% \end{macrocode}
% \DescribeMacro{\eqSP}\cs{eqSP} is a space character to keep \textsf{dvips} from breaking lines at space.
% \begin{macrocode}
-\def\eqSP{\string\040} % dps17
+\def\eqSP{\string\040}
\def\eqLBr{\string\173}
\def\eqRBr{\string\175}
+% \end{macrocode}
+% Keystroke action for \cs{RespBoxMath}.
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\!\makecmt\%]{\rbmAAKey}
+if(event.willCommit) {
+!ifSubstVars%
+% \end{macrocode}
+% If there are multi-letter variables (\cs{SubstVarstrue}), we insert the code developed.
+% \begin{macrocode}
+ var _substVars=!indepVars;
+ var _mathVars=processMathVars(_substVars);
+ var _substValue=getSubstValue(_substVars,event.value);
+ var _substAns=getSubstValue(_substVars,"!eqCorrectAns");
+ var retn=!processJSfunc(!rbArgs,%
+!compareJSfunc,_substValue);!else%
+ var _mathVars=!indepVars;
+ var retn=!processJSfunc(!rbArgs,!compareJSfunc);!fi%
+!ifx!@sqTurnOffAlerts!eq@One
+ OnBlurRespBox(retn,"!curr@quiz");!fi%
+!ifx!eqAddAAKeystroke!@empty!else
+!eqAddAAKeystroke!fi
+}
+\end{defineJS}
+% \end{macrocode}
+% The actions of \cs{RespBoxMath}
+% \begin{macrocode}
\def\@@RespBoxMathActions{%
\AA{\if\eqQuizType\isQZ
- \AAKeystroke{\AAKqRespBoxMath\eqAddAAKeystroke}
- \AAFormat{\ifShowAppr\ifSubstVars\ifarrowDelim % dps17
+ \AAKeystroke{\AAKqRespBoxMath}
+ \AAFormat{\ifShowAppr\ifSubstVars\ifarrowDelim
% \end{macrocode}
% The \texttt{RespBoxApp()} JavaScript function replaces the multi-letter variable (\texttt{alpha}, for example)
% with its appearance (|\\u03B1|, eg).
@@ -7937,31 +8069,8 @@ if (_bOK) {\jsR\jsT
try{event.value=RespBoxAppr(event);}catch(e){}\r
\fi\fi\fi\eqAddAAFormat}
\else
- \AAKeystroke{if(event.willCommit) {\r\t
-\ifSubstVars%
-% \end{macrocode}
-% If there are multi-letter variables (\cs{SubstVarstrue}), we insert the code developed.
-% \begin{macrocode}
- var\eqSP_substVars=\indepVars;\r\t
- var\eqSP_mathVars=processMathVars(_substVars);\r\t
- var\eqSP_substValue=getSubstValue(_substVars,event.value);\r\t
- var\eqSP_substAns=getSubstValue(_substVars,"\eqCorrectAns");\r\t
- var\eqSP retn=\processJSfunc(\rbArgs,%
- \compareJSfunc,_substValue);\r\t
-\else
- var\eqSP_mathVars=\indepVars;\r\t
- var\eqSP retn=\processJSfunc(\rbArgs,\compareJSfunc);
-\fi
-\if\@sqTurnOffAlerts1%
- OnBlurRespBox(retn,"\curr@quiz");
-\fi
-% \end{macrocode}
-% Moved \cs{eqAAKeystrokArg} from the conditional to the position below.
-% \changes{v7.8i}{2017/07/21}{Moved \string\cs{eqAAKeystrokArg}}
-% \begin{macrocode}
- \eqAddAAKeystroke\r
- }}
- \AAFormat{\ifShowAppr\ifSubstVars\ifarrowDelim % dps17
+ \AAKeystroke{\rbmAAKey}
+ \AAFormat{\ifShowAppr\ifSubstVars\ifarrowDelim
try{event.value=RespBoxAppr(event);}catch(e){}\r\fi\fi\fi
\eqAddAAFormat}%
\AAOnFocus{\JS{var retn = null;}}%
@@ -8052,13 +8161,13 @@ if (_bOK) {\jsR\jsT
\def\defaultRDPrecision#1{\def\eq@defaultRDPrecision{#1}}
\defaultRDPrecision{1E-14}
% \end{macrocode}
-% dps/change 02/23/07 Here we try to implement a suggest of Bruce Wagner. If the tolerance
+% dps/change 02/23/07 Here we try to implement a suggestion of Bruce Wagner. If the tolerance
% is set to zero, then use \texttt{reldiffCompare} as the default compare, and set the tolerance
% to some small value. Here, the small value is the value of the command
% \cs{eq@defaultRDPrecision} which can be set by \cs{defaultRDPrecision}. The default definition
% is \verb!\defaultRDPrecision{1E-14}!.
% \begin{macrocode}
-\newif\ifarrowDelim\arrowDelimfalse % dps17
+\newif\ifarrowDelim\arrowDelimfalse
% \end{macrocode}
% The problem is to detect when \cs{indepVars} contains the arrow notation (\verb~->~), this signals
% that the appearance of the user's response is to be replaced by another appearance. The command
@@ -8198,32 +8307,40 @@ if (_bOK) {\jsR\jsT
% \cs{RespBoxMath} continues here
% \begin{macrocode}
\def\@eq@RespB@x#1(#2)[#3]#4#5#6{\xdef\@qzsolndest{#3}% dps17
- \gdef\indepVars{"#2"}\isFrstrpl#2\@nil\if\frstIsrpl\eq@YES
- \def\@IVi{#2}\else\expandafter\def\expandafter
- \@IVi\expandafter{#2}\fi\edef\@IVii{#2}\ifx\@IVi\@IVii
+ \gdef\indepVars{"#2"}\isFrstrpl#2\@nil
+ \if\frstIsrpl\eq@YES
+ \def\@IVi{#2}\else\expandafter\def\expandafter
+ \@IVi\expandafter{#2}\fi
+ \edef\@IVii{#2}%
+ \ifx\@IVi\@IVii
% \end{macrocode}
% If \cs{indepVars} (\texttt{\#2}) does not contain \cs{rpl}, the two versions
% of \cs{@IVi} and \cs{@IVii} should compare favorably. If they differ, the difference
% is due to the presence of \cs{rpl}.
% \begin{macrocode}
- \global\SubstVarsfalse\else\global\SubstVarstrue
- \isAltApprSpec{#2}\fi
+ \global\SubstVarsfalse
+ \else
+ \global\SubstVarstrue
+ \isAltApprSpec{#2}%
+ \fi
% \end{macrocode}
% \textbf{Counting number of variables.} We count the number of independent variables.
% \begin{macrocode}
- \cntVars{#2}\def\eq@precision{#5}%
- \ifx\eq@precision\eq@ZERO
- \def\eq@defaultCompare{reldiffCompare}%
+ \cntVars{#2}\def\eq@precision{#5}%
+ \ifx\eq@precision\eq@ZERO
+ \def\eq@defaultCompare{reldiffCompare}%
% \end{macrocode}
% (2017/01/11) Replace \texttt{\#1} by \cs{eqCorrectAns} to delay expansion
% \changes{v7.8d}{2017/01/11}{Replace \string\texttt{\#1} by \string\cs{eqCorrectAns} to delay expansion}
% \begin{macrocode}
- \def\rbArgstmp{\rbFlag,% dps17
- \ifSubstVars_substAns\else"#1"\fi,#4,%
- \eq@defaultRDPrecision}\else
- \def\eq@defaultCompare{diffCompare}%
- \def\rbArgstmp{\rbFlag,% dps17
- \ifSubstVars_substAns\else"#1"\fi,#4,#5}\fi
+ \def\rbArgstmp{\rbFlag,%
+ \ifSubstVars_substAns\else"#1"\fi,#4,%
+ \eq@defaultRDPrecision}%
+ \else
+ \def\eq@defaultCompare{diffCompare}%
+ \def\rbArgstmp{\rbFlag,%
+ \ifSubstVars_substAns\else"#1"\fi,#4,#5}%
+ \fi
% \end{macrocode}
% We have arrived at the first of possibly two parameters that define the interval(s)
% from which to sample random points. There are two forms, the old style (deprecated)
@@ -8232,7 +8349,7 @@ if (_bOK) {\jsR\jsT
% (10/10/11) To support \cs{viidna}, we expand \texttt{\#6} first before passing it
% to the command \cs{@checkforInterval}.
% \begin{macrocode}
- \edef\eq@ixparam{#6}\expandafter\eq@chkivIntrvls\eq@ixparam\\%
+ \edef\eq@ixparam{#6}\expandafter\eq@chkivIntrvls\eq@ixparam\\%
}
% \end{macrocode}
% \DescribeMacro{\viidna} is used with the \texttt{satisfyEq} for the seventh parameter,
@@ -8240,7 +8357,6 @@ if (_bOK) {\jsR\jsT
% stop compilation.
% \begin{macrocode}
\def\viidna{[0,1]}
-%\def\viidna{[]}
% \end{macrocode}
% If the next token is a `\texttt[', then that signals the beginning of an interval
% such as \texttt{[a,b]}, must be the new style. The second parameter is not
@@ -8319,10 +8435,8 @@ if (_bOK) {\jsR\jsT
% \changes{v8.2}{2018/03/18}{Corrected \string\cs{eq@recordCorrAns}}
% \changes{v8.2.1}{2018/03/19}{If not a math group, record this data}
% \begin{macrocode}
-\ifx\grpquestions\eq@Zero
- \eq@recordCorrAns{"\eqCorrectAns"}% 2018/03/18
-% \eq@recordCorrAns{("\eqCorrectAns")}% 01/11
-\fi
+ \ifx\grpquestions\eq@Zero
+ \eq@recordCorrAns{"\eqCorrectAns"}\fi
\ifeq@proofing\makebox[0pt][l]{\space\math@correctAnswer}\fi
\eq@TextField % send to the driver-dependent macro
% \end{macrocode}
@@ -8394,71 +8508,74 @@ if (_bOK) {\jsR\jsT
% Pick up any parameters that would modify the appearance of this text field.
% \begin{macrocode}
\def\RespBoxTxtOnBlur{OnBlurRespBox(%
- \if\@sqTurnOffAlerts1retn\else null\fi,"\curr@quiz");}
+ \ifx\@sqTurnOffAlerts\eq@One
+ retn\else null\fi,"\curr@quiz");}
+\def\eqObjAlertIfFalse{if (false) }
\def\eqObjAlert{%
\ifx\eqQuizType\isQZ\ifx\eq@online\eq@YES\ifeq@noquizsolutions
- \else if (false) \fi\fi\fi}
-\begin{defineJS}[%
- \catcode`\@=0\relax\catcode`\%=14\relax]{\AAKqRespBoxTxt}
+ \else\eqObjAlertIfFalse\fi\fi\fi}
+\def\eqAppAlert{eqAppAlert}
+% \end{macrocode}
+% Keystroke action for \cs{RespBoxTxt}
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\AAKqRespBoxTxt}
if(event.willCommit){
- RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
-@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
-"@grpEvalFunction"@fi);
- RecordProblemType("@eqQT",@thequestionno);
- var retn = ProcRespTxt(@rbTxtAlt);
- ProcUserResp(retn,event.value,@thequestionno,%
-0@ifx@grpquestions1,@thegrpquestionno@fi);
-}
-if (!isQuizInitialized("@currQuiz")) {
- @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
+ RecordPointValue(*eqPTs,*thequestionno*ifx*grpquestions*eq@One,%
+*thegrpquestionno,*grpPointValue,*grpTotalWeight,%
+"*grpEvalFunction"*fi);
+ RecordProblemType("*eqQT",*thequestionno);
+ var retn = ProcRespTxt(*rbTxtAlt);
+ ProcUserResp(retn,event.value,*thequestionno,0%
+*ifx*grpquestions*eq@One,*thegrpquestionno*fi);
+}
+if (!isQuizInitialized("!currQuiz")) {
+ *eqObjAlert*eqAppAlert(InitMsg("*bqlabelISO"),3);
event.rc = false;
}
\end{defineJS}
-\def\RespBoxTxtDefaults
-{%
+\def\RespBoxTxtDefaults{%
\BC{0 0 0}\W{1}\S{S}\textColor{0 g}\F{\FPrint}%
}
-\def\moreRespBoxTxtDefaults
-{%
+\def\moreRespBoxTxtDefaults{%
\edef\@moreRespBoxTxtDefaults{%
\if\eqQuizType\isQZ\ifx\eq@online\eq@YES
\ifeq@noquizsolutions\else
\noexpand\Ff{\FfReadOnly}\fi\fi\fi
}%
}
-\def\@@RespBoxTxtActions
-{%
+\begin{defineJS}[\makeesc\!\makecmt\%]{\rbtAAKey}
+if(event.willCommit) {
+ var retn = ProcRespTxt(!rbTxtAlt);%
+!ifx!@sqTurnOffAlerts!eq@One
+ !RespBoxTxtOnBlur!fi%
+!ifx!eqAddAAKeystroke!@empty!else
+!eqAddAAKeystroke!fi
+}
+\end{defineJS}
+\def\@@RespBoxTxtActions{%
\AA{\if\eqQuizType\isQZ
% \end{macrocode}
-% Added \cs{eqAAKeystrokArg} to \cs{@@RespBoxTxtActions}
-% \changes{v7.8i}{2017/07/21}{Added \string\cs{eqAAKeystrokArg} to \string\cs{@@RespBoxTxtActions}}
+% Added \cs{eqAddAAKeystroke} to \cs{@@RespBoxTxtActions}
+% \changes{v7.8i}{2017/07/21}{Added \string\cs{eqAddAAKeystroke} to \string\cs{@@RespBoxTxtActions}}
% \begin{macrocode}
\AAKeystroke{\AAKqRespBoxTxt\eqAddAAKeystroke}
\AAFormat{\eqAddAAFormat}
\else
- \AAKeystroke{%
- if(event.willCommit) {\r\t
- retn = ProcRespTxt(\rbTxtAlt);\r
- \if\@sqTurnOffAlerts1
- \t\RespBoxTxtOnBlur\r\fi
- \eqAddAAKeystroke\r
- }%
- }
+ \AAKeystroke{\rbtAAKey}
\AAFormat{\eqAddAAFormat}
- \AAOnFocus{\JS{var retn = null;}}
+ \AAOnFocus{\JS{var\eqSP retn=null;}}
% \end{macrocode}
% (2005/12/02) A fix for Acro7.0, a change in the blur event, must
% move this event to keystroke so behavior is the same as in previous
% versions.
% \begin{macrocode}
- \if\@sqTurnOffAlerts0%
+ \ifx\@sqTurnOffAlerts\eq@Zero
\AAOnBlur{\JS{\RespBoxTxtOnBlur}}\fi
\fi
}
}
\def\annot@subtype@rbt{rbt}
-\newcommand\@RespBoxTxt[1][]
-{%
+\newcommand\@RespBoxTxt[1][]{%
\edef\annot@subtype{\annot@subtype@rbt}%
\eq@AddProbToQzQuesList
\ifx\grpquestions\eq@Zero\addtocounter{eqpointvalue}{\eqPTs}\fi
@@ -8511,7 +8628,7 @@ if (!isQuizInitialized("@currQuiz")) {
\def\eq@argi{-1}\fi\fi\fi
\def\eq@argii{#2}\ifx\eq@argii\eq@ONE\else\def\eq@argii{0}\fi
\begingroup
- \ifnum\eq@argii=1\relax
+ \ifnum\eq@argii=\@ne
% \end{macrocode}
% local definitions: \DescribeMacro{\rexpStr}\cs{rexpStr},
% \DescribeMacro{\\<RegEXP>}|\\|, and \DescribeMacro{\word}\cs{word}.
@@ -8528,37 +8645,37 @@ if (!isQuizInitialized("@currQuiz")) {
#4\space instead}{Enter a positive integer.}\fi
}
\def\@argRead#1{\xdef\jsTempArgs{\txtAltList}%
- \ifx\txtAltList\@empty\xdef\txtAltList{"#1"}\else
- \xdef\txtAltList{\jsTempArgs,"#1"}\fi\@@argRead}
+ \ifx\txtAltList\@empty\xdef\txtAltList{"#1"}\else
+ \xdef\txtAltList{\jsTempArgs,"#1"}\fi\@@argRead}
\def\@@argRead{\advance\eqtmpcnta\m@ne
- \ifnum\eqtmpcnta=\z@
- \def\eq@next{\endgroup
- \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}%
- \if\grpquestions\eq@Zero
- \ifwithinMCFI
- \xdef\s@veCorrAnsMCFI{[\txtAltList]}\else
- \eq@recordCorrAns{[\txtAltList]}\fi
- \else
+ \ifnum\eqtmpcnta=\z@
+ \def\eq@next{\endgroup
+ \xdef\rbTxtAlt{\rbTxtAlt,\txtAltList}%
+ \if\grpquestions\eq@Zero
+ \ifwithinMCFI
+ \xdef\s@veCorrAnsMCFI{[\txtAltList]}\else
+ \eq@recordCorrAns{[\txtAltList]}\fi
+ \else
% \end{macrocode}
% \changes{v7.8a}{2016/11/18}{Fixed a typo, \string\texttt{...AnsArrayi} should be
% \string\texttt{...AnsGrpAnsArray}}
% Fixed typo, changed \cs{eq@recordGrpAnsArrayi} to \cs{eq@recordGrpAnsArray}.
% \begin{macrocode}
- \eq@recordGrpAnsArray{[\txtAltList]}%
- \fi
- \eq@@RespBoxTxt
- }%
- \else
- \def\eq@next{\@argRead}%
- \fi\eq@next
+ \eq@recordGrpAnsArray{[\txtAltList]}%
+ \fi
+ \eq@@RespBoxTxt
+ }%
+ \else
+ \def\eq@next{\@argRead}%
+ \fi\eq@next
}
\def\eq@@RespBoxTxt{%
- \ifeq@proofing\makebox[0pt][l]{\space\txt@correctAnswer}\fi
- \eq@TextField
+ \ifeq@proofing\makebox[0pt][l]{\space\txt@correctAnswer}\fi
+ \eq@TextField
% \end{macrocode}
% Closing of the \cs{hbox} begun above.
% \begin{macrocode}
- \egroup
+ \egroup
}
% \end{macrocode}
% If the \texttt{proofing} option is specified, then we type out the author's list of
@@ -8566,8 +8683,8 @@ if (!isQuizInitialized("@currQuiz")) {
% \begin{macrocode}
\def\gobbleTxt#1>#2,#3,#4,{}
\gdef\txt@correctAnswer{\ttfamily\color{\@proofingsymbolColor}%
- \spaceskip=2pt\xspaceskip=2pt
- \expandafter\gobbleTxt\meaning\rbTxtAlt
+ \spaceskip=2pt\xspaceskip=2pt
+ \expandafter\gobbleTxt\meaning\rbTxtAlt
}
% \end{macrocode}
% \end{macro}
@@ -8607,107 +8724,104 @@ if (!isQuizInitialized("@currQuiz")) {
% that $4$ alternatives follow.)
% \end{description}
% \begin{macrocode}
-\begin{defineJS}[%
- \catcode`\@=0\relax\catcode`\%=14\relax]{\AAKqRespBoxTxtPC}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\AAKqRespBoxTxtPC}
if(event.willCommit){
- RecordPointValue(@eqPTs,@thequestionno@ifx@grpquestions1,%
-@thegrpquestionno,@grpPointValue,@grpTotalWeight,%
-"@grpEvalFunction"@fi);
- RecordProblemType("@eqQT",@thequestionno);
- var retn = ProcRespTxtPC(@rbTxtAlt);
-@ifx@grpquestions1%
-ProbValue[@thequestionno][3+@thegrpquestionno]%
-=ProcRespTxtPC.txtPCpCr;@else%
-ProbValue[@thequestionno]=ProcRespTxtPC.txtPCpCr;@fi
- ProcUserResp(retn,event.value,@thequestionno,0%
-@ifx@grpquestions1,@thegrpquestionno@fi);
-}
-if (!isQuizInitialized("@currQuiz")) {
- @eqObjAlert@space eqAppAlert(InitMsg("@bqlabelISO"),3);
- event.rc = false;
+ RecordPointValue(*eqPTs,*thequestionno*ifx*grpquestions*eq@One,%
+*thegrpquestionno,*grpPointValue,*grpTotalWeight,%
+"*grpEvalFunction"*fi);
+ RecordProblemType("*eqQT",*thequestionno);
+ var retn = ProcRespTxtPC(*rbTxtAlt);
+*ifx*grpquestions*eq@One%
+ ProbValue[*thequestionno][3+*thegrpquestionno]%
+=ProcRespTxtPC.txtPCpCr;*else%
+ ProbValue[*thequestionno]=ProcRespTxtPC.txtPCpCr;*fi
+ ProcUserResp(retn,event.value,*thequestionno,0%
+*ifx*grpquestions*eq@One,*thegrpquestionno*fi);
+}
+if (!isQuizInitialized("*currQuiz")) {
+ *eqObjAlert*eqAppAlert(InitMsg("*bqlabelISO"),3);
+ event.rc = false;
}
\end{defineJS}
-\def\@@RespBoxTxtPCActions
-{%
- \AA{\if\eqQuizType\isQZ
- \AAKeystroke{\AAKqRespBoxTxtPC}
- \else
- \AAKeystroke{%
- if(event.willCommit) {\r\t
- retn = ProcRespTxtPC(\rbTxtAlt);\r
-\if\@sqTurnOffAlerts1%
- \t\RespBoxTxtOnBlur\r
-\fi
- }%
- }
- \AAOnFocus{\JS{var retn = null;}}
-\if\@sqTurnOffAlerts0%
- \AAOnBlur{\JS{\RespBoxTxtOnBlur}}%
-\fi
- \fi
- }
+\begin{defineJS}[\makeesc\!\makecmt\%]{\rbtPCAAKey}
+if(event.willCommit) {
+ retn = ProcRespTxtPC(!rbTxtAlt);%
+!ifx!@sqTurnOffAlerts!eq@One
+ !RespBoxTxtOnBlur!fi%
+}
+\end{defineJS}
+\def\@@RespBoxTxtPCActions{%
+ \AA{%
+ \if\eqQuizType\isQZ
+ \AAKeystroke{\AAKqRespBoxTxtPC}
+ \else
+ \AAKeystroke{\rbtPCAAKey}
+ \AAOnFocus{\JS{var\eqSP retn=null;}}
+ \ifx\@sqTurnOffAlerts\eq@Zero
+ \AAOnBlur{\JS{\RespBoxTxtOnBlur}}\fi
+ \fi
+ }
}
% \end{macrocode}
% Here is the beginning of \cs{RespBoxTxtPC}.
% \begin{macrocode}
\newcommand{\RespBoxTxtPC}{\def\rbFlag{0}\@RespBoxTxtPC}
\def\annot@subtype@rbtpc{rbtpc}
-\newcommand\@RespBoxTxtPC[1][]
-{%
- \edef\annot@subtype{\annot@subtype@rbtpc}%
- \eq@AddProbToQzQuesList
- \smallskip\ifx\grpquestions\eq@Zero
- \addtocounter{eqpointvalue}{\eqPTs}\fi
- \if\eqQuizType\isQZ\def\rbFlag{1}\global\IsRespBoxtrue
- \ifx\grpquestions\eq@One
- \stepcounter{grpquestionno}%
- \def\Fld@name{%
- grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
- \else
- \eq@recordThesePTs\eq@recordProbType
- \edef\eqtmp{\aPointType}%
- \xdef\aPointType{\eqtmp,[\eqPTs,"text"]}%
- \stepcounter{questionno}%
- \def\Fld@name{obj.\curr@quiz.\thequestionno}%
- \fi
+\newcommand\@RespBoxTxtPC[1][]{%
+ \edef\annot@subtype{\annot@subtype@rbtpc}%
+ \eq@AddProbToQzQuesList
+ \smallskip\ifx\grpquestions\eq@Zero
+ \addtocounter{eqpointvalue}{\eqPTs}\fi
+ \if\eqQuizType\isQZ\def\rbFlag{1}\global\IsRespBoxtrue
+ \ifx\grpquestions\eq@One
+ \stepcounter{grpquestionno}%
+ \def\Fld@name{%
+ grpobj.\curr@quiz.\thequestionno.\thegrpquestionno}%
\else
- \stepcounter{questionno}%
- \def\Fld@name{obj.\oField.\thequestionno}%
+ \eq@recordThesePTs\eq@recordProbType
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"text"]}%
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\curr@quiz.\thequestionno}%
\fi
- \moreRespBoxTxtDefaults
- \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
- {\RBW}{\DefaultHeightOfWidget}%
- {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxTxtPC}%
- {\RespBoxTxtDefaults\@moreRespBoxTxtDefaults
- \@@RespBoxTxtPCActions\every@eqTextField\every@RespBoxTxt}%
+ \else
+ \stepcounter{questionno}%
+ \def\Fld@name{obj.\oField.\thequestionno}%
+ \fi
+ \moreRespBoxTxtDefaults
+ \leavevmode\hbox\bgroup\text@@Field{#1}{\Fld@name}%
+ {\RBW}{\DefaultHeightOfWidget}%
+ {\eq@protect\AA}{\eq@setWidgetProps\@@RespBoxTxtPC}%
+ {\RespBoxTxtDefaults\@moreRespBoxTxtDefaults
+ \@@RespBoxTxtPCActions\every@eqTextField\every@RespBoxTxt}%
}
\def\@@RespBoxTxtPC#1{\@ifnextchar[{\@@@RespBoxTxtPC{#1}}
- {\@ifstar{\@@@RespBoxTxtPC{#1}[\curr@quiz.\thequestionno]}%
- {\@@@RespBoxTxtPC{#1}[]}}}
+ {\@ifstar{\@@@RespBoxTxtPC{#1}[\curr@quiz.\thequestionno]}%
+ {\@@@RespBoxTxtPC{#1}[]}}}
\def\@@@RespBoxTxtPC#1[#2]#3{\xdef\@qzsolndest{#2}%
\begingroup
% \end{macrocode}
% We make special definitions for retrieving the parameters.
% \begin{macrocode}
- \def\rexpStr##1{\eqbs\eqbs\eqbs\eqbs##1}%
- \def\\##1{\eqbs\eqbs\eqbs\eqbs##1}%
- \def\word##1{\\b##1\\b}\def\any{@any@}
- \gdef\rbTxtAlt{\rbFlag,#1,1}% force sub-string match
- \global\let\txtAltList\@empty
- \eqtmpcnta=#3\relax\ifnum\eqtmpcnta>\z@\expandafter\@argReadPC\else
- \PackageError{exerquiz}{%
- The third required parameter of
- \string\RespBoxTxtPC\MessageBreak
- is required to be a positive integer.
- You entered\MessageBreak #3\space instead}
- {Enter a positive integer.}\fi
+ \def\rexpStr##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\\##1{\eqbs\eqbs\eqbs\eqbs##1}%
+ \def\word##1{\\b##1\\b}\def\any{@any@}
+ \gdef\rbTxtAlt{\rbFlag,#1,1}% force sub-string match
+ \global\let\txtAltList\@empty
+ \eqtmpcnta=#3\relax\ifnum\eqtmpcnta>\z@\expandafter\@argReadPC\else
+ \PackageError{exerquiz}{%
+ The third required parameter of
+ \string\RespBoxTxtPC\MessageBreak
+ is required to be a positive integer.
+ You entered\MessageBreak #3\space instead}
+ {Enter a positive integer.}\fi
}
% \end{macrocode}
% \texttt{\#1=<num>}, partial credit for this answer, \texttt{\#2=word}.
% \begin{macrocode}
\newcommand\@argReadPC[2][0]{\xdef\jsTempArgs{\txtAltList}%
- \ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else
- \xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC}
+ \ifx\txtAltList\@empty\xdef\txtAltList{["#2",#1]}\else
+ \xdef\txtAltList{\jsTempArgs,["#2",#1]}\fi\@@argReadPC}
\def\@@argReadPC{\advance\eqtmpcnta\m@ne
\ifnum\eqtmpcnta=\z@
\def\eq@next{\endgroup
@@ -8786,22 +8900,20 @@ if (!isQuizInitialized("@currQuiz")) {
{%
\BC{0 0 0}\W{1}\S{S}\Ff{\FfMultiline}\rawPDF{}%
}
-\def\@@RespBoxEssayActions
-{%
- \AA{\if\eqQuizType\isQZ
- \AAKeystroke{%
- if(event.willCommit){\jsR\jsT
- RecordPointValue(\eqPTs,\thequestionno);\jsR\jsT
- RecordProblemType("\eqQT",\thequestionno);\jsR %\jsT
- }\jsR
- if (!isQuizInitialized("\curr@quiz")) {\jsR\jsT
- \eqObjAlert\space eqAppAlert(%
- InitMsg("\bqlabelISO"),3);\jsR\jsT
- event.rc = false;\jsR
- }%
- }%
- \fi
- }
+\def\@@RespBoxEssayActions{\AA{%
+ \if\eqQuizType\isQZ
+ \AAKeystroke{%
+ if(event.willCommit){\jsR\jsT
+ RecordPointValue(\eqPTs,\thequestionno);\jsR\jsT
+ RecordProblemType("\eqQT",\thequestionno);\jsR %\jsT
+ }\jsR
+ if (!isQuizInitialized("\curr@quiz")) {\jsR\jsT
+ \eqObjAlert\space eqAppAlert(%
+ InitMsg("\bqlabelISO"),3);\jsR\jsT
+ event.rc = false;\jsR
+ }%
+ }%
+ \fi}%
}
% \RespBoxEssay[opt][dest]|*{wd}{ht}
\def\annot@subtype@rbe{rbe}
@@ -8813,22 +8925,21 @@ if (!isQuizInitialized("@currQuiz")) {
{\RespBoxEssay@ii[]}%
}
% \RespBoxEssay#1[dest]{wd}{ht}
-\newcommand\RespBoxEssay@ii[3][]
-{%
- \smallskip\addtocounter{eqpointvalue}{\eqPTs}%
+\newcommand\RespBoxEssay@ii[3][]{%
+ \smallskip\addtocounter{eqpointvalue}{\eqPTs}%
% \end{macrocode}
% (2019/06/26) Added \cs{eq@AddProbToQzQuesList} for \cs{RespBoxEssay}
% \changes{v8.2.13}{2019/06/26}{Added \string\cs{eq@AddProbToQzQuesList} for \string\cs{RespBoxEssay}}
% \begin{macrocode}
- \eq@AddProbToQzQuesList
- \stepcounter{questionno}%
- \xdef\@qzsolndest{#1}%
- \edef\eqtmp{\aPointType}\xdef\aPointType{\eqtmp,[\eqPTs,"essay"]}%
- \expandafter\mbox\expandafter{\expandafter\text@@Field
- \expandafter{\rbe@rgi}{essay.\curr@quiz.\thequestionno}{#2}{#3}%
- {\eq@protect\AA}{\eq@setWidgetProps
- \eq@TextField}{\RespBoxEssayDefaults\@@RespBoxEssayActions
- \every@eqTextField}}%
+ \eq@AddProbToQzQuesList
+ \stepcounter{questionno}%
+ \xdef\@qzsolndest{#1}%
+ \edef\eqtmp{\aPointType}\xdef\aPointType{\eqtmp,[\eqPTs,"essay"]}%
+ \expandafter\mbox\expandafter{\expandafter\text@@Field
+ \expandafter{\rbe@rgi}{essay.\curr@quiz.\thequestionno}{#2}{#3}%
+ {\eq@protect\AA}{\eq@setWidgetProps
+ \eq@TextField}{\RespBoxEssayDefaults\@@RespBoxEssayActions
+ \every@eqTextField}}%
}
% \end{macrocode}
% \end{macro}
@@ -8843,21 +8954,19 @@ if (!isQuizInitialized("@currQuiz")) {
\@ifundefined{calcOrder}{%
\ifpdf\def\@@sqTallyBoxActions{%
\AA{\AAValidate{getTotalTally("\oField");}}}\fi}{}
-\def\sqTallyBoxDefaults
-{%
+\def\sqTallyBoxDefaults{%
\BC{0 0 0}\W{1}\textColor{1 0 0 rg}\S{I}\Q{2}\Ff{\FfReadOnly}
}
\ifpdf\def\@@sqTallyBoxActions{%
- \AA{\AAValidate{getTotalTally("\oField");}}}\else
- \let\@@sqTallyBoxActions\@empty
+ \AA{\AAValidate{getTotalTally("\oField");}}}\else
+ \let\@@sqTallyBoxActions\@empty
\fi
-\newcommand\sqTallyBox[1][]
-{%
- \mbox{\text@@Field{#1}{tally.\oField.\thequestionno}%
- {\TBW}{\DefaultHeightOfWidget}%
- {}{\eq@setWidgetProps\eq@TextField}%
- {\sqTallyBoxDefaults\@@sqTallyBoxActions\every@eqTextField
- \every@sqTallyBox}}%
+\newcommand\sqTallyBox[1][]{%
+ \mbox{\text@@Field{#1}{tally.\oField.\thequestionno}%
+ {\TBW}{\DefaultHeightOfWidget}%
+ {}{\eq@setWidgetProps\eq@TextField}%
+ {\sqTallyBoxDefaults\@@sqTallyBoxActions\every@eqTextField
+ \every@sqTallyBox}}%
}
% \end{macrocode}
% \end{macro}
@@ -8866,28 +8975,24 @@ if (!isQuizInitialized("@currQuiz")) {
% \texttt{shortquiz} environment. Takes on optional parameter; this
% parameter can be used to modify the appearance of the fields.
% \begin{macrocode}
-\def\sqTallyTotalDefaults
-{%
- \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}%
- \Q{2}\Ff{\FfReadOnly}%
+\def\sqTallyTotalDefaults{%
+ \rawPDF{}\W{1}\BC{0 0 0}\S{I}\textColor{1 0 0 rg}%
+ \Q{2}\Ff{\FfReadOnly}%
}
-\def\@@sqTallyTotalActions
-{%
- \AA{%
- \AAKeystroke{AFNumber_Keystroke(0,0,0,0,"",true);}
- \AAFormat{AFNumber_Format(0,0,0,0,"",true);}
- \AACalculate{%
- AFSimple_Calculate("SUM",new Array("tally.\oField"));
- }}
-}
-\newcommand\sqTallyTotal[1][]
-{%
- \mbox{\text@@Field{#1}{tallytotal.\oField}{\TBW}%
- {\DefaultHeightOfWidget}{\eq@protect\AA}%
-% {\eq@setWidgetProps\eq@calcTextField}%
- {\eq@setWidgetProps\eq@TextField}%
- {\sqTallyTotalDefaults\@@sqTallyTotalActions\every@eqTextField
- \every@sqTallyTotal}}%
+\def\@@sqTallyTotalActions{%
+ \AA{%
+ \AAKeystroke{AFNumber_Keystroke(0,0,0,0,"",true);}
+ \AAFormat{AFNumber_Format(0,0,0,0,"",true);}
+ \AACalculate{%
+ AFSimple_Calculate("SUM",new Array("tally.\oField"));
+ }}%
+}
+\newcommand\sqTallyTotal[1][]{%
+ \mbox{\text@@Field{#1}{tallytotal.\oField}{\TBW}%
+ {\DefaultHeightOfWidget}{\eq@protect\AA}%
+ {\eq@setWidgetProps\eq@TextField}%
+ {\sqTallyTotalDefaults\@@sqTallyTotalActions\every@eqTextField
+ \every@sqTallyTotal}}%
}
% \end{macrocode}
% \end{macro}
@@ -8919,96 +9024,95 @@ if (!isQuizInitialized("@currQuiz")) {
%\end{verbatim}
% Here, we call a function to evaluate the answer for us.
% \begin{macrocode}
-\def\CorrAnsButtonDefaults
-{%
- \CA{\eq@local@CorrAnsButton}\W{1}\S{S}
- \BC{0 0 0}\BG{.7529 .7529 .7529}\H{P}
+\def\CorrAnsButtonDefaults{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}
+ \BC{0 0 0}\BG{.7529 .7529 .7529}\H{P}
}
\def\normalCABtnBC{0 0 0}
\def\qCorrAnsButtonActionHook{\JS{%
\ifx\@qzsolndest\@empty\else
- if (event.shift)\jsR\jsT
+ if(event.shift)\jsR\jsT
this.gotoNamedDest("\@qzsolndest");\jsR
else {\jsR\jsT\fi
% \end{macrocode}
% The script for the \cs{CorrAnsButton} accommodates multi-letter variables
% \begin{macrocode}
-\ifShowAppr % dps17
+\ifShowAppr
\ifarrowDelim
- if (typeof event.target.appr=="undefined")\r\JST\t
+ if(typeof event.target.appr=="undefined")\r\JST\t
event.target.appr=false;\r\JST
event.target.appr=!event.target.appr;\r\JST
- if (event.target.appr) {\r\t\JST
- var _substVars=\indepVars;\r\t\JST
- var _substAns=getSubstValue(_substVars,"\CorrectAns");\r\t\JST
- var value=RespBoxAppr("\CorrectAns");\r\JST
- } else value="\CorrectAns";\r\JST
+ if(event.target.appr) {\r\t\JST
+ var\eqSP_substVars=\indepVars;\r\t\JST
+ var\eqSP_substAns=getSubstValue(_substVars,"\CorrectAns");\r\t\JST
+ var\eqSP value=RespBoxAppr("\CorrectAns");\r\JST
+ } else\eqSP var\eqSP value="\CorrectAns";\r\JST
\else
- value="\CorrectAns";\r\JST
+ var\eqSP value="\CorrectAns";\r\JST
\fi
\else
- value="\CorrectAns";\r\JST
+ var\eqSP value="\CorrectAns";\r\JST
\fi
\processJSfunc("Ans.\curr@quiz",value,\currQuiz);\r
-\ifx\@qzsolndest\@empty\else % dps17
+\ifx\@qzsolndest\@empty\else
}\fi
}}
- \def\sqCorrAnsButtonActionHook
- {%
- \JS{%
% \end{macrocode}
-% Allow local definition the reset color for response boxes. The reset color
-% is normally black (\cs{eqDefaultColor}). Now if \cs{sqCorrAnsResetBC} is none
-% empty, we put it in as a property of the \cs{oField} object.
+% \leavevmode\DescribeMacro{\sqCorrAnsCode}
+% The JavaScript code for \cs{CorrAnsButton} now in a \env{defineJS} env.
+% \changes{v8.6}{2020/11/29}{code for \string\cs{CorrAnsButton} now in a \string\env{defineJS} env}
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\!\makecmt\%]{\sqCorrAnsCode}
+!ifx!@qzsolndest!@empty%
+!processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
+!currQuiz);!else%
+if (event.shift) this.gotoNamedDest("!@qzsolndest");
+else !processJSfunc("obj.!oField.!thequestionno","!CorrectAns",%
+!currQuiz);!fi
+\end{defineJS}
+\def\sqCorrAnsButtonActionHook{\JS{\sqCorrAnsCode}}
+% \end{macrocode}
+% \leavevmode\DescribeMacro{\CorrAnsButton}
+% The definition of \cs{CorrAnsButton}
% \begin{macrocode}
- \ifx\@qzsolndest\@empty\else
- if (event.shift)\jsR\jsT
- this.gotoNamedDest("\@qzsolndest");\jsR
- else\jsR\jsT
- \fi
- \processJSfunc("obj.\oField.\thequestionno","\CorrectAns",%
-\currQuiz);
- }%
- }
\newcommand\CorrAnsButton[1][]{\eq@@CorrAnsButton{#1}}
\def\eq@@CorrAnsButton#1#2{\bgroup\makeJSspecials % 1/12
- \@ifstar{\eq@@@CorrAnsButton{#1}{#2}}{%
- \eq@@@CorrAnsButton{#1}{#2}{DisplayAnswer}}%
-}
+ \@ifstar{\eq@@@CorrAnsButton{#1}{#2}}{%
+ \eq@@@CorrAnsButton{#1}{#2}{DisplayAnswer}}}
\def\eq@@@CorrAnsButton#1#2#3{\gdef\CorrectAns{#2}%
- \def\processJSfunc{#3}\ifx\@qzsolndest\@empty\let\JST\@empty\else
- \let\JST\jsT\fi % dps17
- \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
- \let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
+ \def\processJSfunc{#3}\ifx\@qzsolndest\@empty\let\JST\@empty\else
+ \let\JST\jsT\fi % dps17
+ \ifx\eq@ProcRespIntervals\g@processJSfunc % 01/11
+ \let\@inmathwarn@SAVE\@inmathwarn\let\@inmathwarn\@gobble
% \end{macrocode}
% When the response function is \texttt{ProcRespIntervals}, there may be unbalanced parentheses, we'll
% pass \cs{CorrectAns} through \cs{pdfstringdef} to escape them.
% \begin{macrocode}
- \pdfstringdef{\CorrectAns}{\CorrectAns}%
- \let\@inmathwarn\@inmathwarn@SAVE\fi
+ \pdfstringdef{\CorrectAns}{\CorrectAns}%
+ \let\@inmathwarn\@inmathwarn@SAVE\fi
\if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
\else\def\Fld@name{corr.\oField.\thequestionno}\fi
\if\eqQuizType\isQZ
- \edef\@@CorrAnsButtonActions{\noexpand\F{\FHidden}%
- \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
- \else\noexpand\BC{\solution@Color}\fi
- \noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
- \ifeq@noquizsolutions\else % dps17 (\let\rpl\eq@rpl)
- \mbox{\let\rpl\eq@rpl
- \push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
- \every@ButtonField\every@CorrAnsButton}}%
- \fi
+ \edef\@@CorrAnsButtonActions{\noexpand\F{\FHidden}%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}%
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\qCorrAnsButtonActionHook}}%
+ \ifeq@noquizsolutions\else % dps17 (\let\rpl\eq@rpl)
+ \mbox{\let\rpl\eq@rpl
+ \push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
\else
\edef\@@CorrAnsButtonActions{%
\ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
\else\noexpand\BC{\solution@Color}\fi
\noexpand\A{\noexpand\sqCorrAnsButtonActionHook}}%
\mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
- \every@ButtonField\every@CorrAnsButton}}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonDefaults\@@CorrAnsButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
\fi
\egroup
}
@@ -9034,41 +9138,40 @@ if (!isQuizInitialized("@currQuiz")) {
}
% \end{macrocode}
% In an attempt to supply some custom colors for the shortquiz, we
-% define \cmd{\sqRespBoxResetColor}. It determines the clear
-% \begin{macrocode}
-\def\@@sqClearButtonActions
-{%
- \A{\JS{ProcessIt = false;\jsR
- if ( typeof \oField\space== "undefined" )\jsR\jsT
- \oField\space= new Object;\jsR
- if (typeof appAlerts["\oField"] == "undefined")\jsR\jsT
- appAlerts["\oField"] = new Object;\jsR
- this.resetForm(new Array("mc.\oField","obj.\oField",%
- "tally.\oField","grpobj.\oField"));\jsR
- var f = this.getField("obj.\oField");\jsR
+% define \cmd{\sqRespBoxResetColor}. It determines the clear color
+% \changes{v8.6}{2020/11/29}{Rewrote SQ clear button using \string\env{defineJS} env}
+% \begin{macrocode}
+\begin{defineJS}[\makeesc\*\makecmt\%]{\@@sqClearButtonJSCode}
+ProcessIt = false;
+if ( typeof *oField == "undefined" )
+ *oField = new Object;
+if (typeof appAlerts["*oField"] == "undefined")
+ appAlerts["*oField"] = new Object;
+this.resetForm(new Array("mc.*oField","obj.*oField",%
+"tally.*oField","grpobj.*oField"));
+var f = this.getField("obj.*oField");
+if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
+*defaultColorJS*else*defaultColorJSLoc*fi;
+f = this.getField("grpobj.*oField");
% \end{macrocode}
% Here, we give the user an opportunity to designate the color
% of the response boxes when they are reset by the \cs{sqClearButton}.
% The default is to use \cs{eqDefaultColor}.
% \begin{macrocode}
- if ( f != null ) f.strokeColor=\ifx\defaultColorJSLoc\@empty
-\defaultColorJS\else\defaultColorJSLoc\fi;\jsR
- f = this.getField("grpobj.\oField");\jsR
- if ( f != null ) f.strokeColor=\ifx\defaultColorJSLoc\@empty
-\defaultColorJS\else\defaultColorJSLoc\fi;\jsR
- f = this.getField("rbmarkup.\oField");\jsR
- if ( f != null ) f.display=display.hidden;\jsR
- \oField.Grp = {};\jsR
- appAlerts["\oField"].bAfterValue=false;\jsR
- ProcessIt=true;}%
- }
-}
-\newcommand\sqClearButton[1][]
-{%
- \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
- \every@sqClearButton}}%
+if ( f != null ) f.strokeColor=*ifx*defaultColorJSLoc*@empty%
+*defaultColorJS*else*defaultColorJSLoc*fi;
+f = this.getField("rbmarkup.*oField");
+if ( f != null ) f.display=display.hidden;
+*oField.Grp = {};
+appAlerts["*oField"].bAfterValue=false;
+ProcessIt=true;
+\end{defineJS}
+\def\@@sqClearButtonActions{\A{\JS{\@@sqClearButtonJSCode}}}
+\newcommand\sqClearButton[1][]{%
+ \mbox{\push@@Button{#1}{clear.\oField}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\sqClearButtonDefaults\@@sqClearButtonActions\every@ButtonField
+ \every@sqClearButton}}%
}
% \end{macrocode}
% \end{macro}
@@ -9079,49 +9182,43 @@ if (!isQuizInitialized("@currQuiz")) {
% the student cannot enter another answer in the text field, and the input that is already
% there will be the one that is counted has the student's response.
% \begin{macrocode}
-\def\PromptButtonDefaults
-{%
- \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
- \BG{.7529 .7529 .7529}\H{P}
+\def\PromptButtonDefaults{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
+ \BG{.7529 .7529 .7529}\H{P}
}
\newcommand{\promptButtonMsg}{%
- "Would you like to see the correct answer at this time? "\r\t\t
- + "Your current answer will be the one that will be scored. "\r\t\t
- + "If you click on \\"Yes\\",
- you will not be able to change your answer."
+ "Would you like to see the correct answer at this time? "\r\t\t
+ + "Your current answer will be the one that will be scored. "\r\t\t
+ + "If you click on \\"Yes\\",
+ you will not be able to change your answer."
}
\newcommand{\AnsPromptBtnStr}{Answer:\space}
-\def\PromptButtonActionHook
-{%
- \JS{%
- if (!isQuizInitialized("\currQuiz")) {\r\t
- eqAppAlert(InitMsg("\bqlabelISO"),3);\r\t
- event.rc=false;\r
- } else {\r\t
- if ( !\currQuiz.oAlertCheck.bAfterValue ) {\r\t
- var resp=eqAppAlert({\r\t\t
- cMsg:\promptButtonMsg,\r\t\t
- nIcon: 2, nType: 2,\r\t\t
- cTitle: ("AcroTeX Prompt Message"),\r\t\t
- oCheckbox: \currQuiz.oAlertCheck\r\t
- });\r\t
- }\r
+\begin{defineJS}[\makeesc\*\makecmt\%]{\PromptButtonActionCode}
+if (!isQuizInitialized("*currQuiz")) {
+ eqAppAlert(InitMsg("*bqlabelISO"),3);
+ event.rc=false;
+} else {
+ if ( !*currQuiz.oAlertCheck.bAfterValue ) {
+ var resp=eqAppAlert({
+ cMsg:*promptButtonMsg,
+ nIcon: 2, nType: 2,
+ cTitle: ("AcroTeX Prompt Message"),
+ oCheckbox: *currQuiz.oAlertCheck
+ });
+ }
% \end{macrocode}
% Correction to the if condition below
% \changes{v7.8d}{2017/01/11}{Correction to the if condition in \string\cs{PromptButtonActionHook}}
% \begin{macrocode}
- if ( promptQuiz.oAlertCheck.bAfterValue || resp==4 )\r\t
- {\r\t\t
- var field=this.getField(%
- "obj.\currQuiz.\thequestionno");\r\t\t
- field.readonly=true;\r\t\t
- field=this.getField("Ans.\currQuiz");\r\t\t
- if (field!=null)
- field.value = "\AnsPromptBtnStr\PromptAns";\r\t
- }\r
- }
- }%
+ if ( promptQuiz.oAlertCheck.bAfterValue || resp==4 ) {
+ var field=this.getField("obj.*currQuiz.*thequestionno");
+ field.readonly=true;
+ field=this.getField("Ans.*currQuiz");
+ if (field!=null) field.value = ("*AnsPromptBtnStr*PromptAns");
+ }
}
+\end{defineJS}
+\def\PromptButtonActionHook{\JS{\PromptButtonActionCode}}
% \end{macrocode}
% This button takes the standard two arguments
% \begin{flushleft}
@@ -9129,22 +9226,21 @@ if (!isQuizInitialized("@currQuiz")) {
% \texttt{\#2}: Prompt answer
% \end{flushleft}
% \begin{macrocode}
-\newcommand\@PromptButton[2][]
-{%
- \def\PromptAns{#2}\if\eqQuizType\isQZ
- \def\Fld@name{promptButton.\curr@quiz.\thequestionno}%
- \else\def\Fld@name{promptButton.\oField.\thequestionno}\fi
- \if\eqQuizType\isQZ
- \def\@@PromptButtonActions{%
- \A{\PromptButtonActionHook}}%
- \mbox{\push@@Button{#1}{\Fld@name}{}%
- {\DefaultHeightOfWidget}{\eq@protect\A}%
- {\eq@setButtonProps\eq@Button@driver}%
- {\PromptButtonDefaults\@@PromptButtonActions
- \every@ButtonField\every@CorrAnsButton}}%
- \else\PackageWarning{exerquiz}{The \string\PromptButton
- is for quiz questions only.}
- \fi
+\newcommand\@PromptButton[2][]{%
+ \def\PromptAns{#2}\if\eqQuizType\isQZ
+ \def\Fld@name{promptButton.\curr@quiz.\thequestionno}%
+ \else\def\Fld@name{promptButton.\oField.\thequestionno}\fi
+ \if\eqQuizType\isQZ
+ \def\@@PromptButtonActions{%
+ \A{\PromptButtonActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\PromptButtonDefaults\@@PromptButtonActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \else\PackageWarning{exerquiz}{The \string\PromptButton
+ is for quiz questions only.}
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -9153,7 +9249,7 @@ if (!isQuizInitialized("@currQuiz")) {
% \cs{CorrAnsButton} as the answer provided by the author.
% \begin{macrocode}
\newcommand{\PromptButton}{\makebox[0pt][r] % assumes xcolor
- {\@PromptButton[\textColor{1 0 0 rg}]{\CorrectAns}}}
+ {\@PromptButton[\textColor{1 0 0 rg}]{\CorrectAns}}}
% \end{macrocode}
% \begin{environment}{mathGrp}
% An environment for enclosing a collection of math/text fill-ins that are to be grouped
@@ -9169,162 +9265,128 @@ if (!isQuizInitialized("@currQuiz")) {
% \begin{macrocode}
\let\eq@ansGrpArray\@empty
\def\eq@recordGrpAnsArray#1{%
- \ifx\eq@ansGrpArray\@empty
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\eq@ansGrpArray{#1}}\else
- \edef\tmp@exp{\noexpand\g@addto@macro
- \noexpand\eq@ansGrpArray{,#1}}\fi
- \tmp@exp
+ \ifx\eq@ansGrpArray\@empty
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansGrpArray{#1}}\else
+ \edef\tmp@exp{\noexpand\g@addto@macro
+ \noexpand\eq@ansGrpArray{,#1}}\fi
+ \tmp@exp
}
\let\grpquestions\eq@Zero
\def\mathGrp{\global\let\eq@ansGrpArray\@empty
- \@ifnextchar[{\@imathGrp}{\@imathGrp[groupEval]}}
+ \@ifnextchar[{\@imathGrp}{\@imathGrp[groupEval]}}
\def\@imathGrp[#1]{\def\argi{#1}%
- \@ifnextchar[{\@iimathGrp}{\@iimathGrp[]}}
+ \@ifnextchar[{\@iimathGrp}{\@iimathGrp[]}}
\def\@iimathGrp[#1]{\def\argii{#1}%
- \eq@AddProbToQzQuesList
- \global\let\grpquestions\eq@One
- \setcounter{grpquestionno}{0}%
- \stepcounter{questionno}%
- \xdef\beginGrp{\thequestionno}%
- \xdef\grpPointValue{\eqPTs}%
- \eq@recordThesePTs\eq@recordProbType
- \if\eqQuizType\isQZ
- \edef\eqtmp{\aPointType}%
- \xdef\aPointType{\eqtmp,[\eqPTs,"grp"]}\fi
- \addtocounter{eqpointvalue}{\eqPTs}%
- \ifx\argii\@empty
- \xdef\grpTotalWeight{\eqPTs}%
- \xdef\grpEvalFunction{\argi}%
- \else
- \xdef\grpTotalWeight{\argi}%
- \xdef\grpEvalFunction{\argii}%
- \fi
+ \eq@AddProbToQzQuesList
+ \global\let\grpquestions\eq@One
+ \setcounter{grpquestionno}{0}%
+ \stepcounter{questionno}%
+ \xdef\beginGrp{\thequestionno}%
+ \xdef\grpPointValue{\eqPTs}%
+ \eq@recordThesePTs\eq@recordProbType
+ \if\eqQuizType\isQZ
+ \edef\eqtmp{\aPointType}%
+ \xdef\aPointType{\eqtmp,[\eqPTs,"grp"]}\fi
+ \addtocounter{eqpointvalue}{\eqPTs}%
+ \ifx\argii\@empty
+ \xdef\grpTotalWeight{\eqPTs}%
+ \xdef\grpEvalFunction{\argi}%
+ \else
+ \xdef\grpTotalWeight{\argi}%
+ \xdef\grpEvalFunction{\argii}%
+ \fi
}
\def\endmathGrp{\global\let\grpquestions\eq@Zero
- \eq@recordCorrAns{[\eq@ansGrpArray]}%
- \xdef\endGrp{\thequestionno}}
+ \eq@recordCorrAns{[\eq@ansGrpArray]}%
+ \xdef\endGrp{\thequestionno}}
% \end{macrocode}
% \end{environment}
% \begin{macro}{\CorrAnsButtonGrp}
% The correct answer button for grouped questions.
+% \changes{v8.6}{2020/11/29}{Action for group answer btn now a \string\env{defineJS} env}
% \begin{macrocode}
-\def\CorrAnsButtonGrpDefaults
-{%
- \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
- \BG{.7529 .7529 .7529}\H{P}
+\def\CorrAnsButtonGrpDefaults{%
+ \CA{\eq@local@CorrAnsButton}\W{1}\S{S}\BC{0 0 0}
+ \BG{.7529 .7529 .7529}\H{P}
}
-\def\CorrAnsButtonGrpActionHook{\JS{%
-\ifx\@qzsolndest\@empty\else
- if (event.shift)\jsR\jsT
- this.gotoNamedDest("\@qzsolndest");\jsR
- else\jsR
-\fi
- {\jsR\jsT
- var aCorrectAns=\CorrectAns;\jsR\jsT
- var beginGrp = 1;\jsR\jsT
- grpOffset = beginGrp;\jsR\jsT
-% if ( typeof \currQuiz == "undefined" ) {\jsR\jsT\jsT
-% \currQuiz = new Object;\jsR\jsT\jsT
-% \currQuiz.Grp = {};\jsR\jsT
-% }\jsR\jsT
- if ( \currQuiz.Grp==null ) \currQuiz.Grp = {};\jsR\jsT
- if (typeof \currQuiz.Grp["\thequestionno"]=="undefined")\jsR\jsT
- {\jsR\jsT\jsT
- \currQuiz.Grp["\thequestionno"] = {offset: 0};\jsR\jsT\jsT
- var f = this.getField(%
- "grpobj.\curr@quiz.\thequestionno."
- + grpOffset)\jsR\jsT\jsT
+\begin{defineJS}[\makeesc\!\makecmt\%]{\cabGrpActn}
+!ifx!@qzsolndest!@empty!else%
+if (event.shift) this.gotoNamedDest("!@qzsolndest");
+else !fi%
+{
+ var aCorrectAns=!CorrectAns;
+ var beginGrp=1;
+ var grpOffset=beginGrp;
+ if(!currQuiz.Grp==null)!currQuiz.Grp={};
+ if(typeof !currQuiz.Grp["!thequestionno"]=="undefined")
+ {
+ !currQuiz.Grp["!thequestionno"]={offset:0};
+ } else {
+ !currQuiz.Grp["!thequestionno"].offset=%
+++(!currQuiz.Grp["!thequestionno"].offset)!%aCorrectAns.length;
+ grpOffset=beginGrp%
++!currQuiz.Grp["!thequestionno"].offset;
+ }
+ var f=this.getField("grpobj.!curr@quiz.!thequestionno." %
++ grpOffset);
% \end{macrocode}
% When the field is readonly, then we cannot set the focus. We'll remove the readonly, set focus, then
-% reset readonly to true again; however, we must wait a little for \texttt{setFocus} to finish.
-% \begin{macrocode}
- if ( f.readonly ) {\jsR\jsT\jsT
- f.readonly = false;\jsR\jsT\jsT
- f.setFocus();\jsR\jsT\jsT
- eqDelay = app.setTimeOut(%
- "f.readonly = true;
- app.clearTimeOut(eqDelay);",10);\jsR\jsT
- } else f.setFocus();\jsR\jsT
- }\jsR\jsT
- else \jsR\jsT
- {\jsR\jsT\jsT
- \currQuiz.Grp["\thequestionno"].offset =
- ++\currQuiz.Grp["\thequestionno"].offset
- \% aCorrectAns.length;\jsR\jsT\jsT
- grpOffset = beginGrp
- + \currQuiz.Grp["\thequestionno"].offset;\jsR\jsT\jsT
- var f = this.getField("grpobj.\curr@quiz.\thequestionno."
- + grpOffset);\jsR\jsT\jsT
- if ( f.readonly ) {\jsR\jsT\jsT
- f.readonly = false;\jsR\jsT\jsT
- f.setFocus();\jsR\jsT\jsT
- eqDelay = app.setTimeOut("f.readonly = true;
- app.clearTimeOut(eqDelay);",10);\jsR\jsT
- } else f.setFocus();\jsR\jsT
- }\jsR\jsT
-\if\eqQuizType\isQZ
- DisplayAnswer("Ans.\curr@quiz",
- aCorrectAns[\currQuiz.Grp["\thequestionno"].offset],%
-\currQuiz);
-%\ifx\sqCorrAnsResetBC\@empty\else,\currQuiz\fi);\jsR
-\else
-% \end{macrocode}
-% Allow local definition the reset color for response boxes. The reset color
-% is normally black (\cs{eqDefaultColor}). Now if \cs{sqCorrAnsResetBC} is none
-% empty, we put it in as a property of the \cs{oField} object.
-% \begin{macrocode}
-%\ifx\sqCorrAnsResetBC\@empty\else
-% if ( typeof \oField=="undefined")\jsR\jsT\jsT
-% var \oField = new Object;\jsR\jsT
-% \oField.CorrAnsResetBC=\sqCorrAnsResetBC;\jsR\jsT
-%\fi
- DisplayAnswer("grpobj.\oField.\thequestionno."+ grpOffset,
- aCorrectAns[\currQuiz.Grp["\thequestionno"].offset],%
-\oField);\jsR
-\fi
- }
-}}
-\newcommand\CorrAnsButtonGrp[2][]
-{%
- \makeStringArray{#2}%
- \edef\CorrectAns{\stringArray}%
- \if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
- \else\edef\currQuiz{\oField}%
+% reset readonly to true again; however, we must wait a little for !texttt{setFocus} to finish.
+% \begin{macrocode}
+ if(f.readonly){
+ f.readonly=false;
+ f.setFocus();
+ eqDelay=app.setTimeOut(%
+"f.readonly=true;app.clearTimeOut(eqDelay);",10);
+ } else f.setFocus();
+!if!eqQuizType!isQZ%
+ DisplayAnswer("Ans.!curr@quiz",%
+aCorrectAns[!currQuiz.Grp["!thequestionno"].offset],!currQuiz);!else%
+ DisplayAnswer("grpobj.!oField.!thequestionno."+ grpOffset,%
+aCorrectAns[!currQuiz.Grp["!thequestionno"].offset],!oField);!fi
+}
+\end{defineJS}
+\def\CorrAnsButtonGrpActionHook{\JS{\cabGrpActn}}
+\newcommand\CorrAnsButtonGrp[2][]{%
+ \makeStringArray{#2}%
+ \edef\CorrectAns{\stringArray}%
+ \if\eqQuizType\isQZ\def\Fld@name{corr.\curr@quiz.\thequestionno}%
+ \else\edef\currQuiz{\oField}%
\def\Fld@name{corr.\oField.\thequestionno}\fi
- \if\eqQuizType\isQZ
- \edef\@@CorrAnsButtonGrpActions{\noexpand\F{\FHidden}%
- \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
- \else\noexpand\BC{\solution@Color}\fi
- \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
- \ifeq@noquizsolutions\else
- \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
- \every@ButtonField\every@CorrAnsButton}}%
- \fi
- \else
- \edef\@@CorrAnsButtonGrpActions{%
- \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
- \else\noexpand\BC{\solution@Color}\fi
- \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
- \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
- {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
- {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
- \every@ButtonField\every@CorrAnsButton}}%
- \fi
+ \if\eqQuizType\isQZ
+ \edef\@@CorrAnsButtonGrpActions{\noexpand\F{\FHidden}%
+ \ifx\@qzsolndest\@empty
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
+ \ifeq@noquizsolutions\let\x\relax\else
+ \def\x{\mbox{\push@@Button{#1}{\Fld@name}{}%
+ {\DefaultHeightOfWidget}{\eq@protect\A}%
+ {\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
+ \every@ButtonField\every@CorrAnsButton}}}\fi\x
+ \else
+ \edef\@@CorrAnsButtonGrpActions{%
+ \ifx\@qzsolndest\@empty%\noexpand\BC{\normalCABtnBC}
+ \else\noexpand\BC{\solution@Color}\fi
+ \noexpand\A{\noexpand\CorrAnsButtonGrpActionHook}}%
+ \mbox{\push@@Button{#1}{\Fld@name}{}{\DefaultHeightOfWidget}%
+ {\eq@protect\A}{\eq@setButtonProps\eq@Button@driver}%
+ {\CorrAnsButtonGrpDefaults\@@CorrAnsButtonGrpActions
+ \every@ButtonField\every@CorrAnsButton}}%
+ \fi
}
\def\makeStringArray#1{\def\stringArray{[}\@makeStringArray#1,\@nil}
\def\@makeStringArray#1,#2\@nil{%
- \edef\eq@temp{\stringArray}\def\argii{#2}%
- \ifx\argii\@empty
- \edef\stringArray{\eq@temp"#1"]}%
- \def\eq@next{}%
- \else
- \edef\stringArray{\eq@temp"#1",}%
- \def\eq@next{\@makeStringArray#2\@nil}%
- \fi
- \eq@next
+ \edef\eq@temp{\stringArray}\def\argii{#2}%
+ \ifx\argii\@empty
+ \edef\stringArray{\eq@temp"#1"]}%
+ \def\eq@next{}%
+ \else
+ \edef\stringArray{\eq@temp"#1",}%
+ \def\eq@next{\@makeStringArray#2\@nil}%
+ \fi
+ \eq@next
}
% \end{macrocode}
% \end{macro}
@@ -9345,15 +9407,14 @@ if (!isQuizInitialized("@currQuiz")) {
\let\@currentQues\@empty
\let\eqQzQuesList\@empty
\def\eq@AddProbToQzQuesList{%
- \edef\eq@tmpExp{\noexpand\g@addto@macro%
+ \edef\eq@tmpExp{\noexpand\g@addto@macro%
% \end{macrocode}
% Cosmetic change replaced \cs{noexpand} with \cs{string}.
% \changes{v8.2.15}{2019/08/06}{replace \string\cs{noexpand} with \string\cs{string}}
% \changes{v8.5.4}{2019/11/03}{Reverted to \string\cs{noexpand}}
% \begin{macrocode}
- \noexpand\eqQzQuesList{\noexpand
- \@eqListExp{\@currentQues}{\the\c@page}}}%
-% \@eqListExp{\@currentQues}{\thepage}}}%
+ \noexpand\eqQzQuesList{\noexpand
+ \@eqListExp{\@currentQues}{\the\c@page}}}%
% \end{macrocode}
% We add to the list only if we are not within a \texttt{mathGrp} environment.
% \begin{macrocode}
@@ -9379,9 +9440,9 @@ if (!isQuizInitialized("@currQuiz")) {
% the page that contains the button, the JS is executes.
% \begin{macrocode}
\def\pbPopulateSumTable{\pushButton[\W0\BG{}\BC{}\S{S}\autoCenter{n}
- \TU{\thequestionno}\Ff{\FfReadOnly}
- \AA{\AAPageVisible{try{popVisitsTbl("\currQuiz",\thequestionno)}%
- catch(e){}}}]{\currQuiz activateSC}{0pt}{0pt}}
+ \TU{\thequestionno}\Ff{\FfReadOnly}
+ \AA{\AAPageVisible{try{popVisitsTbl("\currQuiz",\thequestionno)}%
+ catch(e){}}}]{\currQuiz activateSC}{0pt}{0pt}}
% \end{macrocode}
% (2013/12/29) Here are some ideas to think about. Each change in the response to a question
% can execute the following code. I've put the needed information in the tooltip
@@ -9442,28 +9503,28 @@ if (!isQuizInitialized("@currQuiz")) {
%\end{description}
% \begin{macrocode}
\define@key{smrytbl}{ntables}{%
- \@tempcntb=#1
- \ifnum\@tempcntb<1 \@tempcntb=1 \fi
- \ifnum\@tempcntb>3 \@tempcntb=3 \fi
- \edef\smrytbl@ntables{\the\@tempcntb}%
+ \@tempcntb=#1
+ \ifnum\@tempcntb<\@ne\@tempcntb=\@ne\fi
+ \ifnum\@tempcntb>\thr@@\@tempcntb=\thr@@\fi
+ \edef\smrytbl@ntables{\the\@tempcntb}%
}
\def\smrytbl@ntables{2}
\define@key{smrytbl}{showmarkup}[true]{%
- \csname if#1\endcsname\eqshowmarkuptrue
- \else\eqshowmarkupfalse\fi
+ \csname if#1\endcsname\eqshowmarkuptrue
+ \else\eqshowmarkupfalse\fi
}
\newif\ifsmrytbl@corrections\smrytbl@correctionstrue
\define@key{smrytbl}{nocorrections}[true]{%
- \csname if#1\endcsname\smrytbl@correctionsfalse
- \else\smrytbl@correctionstrue\fi
+ \csname if#1\endcsname\smrytbl@correctionsfalse
+ \else\smrytbl@correctionstrue\fi
}
\define@key{smrytbl}{showOutOf}[true]{%
- \csname if#1\endcsname\eqshowOutOftrue\def\stfmtType{OO}%
- \gdef\showOutOfinSmryTbl{true}\let\stmarkupbox\relax
- \else
- \eqshowOutOffalse\let\stfmtType\@empty
- \gdef\showOutOfinSmryTbl{false}%
- \fi
+ \csname if#1\endcsname\eqshowOutOftrue\def\stfmtType{OO}%
+ \gdef\showOutOfinSmryTbl{true}\let\stmarkupbox\relax
+ \else
+ \eqshowOutOffalse\let\stfmtType\@empty
+ \gdef\showOutOfinSmryTbl{false}%
+ \fi
}
\let\stfmtType\@empty
\define@key{smrytbl}{setDimens}[]{#1}
@@ -9473,61 +9534,60 @@ if (!isQuizInitialized("@currQuiz")) {
% Finally we come to the definition of \cs{displaySumryTbl}.
% \begin{macrocode}
\newcommand{\displaySumryTbl}[2][]{%
- \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}%
- \setkeys{smrytbl}{#1}%
- \eqtmpcnta\smrytbl@ntables\relax
+ \begingroup\edef\currQuiz{#2}\edef\oField{#2}\edef\curr@quiz{#2}%
+ \setkeys{smrytbl}{#1}%
+ \eqtmpcnta\smrytbl@ntables\relax
% \end{macrocode}
% We accept only 1 or 2 as an argument, we put it in \cs{count0},
% if not an integer, we'll stop the compile. If the argument is not 1,
% we force a value of 2.
% \begin{macrocode}
-% \ifnum\eqtmpcnta=\@ne\else\eqtmpcnta\tw@\fi
- \eq@rowcnt\z@\@tempcntb=\value{questionno}%
+ \eq@rowcnt\z@\@tempcntb=\value{questionno}%
% \end{macrocode}
% We calculate the number of rows in the first column, in case
% of a two column table. When the number of questions is odd,
% the the left-hand table will have one more entry than the right-hand
% column.
% \begin{macrocode}
- \ifnum\eqtmpcnta=\tw@
- \divide\@tempcntb\tw@
- \advance\@tempcntb\ifodd\value{questionno}2\else1\fi
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb-1\relax
- \fi
+ \ifnum\eqtmpcnta=\tw@
+ \divide\@tempcntb\tw@
+ \advance\@tempcntb\ifodd\value{questionno}\tw@\else\@ne\fi
+ \xdef\@beginSecCol{\the\@tempcntb}\advance
+ \@tempcntb\m@ne
+ \fi
% \end{macrocode}
% Three table support
% \begin{macrocode}
- \ifnum\eqtmpcnta=\thr@@
- \edef\eq@n{\the\@tempcntb}%
- \divide\@tempcntb\eqtmpcnta
- \edef\eq@q{\the\@tempcntb}%
- \@tempcnta=\@tempcntb\multiply\@tempcnta3
- \edef\eq@p{\the\@tempcnta}%
- \@tempcnta=\eq@n
- \advance\@tempcnta-\eq@p\relax
- \ifnum\@tempcnta=\z@
- \@tempcntb=\eq@q \advance\@tempcntb\@ne
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb\eq@q\relax
- \xdef\@beginThrdCol{\the\@tempcntb}%
- \else\ifnum\@tempcnta=\@ne
- \@tempcntb=\eq@q \advance\@tempcntb\@ne
- \edef\nB@lCols{\the\@tempcntb}%
- \advance\@tempcntb\@ne
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb\eq@q\relax
- \xdef\@beginThrdCol{\the\@tempcntb}%
- \else\ifnum\@tempcnta=2\relax
- \@tempcntb=\eq@q \advance\@tempcntb1
- \edef\nB@lCols{\the\@tempcntb}%
- \advance\@tempcntb\@ne
- \xdef\@beginSecCol{\the\@tempcntb}%
- \advance\@tempcntb\nB@lCols
- \xdef\@beginThrdCol{\the\@tempcntb}%
- \fi\fi\fi
- \@tempcntb=\eq@n
- \fi
+ \ifnum\eqtmpcnta=\thr@@
+ \edef\eq@n{\the\@tempcntb}%
+ \divide\@tempcntb\eqtmpcnta
+ \edef\eq@q{\the\@tempcntb}%
+ \@tempcnta=\@tempcntb\multiply\@tempcnta3
+ \edef\eq@p{\the\@tempcnta}%
+ \@tempcnta=\eq@n
+ \advance\@tempcnta-\eq@p\relax
+ \ifnum\@tempcnta=\z@
+ \@tempcntb=\eq@q \advance\@tempcntb\@ne
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb\eq@q\relax
+ \xdef\@beginThrdCol{\the\@tempcntb}%
+ \else\ifnum\@tempcnta=\@ne
+ \@tempcntb=\eq@q \advance\@tempcntb\@ne
+ \edef\nB@lCols{\the\@tempcntb}%
+ \advance\@tempcntb\@ne
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb\eq@q\relax
+ \xdef\@beginThrdCol{\the\@tempcntb}%
+ \else\ifnum\@tempcnta=\tw@
+ \@tempcntb=\eq@q \advance\@tempcntb\@ne
+ \edef\nB@lCols{\the\@tempcntb}%
+ \advance\@tempcntb\@ne
+ \xdef\@beginSecCol{\the\@tempcntb}%
+ \advance\@tempcntb\nB@lCols
+ \xdef\@beginThrdCol{\the\@tempcntb}%
+ \fi\fi\fi
+ \@tempcntb=\eq@n
+ \fi
% \end{macrocode}
% We \cs{let} \cs{@eqListExp} to \cs{@@eqListExp}, defined below.
% \begin{macrocode}
@@ -9544,9 +9604,9 @@ if (!isQuizInitialized("@currQuiz")) {
% This is a definition of \cs{@eqListExp}. It appears in the
% token list \cs{eqQzQuesList}. A typical entry in \cs{eqQzQuesList} is
% of the form
-%\begin{verbatim}
-% \@eqListExp{<question_label>}{\thepage}
-%\end{verbatim}
+%\begin{quote}\ttfamily
+%\string\@eqListExp\darg{\ameta{question\_label}}\darg{\string\thepage}
+%\end{quote}
% We use the two arguments to construct a table of three columns: Question (consisting
% of the question label); Responded (a checkbox that is checked if that question was answered);
% and Page (a hypertext link to the page containing he question). The command may be redefined
@@ -9556,8 +9616,8 @@ if (!isQuizInitialized("@currQuiz")) {
% headings (may be redefined).
% \begin{macrocode}
\def\eq@begintab{%
- \begin{tabular}[t]{lcc}\sumryTblQ&\sumryTblR&\sumryTblP\\\sthline
- {\Large\strut}}
+ \begin{tabular}[t]{lcc}\sumryTblQ&\sumryTblR&\sumryTblP\\\sthline
+ {\Large\strut}}
% \end{macrocode}
% \DescribeMacro{\sthline}\cmd{\sthline}
% is a user hook to change the appearance of the horizontal line, such
@@ -9594,12 +9654,13 @@ if (!isQuizInitialized("@currQuiz")) {
% and stMarkup text field.
% \begin{macrocode}
\def\st@scndclmn{%
- \checkBox[\Ff{\FfReadOnly}]%
- {\ccatCurrQzWith(SanityCheck).\the\eq@rowcnt}%
- {\markupHeight}{\markupHeight}{Yes}\ifeqshowmarkup
- \stmarkupbox{\sumrytblCkMUsep\textField[%
- \Ff\FfReadOnly\BC{}\textColor{\pcMarkupColor}%
- \textSize{\stmarkupTextSize}\autoCenter{n}%
+ \checkBox[\Ff{\FfReadOnly}]
+ {\ccatCurrQzWith(SanityCheck).\the\eq@rowcnt}
+ {\markupHeight}{\markupHeight}{Yes}%
+ \ifeqshowmarkup
+ \stmarkupbox{\sumrytblCkMUsep\textField[%
+ \Ff\FfReadOnly\BC{}\textColor{\pcMarkupColor}
+ \textSize{\stmarkupTextSize}\autoCenter{n}]
% \end{macrocode}
% Key to being able to have duplicated summary fields with different \texttt{showOutOf}
% options is the naming of the text field. If \texttt{showOutOf=false}, the default,
@@ -9607,18 +9668,19 @@ if (!isQuizInitialized("@currQuiz")) {
% text field is named \cs{currQuizSanityCheckOOPts}. When the Correct button is pressed,
% the JavaScript function \texttt{correctSumryTbl()} checks for the existence of each of
% these two fields, and populates them properly formatted. The command \cs{stfmtType} is
-% either \cs{empty} or \cs{OO}.
+% either \cs{@empty} or \cs{OO}.
% \begin{macrocode}
- ]{\ccatCurrQzWith(SanityCheck\stfmtType Pts).\the\eq@rowcnt}%
- {\stmarkupWidth}{\stmarkupHeight}}\fi
+ {\ccatCurrQzWith(SanityCheck\stfmtType Pts).\the\eq@rowcnt}%
+ {\stmarkupWidth}{\stmarkupHeight}}%
+ \fi
}
% \end{macrocode}
% \textbf{Third column.} The third column of the table consisting of a link to the
% page that contains the question.
% \begin{macrocode}
\def\st@thrdclmn#1{%
- \setLink[\linktxtcolor{\@linkcolor}
- \A{\JS{this.pageNum=(#1-1)}}]{\sumrytbllinkHook{#1}}}
+ \setLink[\linktxtcolor{\@linkcolor}
+ \A{\JS{this.pageNum=(#1-1)}}]{\sumrytbllinkHook{#1}}}
% \end{macrocode}
% Now for the definition of \cs{@@eqListExp} which does the work in the table.
% \begin{macrocode}
@@ -9628,20 +9690,20 @@ if (!isQuizInitialized("@currQuiz")) {
% when the page becomes visible, and we expand \cs{eq@begintab}, which
% is a \texttt{tabular} environment.
% \begin{macrocode}
- \ifnum\eq@rowcnt=\@ne
- \pbPopulateSumTable\ifsmrytbl@corrections\else
- \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi
+ \ifnum\eq@rowcnt=\@ne
+ \pbPopulateSumTable\ifsmrytbl@corrections\else
+ \pbDoNoCorrectSumryTbl\fi\expandafter\eq@begintab\fi
% \end{macrocode}
% If it is the two table solution, and the row number equals the calculated
% value of the first row of the second table, we emit another
% \cs{eq@begintab}.
% \begin{macrocode}
- \ifnum\eqtmpcnta>\@ne\ifnum\eq@rowcnt=\@beginSecCol\relax
- \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
- \fi\fi
- \ifnum\eqtmpcnta=\thr@@\ifnum\eq@rowcnt=\@beginThrdCol\relax
- \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
- \fi\fi
+ \ifnum\eqtmpcnta>\@ne\ifnum\eq@rowcnt=\@beginSecCol\relax
+ \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
+ \fi\fi
+ \ifnum\eqtmpcnta=\thr@@\ifnum\eq@rowcnt=\@beginThrdCol\relax
+ \eq@endtab\expandafter\sumrytablesep\expandafter\eq@begintab
+ \fi\fi
% \end{macrocode}
% We layout a row of the table, problem label, checkbox, and page.
% \begin{macrocode}
@@ -9650,9 +9712,7 @@ if (!isQuizInitialized("@currQuiz")) {
% We set the \cs{eq@endtab} at the bottom of the first table,
% and at the bottom of the second table.
% \begin{macrocode}
-% \ifnum\count0=\tw@\ifnum\eq@rowcnt=\@tempcntb
-% \expandafter\eq@endtab\fi\fi
- \ifnum\eq@rowcnt=\thequestionno\relax\expandafter\eq@endtab\fi
+ \ifnum\eq@rowcnt=\value{questionno}\expandafter\eq@endtab\fi
}
% \end{macrocode}
%
@@ -9671,18 +9731,18 @@ if (!isQuizInitialized("@currQuiz")) {
% total number of questions.
% \begin{macrocode}
\def\writeProListAux{%
- \eq@IWAuxOut{\string
- \csarg\string\gdef{\currQuiz QzQuesList}{\eqQzQuesList}}%
- \eq@IWAuxOut{\string
- \csarg\string\gdef{\currQuiz nQuestions}{\thequestionno}}%
+ \eq@IWAuxOut{\string
+ \csarg\string\gdef{\currQuiz QzQuesList}{\eqQzQuesList}}%
+ \eq@IWAuxOut{\string
+ \csarg\string\gdef{\currQuiz nQuestions}{\thequestionno}}%
}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\def\setParamSumryTblAux{%
- \edef\eqQzQuesList{\@nameuse{\currQuiz QzQuesList}}%
- \@ifundefined{\currQuiz nQuestions}{}{%
- \value{questionno}=\@nameuse{\currQuiz nQuestions}}%
+ \edef\eqQzQuesList{\@nameuse{\currQuiz QzQuesList}}%
+ \@ifundefined{\currQuiz nQuestions}{}{%
+ \value{questionno}=\@nameuse{\currQuiz nQuestions}}%
}
% \end{macrocode}
% \begin{environment}{sumryTblAux}
@@ -9707,7 +9767,7 @@ if (!isQuizInitialized("@currQuiz")) {
% quiz.
% \begin{macrocode}
\newenvironment{sumryTblAux}[1]{%
- \DeclareQuiz{#1}\setParamSumryTblAux}{}%
+ \DeclareQuiz{#1}\setParamSumryTblAux}{}%
% \end{macrocode}
% \end{environment}
% \begin{macrocode}
@@ -9717,41 +9777,40 @@ if (!isQuizInitialized("@currQuiz")) {
% \end{macrocode}
% \subsection{Posing MC/math fill-in questions}
% \begin{macrocode}
-\def\bMCFI{%
- \withinMCFItrue
- \ifx\qRadionActionsHook\@empty
- \let\qRadionActionsHook@SAVE\@empty
- \def\qRadionActionsHook{\jsR
- qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\else
- \let\qRadionActionsHook@SAVE\qRadionActionsHook
- \def\qRadionActionsHook{\qRadionActionsHook@SAVE\jsR
- qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\fi
- \ifx\every@RespBoxMath\@empty
- \let\every@RespBoxMath@SAVE\@empty
- \def\every@RespBoxMath{%
- \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
- \else
- \let\every@RespBoxMath@SAVE\every@RespBoxMath
- \expandafter\def\expandafter\every@RespBoxMath\expandafter{%
- \every@RespBoxMath@SAVE
- \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
- \fi
+\def\bMCFI{\withinMCFItrue
+ \ifx\qRadionActionsHook\@empty
+ \let\qRadionActionsHook@SAVE\@empty
+ \def\qRadionActionsHook{\jsR
+ qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\else
+ \let\qRadionActionsHook@SAVE\qRadionActionsHook
+ \def\qRadionActionsHook{\qRadionActionsHook@SAVE\jsR
+ qRadioButtonMCFI(\Ans@choice,"\currQuiz",\thequestionno);}\fi
+ \ifx\every@RespBoxMath\@empty
+ \let\every@RespBoxMath@SAVE\@empty
+ \def\every@RespBoxMath{%
+ \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
+ \else
+ \let\every@RespBoxMath@SAVE\every@RespBoxMath
+ \expandafter\def\expandafter\every@RespBoxMath\expandafter
+ {\every@RespBoxMath@SAVE
+ \AddAAKeystroke{mcfiKeyStroke("\currQuiz",\thequestionno);}}%
+ \fi
}
\def\eMCFI{%
- \ifx\qRadionActionsHook@SAVE\@empty
- \let\qRadionActionsHook\@empty\else
- \let\qRadionActionsHook\qRadionActionsHook@SAVE\fi
- \ifx\every@RespBoxMath@SAVE\@empty
- \let\every@RespBoxMath\@empty\else
- \let\every@RespBoxMath\every@RespBoxMath@SAVE\fi
- \withinMCFIfalse
+ \ifx\qRadionActionsHook@SAVE\@empty
+ \let\qRadionActionsHook\@empty\else
+ \let\qRadionActionsHook\qRadionActionsHook@SAVE\fi
+ \ifx\every@RespBoxMath@SAVE\@empty
+ \let\every@RespBoxMath\@empty\else
+ \let\every@RespBoxMath\every@RespBoxMath@SAVE\fi
+ \withinMCFIfalse
}
\def\eqNA{-43252452452}
\@ifundefined{text}{\let\MCFIMarkup@BOX\mbox}{\let\MCFIMarkup@BOX\text}
\newcommand\mcfiMarkupfmt{\cgBdry
- ${}^{\MCFIMarkup@BOX{\aeb@creditmarkup}}$}
+ ${}^{\MCFIMarkup@BOX{\aeb@creditmarkup}}$}
\def\mcfiMarkup{\addtocounter{questionno}{-1}\mcfiMarkupfmt
- \stepcounter{questionno}}
+ \stepcounter{questionno}}
%</mcfi>
%<*package>
% \end{macrocode}
@@ -9779,8 +9838,8 @@ if (!isQuizInitialized("@currQuiz")) {
% the color without commas. For example |\solutionColor{0 .6 0}|
% \begin{macrocode}
\newcommand{\solutionColor}[1]{\def\eq@argi{#1}\ifx\eq@argi\@empty
- \def\solution@Color{\solutionColorDef}\else
- \def\solution@Color{#1}\fi}
+ \def\solution@Color{\solutionColorDef}\else
+ \def\solution@Color{#1}\fi}
\newcommand{\solutionColorDef}{0 .6 0}
\solutionColor{\solutionColorDef}
% \end{macrocode}
@@ -9797,19 +9856,19 @@ if (!isQuizInitialized("@currQuiz")) {
\def\eq@getCmdName#1#2{\edef#1{\expandafter\@gobble\string#2}}
\def\eq@getfirst#1#2\@nil{\def\eq@argi{#1}}
\def\eq@checkValidityModel#1{%
- \if#1g\else\if#1r\else\if#1c\else
- \PackageError{exerquiz}
- {JavaScript does not support this model}
- {Use a named color from one of the models gray, rgb, or cmyk.}
- \fi\fi\fi
+ \if#1g\else\if#1r\else\if#1c\else
+ \PackageError{exerquiz}
+ {JavaScript does not support this model}
+ {Use a named color from one of the models gray, rgb, or cmyk.}
+ \fi\fi\fi
}
\def\eq@jsSetColorMsg#1#2{\PackageWarning{exerquiz}
- {The argument `#2' of \string#1\MessageBreak
- is not of the right form.\MessageBreak Using the default}}
+ {The argument `#2' of \string#1\MessageBreak
+ is not of the right form.\MessageBreak Using the default}}
\def\eqModelInfo#1#2{%
- \uppercase{\def\eq@ucmodel{#1}}\def\eq@modelspec{#2}%
- \eq@getfirst#1\@nil\eq@ResetModelForGray{\eq@argi}%
- \eq@checkValidityModel{\eq@argi}%
+ \uppercase{\def\eq@ucmodel{#1}}\def\eq@modelspec{#2}%
+ \eq@getfirst#1\@nil\eq@ResetModelForGray{\eq@argi}%
+ \eq@checkValidityModel{\eq@argi}%
}
\def\eq@ResetModelForGray#1{\if#1g\def\eq@ucmodel{G}\fi}
% \end{macrocode}
@@ -9817,40 +9876,40 @@ if (!isQuizInitialized("@currQuiz")) {
% as the first two tokens.
% \begin{macrocode}
\def\eq@checkRawJSColor#1{%
- \edef\eq@argi{#1}\ifx\eq@argi\@empty
- \def\eq@next{\let\eq@rawJSCol\eq@YES}\else
- \def\eq@next{\expandafter\eq@@checkRawJSColor#1\@nil}\fi\eq@next
+ \edef\eq@argi{#1}\ifx\eq@argi\@empty
+ \def\eq@next{\let\eq@rawJSCol\eq@YES}\else
+ \def\eq@next{\expandafter\eq@@checkRawJSColor#1\@nil}\fi\eq@next
}
\def\eq@@checkRawJSColor#1#2#3\@nil{\let\eq@rawJSCol\eq@NO
- \let\eqpredefineJSCol\eq@NO
- \if[#1\if#2"\let\eq@rawJSCol\eq@YES\fi\fi
- \ifx\eq@rawJSCol\eq@NO\if#1c\if#2o\let\eq@rawJSCol\eq@YES
- \let\eqpredefineJSCol\eq@YES\fi\fi\fi
+ \let\eqpredefineJSCol\eq@NO
+ \if[#1\if#2"\let\eq@rawJSCol\eq@YES\fi\fi
+ \ifx\eq@rawJSCol\eq@NO\if#1c\if#2o\let\eq@rawJSCol\eq@YES
+ \let\eqpredefineJSCol\eq@YES\fi\fi\fi
}
\def\eq@jsColorWXColori#1#2{\edef\eq@colorDefn{#2}%
- \ifx\eq@colorDefn\@empty
- \ifx\is@Defined\eq@YES
- \edef\eq@colorDefn{\csname\cmdName Def\endcsname}\else
- \PackageError{exerquiz}{JS color \string#1 has an
- empty definition}{}\fi
- \fi
- \eq@checkRawJSColor{\eq@colorDefn}%
- \ifx\eq@rawJSCol\eq@NO
- \extractcolorspec{\eq@colorDefn}{\eq@tmp@color}%
- \expandafter\eqModelInfo\eq@tmp@color
- \edef#1{["\eq@ucmodel",\eq@modelspec]}%
- \else\edef#1{\eq@colorDefn}\fi
+ \ifx\eq@colorDefn\@empty
+ \ifx\is@Defined\eq@YES
+ \edef\eq@colorDefn{\csname\cmdName Def\endcsname}\else
+ \PackageError{exerquiz}{JS color \string#1 has an
+ empty definition}{}\fi
+ \fi
+ \eq@checkRawJSColor{\eq@colorDefn}%
+ \ifx\eq@rawJSCol\eq@NO
+ \extractcolorspec{\eq@colorDefn}{\eq@tmp@color}%
+ \expandafter\eqModelInfo\eq@tmp@color
+ \edef#1{["\eq@ucmodel",\eq@modelspec]}%
+ \else\edef#1{\eq@colorDefn}\fi
}
\def\eq@jsColorWOXColori#1#2{\def\eq@colorDefn{#2}%
- \ifx\eq@colorDefn\@empty
- \ifx\is@Defined\eq@YES
- \edef\eq@colorDefn{\csname cmdName Def\endcsname}\else
- \PackageError{exerquiz}{JS color \string#1 has an
- empty definition}{}\fi
- \fi
- \eq@checkRawJSColor{\eq@colorDefn}%
- \ifx\eq@rawJSCol\eq@YES\edef#1{\eq@colorDefn}\else
- \eq@jsSetColorMsg{#1}{#2}\fi
+ \ifx\eq@colorDefn\@empty
+ \ifx\is@Defined\eq@YES
+ \edef\eq@colorDefn{\csname cmdName Def\endcsname}\else
+ \PackageError{exerquiz}{JS color \string#1 has an
+ empty definition}{}\fi
+ \fi
+ \eq@checkRawJSColor{\eq@colorDefn}%
+ \ifx\eq@rawJSCol\eq@YES\edef#1{\eq@colorDefn}\else
+ \eq@jsSetColorMsg{#1}{#2}\fi
}
% \end{macrocode}
% \DescribeMacro{\jsColor} General command for defining a JavaScript Color, and support commands for
@@ -9868,13 +9927,13 @@ if (!isQuizInitialized("@currQuiz")) {
% When \textsf{xcolor} is not used, only the JavaScript format is allowed.
% \begin{macrocode}
\def\jsColor#1#2{\eq@getCmdName{\cmdName}{#1}%
- \let\is@Defined\eq@YES
- \expandafter\ifx\csname\cmdName\endcsname\relax
- \PackageWarning{exerquiz}{\string#1 is not a command used by
- exerquiz.\MessageBreak Will define it anyway}%
- \let\is@Defined\eq@NO\fi
- \HyColor@IfXcolor{\eq@jsColorWXColori{#1}{#2}}%
- {\eq@jsColorWOXColori{#1}{#2}}%
+ \let\is@Defined\eq@YES
+ \expandafter\ifx\csname\cmdName\endcsname\relax
+ \PackageWarning{exerquiz}{\string#1 is not a command used by
+ exerquiz.\MessageBreak Will define it anyway}%
+ \let\is@Defined\eq@NO\fi
+ \HyColor@IfXcolor{\eq@jsColorWXColori{#1}{#2}}%
+ {\eq@jsColorWOXColori{#1}{#2}}%
}
% \end{macrocode}
% \begin{macrocode}
@@ -9886,10 +9945,10 @@ if (!isQuizInitialized("@currQuiz")) {
% (\string\texttt{eqcolor})}
% \begin{macrocode}
\@ifundefined{jsColor}{%
- \InputIfFileExists{eqcolor.def}{\PackageInfo{exerquiz}
- {Inputting eqcolor.def}}
- {\PackageError{exerquiz}{cannot find eqcolor.def}
- {Refresh your file name database and try again.}}
+ \InputIfFileExists{eqcolor.def}{\PackageInfo{exerquiz}
+ {Inputting eqcolor.def}}
+ {\PackageError{exerquiz}{cannot find eqcolor.def}
+ {Refresh your file name database and try again.}}
}{}
% \end{macrocode}
%
@@ -9928,26 +9987,26 @@ if (!isQuizInitialized("@currQuiz")) {
% These must be declared in the preamble.
% \begin{macrocode}
\def\chooseJSsymbol{\@ifstar{\let\eq@isstar\eq@YES\chooseJSsymboli}
- {\let\eq@isstar\eq@NO\chooseJSsymboli}}
+ {\let\eq@isstar\eq@NO\chooseJSsymboli}}
\def\chooseJSsymboli#1{\lowercase{\edef\eq@arg{#1}}%
- \def\eq@carg{check}\ifx\eq@arg\eq@carg
- \def\eq@retnStyle{style.ch}\else
- \def\eq@carg{cross}\ifx\eq@arg\eq@carg
- \def\eq@retnStyle{style.cr}\else
- \def\eq@carg{diamond}\ifx\eq@arg\eq@carg
- \def\eq@retnStyle{style.di}\else
- \def\eq@carg{circle}\ifx\eq@arg\eq@carg
- \def\eq@retnStyle{style.ci}\else
- \def\eq@carg{star}\ifx\eq@arg\eq@carg
- \def\eq@retnStyle{style.st}\else
- \def\eq@carg{square}\ifx\eq@arg\eq@carg
- \def\eq@retnStyle{style.sq}\else
- \let\eq@retnStyle\@empty
- \ifx\eq@isstar\eq@NO\PackageWarning{exerquiz}
- {Argument `#1' not recognized.\MessageBreak
- Permissible values are check, cross, diamond,\MessageBreak
- circle, star, square. Will use the default}\fi
- \fi\fi\fi\fi\fi\fi
+ \def\eq@carg{check}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.ch}\else
+ \def\eq@carg{cross}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.cr}\else
+ \def\eq@carg{diamond}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.di}\else
+ \def\eq@carg{circle}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.ci}\else
+ \def\eq@carg{star}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.st}\else
+ \def\eq@carg{square}\ifx\eq@arg\eq@carg
+ \def\eq@retnStyle{style.sq}\else
+ \let\eq@retnStyle\@empty
+ \ifx\eq@isstar\eq@NO\PackageWarning{exerquiz}
+ {Argument `#1' not recognized.\MessageBreak
+ Permissible values are check, cross, diamond,\MessageBreak
+ circle, star, square. Will use the default}\fi
+ \fi\fi\fi\fi\fi\fi
}
% \end{macrocode}
% \begin{macro}{\setRightAnsSymb}
@@ -9959,41 +10018,38 @@ if (!isQuizInitialized("@currQuiz")) {
% The check style when the use chooses the incorrect answer.
% (def: \texttt{style.cr})
% \begin{macrocode}
-%\def\defineAnsStyle#1#2{%
-% \eq@getCmdName{\cmdName}{#1}\let\is@Defined\eq@YES
-%}
\newcommand\setRghtAnsSymb[1]{\chooseJSsymbol{#1}%
- \ifx\eq@retnStyle\@empty\else
- \edef\rghtAnsSymbJS{\eq@retnStyle}%
- \edef\rghtAnsSymb{\eq@carg}\fi}
+ \ifx\eq@retnStyle\@empty\else
+ \edef\rghtAnsSymbJS{\eq@retnStyle}%
+ \edef\rghtAnsSymb{\eq@carg}\fi}
\def\rghtAnsSymbJS{style.ch}
\def\rghtAnsSymb{check}
\newcommand\setCorrAnsSymb[1]{\chooseJSsymbol{#1}%
- \ifx\eq@retnStyle\@empty\else
- \edef\corrAnsSymbJS{\eq@retnStyle}%
- \edef\corrAnsSymb{\eq@carg}\fi}
+ \ifx\eq@retnStyle\@empty\else
+ \edef\corrAnsSymbJS{\eq@retnStyle}%
+ \edef\corrAnsSymb{\eq@carg}\fi}
\def\corrAnsSymbJS{style.ci}
\def\corrAnsSymb{circle}
\newcommand\setWrngAnsSymb[1]{\chooseJSsymbol{#1}%
- \ifx\eq@retnStyle\@empty\else
- \edef\wrngAnsSymbJS{\eq@retnStyle}%
- \edef\wrngAnsSymb{\eq@carg}\fi}
+ \ifx\eq@retnStyle\@empty\else
+ \edef\wrngAnsSymbJS{\eq@retnStyle}%
+ \edef\wrngAnsSymb{\eq@carg}\fi}
\def\wrngAnsSymbJS{style.cr}
\def\wrngAnsSymb{cross}
\def\setRghtAnsSymbLoc#1{\chooseJSsymbol*{#1}%
- \ifx\eq@retnStyle\@empty
- \let\rghtAnsSymbJSLoc\@empty\else
- \edef\rghtAnsSymbJSLoc{\eq@retnStyle}\fi
+ \ifx\eq@retnStyle\@empty
+ \let\rghtAnsSymbJSLoc\@empty\else
+ \edef\rghtAnsSymbJSLoc{\eq@retnStyle}\fi
}
\def\setCorrAnsSymbLoc#1{\chooseJSsymbol*{#1}%
- \ifx\eq@retnStyle\@empty
- \let\corrAnsSymbJSLoc\@empty\else
- \edef\corrAnsSymbJSLoc{\eq@retnStyle}\fi
+ \ifx\eq@retnStyle\@empty
+ \let\corrAnsSymbJSLoc\@empty\else
+ \edef\corrAnsSymbJSLoc{\eq@retnStyle}\fi
}
\def\setWrngAnsSymbLoc#1{\chooseJSsymbol*{#1}%
- \ifx\eq@retnStyle\@empty
- \let\wrngAnsSymbJSLoc\@empty\else
- \edef\wrngAnsSymbJSLoc{\eq@retnStyle}\fi
+ \ifx\eq@retnStyle\@empty
+ \let\wrngAnsSymbJSLoc\@empty\else
+ \edef\wrngAnsSymbJSLoc{\eq@retnStyle}\fi
}
\let\rghtAnsSymbJSLoc\@empty
\let\rghtAnsSymbJSLocDef\@empty
@@ -10109,6 +10165,7 @@ if (!isQuizInitialized("@currQuiz")) {
%\end{flushleft}
% Define a special value (\cs{formatInitAltApprs}) for \cs{AddAAFormat} used in initializing \cs{RespBoxMath} problems,
% where there are alternate appearances.
+% See \url{http://www.acrotex.net/blog/?p=1335} for a discussion of the use of \cs{formatInitAltApprs}.
% \changes{v8.1a}{2017/09/03}{Define a special value (\string\cs{formatInitAltApprs}) for \string\cs{AddAAFormat}}
% \begin{macrocode}
\def\formatInitAltApprs{\formatInitAltApprs}
@@ -10201,7 +10258,7 @@ if (!isQuizInitialized("@currQuiz")) {
%}
% \begin{macrocode}
\def\@eqAddAAKeystroke#1{\def\argi{#1}\ifx\argi\@empty
- \def\eqAddAAKeystroke{}\else\def\eqAddAAKeystroke{#1}\fi} %\r
+ \def\eqAddAAKeystroke{}\else\def\eqAddAAKeystroke{#1}\fi} %\r
\def\eqAddAAKeystroke{}
% \end{macrocode}
% \end{macro}
@@ -10213,10 +10270,10 @@ if (!isQuizInitialized("@currQuiz")) {
% and \string\cs{@eqAddAAMouseUpMS}}
% \begin{macrocode}
\def\@eqAddAAMouseUpMC#1{\def\argi{#1}\ifx\argi\@empty
- \def\eqAddAAMouseUpMC{}\else\def\eqAddAAMouseUpMC{#1}\fi}
+ \def\eqAddAAMouseUpMC{}\else\def\eqAddAAMouseUpMC{#1}\fi}
\def\eqAddAAMouseUpMC{}
\def\@eqAddAAMouseUpMS#1{\def\argi{#1}\ifx\argi\@empty
- \def\eqAddAAMouseUpMS{}\else\def\eqAddAAMouseUpMS{#1}\fi}
+ \def\eqAddAAMouseUpMS{}\else\def\eqAddAAMouseUpMS{#1}\fi}
\def\eqAddAAMouseUpMS{}
% \end{macrocode}
% \end{macro}
@@ -10234,17 +10291,15 @@ if (!isQuizInitialized("@currQuiz")) {
% #4 = the height of the bounding rectangle
%\end{verbatim}
% \begin{macrocode}
-\def\eqIconDefaults
-{%
- \rawPDF{}\S{}\mkIns{/TP 1}\W{}
- \CA{}\RC{}\AC{}\BC{}\BG{}\H{N}
- \textColor{0 g}\Ff{\FfReadOnly}
+\def\eqIconDefaults{%
+ \rawPDF{}\S{}\mkIns{/TP 1}\W{}
+ \CA{}\RC{}\AC{}\BC{}\BG{}\H{N}
+ \textColor{0 g}\Ff{\FfReadOnly}
}
-\newcommand\eqIcon[4][]
-{%
- \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{\eq@setButtonProps
- \eq@Button@driver}{\eqIconDefaults\every@ButtonField
- \every@eqIcon}}%
+\newcommand\eqIcon[4][]{%
+ \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{\eq@setButtonProps
+ \eq@Button@driver}{\eqIconDefaults\every@ButtonField
+ \every@eqIcon}}%
}
% \end{macrocode}
% \end{macro}
@@ -10266,15 +10321,8 @@ if (!isQuizInitialized("@currQuiz")) {
% \begin{macrocode}
\def\aeb@array{new Array}
% \end{macrocode}
-% The following definitions are associated with \texttt{requireForm()}, the JS function
-% defined below.
-% \begin{macrocode}
-%\newcommand{\defaultReqFormMsg}{%
-% "The expression is not in the expected form."}
-% \end{macrocode}
% (07/16/11) Some definitions that may be used by \texttt{requireForm}, a \cs{RespMathBox} filter
% \begin{macrocode}
-%\def\refac(#1){\\(#1\\)}\def\regrp(#1){(#1)}\def\rechrclass(#1){[#1]}
\def\refac#1{\\(#1\\)}\def\regrp#1{(#1)}\def\rechrclass#1{[#1]}
\def\redm{\\.}\def\remul{\\*}\def\rediv{\\/}\def\repow{\\^}
\def\redigit{\\d}\def\reany{.}\def\rebstr{\string^}\def\reestr{\string$}
@@ -10285,9 +10333,6 @@ if (!isQuizInitialized("@currQuiz")) {
% (10/07/11) Some convenience commands to simplifying the use of the \texttt{priorParse}
% and \texttt{postParse} filters.
% \begin{macrocode}
-%\def\preDenyForm(#1){\Array(denyForm,#1)}
-%\def\preReqForm(#1){\Array(requireForm,#1)}
-%\def\postDenyForm(#1){\Array(requireFormNot,#1)}
\def\preReqForm{\Array(requireForm,\@gobble}
\def\preDenyForm{\Array(denyForm,\@gobble}
\def\postDenyForm{\Array(requireFormNot,\@gobble}
@@ -10299,7 +10344,7 @@ if (!isQuizInitialized("@currQuiz")) {
% of the no peeking alert box.
% \begin{macrocode}
\newcommand{\noPeekArgs}[1]{%
- \def\NoPeekAlert{eqAppAlert(#1)}}\def\newNoPeekArgs{}
+ \def\NoPeekAlert{eqAppAlert(#1)}}\def\newNoPeekArgs{}
\def\NoPeekAlert{eqAppAlert(\noPeekMsg,3)}
% \end{macrocode}
% \begin{macrocode}
@@ -10312,7 +10357,7 @@ if (!isQuizInitialized("@currQuiz")) {
\def\corrChoiceFullyOff{\def\eqCorrChoiceFully{false}}
\corrChoiceFullyOn
% \end{macrocode}
-% Implement a local version of full corrections of MS and MS
+% Implement a local version of full corrections of MC and MS
% \changes{v8.1l}{2018/02/07}{Add local version of \string\cs{corrChoiceFullOn}}
% \begin{macrocode}
\def\corrLocalChoiceFullyOn{\def\eqCorrLocalChoiceFully{true}}
@@ -12052,16 +12097,16 @@ function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
NPointTotal=nPointTotal; NQuestions=nQuestions;
for (var i=1; i < RightWrong.length; i++)
{
- if ( (typeof RightWrong[i] == "object" ) %
-&& ( RightWrong[i][0] == "grp" ) ) {
+ if ( (typeof RightWrong[i] == "object" ) && %
+( RightWrong[i][0] == "grp" ) ) {
// grouped question
- Score += GrpRight(RightWrong[i], i, qtfield);
- var aWeights = ProbValue[i].slice(2);
- var evalGrpJS = eval(ProbValue[i][1]);
- var evalGrpJSValue = evalGrpJS(this,qtfield,i,
- RightWrong[i],aWeights);
- ProbDist[i] = evalGrpJSValue;
- ptScore = ptScore + evalGrpJSValue;
+ Score += GrpRight(RightWrong[i], i, qtfield);
+ var aWeights = ProbValue[i].slice(2);
+ var evalGrpJS = eval(ProbValue[i][1]);
+ var evalGrpJSValue = evalGrpJS(this,qtfield,i,
+ RightWrong[i],aWeights);
+ ProbDist[i] = evalGrpJSValue;
+ ptScore = ptScore + evalGrpJSValue;
} else {
if (typeof RightWrong[i] == "object") {
if ( RightWrong[i][0] == 1 ) {
@@ -12080,20 +12125,21 @@ function DisplayQuizResults(qtfield,nPointTotal,nQuestions)
% If the user receives negative points, we change it to zero points.
% \changes{v8.5.9}{2020/02/21}{If the user receives negative points, we change it to zero points.}
% \begin{macrocode}
- if (!negPointsAllowed && !negPointsMarkupAllowed) if (ProbDist[i]<0) ProbDist[i]=0
+ if (!negPointsAllowed && %
+!negPointsMarkupAllowed && (ProbDist[i]<0) ) ProbDist[i]=0;
}
ptScore += (1*ProbDist[i]);
}
} else {
if (RightWrong[i]==1) {
Score++;
- ProbDist[i] = ( typeof ProbValue[i] == "object") ?
- 1*ProbValue[i][1] : 1*ProbValue[i];
+ ProbDist[i] = ( typeof ProbValue[i] == "object") ? %
+1*ProbValue[i][1] : 1*ProbValue[i];
ptScore += (1*ProbDist[i]);
}
else {
- ProbDist[i] = ( typeof ProbValue[i] == "object") ?
- 1*ProbValue[i][2] : 0;
+ ProbDist[i] = ( typeof ProbValue[i] == "object") ? %
+1*ProbValue[i][2] : 0;
ptScore += (1*ProbDist[i]);
}
}
@@ -12220,7 +12266,7 @@ function ProcessQuestion (key,letterresp,probno,
function correctQuiz(qtfield,nQuestions)
{
% \end{macrocode}
-% (2019/10/14) If \texttt{oRecordOfQuizData} is present (from \pkg{eq-save}, we use that data from the quiz.
+% (2019/10/14) If \texttt{oRecordOfQuizData} is present (from \pkg{eq-save}), we use that data from the quiz.
% \changes{v8.5.1}{2019/10/14}{Incorporated oRecordOfQuizData into correctQuiz()}
% \begin{macrocode}
var bROQD=(typeof oRecordOfQuizData=="object");
diff --git a/macros/latex/contrib/acrotex/insdljs.dtx b/macros/latex/contrib/acrotex/insdljs.dtx
index c94ec374a0..d53aeb6baa 100644
--- a/macros/latex/contrib/acrotex/insdljs.dtx
+++ b/macros/latex/contrib/acrotex/insdljs.dtx
@@ -4,7 +4,7 @@
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% insdljs.sty package, %%
-%% Copyright (C) 2001-2019 D. P. Story %%
+%% Copyright (C) 2001-2020 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{insdljs}
-%<package> [2020/07/09 v2.4.9 Insert Document Level JavaScripts (dps)]
+%<package> [2020/12/20 v2.5 Insert Document Level JavaScripts (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -470,7 +470,7 @@
% \begin{macrocode}
\let\isOpenAction\dl@NO
% \end{macrocode}
-% \IndexOpt{nodljs}
+% \leavevmode\IndexOpt{nodljs}^^A
% Option to cancel the insertion of DLJS, useful for a document meant to be
% printed only, or one that does not use the \texttt{shortquiz} or
% \texttt{quiz} environments, for example.
@@ -483,7 +483,7 @@
\let\firstdljs\dl@YES
\let\dljspresent\dl@NO
% \end{macrocode}
-% \IndexOpt{debug}
+% \leavevmode\IndexOpt{debug}^^A
% Use this option to help debug DLJS.
% \begin{macrocode}
\DeclareOptionX{debug}{\let\dljs@debug\dl@YES}
@@ -507,24 +507,24 @@
% We set the driver, according to the following algorithm.
% \begin{macrocode}
\@ifpackageloaded{web}{%
- \ExecuteOptionsX{\eq@driver@name}%
+ \ExecuteOptionsX{\eq@driver@name}%
}{%
- \@ifpackageloaded{eforms}{%
- \ExecuteOptionsX{\ef@driver}%
- }{%
- \ifpdf\ExecuteOptionsX{pdftex}\else
- \ifxetex\ExecuteOptionsX{xetex}\else
- \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
- {\ExecuteOptionsX{dvipsone}}\fi\fi
- }%
+ \@ifpackageloaded{eforms}{%
+ \ExecuteOptionsX{\ef@driver}%
+ }{%
+ \ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}\fi\fi
+ }%
}
% \end{macrocode}
-% \leavevmode\IndexOpt{reqjs}
+% \leavevmode\IndexOpt{reqjs}^^A
% Beginning with PDF 1.7, a document can specify requirements, here we declare
% the document uses JavaScripts. The option \texttt{reqjs} is taken by default,
% that is, JavaScripts are required for this document
-%
-% \DescribeMacro{!reqjs}
+% \medskip\par\noindent
+% \DescribeMacro{!reqjs}^^A
% The option \texttt{!reqis} turns off this feature; that is, there is no notification
% via the \textsf{YMB} (\textsf{Yellow Message Bar}) that Javascripts are used in the document, and the
% document may not function as designed.
@@ -545,10 +545,10 @@
% the usealtadobe option}
% \begin{macrocode}
\DeclareOptionX{usealtadobe}{\let\usedAdbFuncs\dl@YES
- \def\inputAltAdbFncs{\InputIfFileExists{altadbfncs.def}
- {\PackageInfo{insdljs}{Inputting code for usealtadobe option}}
- {\PackageWarning{insdljs}{Cannot find altadbfncs.def.\MessageBreak
- Reinstall or refresh your file name database.}}}}
+\def\inputAltAdbFncs{\InputIfFileExists{altadbfncs.def}
+ {\PackageInfo{insdljs}{Inputting code for usealtadobe option}}
+ {\PackageWarning{insdljs}{Cannot find altadbfncs.def.\MessageBreak
+ Reinstall or refresh your file name database.}}}}
\let\usedAdbFuncs\dl@NO
\let\inputAltAdbFncs\relax
% \end{macrocode}
@@ -564,14 +564,13 @@
% \end{macrocode}
% Issue a package error if there is no driver specified or implied.
% \begin{macrocode}
-\@ifundefined{dljs@drivernum}{%
- \PackageError{insdljs}%
- {You have not specified dvips, dvipsone, pdftex,\MessageBreak
- dvipdfm, dvipdfmx, or xetex in the option list
- \MessageBreak of the insdljs package}
- {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
- dvipdfmx, or xetex
- \MessageBreak in the option list of the insdljs package.}
+\@ifundefined{dljs@drivernum}{\PackageError{insdljs}%
+ {You have not specified dvips, dvipsone, pdftex,\MessageBreak
+ dvipdfm, dvipdfmx, or xetex in the option list
+ \MessageBreak of the insdljs package}
+ {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm,
+ dvipdfmx, or xetex
+ \MessageBreak in the option list of the insdljs package.}
}{}
% \end{macrocode}
% \subsection{Required Packages}
@@ -583,7 +582,6 @@
% \begin{macrocode}
\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
-% \begin{macrocode}
\RequirePackage{hyperref}
% \end{macrocode}
% LuaTeX v0.85 has made some changes to primitives, the definition below follows
@@ -593,8 +591,8 @@
% \changes{v2.3a}{2016/07/31}{Added luatex85 definition of \string\cs{pdfpageref}}
% \begin{macrocode}
\ifpdf\ifx\pdfextension\@undefined\else
- \protected\def\pdfnames{\pdfextension names }
- \def\pdfpageref{\pdffeedback pageref}\fi\fi
+ \protected\def\pdfnames{\pdfextension names }
+ \def\pdfpageref{\pdffeedback pageref}\fi\fi
\RequirePackage{verbatim}
% \end{macrocode}
%\changes{v2.4.1}{2019/02/11}{Save \string\cs{comment}\space as \string\cs{dlcomment}}
@@ -612,37 +610,37 @@
% Last minute adjustments in the driver.
% \begin{macrocode}
\@ifundefined{dljs@drivernum}{%
- \@ifundefined{eq@drivernum}{%
- \PackageWarning{insdljs}
- {No driver specified, will check for pdftex.}
- \@ifundefined{pdfoutput}{%
- \@ifundefined{@pdfm@mark}{\def\eq@drivernum{2}%
- \def\dljs@drivernum{1}\let\isOpenAction\dl@NO
- \PackageWarning{insdljs}{No pdftex, but detected dvipdfm}}%
- {\PackageWarning{insdljs}{Neither pdftex nor dvipdfm,
- assuming dvips/dvipsone.}%
- \def\eq@drivernum{0}\def\dljs@drivernum{0}%
- \let\isOpenAction\dl@YES}
- }{%
- \ifcase\pdfoutput
- \def\eq@drivernum{1}\def\dljs@drivernum{1}%
- \let\isOpenAction\dl@NO
- \PackageInfo{insdljs}{Pdftex detected.}%
- \else
- \def\eq@drivernum{0}\def\dljs@drivernum{0}%
- \let\isOpenAction\dl@YES
- \PackageWarning{insdljs}{Pdftex engine detected,
- but is outputting dvi. Assuming dvips as the driver.}%
- \fi
- }%
+ \@ifundefined{eq@drivernum}{%
+ \PackageWarning{insdljs}
+ {No driver specified, will check for pdftex.}
+ \@ifundefined{pdfoutput}{%
+ \@ifundefined{@pdfm@mark}{\def\eq@drivernum{2}%
+ \def\dljs@drivernum{1}\let\isOpenAction\dl@NO
+ \PackageWarning{insdljs}{No pdftex, but detected dvipdfm}}%
+ {\PackageWarning{insdljs}{Neither pdftex nor dvipdfm,
+ assuming dvips/dvipsone.}%
+ \def\eq@drivernum{0}\def\dljs@drivernum{0}%
+ \let\isOpenAction\dl@YES}
}{%
- \begingroup
- \count0=\eq@drivernum
- \xdef\dljs@drivernum{\ifcase\count0 0\or1\or2\or0\else0\fi}
- \ifnum\dljs@drivernum=0\global\let\isOpenAction\dl@YES
- \else\global\let\isOpenAction\dl@NO\fi
- \endgroup
+ \ifcase\pdfoutput
+ \def\eq@drivernum{1}\def\dljs@drivernum{1}%
+ \let\isOpenAction\dl@NO
+ \PackageInfo{insdljs}{Pdftex detected.}%
+ \else
+ \def\eq@drivernum{0}\def\dljs@drivernum{0}%
+ \let\isOpenAction\dl@YES
+ \PackageWarning{insdljs}{Pdftex engine detected,
+ but is outputting dvi. Assuming dvips as the driver.}%
+ \fi
}%
+ }{%
+ \begingroup
+ \count0=\eq@drivernum
+ \xdef\dljs@drivernum{\ifcase\count0 0\or1\or2\or0\else0\fi}
+ \ifnum\dljs@drivernum=0\global\let\isOpenAction\dl@YES
+ \else\global\let\isOpenAction\dl@NO\fi
+ \endgroup
+ }%
}{}
% \end{macrocode}
% I've always had problems with the pdftex option and inserting open page actions.
@@ -653,7 +651,7 @@
% This approach seems to work.
% \begin{macrocode}
\ifnum\dljs@drivernum=1\relax
- \RequirePackage{everyshi}
+ \RequirePackage{everyshi}
\fi
% \end{macrocode}
% If \texttt{reqjs} is in effect, we execute the following code, otherwise, we
@@ -663,10 +661,10 @@
\def\AEB@psMrk{[%]
\space}
\ifx\dl@reqJS\dl@YES
- \def\dl@@reqJS{/Type/Requirement/S/EnableJavaScripts}
- \ifpdf\pdfcatalog{\dl@@reqJS}\else
- \ifxetex\immediate\@pdfm@mark{put @catalog <<\dl@@reqJS>>}\else
- \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi
+ \def\dl@@reqJS{/Type/Requirement/S/EnableJavaScripts}
+ \ifpdf\pdfcatalog{\dl@@reqJS}\else
+ \ifxetex\immediate\@pdfm@mark{put @catalog <<\dl@@reqJS>>}\else
+ \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi
\fi
% \end{macrocode}
% Added switch to mark whether djs is inserted
@@ -789,21 +787,62 @@
%
%\subsection{Begin Code}
%
-% Some control sequences that are useful for formatting JavaScript.
-% \begin{macro}{\JS}
-% \begin{macro}{\Named}
-% A convenience command for writing JavaScript.
-% \changes{v2.4.9}{2020/07/09}{Added \string\Thread}
+% Some control sequences that are useful for various
+% actions. All appear within the \cs{A} key, eg, |\A{\JS{var x=17;}}|. Note the arguments
+% of some are delimited by parentheses, others by braces. Sorry for the inconsistency,
+% but these evolved over a period of years. Some keys require additional arguments which
+% are typically inserted in raw form; eg, |\A{\GoToR(|\ameta{dest}|)/F(example.pdf)}|.
+% \begin{macro}{\JS}\hskip-\marginparsep\texttt{\darg{\ameta{code}}}
+% A convenience command for writing a JavaScript action
% \begin{macrocode}
\providecommand\JS[1]{/S/JavaScript/JS(#1)}
-\providecommand\Named[1]{/S/Named/N/#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Named}\hskip-\marginparsep\texttt{\darg{\ameta{name}}}
+% A named action, eg, |\A{\Named{NextPage}}|
+% \begin{macrocode}
+\providecommand{\Named}[1]{/S/Named/N/#1}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GoTo}\hskip-\marginparsep\texttt{(\ameta{name})}
+% A go-to-action; eg, |\A{\GoTo(|\ameta{dest}|)}|. The argument can actually be a name
+% (enclosed in parentheses), a byte string, or an array.
+% \begin{macrocode}
\providecommand{\GoTo}{/S/GoTo/D}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GoToD}\hskip-\marginparsep\texttt{(\ameta{name})}
+% A go-to-action destination; eg, |\A{\GoToD(|\ameta{dest}|)}| (same as \cs{GoTo})
+% \begin{macrocode}
\providecommand{\GoToD}{/S/GoTo/D}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GoToR}\hskip-\marginparsep\texttt{(\ameta{name})/F(\ameta{file-spec})} A go-to-remote action,
+% where \ameta{name} is the destination in the remote file \ameta{file-spec}; eg, |\A{\GoToR(|\ameta{dest}|)/F(example.pdf)}|
+%
+% \begin{macrocode}
\providecommand{\GoToR}{/S/GoToR}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Thread}\hskip-\marginparsep\texttt{\darg{\ameta{thread-title}}}
+% \changes{v2.4.9}{2020/07/09}{Added \string\Thread}
+% A thread action; this command is used in the \pkg{artthreads} package.
+% \begin{macrocode}
\providecommand{\Thread}[1]{/S/Thread/D(#1)}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\URI}\hskip-\marginparsep\texttt{\darg{\ameta{string}}}
+% A URI action, eg, |\A{\URI{http://www.example.com}}|
+% \begin{macrocode}
\providecommand{\URI}[1]{/S/URI/URI(#1)}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\Launch}\hskip-\marginparsep\texttt{\darg{\ameta{file-spec}}}
+% \changes{v2.5}{2020/12/20}{Added \string\Launch}
+% A launch action
+% \begin{macrocode}
+\providecommand{\Launch}[1]{/Launch/F(#1)}
+% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\def\previewMiKTeX{\def\jsR{\string\r}\def\jsT{\string\t}}
@@ -811,16 +850,30 @@
\gdef\js@@R{\noexpand
}}
% \end{macrocode}
-% We define space\DescribeMacro\pdfSp, left\DescribeMacro\pdfLBr\space and right\DescribeMacro\pdfRBr\space
+% We define space\DescribeMacro\pdfSp, left\DescribeMacro\pdfLBr, and right \DescribeMacro\pdfRBr
% braces in pdf (PDFDocEncoding); these are also defined
% in \pkg{exerquiz} but under different names (\cs{eqSP}, \cs{eqLBr}, and \cs{eqRBr}).
% \changes{v2.4.2}{2019/03/16}{Added \string\cs{pdfSP}, and others, and \string\cs{dl@sp@ce}}
+% \changes{v2.4.10}{2020/11/28}{\string\cs{pdfSpacesOn} on by default,
+% only for \string\app{dvips}; otherwise, \string\cs{pdfSpacesOff}}
% \begin{macrocode}
\def\pdfSPDef{\string\040}
-\let\pdfSP\pdfSPDef
+\def\dl@sp@ce{ }
+% \end{macrocode}
+% Beginning with \pkg{insdljs} dated 2019/03/16, we solve an age-old problem with \app{dvips}: This problem
+% is that is wraps code around to the next line, according to some unknown algorithm. Normally this is not
+% a problem, but occasionally it will wrap some JavaScript code that breaks the code. Solve this problem,
+% we make the space character active, and replace it with \cs{pdfSP} (\cs{040}), which is octal for the space
+% character. Now there are no free spaces for \app{dvips} to break the line at in the PS file. The feature
+% is turned on by default, and may be turned off with \DescribeMacro\pdfSpacesOff\cs{pdfSpacesOff}
+% and back on by \DescribeMacro\pdfSpacesOn\cs{pdfSpacesOn}.
+% \begin{macrocode}
+\def\pdfSpacesOn{\let\pdfSP\pdfSPDef}
+\def\pdfSpacesOff{\let\pdfSP\dl@sp@ce}
+\pdfSpacesOff
+\ifpdf\else\ifxetex\else\pdfSpacesOn\fi\fi
\def\pdfLBr{\string\173}
\def\pdfRBr{\string\175}
-\def\dl@sp@ce{ }
% \end{macrocode}
% \DescribeMacro\dl@restorespcs restores the obey spaces space to its default,
% saved earlier. This command is placed at the end of each of the form field
@@ -829,18 +882,24 @@
\bgroup\obeyspaces
\gdef\dl@restorespcs{\global\let =\dl@sp@ce}\egroup
% \end{macrocode}
+% \cs{dljstfor} is used in the \texttt{cc4js} segment.
% \begin{macrocode}
\let\dljstfor\@tfor
% \end{macrocode}
-% 2012/06/20 Change the following code so there are no special cases.
+% \leavevmode\DescribeMacro{\dfnJSCR}\hskip-\marginparsep\texttt{\darg{\ameta{eol}}}
+% A help macro to define \cs{dfnJSR} in a convenient way; \cs{dfnJSR} is
+% used in the \env{defineJS} environment.
+% \changes{v2.5}{2020/12/20}{Helper commands \string\cs{dfnJSCR} to define
+% \string\cs{defineJSjsR} and \cs{dfnJSCRDef} to set default.}
% \begin{macrocode}
+\def\dfnJSCR#1{\gdef\dfnJSR{#1}\gdef\defineJSjsR{#1}}
+\def\dfnJSCRDef{\dfnJSCR{\string\r\eqbs^^J}}
+\dfnJSCRDef
\def\jsR{\string\r\string\n}
-%\def\jsR{\string\r\eqbs\js@@R}
-\def\defineJSjsR{\string\r\eqbs^^J}
% \end{macrocode}
-% \changes{v2.0l}{2012/11/10}{Added \cs{jsN}}
% \cs{r} is recognized by hyperref when \cs{pdfstringdef} is used. Hyperref
-% then modifies the expansion of \cs{r}. So, we'll use \cs{n} is those situations.
+% then modifies the expansion of \cs{r}. So, we'll use \cs{n} in those situations.
+% \changes{v2.0l}{2012/11/10}{Added \cs{jsN}}
% \begin{macrocode}
\def\jsN{\string\n}
{\catcode`\^^I\active %
@@ -875,7 +934,7 @@
% \begin{macrocode}
\def\dl@lparen{(}\def\dl@rparen{)}
\def\genericNL{^^J}
-\def\defjsLB{\expandafter\pdfmarkLB\@gobblefour}
+\def\defjsLB{\gobiv}
\def\genericLB{\eqbs\eqbs^^J}
\def\pdfmarkLB{\eqbs^^J}
\def\jscsDflt{\let\protect\noexpand\let\jslit\string
@@ -1017,13 +1076,12 @@
% This verbatim is used internally to write the \texttt{.djs} files, containing
% the JavaScript.
% \begin{macrocode}
-\newenvironment{js@verbatimwrite}% writes to current \js@verbatim@out
- {%
- \@bsphack
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \def\verbatim@processline{%
- \immediate\write\js@verbatim@out{\the\verbatim@line}}%
- \verbatim@start}{\@esphack}
+\newenvironment{js@verbatimwrite}{% writes to current \js@verbatim@out
+ \@bsphack
+ \let\do\@makeother\dospecials\catcode`\^^M\active
+ \def\verbatim@processline{\immediate
+ \write\js@verbatim@out{\the\verbatim@line}}\verbatim@start
+}{\@esphack}
% \end{macrocode}
% Unlike the example of verbatimwrite in the \texttt{verbatim} package, we do not
% automatically close the stream when we finish out \texttt{js@verbatimwrite} environment.
@@ -1069,39 +1127,38 @@
\begingroup
\catcode`\~=\active \lccode`\~=`\^^M
\lowercase{\endgroup
- \def\eqverbatim@#1~{\verbatim@@#1*end\@nil}%
- \def\eqverbatim@@#1*end{%
- \verbatim@addtoline{#1}%
- \futurelet\dl@next\eqverbatim@@@}%
- \def\eqverbatim@@@#1\@nil{%
- \ifx\dl@next\@nil
- \verbatim@processline
- \verbatim@startline
- \let\dl@next\eqverbatim@
- \else
- \def\@tempa##1*end\@nil{##1}%
- \@temptokena{*end}%
- \def\dl@next{\expandafter\verbatim@test\@tempa#1\@nil~}%
- \fi\dl@next}%
+ \def\eqverbatim@#1~{\verbatim@@#1*end\@nil}%
+ \def\eqverbatim@@#1*end{%
+ \verbatim@addtoline{#1}%
+ \futurelet\dl@next\eqverbatim@@@}%
+ \def\eqverbatim@@@#1\@nil{%
+ \ifx\dl@next\@nil
+ \verbatim@processline
+ \verbatim@startline
+ \let\dl@next\eqverbatim@
+ \else
+ \def\@tempa##1*end\@nil{##1}%
+ \@temptokena{*end}%
+ \def\dl@next{\expandafter\verbatim@test\@tempa#1\@nil~}%
+ \fi\dl@next}%
}%
\def\jsexpverbatimwrite
{% writes to current \js@verbatim@out
- \@bsphack
-% \escapechar=-1%
- \ccpdfmark
- \catcode`\<=12 \catcode`\>=12
- \input{dljscc.def}%
-% Attempt to redefine some macros from the the verbatim package
- \let\verbatim@=\eqverbatim@
- \let\verbatim@@=\eqverbatim@@
- \let\verbatim@@@=\eqverbatim@@@
+ \@bsphack
+ \ccpdfmark
+ \catcode`\<=12 \catcode`\>=12
+ \input{dljscc.def}%
+% Attempt to redefine some macros from the verbatim package
+ \let\verbatim@=\eqverbatim@
+ \let\verbatim@@=\eqverbatim@@
+ \let\verbatim@@@=\eqverbatim@@@
% end redefine of verbatim package
- \let\do\@makeother\eqdospecials%
- \catcode`\^^M=\active\catcode`\^^I=12%
- \def\verbatim@processline{%
- \edef\expVerb{\the\verbatim@line}%
- \immediate\write\js@verbatim@out{\expVerb}}%
- \verbatim@start%
+ \let\do\@makeother\eqdospecials%
+ \catcode`\^^M=\active\catcode`\^^I=12%
+ \def\verbatim@processline{%
+ \edef\expVerb{\the\verbatim@line}%
+ \immediate\write\js@verbatim@out{\expVerb}}%
+ \verbatim@start%
}
\def\endjsexpverbatimwrite{\immediate\closeout\js@verbatim@out\@esphack}
% \end{macrocode}
@@ -1143,21 +1200,21 @@
\gdef\dl@tilda<\string~> \gdef\dl@sup<\string^>
\endgroup
\def\makeJSspecials{%
- \def\\{\eqbs\eqbs}% % define \\ to be \\
- \let\jslit\string
+ \def\\{\eqbs\eqbs}% % define \\ to be \\
+ \let\jslit\string
% \end{macrocode}
% \changes{v2.0n}{2014/05/20}{Remake the definition of \cs{\char`\{} and \cs{\char`\}}}
% In an attempt to avoid the use of \verb~\jslit\{~ and \verb~\jslit\}~, we remake
% the definition of \verb~\{} and \verb~\}~.
% \begin{macrocode}
- \let\{\dl@lBrace\let\}\dl@rBrace
+ \let\{\dl@lBrace\let\}\dl@rBrace
% \end{macrocode}
% \changes{v2.1}{2015/07/12}{\cs{let} \cs{u} to \cs{@empty}.}
% \cs{let} \cs{u} to \cs{@empty}.
% \begin{macrocode}
- \let\u\@empty
- \def\({\eqbs(}\def\){\eqbs)}%
- \makespecialJS % make \r=\jsR and \t=\jsT
+ \let\u\@empty
+ \def\({\eqbs(}\def\){\eqbs)}%
+ \makespecialJS % make \r=\jsR and \t=\jsT
}
% \end{macrocode}
% \subsection{Open Document Actions}\label{opendocactions}
@@ -1183,12 +1240,12 @@
\def\dl@inheritzoom{/XYZ 0 0 0}
\def\dl@mag#1{/XYZ null null #1}
\edef\dl@Page#1{\ifcase\dljs@drivernum
- {Page#1}\or\noexpand\pdfpageref#1\space\space 0 R\or
- @page#1\fi}
+ {Page#1}\or\noexpand\pdfpageref#1\space\space 0 R\or
+ @page#1\fi}
\def\dl@preProcDefns{\let\Page\dl@Page\let\mag\dl@mag
- \let\fitpage\dl@fitpage\let\actualsize\dl@actualsize
- \let\fitwidth\dl@fitwidth\let\fitheight\dl@fitheight
- \let\fitvisible\dl@fitvisible\let\inheritzoom\dl@inheritzoom
+ \let\fitpage\dl@fitpage\let\actualsize\dl@actualsize
+ \let\fitwidth\dl@fitwidth\let\fitheight\dl@fitheight
+ \let\fitvisible\dl@fitvisible\let\inheritzoom\dl@inheritzoom
}
\let\aeb@additionalOpenAction\@empty
\let\aeb@addActionCode\@empty
@@ -1208,42 +1265,42 @@
%\end{verbatim}
% \begin{macrocode}
\newcommand{\addToDocOpen}[1]{%
- \ifx\aebpFA\dl@NO
- \g@addto@macro\aebpopentoks{#1}%
- \def\aeb@additionalOpenAction{/Next {pubAddToDocOpen}}%
+ \ifx\aebpFA\dl@NO
+ \g@addto@macro\aebpopentoks{#1}%
+ \def\aeb@additionalOpenAction{/Next {pubAddToDocOpen}}%
\ifpdf
- \def\aeb@addActionCode{\immediate\pdfobj{<<
- \aebpopentoks\aebp@rightDelimiters >>}%
- \edef\addActionObj{\the\pdflastobj\space 0 R}}%
+ \def\aeb@addActionCode{\immediate\pdfobj{<<
+ \aebpopentoks\aebp@rightDelimiters >>}%
+ \edef\addActionObj{\the\pdflastobj\space 0 R}}%
\else\ifxetex
- \def\aeb@addActionCode{\immediate
- \@pdfm@mark{obj @objAddActionObj
- << \aebpopentoks\aebp@rightDelimiters >> }}%
- \def\addActionObj{@objAddActionObj}%
+ \def\aeb@addActionCode{\immediate
+ \@pdfm@mark{obj @objAddActionObj
+ << \aebpopentoks\aebp@rightDelimiters >> }}%
+ \def\addActionObj{@objAddActionObj}%
\else % postscript
- \def\aeb@addActionCode{\literalps@out{%
- \AEB@psMrk/_objdef {pubAddToDocOpen}
- /type/dict /OBJ pdfmark^^J%
- \AEB@psMrk{pubAddToDocOpen} <<
- \aebpopentoks\aebp@rightDelimiters >> /PUT pdfmark}}%
- \def\addActionObj{{pubAddToDocOpen}}%
+ \def\aeb@addActionCode{\literalps@out{%
+ \AEB@psMrk/_objdef {pubAddToDocOpen}
+ /type/dict /OBJ pdfmark^^J%
+ \AEB@psMrk{pubAddToDocOpen} <<
+ \aebpopentoks\aebp@rightDelimiters >> /PUT pdfmark}}%
+ \def\addActionObj{{pubAddToDocOpen}}%
\fi\fi
- \global\let\aebpFA\dl@YES
- \let\@pdfstartview\@empty
- \else
- \edef\aebp@dljstmp{\aebp@rightDelimiters}%
- \xdef\aebp@rightDelimiters{\aebp@dljstmp >> }%
- \g@addto@macro\aebpopentoks{/Next << #1 }%
- \fi
+ \global\let\aebpFA\dl@YES
+ \let\@pdfstartview\@empty
+ \else
+ \edef\aebp@dljstmp{\aebp@rightDelimiters}%
+ \xdef\aebp@rightDelimiters{\aebp@dljstmp >> }%
+ \g@addto@macro\aebpopentoks{/Next << #1 }%
+ \fi
}
\def\dljs@OpenActions{/OpenAction \addActionObj}
\def\dljs@setOpenActions{\bgroup\makeJSspecials\dl@preProcDefns
- \aeb@addActionCode
- \ifpdf\pdfcatalog{\dljs@OpenActions}\else
- \ifxetex\immediate
- \@pdfm@mark{put @catalog <<\dljs@OpenActions>>}\else
- \literalps@out{\AEB@psMrk
- {Catalog} <<\dljs@OpenActions>> /PUT pdfmark}\fi\fi\egroup}
+ \aeb@addActionCode
+ \ifpdf\pdfcatalog{\dljs@OpenActions}\else
+ \ifxetex\immediate
+ \@pdfm@mark{put @catalog <<\dljs@OpenActions>>}\else
+ \literalps@out{\AEB@psMrk
+ {Catalog} <<\dljs@OpenActions>> /PUT pdfmark}\fi\fi\egroup}
% \end{macrocode}
% If \textsf{aeb\_pro} is not loaded, we set the open actions. If \textsf{aeb\_pro}
% is loaded, we do nothing for \textsf{aeb\_pro} has its own contributions to the
@@ -1251,8 +1308,8 @@
% \changes{v2.3d}{2017/01/08}{Use \cs{aebpFA} to detect open actions}
% \begin{macrocode}
\@ifpackageloaded{aeb_pro}{}
- {\AtBeginDocument{\ifx\aebpFA\dl@YES\expandafter
- \dljs@setOpenActions\fi}}
+ {\AtBeginDocument{\ifx\aebpFA\dl@YES\expandafter
+ \dljs@setOpenActions\fi}}
% \end{macrocode}
%
% \subsection{Open Page Actions}\label{openaction}
@@ -1270,18 +1327,17 @@
% \begin{macrocode}
\let\@CloseAction\@empty
\def\@OAction@pdfmark{\literalps@out{%
- \AEB@psMrk{ThisPage} << /AA << /O << \theFirstAction\space
- \opentoks\@rightDelimiters >> \@CloseAction >> >> /PUT pdfmark}}
+ \AEB@psMrk{ThisPage} << /AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >> >> /PUT pdfmark}}
\def\@POAction@pdfmark{\literalps@out{%
- \AEB@psMrk{ThisPage} << /AA << \@thisOpenAction
- \@thisCloseAction >> >> /PUT pdfmark}%
+ \AEB@psMrk{ThisPage} << /AA << \@thisOpenAction
+ \@thisCloseAction >> >> /PUT pdfmark}%
}
\def\@OAction@pdftex{%
- \ifx\isOpenAction\dl@YES
- \xdef\pdftexOAction{/AA << /O << \theFirstAction\space
- \opentoks\@rightDelimiters >> \@CloseAction >>}%
- \AtNextShipout{\pdfpageattr=\expandafter{\pdftexOAction}}%
- \fi
+ \ifx\isOpenAction\dl@YES
+ \xdef\pdftexOAction{/AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >>}%
+ \AtNextShipout{\pdfpageattr=\expandafter{\pdftexOAction}}\fi
}
\def\@POAction@pdftex{%
\xdef\thisPageActionpdftex{/AA << \@thisOpenAction
@@ -1292,29 +1348,29 @@
% For \textsf{dvipdfm}
% \begin{macrocode}
\def\@OAction@dvipdfm{\ifx\isOpenAction\dl@YES
- \@pdfm@mark{put @thispage << /AA << /O << \theFirstAction\space
- \opentoks\@rightDelimiters >> \@CloseAction >> >>}\fi
+ \@pdfm@mark{put @thispage << /AA << /O << \theFirstAction\space
+ \opentoks\@rightDelimiters >> \@CloseAction >> >>}\fi
}
\def\@POAction@dvipdfm{%
- \@pdfm@mark{put @thispage << /AA << \@thisOpenAction
- \@thisCloseAction >> >>}%
+ \@pdfm@mark{put @thispage << /AA << \@thisOpenAction
+ \@thisCloseAction >> >>}%
}
% \end{macrocode}
% Now we choose the one appropriate to the user's driver option.
% \begin{macrocode}
\ifcase\dljs@drivernum
- \let\@OAction\@OAction@pdfmark
- \let\@POAction\@POAction@pdfmark
- \gdef\theFirstAction{/S/JavaScript/JS (\the\importfdftoks)}
- \let\isOpenAction\dl@YES
+ \let\@OAction\@OAction@pdfmark
+ \let\@POAction\@POAction@pdfmark
+ \gdef\theFirstAction{/S/JavaScript/JS (\the\importfdftoks)}
+ \let\isOpenAction\dl@YES
\or
- \let\@OAction\@OAction@pdftex
- \let\@POAction\@POAction@pdftex
- \AtBeginDocument{\@OAction@pdftex}
+ \let\@OAction\@OAction@pdftex
+ \let\@POAction\@POAction@pdftex
+ \AtBeginDocument{\@OAction@pdftex}
\or
- \let\@OAction\@OAction@dvipdfm
- \let\@POAction\@POAction@dvipdfm
- \AtBeginDocument{\@OAction@dvipdfm}
+ \let\@OAction\@OAction@dvipdfm
+ \let\@POAction\@POAction@dvipdfm
+ \AtBeginDocument{\@OAction@dvipdfm}
\fi
% \end{macrocode}
% \begin{macro}{\OpenAction}
@@ -1353,7 +1409,6 @@
%\end{verbatim}
%\cs{opentoks} accumulates the ``action''.
% \begin{macrocode}
-%\newtoks\opentoks \opentoks={}
\def\opentoks{}
% \end{macrocode}
% The open action is really not meant for anything too fancy, such as searching using regular
@@ -1363,14 +1418,14 @@
% open page action.
% \begin{macrocode}
\def\makespecialJS{%
- \let\r\jsR\let\t\jsT\let\n\jsN}
+ \let\r\jsR\let\t\jsT\let\n\jsN}
\def\@rightDelimiters{}
% \end{macrocode}
% If the next token is \cs{Next} then we gobble it up, and begin \cs{@OpenAction}
% otherwise we begin \cs{@OpenAction}. This allows the ``chaining'' as illustrated above.
% \begin{macrocode}
\def\OpenAction{\@ifnextchar\Next
- {\expandafter\@OpenAction\@gobble}{\@OpenAction}}
+ {\expandafter\@OpenAction\@gobble}{\@OpenAction}}
% \end{macrocode}
% \cs{@OpenAction}: This is the macro that actually does the work. We differentiate between whether the
% current argument \texttt{\#1} is the first of all open actions, or not. If the former,
@@ -1379,23 +1434,23 @@
% the \cs{opentoks} token register.
% \begin{macrocode}
\def\@OpenAction#1{%
- \ifx\isOpenAction\dl@NO
- {\makespecialJS\xdef\theFirstAction{#1}}%
- \global\let\isOpenAction\dl@YES
- \else
- \edef\dljstmp{\@rightDelimiters}%
- \xdef\@rightDelimiters{\dljstmp >> }%
- {\makespecialJS\xdef\dljstmp{\opentoks /Next << #1 }}%
- \xdef\opentoks{\dljstmp}%
- \fi
- \@nextOpenAction
+ \ifx\isOpenAction\dl@NO
+ {\makespecialJS\xdef\theFirstAction{#1}}%
+ \global\let\isOpenAction\dl@YES
+ \else
+ \edef\dljstmp{\@rightDelimiters}%
+ \xdef\@rightDelimiters{\dljstmp >> }%
+ {\makespecialJS\xdef\dljstmp{\opentoks /Next << #1 }}%
+ \xdef\opentoks{\dljstmp}%
+ \fi
+ \@nextOpenAction
}
% \end{macrocode}
% As its last act, \cs{@OpenAction} calls \cs{@nextOpenAction}, which is nearly identical to
% \cs{OpenAction}, except if there is no \cs{Next} token, the macro terminates.
% \begin{macrocode}
\def\@nextOpenAction{\@ifnextchar\Next{\expandafter
- \@OpenAction\@gobble}{}}
+ \@OpenAction\@gobble}{}}
% \end{macrocode}
% \end{macro}
% Here is a last example that uses the \texttt{insDLJS} environment and the \cs{OpenAction} command. This code
@@ -1430,58 +1485,56 @@
% The first argument is on open page action, the second one is a closed page action.
% \begin{macrocode}
\def\protectJSCtrls{\def\r{\string\r\string\n}%
- \def\t{\string\t}\def\n{\string\n}}
+ \def\t{\string\t}\def\n{\string\n}}
\def\dljs@tstlp{\@ifnextchar\bgroup
- {\let\dljs@multi\dl@YES\dljs@tstlpi}%
- {\let\dljs@multi\dl@NO\dljs@tstlpi}}
+ {\let\dljs@multi\dl@YES\dljs@tstlpi}%
+ {\let\dljs@multi\dl@NO\dljs@tstlpi}}
\def\dljs@tstlpi#1\@nil{}%
% #1=arg, #2=O|C, #3=cmd
-\def\dljs@bldScript#1#2#3{{%
- \dljs@tstlp#1\@nil
- \ifx\dljs@multi\dl@NO{\protectJSCtrls\xdef#3{/#2<<#1>>}}\else
- \toks0={}\let\dljs@rAngles\@empty\count0=0
- \@tfor\dljs@arg:=#1\do{%
- \ifnum\count0=0
- \toks0=\expandafter{\dljs@arg}\else
- \toks2=\expandafter{\dljs@arg}%
- \edef\holdtokstmp{\the\toks0
- /Next<<\the\toks2 }%
- \edef\dljs@rAngles{\dljs@rAngles\space>>}%
- \toks0=\expandafter{\holdtokstmp}%
- \fi
- \advance\count0by1
- }%
- {\protectJSCtrls\xdef#3{/#2<<\the\toks0 \dljs@rAngles>>}%
- \xdef#3{#3}}%
- \fi
-}}
+\def\dljs@bldScript#1#2#3{\bgroup
+ \dljs@tstlp#1\@nil
+ \ifx\dljs@multi\dl@NO{\protectJSCtrls\xdef#3{/#2<<#1>>}}\else
+ \toks0={}\let\dljs@rAngles\@empty\count0=0
+ \@tfor\dljs@arg:=#1\do{%
+ \ifnum\count0=0
+ \toks0=\expandafter{\dljs@arg}\else
+ \toks2=\expandafter{\dljs@arg}%
+ \edef\holdtokstmp{\the\toks0
+ /Next<<\the\toks2 }%
+ \edef\dljs@rAngles{\dljs@rAngles\space>>}%
+ \toks0=\expandafter{\holdtokstmp}%
+ \fi
+ \advance\count0by\@ne
+ }{\protectJSCtrls\xdef#3{/#2<<\the\toks0 \dljs@rAngles>>}%
+ \xdef#3{#3}}%
+ \fi
+\egroup}
\newcommand{\thisPageAction}[2]{%
- \let\@CloseAction\@empty
- \let\@thisOpenAction\@empty
- \let\@thisCloseAction\@empty
- \def\dljs@argi{#1}\def\dljs@argii{#2}%
+ \let\@CloseAction\@empty
+ \let\@thisOpenAction\@empty
+ \let\@thisCloseAction\@empty
+ \def\dljs@argi{#1}\def\dljs@argii{#2}%
% \end{macrocode}
% On the first page, \cs{OpenAction} is used to process the open action
% \begin{macrocode}
- \ifnum\value{page}=1\relax
- \ifx\dljs@argii\@empty\else
- \dljs@bldScript{#2}{C}{\@CloseAction}\fi
- \ifx\dljs@argi\@empty\else\dljs@tstlp#1\@nil
- \ifx\dljs@multi\dl@NO\OpenAction{#1}\else
- \@tfor\dljs@arg:=#1\do{\expandafter
- \OpenAction\expandafter{\dljs@arg}%
- }\fi
- \fi
- \else
+ \ifnum\value{page}=1\relax
+ \ifx\dljs@argii\@empty\else
+ \dljs@bldScript{#2}{C}{\@CloseAction}\fi
+ \ifx\dljs@argi\@empty\else\dljs@tstlp#1\@nil
+ \ifx\dljs@multi\dl@NO\OpenAction{#1}\else
+ \@tfor\dljs@arg:=#1\do{\expandafter
+ \OpenAction\expandafter{\dljs@arg}%
+ }\fi\fi
+ \else
% \end{macrocode}
% If this is not the first page, we just populate the \texttt{/O} dictionary
% \begin{macrocode}
- \ifx\dljs@argi\@empty\else
- \dljs@bldScript{#1}{O}{\@thisOpenAction}\fi
- \ifx\dljs@argii\@empty\else
- \dljs@bldScript{#2}{C}{\@thisCloseAction}\fi
- \@POAction
- \fi
+ \ifx\dljs@argi\@empty\else
+ \dljs@bldScript{#1}{O}{\@thisOpenAction}\fi
+ \ifx\dljs@argii\@empty\else
+ \dljs@bldScript{#2}{C}{\@thisCloseAction}\fi
+ \@POAction
+ \fi
}
% \end{macrocode}
% \subsection{The \texttt{insDLJS} Environments}
@@ -1547,10 +1600,10 @@
\let\insdljsloadVar\@empty
\newenvironment{insDLJS}[3][]
{%
- \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
- \ifxetex{\def\1{\string\1}\def\2{\string2}%
- \def\3{\string\3}\xdef\dljsName{#3}}\else
- \Hy@unicodefalse\pdfstringdef{\dljsName}{#3}\fi
+ \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
+ \ifxetex{\def\1{\string\1}\def\2{\string2}%
+ \def\3{\string\3}\xdef\dljsName{#3}}\else
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#3}\fi
% \end{macrocode}
% If the optional argument is not passed,
% we generate one for the user.
@@ -1558,32 +1611,32 @@
% we generate one for the user.}
% \begin{macrocode}
\ifx\detectdljs\@empty
- \stepcounter{dljs@cnt}%
- \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
- \edef\insdljsloadVar{var \detectdljs=true;}%
- \addtocounter{dljs@cnt}{-1}%
+ \stepcounter{dljs@cnt}%
+ \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
+ \edef\insdljsloadVar{var \detectdljs=true;}%
+ \addtocounter{dljs@cnt}{-1}%
\fi
- \global\let\multisegments\dl@NO\setcounter{dljssegs}{2}%
- \global\dljsobjtoks={}%
- \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
- \else\@insjserrDuplicate\fi
- \ifcase\dljs@drivernum
- \let\insert@DLJS=\insert@DLJS@pdfmark
- \let\endinsDLJS=\endinsert@DLJS@pdfmark
- \let\newsegment=\newsegment@pdfmark
- \let\endnewsegment=\endnewsegment@pdfmark
- \or
- \let\insert@DLJS=\insert@DLJS@pdftex
- \let\endinsDLJS=\endinsert@DLJS@pdftex
- \let\newsegment=\newsegment@pdftex
- \let\endnewsegment=\endnewsegment@pdftex
- \or
- \let\insert@DLJS=\insert@DLJS@dvipdfm
- \let\endinsDLJS=\endinsert@DLJS@dvipdfm
- \let\newsegment=\newsegment@dvipdfm
- \let\endnewsegment=\endnewsegment@dvipdfm
- \fi
- \insert@DLJS
+ \global\let\multisegments\dl@NO\setcounter{dljssegs}{2}%
+ \global\dljsobjtoks={}\expandafter
+ \ifx\csname dljs\dljsBase\endcsname\relax
+ \else\@insjserrDuplicate\fi
+ \ifcase\dljs@drivernum
+ \let\insert@DLJS=\insert@DLJS@pdfmark
+ \let\endinsDLJS=\endinsert@DLJS@pdfmark
+ \let\newsegment=\newsegment@pdfmark
+ \let\endnewsegment=\endnewsegment@pdfmark
+ \or
+ \let\insert@DLJS=\insert@DLJS@pdftex
+ \let\endinsDLJS=\endinsert@DLJS@pdftex
+ \let\newsegment=\newsegment@pdftex
+ \let\endnewsegment=\endnewsegment@pdftex
+ \or
+ \let\insert@DLJS=\insert@DLJS@dvipdfm
+ \let\endinsDLJS=\endinsert@DLJS@dvipdfm
+ \let\newsegment=\newsegment@dvipdfm
+ \let\endnewsegment=\endnewsegment@dvipdfm
+ \fi
+ \insert@DLJS
}{}
% \end{macrocode}
%
@@ -1637,7 +1690,7 @@
% \begin{macrocode}
\newenvironment{insDLJS*}[2][]
{%
- \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
+ \gdef\detectdljs{#1}\gdef\dljsBase{#2}%
% \end{macrocode}
% If the optional argument is not passed,
% we generate one for the user.
@@ -1645,43 +1698,40 @@
% we generate one for the user.}
% \begin{macrocode}
\ifx\detectdljs\@empty
- \stepcounter{dljs@cnt}%
- \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
- \edef\insdljsloadVar{var \detectdljs=true;}%
- \addtocounter{dljs@cnt}{-1}%
+ \stepcounter{dljs@cnt}%
+ \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}%
+ \edef\insdljsloadVar{var \detectdljs=true;}%
+ \addtocounter{dljs@cnt}{-1}%
\fi
- \global\let\multisegments\dl@YES\setcounter{dljssegs}{2}%
- \global\dljsobjtoks={}%
- \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
- \else\@insjserrDuplicate\fi
- \ifcase\dljs@drivernum
- \let\insert@DLJS=\insert@DLJS@pdfmark
- \expandafter
- \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark
- \let\newsegment=\newsegment@pdfmark
- \let\endnewsegment=\endnewsegment@pdfmark
- \or
- \let\insert@DLJS=\insert@DLJS@pdftex
- \expandafter
- \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex
- \let\newsegment=\newsegment@pdftex
- \let\endnewsegment=\endnewsegment@pdftex
- \or
- \let\insert@DLJS=\insert@DLJS@dvipdfm
- \expandafter
- \let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm
- \let\newsegment=\newsegment@dvipdfm
- \let\endnewsegment=\endnewsegment@dvipdfm
- \fi
- \insert@DLJS
+ \global\let\multisegments\dl@YES\setcounter{dljssegs}{2}%
+ \global\dljsobjtoks={}%
+ \expandafter\ifx\csname dljs\dljsBase\endcsname\relax
+ \else\@insjserrDuplicate\fi
+ \ifcase\dljs@drivernum
+ \let\insert@DLJS=\insert@DLJS@pdfmark\expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark
+ \let\newsegment=\newsegment@pdfmark
+ \let\endnewsegment=\endnewsegment@pdfmark
+ \or
+ \let\insert@DLJS=\insert@DLJS@pdftex\expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex
+ \let\newsegment=\newsegment@pdftex
+ \let\endnewsegment=\endnewsegment@pdftex
+ \or
+ \let\insert@DLJS=\insert@DLJS@dvipdfm\expandafter
+ \let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm
+ \let\newsegment=\newsegment@dvipdfm
+ \let\endnewsegment=\endnewsegment@dvipdfm
+ \fi
+ \insert@DLJS
}{}
\def\@insjserrDuplicate{%
- \typeout{^^J! insdljs Package error.}
- \typeout{! insDLJS environment: On line number \the\inputlineno,}
- \typeout{! the base name `\dljsBase' has already been chosen.}
- \typeout{! A DLJS earlier defined has been overwritten!}
- \typeout{! Choose another name for the first required argument}
- \typeout{! of the insDLJS environment.^^J}
+ \typeout{^^J! insdljs Package error.}
+ \typeout{! insDLJS environment: On line number \the\inputlineno,}
+ \typeout{! the base name `\dljsBase' has already been chosen.}
+ \typeout{! A DLJS earlier defined has been overwritten!}
+ \typeout{! Choose another name for the first required argument}
+ \typeout{! of the insDLJS environment.^^J}
}
% \end{macrocode}
% \end{macro}
@@ -1711,18 +1761,18 @@
% \begin{macrocode}
\let\DLspecialDefs\@empty
\def\fdfAfterheader#1{%
- \iwvo{\string\begingroup\string\efdlspecials}
- \iwvo{\string\DLspecialDefs\string#1}
- \iwvo{\string\isdljstrue}
- \iwvo{\string\makeatletter}
- \iwvo{\string\immediate\string\openout\string
+ \iwvo{\string\begingroup\string\efdlspecials}
+ \iwvo{\string\DLspecialDefs\string#1}
+ \iwvo{\string\isdljstrue}
+ \iwvo{\string\makeatletter}
+ \iwvo{\string\immediate\string\openout\string
\js@verbatim@out=\string\js@Path\space\dljsBase.fdf}%
- \iwvo{\string\begin{jsexpverbatimwrite}}
- \iwvo{\string\firstFDFline}
- \iwvo{1 0 obj}
- \iwvo{<< /FDF << /JavaScript << /Doc 2 0 R /After 3 0 R >> >> >> }
- \iwvo{endobj}
- \iwvo{2 0 obj}
+ \iwvo{\string\begin{jsexpverbatimwrite}}
+ \iwvo{\string\firstFDFline}
+ \iwvo{1 0 obj}
+ \iwvo{<< /FDF << /JavaScript << /Doc 2 0 R /After 3 0 R >> >> >> }
+ \iwvo{endobj}
+ \iwvo{2 0 obj}
% \end{macrocode}
% When a non-Distiller workflow, ensure execJSs are listed first.
% \changes{v2.2h}{2016/06/09}{When a non-Distiller workflow, ensure execJSs are listed first}
@@ -1756,34 +1806,34 @@
\def\restoreDLspecialDefs{\let\DLspecialDefs\@empty}
\newenvironment{execJS}[2][\relax]
{%
- \def\x{#1}\ifx\x\@empty\def\x{\relax}\fi
- \gdef\detectdljs{\string_#2}\gdef\dljsBase{#2}%
- \global\dljsobjtoks={}%
- \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
- \ifx\importdljs\dl@YES\ifx\execjs\dl@YES
- \ifx\dl@gopro\dl@YES
- \ifnum\dljs@drivernum=0\relax
- \addImportAnFDF\importAnFDFTemplate
- \else
- \OpenAction{/S/JavaScript/JS (\importAnFDFTemplate)}%
- \fi\fi
+ \def\x{#1}\ifx\x\@empty\def\x{\relax}\fi
+ \gdef\detectdljs{\string_#2}\gdef\dljsBase{#2}%
+ \global\dljsobjtoks={}%
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \ifx\importdljs\dl@YES\ifx\execjs\dl@YES
+ \ifx\dl@gopro\dl@YES
+ \ifnum\dljs@drivernum=0\relax
+ \addImportAnFDF\importAnFDFTemplate
+ \else
+ \OpenAction{/S/JavaScript/JS (\importAnFDFTemplate)}%
\fi\fi
- \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
- \expandafter\fdfAfterheader\expandafter{\x}%
- \js@verbatimwrite
+ \fi\fi
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \expandafter\fdfAfterheader\expandafter{\x}%
+ \js@verbatimwrite
}{%
- \fdfendstreamobj
- \endjs@verbatimwrite
- \fdftrailer
+ \fdfendstreamobj
+ \endjs@verbatimwrite
+ \fdftrailer
% \end{macrocode}
% Added \cs{restoreDLspecialsDefs} to restore \cs{DLspecialDefs} to its default of \cs{@empty}.
% \changes{v2.4.4}{2019/07/14}{Added \string\cs{restoreDLspecialsDefs}}
% \begin{macrocode}
- \iwvo{\string\restoreDLspecialDefs}%
- \closejs@verbatim@out
- \expandafter\xdef\csname\dljsBase OBJ\endcsname{\the\dljsobjtoks}%
- \edef\@dljstmp{\noexpand\AtBeginDocument{%
- \noexpand\input{\js@Path\dljsBase.djs}}}\@dljstmp
+ \iwvo{\string\restoreDLspecialDefs}%
+ \closejs@verbatim@out
+ \expandafter\xdef\csname\dljsBase OBJ\endcsname{\the\dljsobjtoks}%
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}\@dljstmp
% \end{macrocode}
%\changes{v2.2g}{2016/05/11}{Removed \string\cs{AtBeginDocument} code
%from the \string\texttt{execJS} environment. This causes problems with
@@ -1828,7 +1878,7 @@
% of the environment. (Note, within the body, there is no escape character unless you change catcode of another character
% within the optional argument of the \env{defineJS} environments.)
%\begin{verbatim}
-% \begin{defineJS}[\catcode`\!=0\relax]{\myCode}
+% \begin{defineJS}[\makeesc\!]{\myCode}
% var p1=!p(1), p2=!p(2);
% app.alert("p1 + p2 = " + Number(p1+p2) );
% \end{defineJS}
@@ -1885,58 +1935,61 @@
\JStoks=\expandafter{\x}\expandafter
\edef\csname\p@r@m\the\c@dljs@cnt\endcsname{\the\JStoks}}}
% \end{macrocode}
-% Beginning with \pkg{insdljs} dated 2019/03/16, we solve an age-old problem with \app{dvips}: This problem
-% is that is wraps code around to the next line, according to some unknown algorithm. Normally this is not
-% a problem, but occasionally it will wrap some JavaScript code that breaks the code. Solve this problem,
-% we make the space character active, and replace it with \cs{pdfSP} (\cs{040}), which is octal for the space
-% character. Now there are no free spaces for \app{dvips} to break the line at in the PS file. The feature
-% is turned on by default, and may be turned off with \DescribeMacro\pdfSpacesOff\cs{pdfSpacesOff}
-% and back on by \DescribeMacro\pdfSpacesOn\cs{pdfSpacesOn}.
-% \begin{macrocode}
-\def\pdfSpacesOn{\let\pdfSP\pdfSPDef}
-\def\pdfSpacesOff{\let\pdfSP\dl@sp@ce}
-% \end{macrocode}
% \DescribeMacro{\dlcombine}\hskip-\marginparsep\texttt{(\#1)(\#2)}
-% Within the \env{defineJS} environment, spaces are obeyed, at time, we want to says
-% \verb*|@currQuiz MyField|, for example. which within \env{defineJS} gets expanded to
+% (In this discussion, it is assumed `\texttt{@}' is the escape character
+% within \env{defineJS}.)
+% Within the \env{defineJS} environment, spaces are obeyed; at times, we want to say
+% \verb*|@currQuiz MyField|, for example, which within \env{defineJS} gets expanded to
% \verb*|q1 MyField|, not \texttt{q1MyField} as it should be. To solve this and other
% problems like it, use \verb|@dlcombine(@currQuiz)(MyField)| which does expand
-% to the intended expression. (In this discussion, it is assumed \texttt{@} is the escape character
-% within \env{defineJS}.)
+% to the intended expression.
% \changes{v2.4.3}{2019/06/27}{Added \string\cs{dlcombine}}
% \begin{macrocode}
\def\dlcombine(#1)(#2){#1#2}
% \end{macrocode}
+% \DescribeMacro{\dlcontig}\hskip-\marginparsep\texttt{(\#1)} Perhaps a better method than
+% just described (\cs{dlcombine}) is to have a single argument delimited by parentheses.
+% Thus \verb|@currQuiz@dlcontig(MyField)| also produces \texttt{q1MyField}.
+% \begin{macrocode}
+\def\dlcontig(#1){#1}
+% \end{macrocode}
% When you declare a character to be an escape within the optional argument of \env{defineJS},
-% that character may be needed in the code; for example if we say |\catcode`\!=0\relax|, and
-% within the JavaScript code you have \texttt{if (x != 0 ) ...}, there is a problem: the JavaScript
+% that character may be needed in the code; for example if we declare |\makeesc\!|, and
+% within the JavaScript code we have \texttt{if (x != 0 )...}, the JavaScript
% code is broken. As a fix for this problem, you can declare \DescribeMacro\escIs|\escIs{!}|,
-% which in turn defines \DescribeMacro\Eschr\cs{Eschr}. the above code
-% should then be written as \texttt{if (x !Eschr= 0 ) ...}; messy, but it works. The lines
-% below is the recommended method of declaring \cs{escIs}:
+% which in turn defines \DescribeMacro\Eschr\cs{Eschr} to expand to `\texttt!'. The above code
+% may then be written as \texttt{if (x !Eschr= 0 )...}; messy, but it works. The lines
+% below are the recommended method of declaring \cs{escIs}:
%\begin{verbatim}
% \pushButton[\cmd{\escIs{!}\bParams{77}{11}\eParams}
% \A{\JS{\myCode}}]{pbfld2}{.5in}{11bp}
%\end{verbatim}
-% These declarations makes everything local to the group within which the button is built.
+% These declarations make everything local to the group within which the button is built.
% \begin{macrocode}
\def\escIs#1{\def\Eschr{#1}}
% \end{macrocode}
% \DescribeMacro\makeesc\hskip-\marginparsep\texttt{\cs{\ameta{char}}}
% \cs{dl@makeesc} is a helper command that sets the escape character,
-% Within the \env{defineJS} environments, it is \cs{let} to \DescribeMacro\makeesc\cs{makeesc};
-% eg, |\makeesc\@|
+% Within the \env{defineJS} environments, it is \cs{let} to \cs{makeesc};
+% eg, |\makeesc\!|.
% \changes{v2.4.3}{2019/06/27}{Added \string\cs{dl@makeesc}}
% \begin{macrocode}
\def\dl@makeesc#1{\catcode`#1=0\relax}
% \end{macrocode}
-% \leavevmode\DescribeMacro\dlgobToFi Used to format \env{defineJS} content
-% when a conditional leaves an empty space; for example,
+% \DescribeMacro\makecmt\hskip-\marginparsep\texttt{\cs{\ameta{char}}} Likewise,
+% you can conviently declare the comment character, if any; eg, |\makecmt\%|.
+% \changes{v2.4.10}{2020/11/28}{Added \string\cs{dl@makecmt}}
+% \begin{macrocode}
+\def\dl@makecmt#1{\catcode`#1=14\relax}
+% \end{macrocode}
+% \paragraph*{Incorporating {\LaTeX} conditionals in \env{defineJS}.} {\LaTeX} conditionals
+% need to be handled carefull so as not to produce any specious spaces. Normally, there is
+% a comment character declared (|\makecmt\%|). Use the comment character to suppress the beginning
+% of a new line until it is known whether there is content on that next line. Eg,
%\begin{verbatim}
-%\begin{defineJS}[%
-% \makeesc\*\catcode`\%=14\relax]{\X}
-%var w=1;
-%*ifx*Y*@empty*dlgobToFi*else%
+%\begin{defineJS}[\makeesc\*\makecmt\%]{\X}
+%var w=1;%
+%*ifx*Y*@empty*else
%var x=1;
%var y=1;*fi
%var z=1;
@@ -1954,59 +2007,97 @@
%var y=1;
%var z=1;
%\end{verbatim}
+% The following two commands are no longer used by this package.
% \changes{v2.4.8}{2019/10/30}{Added \string\cs{dlgobToFi} to help format
% \string\env{defineJS} code}
% \begin{macrocode}
-\def\dlgobToFi#1\fi{\defjsLB}
+\def\dlgobToFi#1\fi{\fi\defjsLB}
+\let\gobiv\@gobblefour
% \end{macrocode}
-% Finally, we get to the definition of \env{defineJS}, and its compatriates.
+% \textbf{Typesetting content with the \cs{typeset} keyword macro.}
+% To aid typesetting the contents of a \env{defineJS} environment,
+% the keyword macro \DescribeMacro{\typeset}\cs{typeset}, which is defined only within the environment,
+% can be used. Pass \cs{typeset} to \env{defineJS} through the optional argument.
+% \changes{v2.5}{2020/12/20}{Added the command \string\cs{typeset} to typeset the
+% contents of the \string\env{defineJS} environment}
% \begin{macrocode}
-\newenvironment{defineJS}[2][]{%
- \let\makeesc\dl@makeesc
- \expandafter\@ifundefined\expandafter{%
- \expandafter\@gobble\string#2}{}{%
- \PackageWarning{insdljs}{The command
- \string#2 already defined}}%
- \gdef\defineJSArg{#2}\JStoks={}%
- \def\verbatim@processline{%
- \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
- \global\JStoks=\expandafter{\JS@temp}}%
- \let\do\@makeother\dospecials\catcode`\^^M\active
+\newif\ifdlfortypeset \dlfortypesetfalse
% \end{macrocode}
-% We let \cs{space} to \cs{pdfSP}, and declare \cs{obeyspaces}, in this way, the space
-% character is active and is equal to \cs{040} (space).
+% The macro \cs{dl@typesetthis} defined here, is the external version of the local command
+% \cs{typeset}. It globally sets the switch \cs{ifdlfortypeset} to true and defines the value
+% of \cs{dfnJSR} and the legacy command \cs{defineJSjsR}. For \cs{dfnJSCR}, we use only {\TeX}
+% primitives to maintain compatibilty with the now defunct YandY System, which I still use.
% \begin{macrocode}
- \global\let\space\pdfSP\makeatletter\obeyspaces
- #1%
- \verbatim@start
-}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}%
- \global\let\space\dl@sp@ce\aftergroup\eq@JStemp}
+\def\dl@typesetthis{\global\dlfortypesettrue
+ \dfnJSCR{\hfil\break\null}}
+% \end{macrocode}
+% Next, we define some components common to all define-js environments. First, we initialize
+% the environment with several \cs{let}s.
+% \begin{macrocode}
+\def\@initdfnJS{\let\jsFrstLne\dl@One\let\makeesc\dl@makeesc
+ \let\makecmt\dl@makecmt\let\typeset\dl@typesetthis}
+% \end{macrocode}
+% (2020/12/20) Insert \cs{defineJSJsR} (an alias of \cs{dfnJSR}) at the \emph{beginning} of the second line
+% onward. This gives better formatting of the code within the editor, without
+% an empty final line.
+% \changes{v2.5}{2020/12/20}{Modified \string\cs{verbatim@line} in \string\env{defineJS}}
+% \begin{macrocode}
+\def\@vrbsetupdfnJS{\def\verbatim@processline{\ifx\jsFrstLne\dl@One
+ \let\jsFrstLne\dl@Zero
+ \xdef\JS@temp{\the\JStoks\the\verbatim@line}\else
+ \xdef\JS@temp{\the\JStoks\defineJSjsR\the\verbatim@line}\fi
+ \global\JStoks=\expandafter{\JS@temp}}%
+ \let\do\@makeother\dospecials\catcode`\^^M\active}
+% \end{macrocode}
+% We \cs{let} \cs{space} to \cs{pdfSP}, and declare \cs{obeyspaces}, in this way, the space
+% character is active and is equal to \cs{040} (space). Start the verbatim environment.
+% \begin{macrocode}
+\def\b@vrbdfnJS#1{\global\let\space\pdfSP\makeatletter\obeyspaces%
+% \end{macrocode}
+% Pass the first argument here. If this environment is for typesetting,
+% initialize the tokens \cs{JStoks} to be in a group, and such. The insertion
+% of \cs{dl@paramlocal} is to support the \cs{bParams}/\allowbreak\cs{eParams} construct.
+% \begin{macrocode}
+ #1\ifdlfortypeset\global\JStoks={\bgroup\leavevmode\dl@paramlocal}\fi%
+ \verbatim@start}
+% \end{macrocode}
+% The end of the environment code
+% \begin{macrocode}
+\def\e@vrbdfnJS{\gdef\eq@JStemp{\ifdlfortypeset\global
+ \JStoks=\expandafter{\the\JStoks\egroup}\fi\expandafter
+ \edef\defineJSArg{\the\JStoks}\global
+ \dlfortypesetfalse}\global\let\space\dl@sp@ce\aftergroup\eq@JStemp}
+% \end{macrocode}
+% Finally, we get to the definition of \env{defineJS}, and its compatriates.
+% \begin{macrocode}
+\newenvironment{defineJS}[2][]{\@initdfnJS
+ \expandafter\@ifundefined\expandafter{%
+ \expandafter\@gobble\string#2}{}{\PackageWarning{insdljs}
+ {The command \string#2 already defined}}%
+ \gdef\defineJSArg{#2}\global\JStoks={}%
+ \@vrbsetupdfnJS
+ \b@vrbdfnJS{#1}}{\e@vrbdfnJS}
% \end{macrocode}
% \end{environment}
% \begin{environment}{@defineJS}
% Silent version of \texttt{defineJS}, can repeatedly be used to redefine the same
-% macro.
+% macro. Note: |\makeesc\@| cannot be declared with the \env{@defineJS} environment.
% \begin{macrocode}
-\newenvironment{@defineJS}[2][]
-{%
- \let\makeesc\dl@makeesc
- \gdef\defineJSArg{#2}\JStoks={}%
- \def\verbatim@processline{%
- \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}%
- \global\JStoks=\expandafter{\JS@temp}}%
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \global\let\space\pdfSP\makeatletter\obeyspaces
- #1%
- \verbatim@start
-}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}%
- \global\let\space\dl@sp@ce\aftergroup\eq@JStemp}
+\newenvironment{@defineJS}[2][]{\@initdfnJS
+ \gdef\defineJSArg{#2}\global\JStoks={}%
+ \@vrbsetupdfnJS
+ \b@vrbdfnJS{#1}}{\e@vrbdfnJS}
% \end{macrocode}
% \end{environment}
% \begin{environment}{defineJS*}
-% We declare a public version of \env{@defineJS}
+% A silent public version of \env{defineJS}.
+% The \env{defineJS*} environment cannot use |\makeesc\*| in its optional argument.
% \changes{v2.4.2}{2019/03/16}{define \string\env{defineJS*} a public version of \string\env{@defineJS}}
% \begin{macrocode}
-\newenvironment{defineJS*}{\@defineJS}{\end@defineJS}
+\newenvironment{defineJS*}[2][]{\@initdfnJS
+ \gdef\defineJSArg{#2}\global\JStoks={}%
+ \@vrbsetupdfnJS
+ \b@vrbdfnJS{#1}}{\e@vrbdfnJS}
% \end{macrocode}
% \end{environment}
% An author might want these definitions to be local in definition, so the
@@ -2053,33 +2144,33 @@
{\end@defineJS}
\let\did@Print\@empty
\def\dljs@willDidActions{/AA <<
- \ifx\test@will@Close\@empty\else/WC <<
- \JS{\will@Close} >>\fi
- \ifx\test@will@Save\@empty\else/WS <<
- \JS{\will@Save} >>\fi
- \ifx\test@did@Save\@empty\else/DS <<
- \JS{\did@Save} >>\fi
- \ifx\test@will@Print\@empty\else/WP <<
- \JS{\will@Print} >>\fi
- \ifx\test@did@Print\@empty\else/DP <<
- \JS{\did@Print} >>\fi
- >>
+ \ifx\test@will@Close\@empty\else/WC <<
+ \JS{\will@Close} >>\fi
+ \ifx\test@will@Save\@empty\else/WS <<
+ \JS{\will@Save} >>\fi
+ \ifx\test@did@Save\@empty\else/DS <<
+ \JS{\did@Save} >>\fi
+ \ifx\test@will@Print\@empty\else/WP <<
+ \JS{\will@Print} >>\fi
+ \ifx\test@did@Print\@empty\else/DP <<
+ \JS{\did@Print} >>\fi
+ >>
}
\newcommand\dljs@setDocActions{%
- \edef\test@will@Close{\will@Close}%
- \edef\test@will@Save{\will@Save}%
- \edef\test@did@Save{\did@Save}%
- \edef\test@will@Print{\will@Print}%
- \edef\test@did@Print{\did@Print}%
+ \edef\test@will@Close{\will@Close}%
+ \edef\test@will@Save{\will@Save}%
+ \edef\test@did@Save{\did@Save}%
+ \edef\test@will@Print{\will@Print}%
+ \edef\test@did@Print{\did@Print}%
% \end{macrocode}
% Driver dependent code to put any document actions into the additional actions
% dictionary of the document catalog.
% \begin{macrocode}
- \ifpdf\pdfcatalog{\dljs@willDidActions}\else
- \ifxetex\immediate
- \@pdfm@mark{put @catalog <<\dljs@willDidActions>>}\else
- \literalps@out{\AEB@psMrk
- {Catalog} <<\dljs@willDidActions>> /PUT pdfmark}\fi\fi
+ \ifpdf\pdfcatalog{\dljs@willDidActions}\else
+ \ifxetex\immediate
+ \@pdfm@mark{put @catalog <<\dljs@willDidActions>>}\else
+ \literalps@out{\AEB@psMrk
+ {Catalog} <<\dljs@willDidActions>> /PUT pdfmark}\fi\fi
}
\@ifpackageloaded{aeb_pro}{}
{\AtBeginDocument{\dljs@setDocActions}}
@@ -2110,7 +2201,7 @@
\iwvo{\string\isdljstrue}
\iwvo{\string\makeatletter}
\iwvo{\string\immediate\string\openout\string
- \js@verbatim@out=\string\js@Path\space\dljsBase.fdf}%
+ \js@verbatim@out=\string\js@Path\space\dljsBase.fdf}%
\iwvo{\string\begin{jsexpverbatimwrite}}
\iwvo{\string\firstFDFline}
\iwvo{1 0 obj}
@@ -2118,7 +2209,7 @@
\iwvo{endobj}
\iwvo{2 0 obj}
\iwvo{[ \string\csname\string\@gobble\space\dljsBase%
- OBJ\string\endcsname]}
+ OBJ\string\endcsname]}
\iwvo{endobj}
}
\def\fdfbeginstreamobj
@@ -2133,10 +2224,9 @@
%\changes{v2.0k}{2012/06/21}{If the user has not passed the optional
% name, we generated one for him, now we insert it into the \texttt{stream}.}
% \begin{macrocode}
- \ifx\insdljsloadVar\@empty\else
- \iwvo{\insdljsloadVar}
- \global\let\insdljsloadVar\@empty
- \fi
+ \ifx\insdljsloadVar\@empty\else
+ \iwvo{\insdljsloadVar}
+ \global\let\insdljsloadVar\@empty\fi
}
\def\fdfendstreamobj{%
\iwvo{endstream}
@@ -2177,20 +2267,18 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% through a trusted function.
%}
% \begin{macrocode}
- ( app.viewerVersion > 8 ) ? %
- aebTrustedFunctions( this, aebImportAnFDF, %
- "\js@Path\dljsBase.fdf") : %
- this.importAnFDF("\js@Path\dljsBase.fdf");\jsR
+ ( app.viewerVersion > 8 ) ? %
+ aebTrustedFunctions( this, aebImportAnFDF, %
+ "\js@Path\dljsBase.fdf") : %
+ this.importAnFDF("\js@Path\dljsBase.fdf");\jsR
}
% \end{macrocode}
% Add in another template into \cmd{\importfdftoks}.
% \begin{macrocode}
\def\addImportAnFDF#1{%
- \ifx\importdljs\dl@YES
-% \let\jsR\relax\let\jsT\relax
- \edef\importAnFDFtmp{\the\importfdftoks#1}%
- \global\importfdftoks=\expandafter{\importAnFDFtmp}%
- \fi
+ \ifx\importdljs\dl@YES
+ \edef\importAnFDFtmp{\the\importfdftoks#1}%
+ \global\importfdftoks=\expandafter{\importAnFDFtmp}\fi
}
% \end{macrocode}
% This is used by \texttt{insert@DLJS@pdfmark} and is placed
@@ -2204,47 +2292,47 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% authorized way.
% \begin{macrocode}
\newenvironment{newsegment@pdfmark}[1]{%
- \addtocounter{dljssegs}{1}%
- \addtocounter{dljs@cnt}{1}%
- \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}%
- \edef\@dljstmp{\the\dljsobjtoks(\dljsName)
- \thedljssegs\space 0 R\space}
- \global\dljsobjtoks=\expandafter{\@dljstmp}
- \fdfbeginstreamobj
- \js@verbatimwrite
+ \addtocounter{dljssegs}{1}\addtocounter{dljs@cnt}{1}%
+ \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}%
+ \edef\@dljstmp{\the\dljsobjtoks(\dljsName)
+ \thedljssegs\space 0 R\space}%
+ \global\dljsobjtoks=\expandafter{\@dljstmp}%
+ \fdfbeginstreamobj
+ \js@verbatimwrite
}{%
- \fdfendstreamobj
- \endjs@verbatimwrite
+ \fdfendstreamobj
+ \endjs@verbatimwrite
}
\def\insert@DLJS@pdfmark{%
- \global\let\dljspresent\dl@YES
- \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
- \ifx\importdljs\dl@YES\ifx\dl@gopro\dl@YES
- \addImportAnFDF\importAnFDFTemplate
- \fi\fi
- \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
- \fdfheader
- \ifx\multisegments\dl@NO\expandafter
- \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi
+ \global\let\dljspresent\dl@YES
+ \expandafter\gdef\csname dljs\dljsBase\endcsname{}%
+ \ifx\importdljs\dl@YES\ifx\dl@gopro\dl@YES
+ \addImportAnFDF\importAnFDFTemplate\fi\fi
+ \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs
+ \fdfheader
+ \ifx\multisegments\dl@NO\expandafter
+ \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi
}
\def\endinsert@DLJS@pdfmark{%
- \ifx\importdljs\dl@YES
- \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
- \fdftrailer
- \closejs@verbatim@out
- \expandafter\xdef\csname\dljsBase%
- OBJ\endcsname{\the\dljsobjtoks}%
- \edef\@dljstmp{\noexpand\AtBeginDocument{%
- \noexpand\input{\js@Path\dljsBase.djs}}}%
- \@dljstmp
- \ifx\firstdljs\dl@YES
- \AtBeginDocument{\edef\@dljstmp{\importAnFDF}%
- \@dljstmp}\global\let\firstdljs\dl@NO
- \fi
+ \ifx\importdljs\dl@YES
+ \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi
+ \fdftrailer
+ \closejs@verbatim@out
+ \expandafter\xdef\csname\dljsBase%
+ OBJ\endcsname{\the\dljsobjtoks}%
+ \edef\@dljstmp{\noexpand\AtBeginDocument{%
+ \noexpand\input{\js@Path\dljsBase.djs}}}%
+ \@dljstmp
+ \ifx\firstdljs\dl@YES
+ \AtBeginDocument{\edef\@dljstmp{\importAnFDF}%
+ \@dljstmp}\global\let\firstdljs\dl@NO
\fi
+ \fi
}
% \end{macrocode}
+%
% \subsection{For \texttt{pdftex}/\texttt{dvipdfm}}
+%
% Again, we break the problem of creating DLJS into four parts: \cmd{\begindljs},
% \cmd{\enddljs}, the code itself, driver dependent material, \cmd{\write@pdftex@obj}
% and \cmd{\write@dvipdfm@obj}.
@@ -2361,9 +2449,8 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% of the PDF document. This code is inserted into the document in \texttt{insert@DLJS@pdftex}
% using \cmd{\AtEndDocument}.
% \begin{macrocode}
-\def\setDLJSRef@pdftex
-{%
- \noexpand\immediate\noexpand\pdfobj {%
+\def\setDLJSRef@pdftex{\noexpand
+ \immediate\noexpand\pdfobj {%
<< /Names [\the\importfdftoks] >> }%
\edef\noexpand\objNames{\noexpand\the\noexpand\pdflastobj\space 0 R}%
\pdfnames {/JavaScript \noexpand\objNames}%
@@ -2374,8 +2461,7 @@ if(typeof \detectdljs\space == "undefined")\jsR\jsT
% \begin{macrocode}
\newenvironment{newsegment@dvipdfm}[1]
{%
- \addtocounter{dljssegs}{1}%
- \addtocounter{dljs@cnt}{1}%
+ \addtocounter{dljssegs}{1}\addtocounter{dljs@cnt}{1}%
\edef\tmp{^^J\string\immediate\string
\csname\space @pdfm@mark\string\endcsname
{obj @obj\dljsBase\roman{dljssegs}\space << /S/JavaScript%
diff --git a/macros/latex/contrib/acrotex/web.dtx b/macros/latex/contrib/acrotex/web.dtx
index b414e32cdc..0704cade28 100644
--- a/macros/latex/contrib/acrotex/web.dtx
+++ b/macros/latex/contrib/acrotex/web.dtx
@@ -25,8 +25,19 @@
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
-%\def\texorpdfstring#1#2{#1}
-%\pdfstringdefDisableCommands{\let\\\textbackslash}
+\usepackage{fancyvrb}
+\gdef\darg#1{\texttt{\char123\relax#1\char125\relax}}
+\def\CMD#1{\textbackslash#1}
+\let\pkg\textsf
+\let\opt\texttt
+\let\env\texttt
+\let\app\textsf
+\let\uif\textsf
+\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
+\def\visispace{\symbol{32}}
+\def\ameta#1{\ensuremath{\langle\textit{\texttt{#1}}\rangle}}
+\def\meta#1{\textsl{\texttt{#1}}}
+\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
\OnlyDescription % comment out for implementation details
\EnableCrossrefs
\CodelineIndex
@@ -35,9 +46,6 @@
{\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
\PackageInfo{web}{aebdocfmt.def cannot be found}}
\begin{document}
-\def\CMD#1{\textbackslash#1}
-\let\pkg\textsf
-\let\opt\texttt
\addtolength{\marginparwidth}{3pt}
\GetFileInfo{web.sty}
\title{Web: A Screen Design Package}
@@ -85,8 +93,8 @@
% \subsection{Drivers Supported}
% \begin{macrocode}
\IfFileExists{xcolor.sty}{%
- \def\eq@ColorPackage{xcolor}%
- \PassOptionsToPackage{xcolor}{table,hyperref}%
+ \def\eq@ColorPackage{xcolor}%
+ \PassOptionsToPackage{xcolor}{table,hyperref}%
}{\def\eq@ColorPackage{color}}
% \end{macrocode}
% Force package to use \textsf{color}.\IndexOpt{noxcolor}
@@ -106,20 +114,21 @@
\let\i@web@ddtoHyOpts\@empty
\let\eq@driver@name\@empty
\let\web@YES=y \let\web@NO=n
+\let\web@One=1 \let\web@Zero=0
% \end{macrocode}
-% \textsf{dvipsone}\IndexOpt{dvipsone}\space is the dvi-to-ps driver of the YandY system that I still
+% \leavevmode\IndexOpt{dvipsone}\textsf{dvipsone} is the dvi-to-ps driver of the YandY system that I still
% use, I hate to give it up. Even I have not used the \IndexOpt{dviwindo}\texttt{dviwindo} option
% for many years, and is obsolete.
% \begin{macrocode}
\DeclareOptionX{dvipsone}{%
- \def\eq@drivernum{0}\def\eq@driver@name{dvipsone}%
+ \def\eq@drivernum{0}\def\eq@driver@name{dvipsone}%
% \end{macrocode}
% Below is the original definition of \cs{web@set@paper}, this has now
% changed with \texttt{v4.2j} to accommodate \cs{addtoWebHeight} and
% \cs{addtoWebWidth}.
%\begin{verbatim}
-% \def\web@set@paper{%
-% \special{papersize=\the\paperwidth,\the\paperheight}}%
+% \def\web@set@paper{%
+% \special{papersize=\the\paperwidth,\the\paperheight}}%
%\end{verbatim}
% \changes{v4.2j}{2012/05/11}{In support of \string\cs{addtoWebHeight}, we introduce
% the pagesize special at the beginning of the document. Changes are in the
@@ -127,48 +136,45 @@
% The revised definition of \cs{web@set@paper}, we now set the papersize
% at the beginning of the document.
% \begin{macrocode}
- \let\web@set@paper\@empty
- \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}%
+ \let\web@set@paper\@empty
+ \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument
+ {\special{papersize=\the\paperwidth,\the\paperheight}}}%
}
\DeclareOptionX{dviwindo}{%
- \def\eq@drivernum{4}\def\eq@driver@name{dviwindo}%
- \@namedef{papersize@for@\eq@driver@name}{\def\web@set@paper{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}%
+ \def\eq@drivernum{4}\def\eq@driver@name{dviwindo}%
+ \@namedef{papersize@for@\eq@driver@name}{\def\web@set@paper
+ {\special{papersize=\the\paperwidth,\the\paperheight}}}%
}
% \end{macrocode}
% Various extensions of \textsf{dvipdfm}, the dvi-to-pdf driver.\IndexOpt{dvipdfm}\IndexOpt{dvipdfmx}\IndexOpt{xetex}
% \begin{macrocode}
\DeclareOptionX{dvipdfm}{%
- \def\eq@drivernum{2}\def\eq@driver@name{dvipdfm}%
- \web@opts@xdvipdfmx
+ \def\eq@drivernum{2}\def\eq@driver@name{dvipdfm}\web@opts@xdvipdfmx
}
% \end{macrocode}
%\changes{v4.3}{2012/06/20}{Added \string\texttt{dvipdfmx} and \string\texttt{xetex} options}
% \begin{macrocode}
\DeclareOptionX{dvipdfmx}{%
- \def\eq@drivernum{2}\def\eq@driver@name{dvipdfmx}%
- \web@opts@xdvipdfmx
+ \def\eq@drivernum{2}\def\eq@driver@name{dvipdfmx}\web@opts@xdvipdfmx
}
% \end{macrocode}
% \begin{macrocode}
\DeclareOptionX{xetex}{%
- \def\eq@drivernum{2}\def\eq@driver@name{xetex}%
- \web@opts@xdvipdfmx
+ \def\eq@drivernum{2}\def\eq@driver@name{xetex}\web@opts@xdvipdfmx
}
% \end{macrocode}
% \begin{macrocode}
\newcommand{\web@opts@xdvipdfmx}{%
- \@namedef{papersize@for@\eq@driver@name}%
- {\def\web@set@paper{\AtBeginDvi{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}}%
+ \@namedef{papersize@for@\eq@driver@name}%
+ {\def\web@set@paper{\AtBeginDvi
+ {\special{papersize=\the\paperwidth,\the\paperheight}}}}%
}
% \end{macrocode}
% \texttt{dvips}\IndexOpt{dvips} is the dvi-to-ps driver.
% \begin{macrocode}
\DeclareOptionX{dvips}{%
- \def\eq@drivernum{0}\def\eq@driver@name{dvips}%
- \def\i@web@ddtoHyOpts{setpagesize=false}%
+ \def\eq@drivernum{0}\def\eq@driver@name{dvips}%
+ \def\i@web@ddtoHyOpts{setpagesize=false}%
% \end{macrocode}
% The old definition of \cs{web@set@paper}
%\begin{verbatim}
@@ -177,9 +183,9 @@
%\end{verbatim}
% New definitions (\texttt{v4.2j}). See comments for the \texttt{dvipsone} option.
% \begin{macrocode}
- \let\web@set@paper\@empty
- \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}%
+ \let\web@set@paper\@empty
+ \@namedef{papersize@for@\eq@driver@name}{\AtBeginDocument
+ {\special{papersize=\the\paperwidth,\the\paperheight}}}%
}
% \end{macrocode}
% \texttt{pdftex}\IndexOpt{pdftex} is for users of \textsf{pdflatex}.
@@ -201,19 +207,17 @@
% The `\texttt{textures}\IndexOpt{textures}' option was contributed by Ross Moore. {(2003/3/6)}
% \begin{macrocode}
\DeclareOptionX{textures}{%
- \def\eq@drivernum{3}\def\eq@driver@name{textures}%
- \@namedef{papersize@for@\eq@driver@name}%
- {\def\web@set@paper{\bgroup
- \dimen2=\origpaperheight \advance\dimen2 by -\topmargin
- \dimen0\dimen2 \advance\dimen0-\paperheight
- \xdef\@pdfpagescrop{0 \strip@pt\dimen0 \space
- \strip@pt\paperwidth\space \strip@pt\dimen2}%
- \egroup}%
- \AtEndOfPackage{%
- \edef\origpaperwidth{\the\paperwidth}%
- \edef\origpaperheight{\the\paperheight}%
- }%
- }%
+ \def\eq@drivernum{3}\def\eq@driver@name{textures}%
+ \@namedef{papersize@for@\eq@driver@name}%
+ {\def\web@set@paper{\bgroup
+ \dimen2=\origpaperheight \advance\dimen2 by -\topmargin
+ \dimen0\dimen2 \advance\dimen0-\paperheight
+ \xdef\@pdfpagescrop{0 \strip@pt\dimen0 \space
+ \strip@pt\paperwidth\space \strip@pt\dimen2}%
+ \egroup}\AtEndOfPackage
+ {\edef\origpaperwidth{\the\paperwidth}%
+ \edef\origpaperheight{\the\paperheight}}%
+ }%
}
% \end{macrocode}
%\subsection{Paper Option}
@@ -240,15 +244,15 @@
% \IndexOpt{nobullets}^^A
% \begin{macrocode}
\DeclareOptionX{latexlayout}{%
- \let\web@layout\web@NO\ExecuteOptionsX{forcolorpaper}}
+ \let\web@layout\web@NO\ExecuteOptionsX{forcolorpaper}}
\DeclareOptionX{uselatexsectioning}{%
- \web@sectioningfalse
+ \web@sectioningfalse
}
\newif\ifweb@sectioning \web@sectioningtrue
\DeclareOptionX{weblikeclass}{%
- \ExecuteOptionsX{latexlayout}%
- \ExecuteOptionsX{nobullets}%
- \ExecuteOptionsX{uselatexsectioning}%
+ \ExecuteOptionsX{latexlayout}%
+ \ExecuteOptionsX{nobullets}%
+ \ExecuteOptionsX{uselatexsectioning}%
}
\DeclareOptionX{nodirectory}{\let\web@directory@option\web@NO}
\DeclareOptionX{usedirectory}{\let\web@directory@option\web@YES}
@@ -266,48 +270,46 @@
% of parameters).
% \begin{macrocode}
\def\web@MargScrDimOpts#1#2#3#4#5#6{%
- \margins{#1}{#2}{#3}{#4} % left,right,top, bottom
- \screensize{#5}{#6} % height, width
+ \margins{#1}{#2}{#3}{#4} % left,right,top, bottom
+ \screensize{#5}{#6} % height, width
% \end{macrocode}
% We save the current settings, then change \cs{margins} and \cs{screensize}
% to gobble their arguments up if used again.
% \begin{macrocode}
-% \let\margins@web@save\margins
-% \let\screensize@web@save\screensize
- \let\margins\@@margins\let\screensize\@gobbletwo
+ \let\margins\@@margins\let\screensize\@gobbletwo
}
% \end{macrocode}
% The original design concept for various dimensions.\IndexOpt{designi...designvix}
% \begin{macrocode}
\DeclareOptionX{designi}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}}}
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}}}
\DeclareOptionX{designii}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}}}
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}}}
\DeclareOptionX{designiii}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}}}
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}}}
\DeclareOptionX{designiv}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}}}
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4in}{5in}}}
\DeclareOptionX{designv}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}}}
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{6in}}}
\DeclareOptionX{designvi}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}}}
+ \web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.17in}{4.67in}}}
\DeclareOptionX{designvii}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}}}
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}}}
\DeclareOptionX{designviii}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}}}
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}}}
\DeclareOptionX{designix}{\AtEndOfPackage{%
- \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}}}
+ \web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}}}
% \end{macrocode}
% The \texttt{usesf}\IndexOpt{usesf} option makes the default font sans serif.
% Popular for presentations.
% \begin{macrocode}
\DeclareOptionX{usesf}{%
- \def\aeb@defaultfamily{\sffamily}
- \def\itdefault{sl}
- \renewcommand{\familydefault}{\sfdefault}
- \selectfont
- \renewcommand\labelitemi{\textrm{\textbullet}}
- \AtEndOfPackage{\def\web@copyright@symbol{\textrm{\copyright}}}
+ \def\aeb@defaultfamily{\sffamily}
+ \def\itdefault{sl}
+ \renewcommand{\familydefault}{\sfdefault}
+ \selectfont
+ \renewcommand\labelitemi{\textrm{\textbullet}}
+ \AtEndOfPackage{\def\web@copyright@symbol{\textrm{\copyright}}}
}
\def\aeb@defaultfamily{\rmfamily}
% \end{macrocode}
@@ -339,19 +341,19 @@
% \changes{v6.0m}{2016/08/19}{Added \string\texttt{addtoHyOpts*} option}
% \begin{macrocode}
\define@choicekey+{webHyOpts}{pdfencoding}[\val\nr]%
- {auto,pdfdoc,unicode}[pdfdoc]{\edef\web@Hypdfencoding{\val}}
- {\PackageWarning{web}{Bad choice for pdfencoding,
- permissible values\MessageBreak
- are auto, pdfdoc, and unicode.\MessageBreak Try again}}
+ {auto,pdfdoc,unicode}[pdfdoc]{\edef\web@Hypdfencoding{\val}}
+ {\PackageWarning{web}{Bad choice for pdfencoding,
+ permissible values\MessageBreak
+ are auto, pdfdoc, and unicode.\MessageBreak Try again}}
\let\web@Hypdfencoding\@empty
\let\u@web@ddtoHyOpts\@empty
\let\u@web@ddtoHySetup\@empty
\def\web@addtoHyOpts#1{\g@addto@macro\u@web@ddtoHyOpts{#1}}
\def\web@addtoHySetup#1{\g@addto@macro\u@web@ddtoHySetup{#1}}
\define@key{web.sty}{addtoHyOpts}[]{%
- \setkeys*{webHyOpts}{#1}\web@addtoHyOpts{#1}}
+ \setkeys*{webHyOpts}{#1}\web@addtoHyOpts{#1}}
\define@key{web.sty}{addtoHyOpts*}[]{%
- \setkeys*{webHyOpts}{#1}\web@addtoHySetup{#1}}
+ \setkeys*{webHyOpts}{#1}\web@addtoHySetup{#1}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -388,7 +390,6 @@
\let\webpro@loaded\web@NO
\def\loadwebpro{\InputIfFileExists{webpro.def}{}{}}
% \end{macrocode}
-%
% When you take the \texttt{draft}\IndexOpt{draft} option, graphic overlays are not allowed. This is useful
% when you rely heavily on graphic overlays, but during the development phase,
% don't need to read and re-read your overlays. The defined background colors
@@ -407,9 +408,9 @@
% \begin{macrocode}
\DeclareOptionX{usetemplates}{\def\@usetemplates{1}}
\DeclareOptionX{leftpanel}%
- {\def\@panelconfig{1}\def\@usetemplates{1}}
+ {\def\@panelconfig{1}\def\@usetemplates{1}}
\DeclareOptionX{rightpanel}%
- {\def\@panelconfig{2}\def\@usetemplates{1}}
+ {\def\@panelconfig{2}\def\@usetemplates{1}}
% \end{macrocode}
% Normally, the templates feature is removed
% when the \texttt{forpaper} or \texttt{forcolorpaper} open is used. There may be
@@ -418,24 +419,21 @@
% \begin{macrocode}
\newif\iftemplatesforpaper \templatesforpaperfalse
\DeclareOptionX{templatesforpaper}{\templatesforpapertrue
- \ExecuteOptionsX{forcolorpaper}}
+ \ExecuteOptionsX{forcolorpaper}}
% \end{macrocode}
% Here we come to a couple of options, \IndexOpt{rightpanelprt}\IndexOpt{leftpanelprt}
% \texttt{rightpanelprt} and \texttt{leftpanelprt}, I remember nothing about.
% apparently, these are \texttt{rightpanel} and \texttt{leftpanel} options for screen mode only.
% \begin{macrocode}
-\DeclareOptionX{rightpanelprt}{%
- \ifeqforpaper\else\ExecuteOptionsX{rightpanel}\fi
-}
-\DeclareOptionX{leftpanelprt}{%
- \ifeqforpaper\else\ExecuteOptionsX{leftpanel}\fi
-}
+\DeclareOptionX{rightpanelprt}{\ifeqforpaper\else
+ \ExecuteOptionsX{rightpanel}\fi}
+\DeclareOptionX{leftpanelprt}{\ifeqforpaper\else
+ \ExecuteOptionsX{leftpanel}\fi}
% \end{macrocode}
% \DescribeMacro{\templatedefaults} sets the defaults for the template code.
% \begin{macrocode}
\def\templatedefaults{\def\@panelsep{0pt}\def\@usetemplates{0}%
- \def\@panelconfig{0}\def\@textX{0}\def\@panelX{0}%
-}
+ \def\@panelconfig{0}\def\@textX{0}\def\@panelX{0}}
\templatedefaults
% \end{macrocode}
% \subsection{Miscellaneous Options}
@@ -462,10 +460,10 @@
% definitions are used.
% \begin{macrocode}
\DeclareOptionX{uselatexparts}{%
- \AtEndOfPackage{\@ifundefined{part}{}{\let\part\web@save@part}}}
+ \AtEndOfPackage{\@ifundefined{part}{}{\let\part\web@save@part}}}
\DeclareOptionX{uselatexchapters}{%
- \AtEndOfPackage{\@ifundefined{chapter}{}
- {\let\chapter\web@save@chapter}}}
+ \AtEndOfPackage{\@ifundefined{chapter}{}
+ {\let\chapter\web@save@chapter}}}
% \end{macrocode}
% \subsection{Language Options}
% The \texttt{french}\IndexOpt{french} option
@@ -515,8 +513,7 @@
% \end{macrocode}
% The \texttt{norsk}\IndexOpt{norsk} option
% \begin{macrocode}
-\DeclareOptionX{norsk}{%
- \AtEndOfPackage{%
+\DeclareOptionX{norsk}{\AtEndOfPackage{%
\def\today{\ifcase\month\or Januar
\or Februar \or Mars \or April
\or Mai \or Juni \or Juli \or August
@@ -537,68 +534,65 @@
% \end{macrocode}
% The \texttt{dutch}\IndexOpt{dutch} option
% \begin{macrocode}
-\DeclareOptionX{dutch}{%
- \AtEndOfPackage{%
+\DeclareOptionX{dutch}{\AtEndOfPackage{%
\def\today{\the\day~\ifcase\month\or januari
- \or februari \or maart \or april
- \or mei \or juni \or juli \or augustus
- \or september \or oktober \or november
- \or december \fi \space \the\year}
- \def\web@versionlabel{Versie}
- \def\web@toc{Inhoudsopgave}
- \def\web@continued{vervolg}
- \def\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
- \def\web@directory{Overzicht}
- \def\web@revision{Laatste wijziging:}
- \def\web@copyright{Copyright}
- \def\web@section{Sectie}
- \def\web@back{Terug}
- \def\web@doc{Doc}}
+ \or februari \or maart \or april
+ \or mei \or juni \or juli \or augustus
+ \or september \or oktober \or november
+ \or december \fi \space \the\year}
+ \def\web@versionlabel{Versie}
+ \def\web@toc{Inhoudsopgave}
+ \def\web@continued{vervolg}
+ \def\web@article{Begin \hyperlink{\web@Start.1}{Artikel}}
+ \def\web@directory{Overzicht}
+ \def\web@revision{Laatste wijziging:}
+ \def\web@copyright{Copyright}
+ \def\web@section{Sectie}
+ \def\web@back{Terug}
+ \def\web@doc{Doc}}
\PassOptionsToPackage{dutch}{exerquiz}
}
% \end{macrocode}
% The \texttt{spanish}\IndexOpt{spanish} option
% \begin{macrocode}
-\DeclareOptionX{spanish}{%
- \AtEndOfPackage{%
- \def\today{\the\day\ de \ifcase\month\or Enero
- \or Febrero \or Marzo \or Abril
- \or Mayo \or Junio \or Julio \or Agosto
- \or Septiembre \or Octubre \or Noviembre
- \or Deciembre \fi de \the\year}
- \renewcommand\web@versionlabel{Versi\noexpand\'{o}n}
- \renewcommand\web@toc{Tabla de Contenido}
- \renewcommand\web@continued{cont.}
- \renewcommand\web@article{Inicio
- \hyperlink{\web@Start.1}{Art\'{\i}culo}}
- \renewcommand\web@directory{Directorio}
- \renewcommand\web@revision{Actualizado el:}
- \renewcommand\web@copyright{Copyright}
- \renewcommand\web@section{Secci\'on}
- \renewcommand\web@back{Volver}
- \renewcommand\web@doc{Doc}}
+\DeclareOptionX{spanish}{\AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or Enero
+ \or Febrero \or Marzo \or Abril
+ \or Mayo \or Junio \or Julio \or Agosto
+ \or Septiembre \or Octubre \or Noviembre
+ \or Deciembre \fi de \the\year}
+ \renewcommand\web@versionlabel{Versi\noexpand\'{o}n}
+ \renewcommand\web@toc{Tabla de Contenido}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inicio
+ \hyperlink{\web@Start.1}{Art\'{\i}culo}}
+ \renewcommand\web@directory{Directorio}
+ \renewcommand\web@revision{Actualizado el:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Secci\'on}
+ \renewcommand\web@back{Volver}
+ \renewcommand\web@doc{Doc}}
\PassOptionsToPackage{spanish}{exerquiz}
}
% \end{macrocode}
% The \texttt{italian}\IndexOpt{italian} option
% \begin{macrocode}
-\DeclareOptionX{italian}{%
- \AtEndOfPackage{%
- \def\today{\ifcase\month\or Gennaio
- \or Febbraio \or Marzo \or Aprile
- \or Maggio \or Giugno \or Luglio \or Agosto
- \or Settembre \or Ottobre \or Novembre
- \or Dicembre \fi \the\day, \the\year}
- \renewcommand\web@versionlabel{Versione}
- \renewcommand\web@toc{Indice}
- \renewcommand\web@continued{cont.}
- \renewcommand\web@article{Inizio \hyperlink{\web@Start.1}{Articolo}}
- \renewcommand\web@directory{Directory}
- \renewcommand\web@revision{Data Ultima Revisione:}
- \renewcommand\web@copyright{Copyright}
- \renewcommand\web@section{Sezione}
- \renewcommand\web@back{Back}
- \renewcommand\web@doc{Doc}}
+\DeclareOptionX{italian}{\AtEndOfPackage{%
+ \def\today{\ifcase\month\or Gennaio
+ \or Febbraio \or Marzo \or Aprile
+ \or Maggio \or Giugno \or Luglio \or Agosto
+ \or Settembre \or Ottobre \or Novembre
+ \or Dicembre \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Versione}
+ \renewcommand\web@toc{Indice}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inizio \hyperlink{\web@Start.1}{Articolo}}
+ \renewcommand\web@directory{Directory}
+ \renewcommand\web@revision{Data Ultima Revisione:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Sezione}
+ \renewcommand\web@back{Back}
+ \renewcommand\web@doc{Doc}}
\PassOptionsToPackage{italian}{exerquiz}
}
% \end{macrocode}
@@ -613,28 +607,27 @@
% \CYRN,\cyra,\cyrch,\cyra,\cyrl,\cyro,\CYRS,\CYRP,\CYRV,\CYRN,\CYRCH,
% \cyrp,\cyrz,\cyrz,\cyrzh,\CYRK,\cyrishrt,\cyrsftsn}
% \begin{macrocode}
-\DeclareOptionX{russian}{%
- \ExecuteOptionsX{unicode}%
+\DeclareOptionX{russian}{\ExecuteOptionsX{unicode}%
\AtEndOfPackage{%
\def\today{\the\day\ \ifcase\month
- \or \cyrya\cyrn\cyrv\cyra\cyrr\cyrya
- \or \cyrf\cyre\cyrv\cyrr\cyra\cyrl\cyrya
- \or \cyrm\cyra\cyrr\cyrt\cyra
- \or \cyra\cyrp\cyrr\cyre\cyrl\cyrya
- \or \cyrm\cyra\cyrya
- \or \cyri\cyryu\cyrn\cyrya
- \or \cyri\cyryu\cyrl\cyrya
- \or \cyra\cyrv\cyrg\cyru\cyrs\cyrt\cyra
- \or \cyrs\cyre\cyrn\cyrt\cyrya\cyrb\cyrr\cyrya
- \or \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya
- \or \cyrn\cyro\cyrya\cyrb\cyrr\cyrya
- \or \cyrd\cyre\cyrk\cyrya\cyrb\cyrr\cyrya \fi{ }%
- \the\year\ \cyrg.}
+ \or \cyrya\cyrn\cyrv\cyra\cyrr\cyrya
+ \or \cyrf\cyre\cyrv\cyrr\cyra\cyrl\cyrya
+ \or \cyrm\cyra\cyrr\cyrt\cyra
+ \or \cyra\cyrp\cyrr\cyre\cyrl\cyrya
+ \or \cyrm\cyra\cyrya
+ \or \cyri\cyryu\cyrn\cyrya
+ \or \cyri\cyryu\cyrl\cyrya
+ \or \cyra\cyrv\cyrg\cyru\cyrs\cyrt\cyra
+ \or \cyrs\cyre\cyrn\cyrt\cyrya\cyrb\cyrr\cyrya
+ \or \cyro\cyrk\cyrt\cyrya\cyrb\cyrr\cyrya
+ \or \cyrn\cyro\cyrya\cyrb\cyrr\cyrya
+ \or \cyrd\cyre\cyrk\cyrya\cyrb\cyrr\cyrya \fi{ }%
+ \the\year\ \cyrg.}
\gdef\eq@protected##1##2{{\ifhmode ##2\else
- \ifvmode ##2\else\ifinner##2\else\noexpand ##1\fi\fi\fi}}%
+ \ifvmode ##2\else\ifinner##2\else\noexpand ##1\fi\fi\fi}}%
\def\cyrCommand##1##2{\def##1{\eq@protected##1{##2}}}%
\cyrCommand\web@toc{\CYRO\cyrg\cyrl\cyra\cyrv\cyrl\cyre\cyrn%
- \cyri\cyre}
+ \cyri\cyre}
\cyrCommand\web@continued{\cyrp\cyrr\cyro\cyrd\cyro\cyrl%
\cyrzh\cyre\cyrn\cyri\cyre}
\cyrCommand\web@article{\CYRN\cyra\cyrch\cyra\cyrl\cyro{ }%
@@ -645,8 +638,6 @@
\cyrCommand\web@revision{\CYRP\cyro\cyrs\cyrl\cyre\cyrd\cyrn%
\cyrya\cyrya{ }\cyrr\cyre\cyrv\cyri\cyrz\cyri\cyrya:}
\let\web@copyright\@gobble
-% \cyrCommand\web@copyright{%\CYRK\cyro\cyrp\cyri\cyrr\cyra%
-% \cyrishrt\cyrt}%In Russian publications only the symbol presents
\cyrCommand\web@versionlabel{\CYRV\cyre\cyrr\cyrs\cyri\cyrya}
\cyrCommand\web@back{\CYRN\cyra\cyrz\cyra\cyrd}
\cyrCommand\web@section{\CYRCH\cyra\cyrs\cyrt\cyrsftsn}}
@@ -655,8 +646,7 @@
% \end{macrocode}
% The \texttt{dansk}\IndexOpt{dansk} option
% \begin{macrocode}
-\DeclareOptionX{dansk}{%
- \AtEndOfPackage{%
+\DeclareOptionX{dansk}{\AtEndOfPackage{%
\def\today{\ifcase\month\or Januar
\or Februar \or Marts \or April
\or Maj \or Juni \or Juli \or August
@@ -678,33 +668,31 @@
% \end{macrocode}
% The \texttt{polish}\IndexOpt{polish} option
% \begin{macrocode}
-\DeclareOptionX{polish}{%
- \AtEndOfPackage{%
- \def\today{\ifcase\month\or {Stycze\'{n}}
- \or Luty \or Marzec \or {Kwiecie\'{n}}
- \or Maj \or Czerwiec \or Lipiec \or {\'{S}ierpie\'{n}}
- \or {Wrzesie\'{n}} \or {Pa\'{z}dziernik} \or Listopad
- \or {Grudzie\'{n}} \fi \the\day, \the\year}
- \renewcommand\web@versionlabel{Wersja}
- \renewcommand\web@toc{Spis Tre\'{s}ci}
- \renewcommand\web@continued{verte}
- \renewcommand\web@article{Pocz\k{a}tek do
- \hyperlink{\web@Start.1}{Tekstu}}
- \renewcommand\web@directory{Zawarto\'{s}\'{c}}
- \renewcommand\web@revision{Ostatnia zmiana:}
- \renewcommand\web@copyright{Copyright}
- \renewcommand\web@section{Cze\'{s}\'{c}}
- % Label Navibar
- \renewcommand\web@back{Wstecz}
- \renewcommand\web@doc{Dok}} % restricted to three characters
- \PassOptionsToPackage{polish}{exerquiz}
+\DeclareOptionX{polish}{\AtEndOfPackage{%
+ \def\today{\ifcase\month\or {Stycze\'{n}}
+ \or Luty \or Marzec \or {Kwiecie\'{n}}
+ \or Maj \or Czerwiec \or Lipiec \or {\'{S}ierpie\'{n}}
+ \or {Wrzesie\'{n}} \or {Pa\'{z}dziernik} \or Listopad
+ \or {Grudzie\'{n}} \fi \the\day, \the\year}
+ \renewcommand\web@versionlabel{Wersja}
+ \renewcommand\web@toc{Spis Tre\'{s}ci}
+ \renewcommand\web@continued{verte}
+ \renewcommand\web@article{Pocz\k{a}tek do
+ \hyperlink{\web@Start.1}{Tekstu}}
+ \renewcommand\web@directory{Zawarto\'{s}\'{c}}
+ \renewcommand\web@revision{Ostatnia zmiana:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Cze\'{s}\'{c}}
+% Label Navibar
+ \renewcommand\web@back{Wstecz}
+ \renewcommand\web@doc{Dok}}% restricted to three characters
+ \PassOptionsToPackage{polish}{exerquiz}
}
% \end{macrocode}
% The \texttt{finnish}\IndexOpt{finnish} option
% \begin{macrocode}
-\DeclareOptionX{finnish}{%
- \AtEndOfPackage{%
- % Recouvrement de \today
+\DeclareOptionX{finnish}{\AtEndOfPackage{%
+% Recouvrement de \today
\def\today{\the\day\ \ifcase\month\or Tammikuu
\or Helmikuu \or Maaliskuu \or Huhtikuu
\or Toukokuu \or Kes\"{a}kuu \or Hein\"{a}kuu \or Elokuu
@@ -724,30 +712,28 @@
% \end{macrocode}
% The \texttt{catalan}\IndexOpt{catalan} option
% \begin{macrocode}
-\DeclareOptionX{catalan}{%
- \AtEndOfPackage{%
- \def\today{\the\day\ de \ifcase\month\or Gener
- \or Febrer \or Mar\c{c} \or Abril
- \or Maig \or Juny \or Juliol \or Agost
- \or Setembre \or Octubre \or Novembre
- \or Desembre \fi de \the\year}
- \renewcommand\web@versionlabel{Versi\noexpand\'{o}}
- \renewcommand\web@toc{Taula de Contingut}
- \renewcommand\web@continued{cont.}
- \renewcommand\web@article{Inici \hyperlink{\web@Start.1}{Article}}
- \renewcommand\web@directory{Directori}
- \renewcommand\web@revision{Actualizat el:}
- \renewcommand\web@copyright{Copyright}
- \renewcommand\web@section{Secci\'o}
- \renewcommand\web@back{Tornar}
- \renewcommand\web@doc{Doc}}
- \PassOptionsToPackage{catalan}{exerquiz}
+\DeclareOptionX{catalan}{\AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or Gener
+ \or Febrer \or Mar\c{c} \or Abril
+ \or Maig \or Juny \or Juliol \or Agost
+ \or Setembre \or Octubre \or Novembre
+ \or Desembre \fi de \the\year}
+ \renewcommand\web@versionlabel{Versi\noexpand\'{o}}
+ \renewcommand\web@toc{Taula de Contingut}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inici \hyperlink{\web@Start.1}{Article}}
+ \renewcommand\web@directory{Directori}
+ \renewcommand\web@revision{Actualizat el:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Secci\'o}
+ \renewcommand\web@back{Tornar}
+ \renewcommand\web@doc{Doc}}
+ \PassOptionsToPackage{catalan}{exerquiz}
}
% \end{macrocode}
% The \texttt{czech}\IndexOpt{czech} option
% \begin{macrocode}
-\DeclareOptionX{czech}{%
- \AtEndOfPackage{%
+\DeclareOptionX{czech}{\AtEndOfPackage{%
\def\today{\number\day. \ifcase\month\or ledna\or \'unora\or
b\v{r}ezna\or dubna\or kv\v{e}tna\or \v{c}ervna\or \v{c}ervence\or
srpna\or z\'a\v{r}\'\i\or \v{r}\'{\i}jna\or listopadu\or prosince\fi
@@ -767,31 +753,29 @@
% \end{macrocode}
% The \texttt{brazil}\IndexOpt{brazil} option
% \begin{macrocode}
-\DeclareOptionX{brazil}{%
- \AtEndOfPackage{%
- \def\today{\the\day\ de \ifcase\month\or janeiro
- \or fevereiro \or mar\c{c}o \or abril
- \or maio \or junho \or julho \or agosto
- \or setembro \or outubro \or novembro
- \or dezembro \fi de \the\year}
- \renewcommand\web@versionlabel{Vers\~{a}o}
- \renewcommand\web@toc{Tabela de Conte\'{u}do}
- \renewcommand\web@continued{cont.}
- \renewcommand\web@article{Inicie o
- \hyperlink{\web@Start.1}{Artigo}}
- \renewcommand\web@directory{Diret\'{o}rio}
- \renewcommand\web@revision{Atualizado em:}
- \renewcommand\web@copyright{Copyright}
- \renewcommand\web@section{Se\c{c}\noexpand\~{a}o}
- \renewcommand\web@back{Voltar}
- \renewcommand\web@doc{Doc}}
+\DeclareOptionX{brazil}{\AtEndOfPackage{%
+ \def\today{\the\day\ de \ifcase\month\or janeiro
+ \or fevereiro \or mar\c{c}o \or abril
+ \or maio \or junho \or julho \or agosto
+ \or setembro \or outubro \or novembro
+ \or dezembro \fi de \the\year}
+ \renewcommand\web@versionlabel{Vers\~{a}o}
+ \renewcommand\web@toc{Tabela de Conte\'{u}do}
+ \renewcommand\web@continued{cont.}
+ \renewcommand\web@article{Inicie o
+ \hyperlink{\web@Start.1}{Artigo}}
+ \renewcommand\web@directory{Diret\'{o}rio}
+ \renewcommand\web@revision{Atualizado em:}
+ \renewcommand\web@copyright{Copyright}
+ \renewcommand\web@section{Se\c{c}\noexpand\~{a}o}
+ \renewcommand\web@back{Voltar}
+ \renewcommand\web@doc{Doc}}
\PassOptionsToPackage{brazil}{exerquiz}
}
% \end{macrocode}
% The \texttt{turkish}\IndexOpt{turkish} option
% \begin{macrocode}
-\DeclareOptionX{turkish}{%
- \ExecuteOptionsX{unicode}%
+\DeclareOptionX{turkish}{\ExecuteOptionsX{unicode}%
\AtEndOfPackage{%
%======> Modification : Mahmut Ko\c{c}ak
\def\today{\the\day\ \ifcase\month\or Ocak
@@ -816,23 +800,20 @@
% Unknown options are passed to the color package
% \begin{macrocode}
\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}
- {\eq@ColorPackage}}
+ {\eq@ColorPackage}}
% \end{macrocode}
% We use \textsf{xcolor} if available.
% \begin{macrocode}
-\@ifpackageloaded{xcolor}%
-{%
- \@ifpackagelater{xcolor}{2004/07/04}{}
- {%
- \PackageError{web}{%
- *************************************************\MessageBreak
- * Your Version of `xcolor.sty' is too old!\MessageBreak
- * You need the version from 2004/07/04 or newer\MessageBreak
- * or use: \string\usepackage[noxcolor]{web}\MessageBreak
- * or \string\documentclass[noxcolor]{article}\MessageBreak
- *************************************************}{}%
- }%
-}{}
+\@ifpackageloaded{xcolor}{%
+ \@ifpackagelater{xcolor}{2004/07/04}{}{%
+ \PackageError{web}{%
+ *************************************************\MessageBreak
+ * Your Version of `xcolor.sty' is too old!\MessageBreak
+ * You need the version from 2004/07/04 or newer\MessageBreak
+ * or use: \string\usepackage[noxcolor]{web}\MessageBreak
+ * or \string\documentclass[noxcolor]{article}\MessageBreak
+ *************************************************}{}%
+}}{}
% \end{macrocode}
% \section{Main Code}
% \subsection{Switches}
@@ -862,11 +843,10 @@
% a bullet. This is only obeyed when the \texttt{pro} option is in effect.
% \begin{macrocode}
\newif\if@defaultsubsubding \@defaultsubsubdingtrue
-\def\forceSubSubNumbers{%
- \ifx\web@latextoc\web@YES\else
- \PackageWarning{webpro}{\string\forSubSubNumbers\space
- requested,\MessageBreak I'm adding the option of latextoc}\fi
- \let\web@latextoc\web@YES\@defaultsubsubdingfalse
+\def\forceSubSubNumbers{\ifx\web@latextoc\web@YES\else
+ \PackageWarning{webpro}{\string\forSubSubNumbers\space
+ requested,\MessageBreak I'm adding the option of latextoc}\fi
+ \let\web@latextoc\web@YES\@defaultsubsubdingfalse
}
% \end{macrocode}
% \end{macro}
@@ -962,7 +942,7 @@
% then ignore the \texttt{unicode} option.
% \begin{macrocode}
\ifx\web@Hypdfencoding\@empty\else
- \let\aeb@useunicode\@gobble\fi
+ \let\aeb@useunicode\@gobble\fi
% \end{macrocode}
% We use a utility command, taken and renamed from the \texttt{comment} package.
% \begin{macrocode}
@@ -1008,20 +988,20 @@
% (2016/07/22) We do not pass the driver to \pkg{hyperref} in the cases the driver
% is \texttt{pdftex} or \texttt{xetex}.
% \begin{macrocode}
- \ifpdf\else\ifxetex\else\eq@driver@name,\fi\fi
- bookmarks,bookmarksnumbered,bookmarksopen,%
- colorlinks,\aeb@useunicode,linkcolor=webgreen,%
- filecolor=webbrown,citecolor=webgreen,%
- urlcolor=webbrown,pagebackref,pdfpagemode=UseNone,%
- pdfstartview=Fit,pdfpagelayout=SinglePage%
+ \ifpdf\else\ifxetex\else\eq@driver@name,\fi\fi
+ bookmarks,bookmarksnumbered,bookmarksopen,%
+ colorlinks,\aeb@useunicode,linkcolor=webgreen,%
+ filecolor=webbrown,citecolor=webgreen,%
+ urlcolor=webbrown,pagebackref,pdfpagemode=UseNone,%
+ pdfstartview=Fit,pdfpagelayout=SinglePage%
% \end{macrocode}
% (2016/08/19) Moved the following code to the end of the option list so these options can override
% earlier options in the list.
% \changes{v6.0m}{2016/08/19}{Moved user and internal options for \string\pkg{hyperref} to end of option list so they
% can override earlier options.}
% \begin{macrocode}
- \ifx\u@web@ddtoHyOpts\@empty\else,\u@web@ddtoHyOpts\fi
- \ifx\i@web@ddtoHyOpts\@empty\else,\i@web@ddtoHyOpts\fi]{hyperref}%
+ \ifx\u@web@ddtoHyOpts\@empty\else,\u@web@ddtoHyOpts\fi
+ \ifx\i@web@ddtoHyOpts\@empty\else,\i@web@ddtoHyOpts\fi]{hyperref}%
}
% \end{macrocode}
% If the option \texttt{xhyperref} is taken, \textsf{hyperref} is not input by this
@@ -1030,10 +1010,10 @@
% and its placement in \string\cs{w@isHyLoaded}.}
% \begin{macrocode}
\def\w@isHyLoaded{\@ifpackageloaded{hyperref}{}{\PackageError{web}
- {The xhyperref option used, but hyperref is not\MessageBreak
- already loaded. Will load hyperref with the options\MessageBreak
- chosen by web}{Remove xhyperref or load hyperref prior to the web
- package.}\web@RequireHyperref}%
+ {The xhyperref option used, but hyperref is not\MessageBreak
+ already loaded. Will load hyperref with the options\MessageBreak
+ chosen by web}{Remove xhyperref or load hyperref prior to the web
+ package.}\web@RequireHyperref}%
}
% \end{macrocode}
% Now if the \opt{xhyperref} option \emph{is not taken}, we load \pkg{hyperref}; otherwise, if \pkg{hyperref}
@@ -1041,10 +1021,10 @@
% options.
% \begin{macrocode}
\if@web@hyperref\expandafter\web@RequireHyperref\else
- \expandafter\w@isHyLoaded\fi
+ \expandafter\w@isHyLoaded\fi
\ifx\u@web@ddtoHySetup\@empty\else\edef\x{\noexpand\hypersetup
{\u@web@ddtoHySetup}}\expandafter\x\fi
-% \end{macrocode}
+% \end{macrocode}
% We declare that `The AcroTeX eDucation Bundle' is the pdf creator.
% \begin{macrocode}
\def\@pdfcreator{The AcroTeX eDucation Bundle}
@@ -1062,14 +1042,14 @@
% If the user specifies the use of templates, we assume they are going
% to do some graphical work, so we include \textsf{graphicx}.
% \begin{macrocode}
-\ifnum\@usetemplates=1\relax
+\ifnum\@usetemplates=\@ne\relax
\def\x{\RequirePackage{graphicx}}\expandafter\x\fi
% \end{macrocode}
% If the user specifies an option requiring templates, then we better
% load \textsf{eso-pic}, which itself requires \textsf{everyshi} or \textsf{atbegshi}.
% \begin{macrocode}
-\ifnum\@usetemplates=1\relax
- \RequirePackage{eso-pic}
+\ifnum\@usetemplates=\@ne
+ \RequirePackage{eso-pic}
% \end{macrocode}
% Here is a fix for \textsf{dvipdfm}. If using templates, then we need to
% redefine the way we set the page size using \textsf{eso-pic}. We also need
@@ -1078,28 +1058,24 @@
% size special will be in the \cs{ESO@HookII} macro, it needs to
% execute (once) before \cs{ESO@HookI} is executed.
% \begin{macrocode}
- \ifnum\eq@drivernum=2\relax
- \def\web@set@paper{\AddToShipoutPicture*{%
- \special{papersize=\the\paperwidth,\the\paperheight}}}%
+ \ifnum\eq@drivernum=\tw@
+ \def\web@set@paper{\AddToShipoutPicture*{%
+ \special{papersize=\the\paperwidth,\the\paperheight}}}%
% \end{macrocode}
% We use some code from \textsf{hyperref} to set the page size.
% \begin{macrocode}
- \AtBeginShipoutFirst{%
- \begingroup
- \@ifundefined{stockwidth}{%
- \ifx\special@paper\@empty
- \special{papersize=\the\paperwidth,\the\paperheight}%
- \else
- \special{papersize=\special@paper}%
- \fi
- }{%
- \ifdim\stockwidth=\z@
- \else
- \special{papersize=\the\stockwidth,\the\stockheight}%
- \fi
- }%
- \endgroup
+ \AtBeginShipoutFirst{%
+ \begingroup
+ \@ifundefined{stockwidth}{%
+ \ifx\special@paper\@empty
+ \special{papersize=\the\paperwidth,\the\paperheight}\else
+ \special{papersize=\special@paper}\fi
+ }{%
+ \ifdim\stockwidth=\z@\else
+ \special{papersize=\the\stockwidth,\the\stockheight}\fi
}%
+ \endgroup
+ }%
% \end{macrocode}
% \changes{v4.2d}{2009/11/22}{Modifications to use
% new \string\textsf{eso-pic}}
@@ -1109,38 +1085,38 @@
% The new version of \textsf{eso-pic} does not define \cs{@ShipoutPicture}.
% If \cs{@Ship\-out\-Pic\-ture} defined, so we use some of the old code.
% \begin{macrocode}
- \renewcommand{\@ShipoutPicture}{%
- \bgroup
- \@tempswafalse%
- \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
- \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
- \if@tempswa%
- \@tempdima=1in\@tempdimb=-\@tempdima%
- \advance\@tempdimb\paperheight
- \@ifundefined{stockwidth}{}{%
- \advance\@tempdima+\trimedge%
- \advance\@tempdima+\paperwidth%
- \advance\@tempdima-\stockwidth%
- \if@twoside\ifodd\c@page\else%
- \advance\@tempdima-2\trimedge%
- \advance\@tempdima-\paperwidth%
- \advance\@tempdima+\stockwidth%
- \fi\fi%
- \advance\@tempdimb+\trimtop}%
- \unitlength=1pt%
- \global\setbox\@cclv\vbox{%
- \vbox{\let\protect\relax
- \pictur@(0,0)%
- (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
- \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
- \endpicture}%
- \box\@cclv%
- }%
- \fi
- \egroup
- }%
- }%
- \fi
+ \renewcommand{\@ShipoutPicture}{%
+ \bgroup
+ \@tempswafalse%
+ \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
+ \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
+ \if@tempswa%
+ \@tempdima=1in\@tempdimb=-\@tempdima%
+ \advance\@tempdimb\paperheight
+ \@ifundefined{stockwidth}{}{%
+ \advance\@tempdima+\trimedge%
+ \advance\@tempdima+\paperwidth%
+ \advance\@tempdima-\stockwidth%
+ \if@twoside\ifodd\c@page\else%
+ \advance\@tempdima-2\trimedge%
+ \advance\@tempdima-\paperwidth%
+ \advance\@tempdima+\stockwidth%
+ \fi\fi\advance\@tempdimb+\trimtop
+ }%
+ \unitlength=1pt%
+ \global\setbox\@cclv\vbox{%
+ \vbox{\let\protect\relax
+ \pictur@(0,0)%
+ (\strip@pt\@tempdima,\strip@pt\@tempdimb)%
+ \ESO@HookII\ESO@HookI\global\let\ESO@HookII\@empty%
+ \endpicture}%
+ \box\@cclv%
+ }%
+ \fi
+ \egroup
+ }% shipout
+ }% ifundefined shipout
+ \fi
\fi
% \end{macrocode}
% A useful command for separating two arguments. Use in \texttt{webpro} section, and by \texttt{aeb\_pro} as well.
@@ -1196,24 +1172,20 @@
% \end{macrocode}
% Modified version of the \cs{InitLayout} macro from pdfscreen.
% \begin{macrocode}
-\def\InitLayout
-{%
- \ifeqforpaper\else
- \setlength\headheight{\websetheadheight}
- \hoffset=0pt \voffset=0pt
- \fi
- \ifeqforpaper\else
+\def\InitLayout{%
+ \ifeqforpaper\else
+ \setlength\headheight{\websetheadheight}
+ \hoffset=0pt \voffset=0pt
{\@tempdima=\paperwidth
- \addtolength{\@tempdima}{-\@Leftmargin}%
- \addtolength{\@tempdima}{-\@Rightmargin}%
- \xdef\fullscreenwidth{\the\@tempdima}}%
- \fi
- \ifx\web@layout\web@YES\else\templatedefaults\fi
- \ifeqforpaper\else
- \setlength{\textwidth}{\paperwidth}
- \setlength{\textheight}{\paperheight}
- \addtolength{\textheight}{-\@Topmargin}
- \addtolength{\textheight}{-\@Bottommargin}
+ \addtolength{\@tempdima}{-\@Leftmargin}%
+ \addtolength{\@tempdima}{-\@Rightmargin}%
+ \xdef\fullscreenwidth{\the\@tempdima}}\fi
+ \ifx\web@layout\web@YES\else\templatedefaults\fi
+ \ifeqforpaper\else
+ \setlength{\textwidth}{\paperwidth}
+ \setlength{\textheight}{\paperheight}
+ \addtolength{\textheight}{-\@Topmargin}
+ \addtolength{\textheight}{-\@Bottommargin}
% \end{macrocode}
%\begin{verbatim}
%\topmargin = \web@Topmargin - 1in
@@ -1221,57 +1193,57 @@
% so \headsep = \@Topmargin - \headheight - \web@Topmargin (\topmargin)
%\end{verbatim}
% \begin{macrocode}
- \setlength{\headsep}{\@Topmargin}
- \addtolength\headsep{-\headheight}
- \setlength{\topmargin}{\web@Topmargin}
- \addtolength\headsep{-\topmargin}
- \addtolength\headsep{\web@additionalheadsep}
- \addtolength{\topmargin}{-1in}
- \setlength\footskip{\@Bottommargin}
- \addtolength{\footskip}{-\web@footskip} % depth of navibar
- \ifcase\@panelconfig
- \setlength{\oddsidemargin}{\@Leftmargin}
- \setlength{\evensidemargin}{\@Leftmargin}
- \or
- \setlength{\oddsidemargin}{\@panelwidth}
- \setlength{\evensidemargin}{\@panelwidth}
- \or
- \setlength{\oddsidemargin}{\@Leftmargin}
- \setlength{\evensidemargin}{\@Leftmargin}
- \fi
- \addtolength{\evensidemargin}{-1in}
- \addtolength{\oddsidemargin}{-1in}
+ \setlength{\headsep}{\@Topmargin}
+ \addtolength\headsep{-\headheight}
+ \setlength{\topmargin}{\web@Topmargin}
+ \addtolength\headsep{-\topmargin}
+ \addtolength\headsep{\web@additionalheadsep}
+ \addtolength{\topmargin}{-1in}
+ \setlength\footskip{\@Bottommargin}
+ \addtolength{\footskip}{-\web@footskip} % depth of navibar
+ \ifcase\@panelconfig
+ \setlength{\oddsidemargin}{\@Leftmargin}
+ \setlength{\evensidemargin}{\@Leftmargin}
+ \or
+ \setlength{\oddsidemargin}{\@panelwidth}
+ \setlength{\evensidemargin}{\@panelwidth}
+ \or
+ \setlength{\oddsidemargin}{\@Leftmargin}
+ \setlength{\evensidemargin}{\@Leftmargin}
+ \fi
+ \addtolength{\evensidemargin}{-1in}
+ \addtolength{\oddsidemargin}{-1in}
\fi
\ifx\web@layout\web@YES
- \ifcase\@panelconfig
- \addtolength{\textwidth}{-\@Leftmargin}
- \addtolength{\textwidth}{-\@Rightmargin}
- \or % leftpanel
- \addtolength{\textwidth}{-\@panelwidth}
- \addtolength{\textwidth}{-\@Rightmargin}
- \or % rightpanel
- \addtolength{\textwidth}{-\@panelwidth}
- \addtolength{\textwidth}{-\@Leftmargin}
+ \ifcase\@panelconfig
+ \addtolength{\textwidth}{-\@Leftmargin}
+ \addtolength{\textwidth}{-\@Rightmargin}
+ \or % leftpanel
+ \addtolength{\textwidth}{-\@panelwidth}
+ \addtolength{\textwidth}{-\@Rightmargin}
+ \or % rightpanel
+ \addtolength{\textwidth}{-\@panelwidth}
+ \addtolength{\textwidth}{-\@Leftmargin}
+ \fi
+ \ifnum\@usetemplates=\@ne
+ \setlength{\textscreenwidth}{\paperwidth}
+ \def\@textX{0}
+ \ifnum\@panelconfig=\@ne % leftpanel
+ \addtolength{\textwidth}{-\@panelsep}
+ \addtolength{\oddsidemargin}{\@panelsep}
+ \addtolength{\evensidemargin}{\@panelsep}
+ \addtolength{\textscreenwidth}{-\@panelwidth}
+ \def\@textX{\strip@pt\@panelwidth}
+ \def\@panelX{0}
\fi
- \ifnum\@usetemplates=1\relax
- \setlength{\textscreenwidth}{\paperwidth}
- \def\@textX{0}
- \ifnum\@panelconfig=1 % leftpanel
- \addtolength{\textwidth}{-\@panelsep}
- \addtolength{\oddsidemargin}{\@panelsep}
- \addtolength{\evensidemargin}{\@panelsep}
- \addtolength{\textscreenwidth}{-\@panelwidth}
- \def\@textX{\strip@pt\@panelwidth}
- \def\@panelX{0}
- \fi
- \ifnum\@panelconfig=2 % rightpanel
- \addtolength{\textwidth}{-\@panelsep}
- \addtolength{\textscreenwidth}{-\@panelwidth}
- \def\@textX{0}
- \def\@panelX{\strip@pt\textscreenwidth}
- \fi
- \calculatefullwidth
+ \ifnum\@panelconfig=\tw@ % rightpanel
+ \addtolength{\textwidth}{-\@panelsep}
+ \addtolength{\textscreenwidth}{-\@panelwidth}
+ \def\@textX{0}
+ \def\@panelX{\strip@pt\textscreenwidth}
\fi
+ \calculatefullwidth
+ \fi
\fi
}
% \end{macrocode}
@@ -1300,30 +1272,26 @@
%
% The commands seems only effect with the \textsf{dvipsone} driver.
% \begin{macrocode}
-\def\@convLtoP#1#2{%
- \afterassignment\@convLtoP@i\dimen@#2bp\relax{#1}{#2}}
+\def\@convLtoP#1#2{\afterassignment
+ \@convLtoP@i\dimen@#2bp\relax{#1}{#2}}
\def\@convLtoP@i#1\relax#2#3{%
- \if!#1!%
- \def#2{#3}%
- \else
- \dimen@.99626\dimen@
- \edef#2{\strip@pt\dimen@}%
- \fi}
+ \if!#1!\def#2{#3}\else
+ \dimen@.99626\dimen@\edef#2{\strip@pt\dimen@}\fi}
\providecommand\setPageDevice[3][600]{\bgroup
- \@convLtoP{\width}{#2}\@convLtoP{\height}{#3}
- \ifpdfmarkup\headerps@out{<< /HWResolution [#1 #1] %
- /PageSize [\width\space\height] >> setpagedevice}\else
- \PackageWarning{web}{This is a distiller only command,\MessageBreak
+ \@convLtoP{\width}{#2}\@convLtoP{\height}{#3}
+ \ifpdfmarkup\headerps@out{<< /HWResolution [#1 #1] %
+ /PageSize [\width\space\height] >> setpagedevice}\else
+ \PackageWarning{web}{This is a distiller only command,\MessageBreak
ignoring \string\setPageDevice}\fi\egroup}
% \end{macrocode}
%\DescribeMacro\allowTransparency sets the \textbf{AllowTransparency} key of
% the distiller to \textbf{true}. We do this with \texttt{setdistillerparams}.
% \begin{macrocode}
\providecommand\allowTransparency{\bgroup
- \ifpdfmarkup\headerps@out{<< %
- /AllowTransparency true >> setdistillerparams}\else
- \PackageWarning{web}{This is a distiller only command,\MessageBreak
- ignoring \string\allowTransparency}\fi\egroup}
+ \ifpdfmarkup\headerps@out{<< %
+ /AllowTransparency true >> setdistillerparams}\else
+ \PackageWarning{web}{This is a distiller only command,\MessageBreak
+ ignoring \string\allowTransparency}\fi\egroup}
\@onlypreamble\setPageDevice
\@onlypreamble\allowTransparency
% \end{macrocode}
@@ -1342,29 +1310,27 @@
%\end{verbatim}
% \begin{macrocode}
\def\screensize#1#2{%
- \def\webSaveSSDim{{#1}{#2}}%
- \begingroup
+ \def\webSaveSSDim{{#1}{#2}}%
+ \begingroup
\ifeqforpaper
- \ifx\web@layout\web@YES
- \setlength{\@tempdima}{#2}%
- \global\textwidth\@tempdima
- \addtolength{\@tempdima}{-\@Leftmargin}%
- \addtolength{\@tempdima}{-\@Rightmargin}%
- \xdef\fullscreenwidth{\the\@tempdima}%
- \else
- \xdef\fullscreenwidth{\the\textwidth}%
- \fi
+ \ifx\web@layout\web@YES
+ \setlength{\@tempdima}{#2}\global
+ \textwidth\@tempdima
+ \addtolength{\@tempdima}{-\@Leftmargin}%
+ \addtolength{\@tempdima}{-\@Rightmargin}%
+ \xdef\fullscreenwidth{\the\@tempdima}\else
+ \xdef\fullscreenwidth{\the\textwidth}\fi
\else
- \setlength{\@tempdima}{#1}%
- \global\paperheight\@tempdima
- \setlength{\@tempdima}{#2}%
- \global\paperwidth\@tempdima
+ \setlength{\@tempdima}{#1}\global
+ \paperheight\@tempdima
+ \setlength{\@tempdima}{#2}\global
+ \paperwidth\@tempdima
\fi
- \endgroup
- \web@papersize@settrue
- \web@set@paper % dps modified
- \let\screensize\@gobbletwo
- \InitLayout
+ \endgroup
+ \web@papersize@settrue
+ \web@set@paper
+ \let\screensize\@gobbletwo
+ \InitLayout
}
% \end{macrocode}
% Save a secret copy of screensize for use by APB
@@ -1403,9 +1369,9 @@
% }
% \begin{macrocode}
\newcommand{\setScreensizeFromGraphic}[2][]{%
- \getDimsFromGraphic[#1]{#2}%
+ \getDimsFromGraphic[#1]{#2}%
{\web@graphicScreenWidth}{\web@graphicScreenHeight}%
- \screensize{\web@graphicScreenHeight}{\web@graphicScreenWidth}%
+ \screensize{\web@graphicScreenHeight}{\web@graphicScreenWidth}%
}
\@onlypreamble\setScreensizeFromGraphic
% \end{macrocode}
@@ -1414,7 +1380,7 @@
% This command uses the graphicx package. It loads a graphic
% into a box and measures its dimensions.
% \changes{v4.1a}{2008/07/06}
-% {
+% {%
% Added the command \string\cs{getDimsFromGraphic} as a helper command for
% \string\cs{setScreensizeFromGraphic}, but also useful as
% stand alone as well.
@@ -1428,11 +1394,11 @@
% \item[]\texttt{\#4}: A control sequence to be used to hold the height
%\end{enumerate}
% \begin{macrocode}
-\newcommand{\getDimsFromGraphic}[4][]{{%
- \setbox0=\hbox{\includegraphics[draft,#1]{#2}}%
- \dimen@=\dp0 \advance\dimen@\ht0
- \xdef#3{\the\wd0 }\xdef#4{\the\dimen@}%
-}}
+\newcommand{\getDimsFromGraphic}[4][]{\bgroup
+ \setbox\z@=\hbox{\includegraphics[draft,#1]{#2}}%
+ \dimen@=\dp\z@ \advance\dimen@\ht\z@
+ \xdef#3{\the\wd\z@ }\xdef#4{\the\dimen@}\egroup
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\addtoWebHeight}
@@ -1446,34 +1412,34 @@
% \begin{macrocode}
\def\web@getSSDims#1#2{\edef\web@@height{#1}\edef\web@@width{#2}}
\def\addToWebHWError{\PackageError{web}{%
- You must declare screen size first by using\MessageBreak
- the \string\screensize\space command, or by declaring \MessageBreak
- a design in the web option list}%
- {Do as is suggested in error message!}}
+ You must declare screen size first by using\MessageBreak
+ the \string\screensize\space command, or by declaring \MessageBreak
+ a design in the web option list}%
+ {Do as is suggested in error message!}}
\newcommand{\addtoWebHeight}[1]{%
% \end{macrocode}
% If the \cmd{\screensize} has already been set, it has been
% \cmd{\let} to \cmd{\@gobbletwo}. We use this to detect the error
% of not already declaring page dimensions.
% \begin{macrocode}
- \ifx\screensize\@gobbletwo
- \expandafter\web@getSSDims\webSaveSSDim
+ \ifx\screensize\@gobbletwo
+ \expandafter\web@getSSDims\webSaveSSDim
% \end{macrocode}
% Even though \cmd{\screensize} has already been expanded and is now
% \cs{let} to \cs{@gobbletwo}, we can use our saved version of
% \cs{screensize} that no one knows about.
% \begin{macrocode}
- \screensize@web@save{\web@@height+#1}{\web@@width}%
- \else\addToWebHWError\fi
+ \screensize@web@save{\web@@height+#1}{\web@@width}%
+ \else\addToWebHWError\fi
}
% \end{macrocode}
% \cs{addtoWebWidth} works the same way as \cmd{\addtoWebHeight}.
% \begin{macrocode}
\newcommand{\addtoWebWidth}[1]{%
- \ifx\screensize\@gobbletwo
- \expandafter\web@getSSDims\webSaveSSDim
- \screensize@web@save{\web@@height}{\web@@width+#1}%
- \else\addToWebHWError\fi
+ \ifx\screensize\@gobbletwo
+ \expandafter\web@getSSDims\webSaveSSDim
+ \screensize@web@save{\web@@height}{\web@@width+#1}%
+ \else\addToWebHWError\fi
}
% \end{macrocode}
% Expand in preamble only.
@@ -1496,18 +1462,17 @@
% #5 = bottom margin
%\end{verbatim}
% \begin{macrocode}
-\newcommand{\@margins}[5][\web@minpanelwidth]
-{%
- \def\webSaveMargDim{[#1]{#2}{#3}{#4}{#5}}%
- \setlength{\@panelwidth}{#1}%
- \ifdim\@panelwidth<\web@minpanelwidth
- \setlength{\@panelwidth}{\web@minpanelwidth}\fi
- \setlength{\@Leftmargin}{#2}%
- \setlength{\@Rightmargin}{#3}%
- \setlength{\@Topmargin}{#4}%
- \setlength{\@Bottommargin}{#5}%
- \web@margins@settrue
- \InitLayout
+\newcommand{\@margins}[5][\web@minpanelwidth]{%
+ \def\webSaveMargDim{[#1]{#2}{#3}{#4}{#5}}%
+ \setlength{\@panelwidth}{#1}%
+ \ifdim\@panelwidth<\web@minpanelwidth
+ \setlength{\@panelwidth}{\web@minpanelwidth}\fi
+ \setlength{\@Leftmargin}{#2}%
+ \setlength{\@Rightmargin}{#3}%
+ \setlength{\@Topmargin}{#4}%
+ \setlength{\@Bottommargin}{#5}%
+ \web@margins@settrue
+ \InitLayout
}
\let\margins\@margins
\let\margins@web@save\margins
@@ -1528,40 +1493,40 @@
% This line adds .25in to each of the side margins.
% \begin{macrocode}
\newcommand\get@MargDim[5][]{%
- \def\currPanelWidth{#1}%
- \def\currLeftMarg{#2}\def\currRightMarg{#3}%
- \def\currTopMarg{#4}\def\currBottomMarg{#5}}
+ \def\currPanelWidth{#1}%
+ \def\currLeftMarg{#2}\def\currRightMarg{#3}%
+ \def\currTopMarg{#4}\def\currBottomMarg{#5}}
\newcommand{\resetmargins}[5][\web@minpanelwidth]{%
- \expandafter\get@MargDim\webSaveMargDim
- \begingroup
- \let\incby\currPanelWidth
- \def\web@arg{#1}\ifx\web@arg\@empty
- \setlength{\@tempdima}{\currPanelWidth}\else
- \setlength{\@tempdima}{#1}\fi
- \xdef\newPanelWidth{\the\@tempdima}%
- \let\incby\currLeftMarg
- \def\web@arg{#2}\ifx\web@arg\@empty
- \setlength{\@tempdima}{\currLeftMarg}\else
- \setlength{\@tempdima}{#2}\fi
- \xdef\newLeftMarg{\the\@tempdima}%
- \let\incby\currRightMarg
- \def\web@arg{#3}\ifx\web@arg\@empty
- \setlength{\@tempdima}{\currRightMarg}\else
- \setlength{\@tempdima}{#3}\fi
- \xdef\newRightMarg{\the\@tempdima}%
- \let\incby\currTopMarg
- \def\web@arg{#4}\ifx\web@arg\@empty
- \setlength{\@tempdima}{\currTopMarg}\else
- \setlength{\@tempdima}{#4}\fi
- \xdef\newTopMarg{\the\@tempdima}%
- \let\incby\currBottomMarg
- \def\web@arg{#4}\ifx\web@arg\@empty
- \setlength{\@tempdima}{\currBottomMarg}\else
- \setlength{\@tempdima}{#5}\fi
- \xdef\newBottomMarg{\the\@tempdima}%
- \endgroup
- \margins@web@save[\newPanelWidth]{\newLeftMarg}{\newRightMarg}
- {\newTopMarg}{\newBottomMarg}
+ \expandafter\get@MargDim\webSaveMargDim
+ \begingroup
+ \let\incby\currPanelWidth
+ \def\web@arg{#1}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currPanelWidth}\else
+ \setlength{\@tempdima}{#1}\fi
+ \xdef\newPanelWidth{\the\@tempdima}%
+ \let\incby\currLeftMarg
+ \def\web@arg{#2}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currLeftMarg}\else
+ \setlength{\@tempdima}{#2}\fi
+ \xdef\newLeftMarg{\the\@tempdima}%
+ \let\incby\currRightMarg
+ \def\web@arg{#3}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currRightMarg}\else
+ \setlength{\@tempdima}{#3}\fi
+ \xdef\newRightMarg{\the\@tempdima}%
+ \let\incby\currTopMarg
+ \def\web@arg{#4}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currTopMarg}\else
+ \setlength{\@tempdima}{#4}\fi
+ \xdef\newTopMarg{\the\@tempdima}%
+ \let\incby\currBottomMarg
+ \def\web@arg{#4}\ifx\web@arg\@empty
+ \setlength{\@tempdima}{\currBottomMarg}\else
+ \setlength{\@tempdima}{#5}\fi
+ \xdef\newBottomMarg{\the\@tempdima}%
+ \endgroup
+ \margins@web@save[\newPanelWidth]{\newLeftMarg}{\newRightMarg}
+ {\newTopMarg}{\newBottomMarg}%
}
\@onlypreamble\resetscreensize
% \end{macrocode}
@@ -1574,7 +1539,6 @@
% \cs{maketitle} and ends up in the doc info section of the PDF file.
% \begin{macrocode}
\let\web@save@title\title
-%\def\title{\@ifnextchar[{\@title}{\@title[]}}
\def\title{\@ifnextchar[{\@web@title}{\@web@title[]}}
% \end{macrocode}
% \begin{macro}{\webtitle}
@@ -1584,8 +1548,8 @@
% \begin{macrocode}
%\def\@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
\def\@web@title[#1]#2{\gdef\webtitle{#2}\hypersetup{pdftitle={#2}}%
- \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebtitle{#2}\else
- \gdef\shortwebtitle{#1}\fi\web@save@title{#2}}
+ \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebtitle{#2}\else
+ \gdef\shortwebtitle{#1}\fi\web@save@title{#2}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1595,7 +1559,6 @@
% doc info of the PDF file.
% \begin{macrocode}
\let\web@saved@author\author
-%\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}}
\def\author#1{\gdef\webauthor{#1}\hypersetup{pdfauthor={#1}}%
\web@saved@author{#1}}
% \end{macrocode}
@@ -1606,9 +1569,9 @@
% \begin{macrocode}
\def\subject{\@ifnextchar[{\@subject}{\@subject[]}}
\def\@subject[#1]#2{%
- \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebsubject{#2}\else
- \gdef\shortwebsubject{#1}\fi\gdef\websubject{#2}%
- \hypersetup{pdfsubject={#2}}}
+ \def\webArg{#1}\ifx\webArg\@empty\gdef\shortwebsubject{#2}\else
+ \gdef\shortwebsubject{#1}\fi\gdef\websubject{#2}%
+ \hypersetup{pdfsubject={#2}}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\email}
@@ -1639,9 +1602,9 @@
% A version or revision number.
% \begin{macrocode}
\def\version#1{\gdef\web@version@value{#1}%
- \edef\webversion{\ifx\web@version@value\@empty\else
- \noexpand\web@versionlabel\noexpand\
- \noexpand\web@version@value\fi}%
+ \edef\webversion{\ifx\web@version@value\@empty\else
+ \noexpand\web@versionlabel\noexpand\
+ \noexpand\web@version@value\fi}%
}
\let\web@version@value\@empty
\def\versionLabel#1{\def\web@versionlabel{#1}}
@@ -1729,16 +1692,16 @@
\providecommand\FALSEACTIONii{\aftergroup\SETTEMPBOXi}
\providecommand\FALSEACTIONiia{\aftergroup\SHOWTEMPBOXi}
\providecommand\SETTEMPBOXi{\IF@AorBswitch\else
- \afterassignment\TRUEACTIONia\fi
- \setbox\webtempboxi=\hbox}
+ \afterassignment\TRUEACTIONia\fi
+ \setbox\webtempboxi=\hbox}
\providecommand\SETTEMPBOXii{\IF@AorBswitch
- \afterassignment\FALSEACTIONiia\fi
- \setbox\webtempboxii=\hbox}
+ \afterassignment\FALSEACTIONiia\fi
+ \setbox\webtempboxii=\hbox}
\def\prtscrV{\let\IF@AorBswitch\ifeqforpaper
- \ifeqforpaper
- \def\web@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
- \def\web@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
- \web@next}
+ \ifeqforpaper
+ \def\web@next{\afterassignment\TRUEACTIONi\SETTEMPBOXi}\else
+ \def\web@next{\afterassignment\FALSEACTIONii\SETTEMPBOXii}\fi
+ \web@next}
% \end{macrocode}
% \end{macro}
%\subsubsection{\texorpdfstring{\protect\cs{optionalPageMatter}}{\CMD{optionalPageMatter}}}
@@ -1754,8 +1717,7 @@
\newcommand{\web@aboveOptPgMatDef}{\minimumskip\vspace{\stretch{1}}}
\newcommand{\aboveOPMvspace}{\web@aboveOptPgMatDef}
\newcommand{\optionalPageMatter}[2][\web@aboveOptPgMatDef]{%
- \def\aboveOPMvspace{#1}\def\optionalpagematter{#2}%
-}
+ \def\aboveOPMvspace{#1}\def\optionalpagematter{#2}}
\def\optionalpagematter{}
% \end{macrocode}
% \end{macro}
@@ -1765,7 +1727,7 @@
% to adjust the hyperlink target appropriately.
% \begin{macrocode}
\@ifundefined{thechapter}
- {\def\web@Start{section}}{\def\web@Start{chapter}}
+ {\def\web@Start{section}}{\def\web@Start{chapter}}
% \end{macrocode}
% \subsubsection{\texorpdfstring{\protect\cs{maketitle}}{\CMD{maketitle}} and the Directory}
% In this section we define \cs{maketitle}. You can \cs{renewcommand} this
@@ -1806,15 +1768,14 @@
% \begin{macrocode}
\newcommand{\trailerFontSize}{\footnotesize}
\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
- \webcopyrightyears}
+ \webcopyrightyears}
\def\maketitle@trailer@ll{\web@revision\ \@date}
\def\maketitle@trailer@ur{\thewebemail}
\def\maketitle@trailer@lr{\webversion}
-\newcommand{\titlepageTrailer}
-{%
- \makebox[\linewidth]{\parbox{\linewidth}{%
- \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
- \maketitle@trailer@ll\hfill\maketitle@trailer@lr}}%
+\newcommand{\titlepageTrailer}{%
+ \makebox[\linewidth]{\parbox{\linewidth}{%
+ \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
+ \maketitle@trailer@ll\hfill\maketitle@trailer@lr}}%
}
% \end{macrocode}
% \end{macro}
@@ -1832,21 +1793,21 @@
% \begin{macro}{\afterDirMatter}
% The code that places the directory on the title page.
% \begin{macrocode}
-\newcommand{\webdirectory}{%
- \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
- \web@priorDirMatter
- \begin{flushleft}{\web@formatWordDirectory\web@directory}%
- \web@priorDirList
- \vspace{\vspaceAfterDirName}%
- \begin{itemize}\setlength{\itemsep}{-3pt}\web@formatDirectoryItems
- \ifx\web@removeDirTOC\web@YES\else\item\relax\dirTOCItem\fi
- \ifx\web@removeDirArticle\web@YES\else
- \item\relax\dirArticleItem\fi
- \web@addtoDirList
- \end{itemize}
- \web@afterDirList
- \end{flushleft}
- \web@afterDirMatter
+\newcommand{\webdirectory}{\par
+ \ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
+ \web@priorDirMatter
+ \begin{flushleft}{\web@formatWordDirectory\web@directory}%
+ \web@priorDirList
+ \vspace{\vspaceAfterDirName}%
+ \begin{itemize}\setlength{\itemsep}{-3pt}\web@formatDirectoryItems
+ \ifx\web@removeDirTOC\web@YES\else\item\relax\dirTOCItem\fi
+ \ifx\web@removeDirArticle\web@YES\else
+ \item\relax\dirArticleItem\fi
+ \web@addtoDirList
+ \end{itemize}
+ \web@afterDirList
+ \end{flushleft}
+ \web@afterDirMatter
}
% \end{macrocode}
% (02/10/2009) We include some additional commands to give control over the
@@ -1921,32 +1882,33 @@
% \begin{macro}{\topTitlePage}
% The top of the title page. This command lays out the university, the title and the author.
% \begin{macrocode}
-\newcommand{\topTitlePage}
-{%
+\newcommand{\topTitlePage}{%
% \end{macrocode}
% Have \cs{webuniversity} centered across the top of the title page.
% \begin{macrocode}
- \vglue\web@aboveTopTitleSkip
- \noindent\makebox[\linewidth]{%
- \parbox{\hproportionwebuniversity\linewidth}%
- {\bfseries\color{\webuniversity@color}\ifeqforpaper\large\fi
- \centering\webuniversity}}\par\ifeqforpaper\else\minimumskip\fi
- \vspace{\stretch{1}}%
+ \vglue\web@aboveTopTitleSkip
+ \noindent\makebox[\linewidth]{%
+ \parbox{\hproportionwebuniversity\linewidth}%
+ {\bfseries\color{\webuniversity@color}\ifeqforpaper\large\fi
+ \centering\webuniversity}}\par\ifeqforpaper\else\minimumskip\fi
+ \vspace{\stretch{1}}\noindent
% \end{macrocode}
% Now place the title (\cs{webtitle})
% \begin{macrocode}
- \noindent\makebox[\linewidth]{%
- \parbox{\hproportionwebtitle\linewidth}%
- {\bfseries\color{\webtitle@color}\ifeqforpaper\Large\else
- \large\fi\centering\webtitle}}\par\ifeqforpaper
- \vspace{2\baselineskip}\else\minimumskip\vspace{\stretch{1}}\fi
+ \makebox[\linewidth]{%
+ \parbox{\hproportionwebtitle\linewidth}%
+ {\bfseries\color{\webtitle@color}\ifeqforpaper\Large\else
+ \large\fi\centering\webtitle}}\par
+ \ifeqforpaper
+ \vspace{2\baselineskip}\else\minimumskip\vspace{\stretch{1}}\fi
+ \noindent
% \end{macrocode}
% Now place the author (\cs{webauthor})
% \begin{macrocode}
- \noindent\makebox[\linewidth]{%
- \parbox{\hproportionwebauthor\linewidth}%
- {\bfseries\color{\webauthor@color}\ifeqforpaper
- \large\fi\centering\webauthor}}
+ \makebox[\linewidth]{%
+ \parbox{\hproportionwebauthor\linewidth}%
+ {\bfseries\color{\webauthor@color}\ifeqforpaper
+ \large\fi\centering\webauthor}}
}
% \end{macrocode}
% \end{macro}
@@ -1958,39 +1920,36 @@
\newcommand{\allowHeadingsTitlePage}{\let\web@titlepagestyle\@gobble}
\def\web@titlepagestyle#1{#1}
\newcommand{\coverpagemargin}{1in}
-\newcommand{\maketitlepreamble}
-{%
- \web@titlepagestyle{\thispagestyle{empty}}%
- \ifeqforpaper\if@centertitlepage
- \begingroup
+\newcommand{\maketitlepreamble}{%
+ \web@titlepagestyle{\thispagestyle{empty}}%
+ \ifeqforpaper\if@centertitlepage
+ \begingroup % closes in \maketitlepostamble
% \end{macrocode}
% We center the content on the title page, much better than before.
% \changes{v4.4}{2012/08/26}{No code to center the cover page content.}
% \begin{macrocode}
- \if@centertitlepagefull
- \@tempdima=\coverpagemargin
- \else
- \@tempdima\paperwidth
- \advance\@tempdima-\textwidth
- \@tempdima=.5\@tempdima
- \edef\coverpagemargin{\the\@tempdima}%
- \fi
- \@tempdimb\paperwidth
- \addtolength{\@tempdimb}{-2\@tempdima}%
- \edef\fullscreenwidth{\the\@tempdimb}%
- \linewidth\fullscreenwidth
- \textwidth\fullscreenwidth
- \hfuzz\linewidth
- \setlength{\oddsidemargin}{\coverpagemargin-1in}%
- \setlength{\evensidemargin}{\oddsidemargin}%
- \marginparsep=0pt
- \marginparwidth=0pt
- \parindent0pt
+ \if@centertitlepagefull
+ \@tempdima=\coverpagemargin
+ \else
+ \@tempdima\paperwidth
+ \advance\@tempdima-\textwidth
+ \@tempdima=.5\@tempdima
+ \edef\coverpagemargin{\the\@tempdima}%
+ \fi
+ \@tempdimb\paperwidth
+ \addtolength{\@tempdimb}{-2\@tempdima}%
+ \edef\fullscreenwidth{\the\@tempdimb}%
+ \linewidth\fullscreenwidth
+ \textwidth\fullscreenwidth
+ \hfuzz\linewidth
+ \setlength{\oddsidemargin}{\coverpagemargin-1in}%
+ \setlength{\evensidemargin}{\oddsidemargin}%
+ \marginparsep=0pt
+ \marginparwidth=0pt
+ \parindent0pt
\fi\fi
}
-\newcommand{\maketitlepostamble}
-{%
- \newpage
+\newcommand{\maketitlepostamble}{\newpage
\ifeqforpaper\if@centertitlepage\endgroup\fi\fi
}
% \end{macrocode}
@@ -2000,40 +1959,39 @@
% Redefining \LaTeX's \cs{maketitle}. Looks a little complicated, but this is only because
% we have the forpaper design as well as the screen design defined here.
% \begin{macrocode}
-\newcommand{\web@maketitle}
-{%
- \maketitlepreamble
- \ifeqforpaper\vspace*{2\baselineskip}\else
+\newcommand{\web@maketitle}{%
+ \maketitlepreamble
+ \ifeqforpaper\vspace*{2\baselineskip}\else
% \end{macrocode}
% If not for paper, restrict title and author to \cs{titleauthorproportion} of the page
% \begin{macrocode}
- \vbox to\titleauthorproportion\textheight\bgroup\fi
+ \vbox to\titleauthorproportion\textheight\bgroup\fi
% \end{macrocode}
% \begin{macrocode}
- \topTitlePage
+ \topTitlePage
% \end{macrocode}
% \begin{macrocode}
- \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
+ \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
% \end{macrocode}
% Now place the \cs{optionalpagematter}
% \begin{macrocode}
- \ifx\optionalpagematter\@empty\par\else
- \begingroup\par
- \aboveOPMvspace
- \noindent\parbox{\linewidth}{\optionalpagematter}%
- \par\endgroup\fi
- \vspace{\stretch{1}}
+ \ifx\optionalpagematter\@empty\par\else
+ \begingroup\par
+ \aboveOPMvspace
+ \noindent\parbox{\linewidth}{\optionalpagematter}%
+ \par\endgroup\fi
+ \vspace{\stretch{1}}
% \end{macrocode}
% Insert the directory, as desired.
% \begin{macrocode}
- \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
- \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
+ \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
% \end{macrocode}
% Insert the ``bottom matter''.
% \begin{macrocode}
- \vfill\noindent\begingroup
- \trailerFontSize\titlepageTrailer\par\endgroup
- \maketitlepostamble
+ \vfill\noindent\begingroup
+ \trailerFontSize\titlepageTrailer\par\endgroup
+ \maketitlepostamble
}
\let\web@save@maketitle\maketitle
\let\maketitle\web@maketitle
@@ -2046,28 +2004,26 @@
% A convenience command for making a simple in line title.
%}
% \begin{macrocode}
-\newcommand{\makeinlinetitle}
-{%
- \noindent\makebox[\linewidth][c]{%
- \bfseries\color{\webtitle@color}\webtitle}
- \makebox[\linewidth]{%
- \shortstack[l]{\strut\\
- \makebox[0pt][l]{\webuniversity}\\
- \makebox[0pt][l]{%
- \@ifundefined{aeb@prepared}
- {\@date}{\aeb@prepared}%
- }%
- }\hfill
- \shortstack[c]{\strut\webauthor\\\strut}\hfill
- \shortstack[r]{\strut\makebox[0pt][r]{\thewebemail}\\
- \makebox[0pt][r]{%
- \@ifundefined{aeb@talksite}{\webversion}
- {\ifx\aeb@talksite\@empty\webversion
- \else\aeb@talksite\fi}%
- }%
- }%
+\newcommand{\makeinlinetitle}{\noindent
+ \makebox[\linewidth][c]{%
+ \bfseries\color{\webtitle@color}\webtitle}
+ \makebox[\linewidth]{%
+ \shortstack[l]{\strut\\
+ \makebox[0pt][l]{\webuniversity}\\
+ \makebox[0pt][l]{\@ifundefined{aeb@prepared}
+ {\@date}{\aeb@prepared}%
+ }%
+ }\hfill
+ \shortstack[c]{\strut\webauthor\\\strut}\hfill
+ \shortstack[r]{\strut\makebox[0pt][r]{\thewebemail}\\
+ \makebox[0pt][r]{%
+ \@ifundefined{aeb@talksite}{\webversion}
+ {\ifx\aeb@talksite\@empty\webversion
+ \else\aeb@talksite\fi}%
+ }%
}%
- \bigskip
+ }%
+ \bigskip
}
% \end{macrocode}
% \end{macro}
@@ -2079,9 +2035,7 @@
% Try to squeeze a little more in per page.
% \begin{macrocode}
\ifeqforpaper\else
- \clubpenalty=50
- \widowpenalty=50
-\fi
+ \clubpenalty=50 \widowpenalty=50 \fi
% \end{macrocode}
% \subsection{Tight Settings}
%
@@ -2103,142 +2057,142 @@
\def\w@ppp#1#2#3{#1\p@ \@plus#2\p@ \@minus#3\p@}
\def\w@zpp#1#2{\z@ \@plus#1\p@ \@minus#2\p@}
\def\tightsettings@z{%
- \setlength\partopsep{\w@ppp{2}{}{}} % unchanged
- \def\web@listi{\leftmargin\leftmargini
- \parsep \w@ppp{2}{2}{}% 4+2-1
- \topsep \w@ppp{2}{1}{}% 8+2-4
- \itemsep\w@ppp{2}{1}{}}% 4+2-1
- \let\@listi\web@listi
- \let\@listI\@listi
- \@listi
- \def\web@listii {\leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
- \topsep \w@zpp{}{}% 4+2-1
- \parsep \w@zpp{}{}% 2+1-1
- \itemsep \parsep}% unchanged
- \def\web@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
- \topsep \w@zpp{}{}% 2+1-1
+ \setlength\partopsep{\w@ppp{2}{}{}} % unchanged
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{2}{2}{}% 4+2-1
+ \topsep \w@ppp{2}{1}{}% 8+2-4
+ \itemsep\w@ppp{2}{1}{}}% 4+2-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@zpp{}{}% 4+2-1
+ \parsep \w@zpp{}{}% 2+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@zpp{}{}% 2+1-1
% \end{macrocode}
% Uncommented text now commented out.
% \changes{v6.0o}{2017/01/20}{Uncommented text, now commented out}
% \begin{macrocode}
- \parsep \z@ % unchanged
- \partopsep \w@ppp{}{}{}% unchanged
- \itemsep \topsep}% unchanged
- \let\@listii\web@listii
- \let\@listiii\web@listiii
- \renewcommand\web@normalsize{%
- \@setfontsize\normalsize\@xpt\@xiipt
- \abovedisplayskip \w@ppp{5}{3}{}% 10+2-5
- \abovedisplayshortskip \w@zpp{3}{0}% unchanged
- \belowdisplayshortskip \w@ppp{3}{2}{2}% 6+3-3
- \belowdisplayskip \abovedisplayskip
- \let\@listi\@listI}%
- \let\normalsize\web@normalsize
- \normalsize
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep
+ }% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xpt\@xiipt
+ \abovedisplayskip \w@ppp{5}{3}{}% 10+2-5
+ \abovedisplayshortskip \w@zpp{3}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{3}{2}{2}% 6+3-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
}
% \end{macrocode}
% \paragraph*{Tight settings for \texttt{11pt}}
% \begin{macrocode}
\def\tightsettings@i{%
- \setlength\partopsep{\w@ppp{2}{}{}}% 3+1-1
- \def\web@listi{\leftmargin\leftmargini
- \parsep \w@ppp{2.5}{2}{}% 4.5+2-1
- \topsep \w@ppp{4.5}{1.5}{2.5}% 9+3-5
- \itemsep \w@ppp{2.5}{}{}}% 4.5+2-1
- \let\@listi\web@listi
- \let\@listI\@listi
- \@listi
- \def\web@listii {\leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
- \topsep \w@ppp{}{}{}% 4.5+2-1
- \parsep \w@ppp{}{}{}% 2+1-1
- \itemsep \parsep}% unchanged
- \def\web@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
- \topsep \w@ppp{}{}{}% 2+1-1
- \parsep \z@ % unchanged
- \partopsep \w@ppp{}{}{}% unchanged
- \itemsep \topsep}% unchanged
- \let\@listii\web@listii
- \let\@listiii\web@listiii
- \renewcommand\web@normalsize{%
- \@setfontsize\normalsize\@xipt{13.6}%
- \abovedisplayskip \w@ppp{5.5}{3}{3}% 11+3-6
- \abovedisplayshortskip \w@zpp{}{0}% unchanged
- \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
- \belowdisplayskip \abovedisplayskip
- \let\@listi\@listI}%
- \let\normalsize\web@normalsize
- \normalsize
+ \setlength\partopsep{\w@ppp{2}{}{}}% 3+1-1
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{2.5}{2}{}% 4.5+2-1
+ \topsep \w@ppp{4.5}{1.5}{2.5}% 9+3-5
+ \itemsep \w@ppp{2.5}{}{}}% 4.5+2-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{}{}{}% 4.5+2-1
+ \parsep \w@ppp{}{}{}% 2+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{}{}{}% 2+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xipt{13.6}%
+ \abovedisplayskip \w@ppp{5.5}{3}{3}% 11+3-6
+ \abovedisplayshortskip \w@zpp{}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
}
% \end{macrocode}
% \paragraph*{Tight settings for \texttt{12pt}}
% \begin{macrocode}
\def\tightsettings@ii{%
- \setlength\partopsep{\w@ppp{3}{2}{2}}% unchanged
- \def\web@listi{\leftmargin\leftmargini
- \parsep \w@ppp{3}{2}{}% 5+2.5-1
- \topsep \w@ppp{5}{2}{3}% 10+4-6
- \itemsep\w@ppp{2.5}{}{}}% 5+2.5-1
- \let\@listi\web@listi
- \let\@listI\@listi
- \@listi
- \def\web@listii {\leftmargin\leftmarginii
- \labelwidth\leftmarginii
- \advance\labelwidth-\labelsep
- \topsep \w@ppp{2.5}{}{}% 5+2.5-1
- \parsep \w@ppp{2}{}{}% 2.5+1-1
- \itemsep \parsep}% unchanged
- \def\web@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii
- \advance\labelwidth-\labelsep
- \topsep \w@ppp{1.5}{}{}% 2.5+1-1
- \parsep \z@ % unchanged
- \partopsep \w@ppp{}{}{}% unchanged
- \itemsep \topsep}% unchanged
- \let\@listii\web@listii
- \let\@listiii\web@listiii
- \renewcommand\web@normalsize{%
- \@setfontsize\normalsize\@xiipt{14.5}%
- \abovedisplayskip \w@ppp{6}{1.5}{3.5}% 12+3-7
- \abovedisplayshortskip \w@zpp{3}{0}% unchanged
- \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
- \belowdisplayskip \abovedisplayskip
- \let\@listi\@listI}%
- \let\normalsize\web@normalsize
- \normalsize
+ \setlength\partopsep{\w@ppp{3}{2}{2}}% unchanged
+ \def\web@listi{\leftmargin\leftmargini
+ \parsep \w@ppp{3}{2}{}% 5+2.5-1
+ \topsep \w@ppp{5}{2}{3}% 10+4-6
+ \itemsep\w@ppp{2.5}{}{}}% 5+2.5-1
+ \let\@listi\web@listi
+ \let\@listI\@listi
+ \@listi
+ \def\web@listii {\leftmargin\leftmarginii
+ \labelwidth\leftmarginii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{2.5}{}{}% 5+2.5-1
+ \parsep \w@ppp{2}{}{}% 2.5+1-1
+ \itemsep \parsep}% unchanged
+ \def\web@listiii{\leftmargin\leftmarginiii
+ \labelwidth\leftmarginiii
+ \advance\labelwidth-\labelsep
+ \topsep \w@ppp{1.5}{}{}% 2.5+1-1
+ \parsep \z@ % unchanged
+ \partopsep \w@ppp{}{}{}% unchanged
+ \itemsep \topsep}% unchanged
+ \let\@listii\web@listii
+ \let\@listiii\web@listiii
+ \renewcommand\web@normalsize{%
+ \@setfontsize\normalsize\@xiipt{14.5}%
+ \abovedisplayskip \w@ppp{6}{1.5}{3.5}% 12+3-7
+ \abovedisplayshortskip \w@zpp{3}{0}% unchanged
+ \belowdisplayshortskip \w@ppp{4}{2}{2}% 6.5+3.5-3
+ \belowdisplayskip \abovedisplayskip
+ \let\@listi\@listI}%
+ \let\normalsize\web@normalsize
+ \normalsize
}
% \end{macrocode}
% Select \DescribeMacro{\tightsettings}\cs{tightsettings} according to point size
% \begin{macrocode}
\def\tightsettings{\@ifstar{\ifeqforpaper\else\tightsettings@cont\fi}
- {\tightsettings@cont}}
+ {\tightsettings@cont}}
\def\tightsettings@cont{\let\web@tight\web@YES
- \ifcase\@ptsize
- \tightsettings@z\or
- \tightsettings@i\or
- \tightsettings@ii
- \fi
+ \ifcase\@ptsize
+ \tightsettings@z\or
+ \tightsettings@i\or
+ \tightsettings@ii\fi
}
% \end{macrocode}
% Restore to normal document class settings using
% \DescribeMacro{\restorenormalsettings}\cs{restorenormalsettings}.
% \begin{macrocode}
\def\restorenormalsettings{\let\web@tight\web@NO
- \let\@listi\web@save@listi
- \let\@listii\web@save@listii
- \let\@listiii\web@save@listiii
- \let\normalsize\web@save@normalsize
- \let\partopsep\web@save@partopsep
- \let\@listI\@listi
- \@listi
- \normalsize
+ \let\@listi\web@save@listi
+ \let\@listii\web@save@listii
+ \let\@listiii\web@save@listiii
+ \let\normalsize\web@save@normalsize
+ \let\partopsep\web@save@partopsep
+ \let\@listI\@listi
+ \@listi
+ \normalsize
}
% \end{macrocode}
% \subsection{Navgation Aids}
@@ -2259,15 +2213,14 @@
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
-\newcommand{\newNaviIcon}[1][\@empty]
-{%
- \ifx#1m\let\web@next\@newNaviIconMenu
- \else\ifx#1j\let\web@next\@newNaviIconJS
- \else\ifx#1l\let\web@next\@newNaviIconLink
- \else\ifx#1\@empty\let\web@next\@newNaviIconLink
- \else\let\web@next\relax
- \PackageWarning{web}{\string\newNaviIcon: unknown first parameter}
- \fi\fi\fi\fi\web@next
+\newcommand{\newNaviIcon}[1][\@empty]{%
+ \ifx#1m\let\web@next\@newNaviIconMenu
+ \else\ifx#1j\let\web@next\@newNaviIconJS
+ \else\ifx#1l\let\web@next\@newNaviIconLink
+ \else\ifx#1\@empty\let\web@next\@newNaviIconLink
+ \else\let\web@next\relax
+ \PackageWarning{web}{\string\newNaviIcon: unknown first parameter}
+ \fi\fi\fi\fi\web@next
}
% \end{macrocode}
% \begin{macro}{\@newNaviIconMenu}
@@ -2287,15 +2240,14 @@
% is determined by \cs{@menuBgColor}.
% \begin{macrocode}
\def\web@colorbox@w@transparency#1{%
- \ifx#1\@empty\setlength{\fboxrule}{0pt}\let\aeb@next\fbox\else
- \def\aeb@next{\colorbox{#1}}\fi\aeb@next}
-\newcommand{\@newNaviIconMenu}[6][I]
-{%
- \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
- \Acrobatmenu{#6}{\web@colorbox@w@transparency{\@menuBgColor}{%
- \parbox[c][#4][c]{#3}%
- {\normalsize\centering\color{\@menucolor}#5}}}%
- }}%
+ \ifx#1\@empty\setlength{\fboxrule}{0pt}\let\aeb@next\fbox\else
+ \def\aeb@next{\colorbox{#1}}\fi\aeb@next}
+\newcommand{\@newNaviIconMenu}[6][I]{%
+ \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
+ \Acrobatmenu{#6}{\web@colorbox@w@transparency{\@menuBgColor}{%
+ \parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ }}%
}
% \end{macrocode}
% \end{macro}
@@ -2314,44 +2266,43 @@
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
% \begin{macrocode}
-\newcommand{\@newNaviIconJS}[6][I]
-{%
- \ifcase\eq@drivernum
- \def#2{{\setlength{\fboxsep}{0pt}%
- \pdf@rect{\web@colorbox@w@transparency{\@menuBgColor}%
- {\parbox[c][#4][c]{#3}%
- {\normalsize\centering\color{\@menucolor}#5}}}%
- \literalps@out{%
- [ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
- /Border [ 0 0 0 ]/H/#1\space
- /Action <</S/JavaScript/JS (#6) >>
- /Subtype/Link
- /ANN pdfmark}%
- }}%
- \or
- \def#2{{\setlength{\fboxsep}{0pt}%
- \leavevmode\pdfstartlink
- attr {/Border [0 0 0 ] /H/#1}%
- user{ /Subtype /Link
- /A << /S/JavaScript/JS (#6) >>}%
- \web@colorbox@w@transparency{\@menuBgColor}%
- {\parbox[c][#4][c]{#3}%
- {\normalsize\centering\color{\@menucolor}#5}}%
- \pdfendlink
- }}%
- \or
- \def#2{{\setlength{\fboxsep}{0pt}%
- \@pdfm@mark{bann
- <<
- /Border [0 0 0 ] /H/#1\space
- /Subtype /Link
- /A << /S/JavaScript/JS (#6) >>
- >>}\web@colorbox@w@transparency{\@menuBgColor}%
- {\parbox[c][#4][c]{#3}%
- {\normalsize\centering\color{\@menucolor}#5}}%
- \@pdfm@mark{eann}%
- }}%
- \fi
+\newcommand{\@newNaviIconJS}[6][I]{%
+ \ifcase\eq@drivernum
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \pdf@rect{\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ \literalps@out{%
+ [ /Rect [pdf@llx pdf@lly pdf@urx pdf@ury]
+ /Border [ 0 0 0 ]/H/#1\space
+ /Action <</S/JavaScript/JS (#6) >>
+ /Subtype/Link
+ /ANN pdfmark}%
+ }}%
+ \or
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \leavevmode\pdfstartlink
+ attr {/Border [0 0 0 ] /H/#1}%
+ user{ /Subtype /Link
+ /A << /S/JavaScript/JS (#6) >>}%
+ \web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}%
+ \pdfendlink
+ }}%
+ \or
+ \def#2{{\setlength{\fboxsep}{0pt}%
+ \@pdfm@mark{bann
+ <<
+ /Border [0 0 0 ] /H/#1\space
+ /Subtype /Link
+ /A << /S/JavaScript/JS (#6) >>
+ >>}\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}%
+ \@pdfm@mark{eann}%
+ }}%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -2374,13 +2325,12 @@
% The color of the text is controlled by \cs{navibarTextColor}, and the background color
% is determined by \cs{@menuBgColor}.
% \begin{macrocode}
-\newcommand{\@newNaviIconLink}[6][I]
-{%
- \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
- #6{\web@colorbox@w@transparency{\@menuBgColor}%
- {\parbox[c][#4][c]{#3}%
- {\normalsize\centering\color{\@menucolor}#5}}}%
- }}%
+\newcommand{\@newNaviIconLink}[6][I]{%
+ \def#2{{\setlength{\fboxsep}{0pt}\def\@pdfhighlight{/#1}%
+ #6{\web@colorbox@w@transparency{\@menuBgColor}%
+ {\parbox[c][#4][c]{#3}%
+ {\normalsize\centering\color{\@menucolor}#5}}}%
+ }}%
}
% \end{macrocode}
% \begin{macrocode}
@@ -2388,7 +2338,7 @@
\def\insert@webtoc{\web@TOC\ }
\def\web@TocText{Toc}
\newNaviIcon[l]{\web@TOC}{\web@nb@width}{\web@nb@height}
- {\footnotesize\web@TocText}{\hyperlink{webtoc}}
+ {\footnotesize\web@TocText}{\hyperlink{webtoc}}
% \end{macrocode}
% Some icon definitions that are used in the navigation bar that appears at the bottom of the page.
% \begin{macrocode}
@@ -2396,80 +2346,81 @@
\newcommand\navibariconHeight[1]{\def\web@nb@height{#1}}
\navibariconWidth{34pt}\navibariconHeight{10pt}
\@newNaviIconMenu{\web@FirstPage}{\web@nb@width}{\web@nb@height}
- {\web@FirstPageText}{FirstPage}
+ {\web@FirstPageText}{FirstPage}
\def\web@FirstPageText{$\blacktriangleleft\blacktriangleleft$}
\@newNaviIconMenu{\web@LastPage}{\web@nb@width}{\web@nb@height}
- {\web@LastPageText}{LastPage}
+ {\web@LastPageText}{LastPage}
\def\web@LastPageText{$\blacktriangleright\blacktriangleright$}
\@newNaviIconMenu{\web@PrevPage}{\web@nb@width}{\web@nb@height}
- {\web@PrevPageText}{PrevPage}
+ {\web@PrevPageText}{PrevPage}
\def\web@PrevPageText{$\blacktriangleleft$}
\@newNaviIconMenu{\web@NextPage}{\web@nb@width}{\web@nb@height}
- {\web@NextPageText}{NextPage}
+ {\web@NextPageText}{NextPage}
\def\web@NextPageText{$\blacktriangleright$}
\@newNaviIconMenu{\web@GoBack}{\web@nb@width}{\web@nb@height}
- {\footnotesize\web@back}{GoBack}
+ {\footnotesize\web@back}{GoBack}
\@newNaviIconMenu{\web@GoBackDoc}{\web@nb@width}{\web@nb@height}
- {$\blacktriangleleft$\ \footnotesize\web@doc}{GoBackDoc}
+ {$\blacktriangleleft$\ \footnotesize\web@doc}{GoBackDoc}
\@newNaviIconMenu{\web@GoForwardDoc}{\web@nb@width}{\web@nb@height}
- {\footnotesize\web@doc\ \normalsize$\blacktriangleright$}
- {GoForwardDoc}
+ {\footnotesize\web@doc\ \normalsize$\blacktriangleright$}
+ {GoForwardDoc}
\@newNaviIconMenu{\web@FS}{\web@nb@width}{\web@nb@height}
- {\footnotesize\web@FSText}{FullScreen}
+ {\footnotesize\web@FSText}{FullScreen}
\def\web@FSText{FS}
\@newNaviIconMenu{\web@GoToPage}{\web@nb@width}{\web@nb@height}
- {\footnotesize\web@GoToPageText}{GoToPage}
+ {\footnotesize\web@GoToPageText}{GoToPage}
\def\web@GoToPageText{Page...}
% \end{macrocode}
% \begin{macro}{\web@navigationbar}
% The navigation bar, this can be redefined.
% \begin{macrocode}
\newcommand\web@navigationbar{%
-\hfil\bfseries\footnotesize
-\insertwebtoc
-\web@FirstPage\
-\web@LastPage\
-\web@PrevPage\
-\web@NextPage\
-\web@GoBack
-%\web@GoBackDoc\
-%\web@GoForwardDoc
-\hfil}
+ \hfil\bfseries\footnotesize
+ \insertwebtoc
+ \web@FirstPage\
+ \web@LastPage\
+ \web@PrevPage\
+ \web@NextPage\
+ \web@GoBack
+ %\web@GoBackDoc\
+ %\web@GoForwardDoc
+ \hfil
+}
% \end{macrocode}
% \end{macro}
% Here are some icon buttons for the panel, if a panel is desired.
% \begin{macrocode}
-\newcommand{\panelgroupWidth}[1]{%
- \global\let\chkpanelgroup\web@chkpanelgroup
- \def\web@pg@width{#1}}
-\newcommand{\panelgroupHeight}[1]{%
- \global\let\chkpanelgroup\web@chkpanelgroup
- \def\web@pg@height{#1}}
-\newcommand{\panelgroupSep}[1]{%
- \global\let\chkpanelgroup\web@chkpanelgroup
- \def\web@pg@sep{#1}}
+\newcommand{\panelgroupWidth}[1]{\global
+ \let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@width{#1}}
+\newcommand{\panelgroupHeight}[1]{\global
+ \let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@height{#1}}
+\newcommand{\panelgroupSep}[1]{\global
+ \let\chkpanelgroup\web@chkpanelgroup
+ \def\web@pg@sep{#1}}
\@newNaviIconMenu{\panel@FirstPage}{\web@pg@width}{\web@pg@height}
- {\web@FirstPageText}{FirstPage}
+ {\web@FirstPageText}{FirstPage}
\@newNaviIconMenu{\panel@LastPage}{\web@pg@width}{\web@pg@height}
- {\web@LastPageText}{LastPage}
+ {\web@LastPageText}{LastPage}
\@newNaviIconMenu{\panel@PrevPage}{\web@pg@width}{\web@pg@height}
- {\web@PrevPageText}{PrevPage}
+ {\web@PrevPageText}{PrevPage}
\@newNaviIconMenu{\panel@NextPage}{\web@pg@width}{\web@pg@height}
- {\web@NextPageText}{NextPage}
+ {\web@NextPageText}{NextPage}
\@newNaviIconMenu{\panel@GoBack}{\web@pg@width}{\web@pg@height}
- {\footnotesize\web@back}{GoBack}
+ {\footnotesize\web@back}{GoBack}
\@newNaviIconMenu{\panel@GoBackDoc}{\web@pg@width}{\web@pg@height}
- {$\blacktriangleleft$\,\footnotesize\web@doc}{GoBackDoc}
+ {$\blacktriangleleft$\,\footnotesize\web@doc}{GoBackDoc}
\@newNaviIconMenu{\panel@GoForwardDoc}{\web@pg@width}{\web@pg@height}
- {\footnotesize\web@doc\,\normalsize$\blacktriangleright$}
- {GoForwardDoc}
+ {\footnotesize\web@doc\,\normalsize$\blacktriangleright$}
+ {GoForwardDoc}
\@newNaviIconMenu{\panel@Close}{\web@pg@width}{\web@pg@height}
- {\footnotesize Close}{Close}
+ {\footnotesize Close}{Close}
\def\web@CloseText{Close}
\@newNaviIconMenu{\panel@FS}{\web@pg@width}{\web@pg@height}
- {\footnotesize\web@FSText}{FullScreen}
+ {\footnotesize\web@FSText}{FullScreen}
\@newNaviIconMenu{\panel@GoToPage}{\web@pg@width}{\web@pg@height}
- {\footnotesize\web@GoToPageText}{GoToPage}
+ {\footnotesize\web@GoToPageText}{GoToPage}
% \end{macrocode}
% A check to see if the panel group is too wide.
% \begin{macrocode}
@@ -2478,7 +2429,8 @@
\ifdim\@tempdima>\@panelwidth\PackageError{web}{Width of
\string\panelNaviGroup\space is wider than the panel}{}\else
\xdef\panelNavigroupWidth{\the\@tempdima}\fi
- \egroup\global\let\chkpanelgroup\@empty
+ \egroup
+ \global\let\chkpanelgroup\@empty
}
\panelgroupWidth{28pt}\panelgroupHeight{15pt}
\panelgroupSep{2pt}
@@ -2487,15 +2439,13 @@
% Standard navigation group for a panel.
% \begin{macrocode}
\newcommand\panelNaviGroup{\chkpanelgroup
- \parbox[c]{\panelNavigroupWidth}{%
- \offinterlineskip
- \panelIconGroup
- }%
-}
+ \parbox[c]{\panelNavigroupWidth}{%
+ \offinterlineskip
+ \panelIconGroup}}
\newcommand{\panelIconGroup}{%
- \panel@FirstPage\hfill\panel@LastPage\\[\panelrowsep]
- \panel@PrevPage\hfill\panel@NextPage\\[\panelrowsep]
- \panel@GoBack\hfill\panel@Close
+ \panel@FirstPage\hfill\panel@LastPage\\[\panelrowsep]
+ \panel@PrevPage\hfill\panel@NextPage\\[\panelrowsep]
+ \panel@GoBack\hfill\panel@Close
}
% \end{macrocode}
% \begin{macro}{\insNaviBar}
@@ -2524,37 +2474,37 @@
% \begin{macrocode}
\def\web@ifOnThisPage#1#2{\ifnum\c@page=\@thispage\relax
#1\else#2\fi}
-\newcommand{\insertnaviiconhere}[1]
-{%
- \xdef\@thispage{\the\c@page}%
- \def\web@insToRight{%
- \ifeqforpaper\makebox[0pt][l]{\ifdim\marginparsep>0pt\relax
- \hspace{\marginparsep}\else\ \fi#1}\else
- \makebox[0pt][l]{%
- \ifnum\@panelconfig=2\relax
- \hspace{\@panelsep}\else
- \hspace{\@Rightmargin}\fi
- \makebox[0pt][r]{#1}}\fi
- }\expandafter\rheader\expandafter
- {\expandafter\web@ifOnThisPage
- \expandafter{\web@rightheader\web@insToRight}%
- {\web@defaultrightheader}}%
+\newcommand{\insertnaviiconhere}[1]{%
+ \xdef\@thispage{\the\c@page}%
+ \def\web@insToRight{%
+ \ifeqforpaper
+ \makebox[0pt][l]{\ifdim\marginparsep>\z@
+ \hspace{\marginparsep}\else\ \fi#1}\else
+ \makebox[0pt][l]{%
+ \ifnum\@panelconfig=\tw@
+ \hspace{\@panelsep}\else
+ \hspace{\@Rightmargin}\fi
+ \makebox[0pt][r]{#1}}\fi
+ }\expandafter\rheader\expandafter
+ {\expandafter\web@ifOnThisPage
+ \expandafter{\web@rightheader\web@insToRight}%
+ {\web@defaultrightheader}}%
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\insertnaviiconhereafter}
% Inserts a direction icon on the current page, and every page thereafter.
% \begin{macrocode}
-%\def\insertnaviiconhereafter#1{\lheader{#1}}
\def\insertnaviiconhereafter#1{\def\web@insToLeft{%
- \ifeqforpaper\makebox[0pt][r]{#1\ifdim\marginparsep>0pt\relax
- \hspace{\marginparsep}\else\ \fi}\else
+ \ifeqforpaper
+ \makebox[0pt][r]{#1\ifdim\marginparsep>\z@
+ \hspace{\marginparsep}\else\ \fi}\else
\makebox[0pt][r]{\makebox[0pt][l]{#1}%
- \ifnum\@panelconfig=1\relax
- \hspace{\@panelsep}\else
- \hspace{\@Leftmargin}\fi}\fi
- }\expandafter\lheader\expandafter
- {\expandafter\web@insToLeft\web@lhead}}
+ \ifnum\@panelconfig=\@ne
+ \hspace{\@panelsep}\else
+ \hspace{\@Leftmargin}\fi}\fi
+ }\expandafter\lheader\expandafter
+ {\expandafter\web@insToLeft\web@lhead}}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\removehereaftericon}
@@ -2571,23 +2521,21 @@
%\insertnaviiconhere{\ArrowUp{\href{http://www.adobe.com/}}}
%\end{verbatim}
% \begin{macrocode}
-\newcommand\ArrowUp[1]
-{%
- \normalsize\ifeqforpaper
- \setlength{\fboxsep}{6pt}\else
- \setlength{\fboxsep}{4pt}\fi
- \raisebox{\depth-\fboxsep}[0pt][0pt]{%
- #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
- {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
-}
-\newcommand\ArrowDown[1]
-{%
- \normalsize\ifeqforpaper
- \setlength{\fboxsep}{6pt}\else
- \setlength{\fboxsep}{4pt}\fi
- \raisebox{\depth-\fboxsep}[0pt][0pt]{%
- #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
- {\textcolor{\web@directionIconTextColor}{$\bigl\Downarrow$}}}}%
+\newcommand\ArrowUp[1]{%
+ \normalsize\ifeqforpaper
+ \setlength{\fboxsep}{6pt}\else
+ \setlength{\fboxsep}{4pt}\fi
+ \raisebox{\depth-\fboxsep}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Uparrow$}}}}%
+}
+\newcommand\ArrowDown[1]{%
+ \normalsize\ifeqforpaper
+ \setlength{\fboxsep}{6pt}\else
+ \setlength{\fboxsep}{4pt}\fi
+ \raisebox{\depth-\fboxsep}[0pt][0pt]{%
+ #1{\web@colorbox@w@transparency{\web@directionIconBgColor}%
+ {\textcolor{\web@directionIconTextColor}{$\bigl\Downarrow$}}}}%
}
% \end{macrocode}
% \end{macro}
@@ -2657,25 +2605,25 @@
% Here we offer a simple mechanism for saving and restoring running headers.
% \begin{macrocode}
\newcommand{\clearHeaders}{%
- \let\web@lhead@save\web@lhead
- \let\web@chead@save\web@chead
- \let\web@rightheader@save\web@rightheader
- \let\web@lhead\@empty\let\web@chead\@empty
- \let\web@rightheader\@empty}
+ \let\web@lhead@save\web@lhead
+ \let\web@chead@save\web@chead
+ \let\web@rightheader@save\web@rightheader
+ \let\web@lhead\@empty\let\web@chead\@empty
+ \let\web@rightheader\@empty}
\newcommand{\restoreHeaders}{%
- \let\web@lhead\web@lhead@save
- \let\web@chead\web@chead@save
- \let\web@rightheader\web@rightheader@save}
+ \let\web@lhead\web@lhead@save
+ \let\web@chead\web@chead@save
+ \let\web@rightheader\web@rightheader@save}
\newcommand{\clearFooters}{%
- \let\web@lfoot@save\web@lfoot
- \let\web@cfoot@save\web@cfoot
- \let\web@rfoot@save\web@lfoot
- \let\web@lfoot\@empty\let\web@cfoot\@empty
- \let\web@rfoot\@empty}
+ \let\web@lfoot@save\web@lfoot
+ \let\web@cfoot@save\web@cfoot
+ \let\web@rfoot@save\web@lfoot
+ \let\web@lfoot\@empty\let\web@cfoot\@empty
+ \let\web@rfoot\@empty}
\newcommand{\restoreFooters}{%
- \let\web@lfoot\web@lfoot@save
- \let\web@cfoot\web@cfoot@save
- \let\web@rfoot\web@rfoot@save}
+ \let\web@lfoot\web@lfoot@save
+ \let\web@cfoot\web@cfoot@save
+ \let\web@rfoot\web@rfoot@save}
% \end{macrocode}
% You can use this command to insert additional formatting into the running header.
% For example, \verb!\headerformat{\bfseries\color{red}}!.
@@ -2700,18 +2648,17 @@
\let\webfootwrapper\@empty
\newcommand{\headWrapper}[1]{\def\webheadwrapper##1{#1}}
\newcommand{\footWrapper}[1]{\def\webfootwrapper##1{#1}}
-\newcommand{\ps@webheadings}
-{%
- \renewcommand{\@oddhead}{\webheadwrapper{%
- \normalfont\ifeqforpaper\else\footnotesize\fi
- \web@headerprivate\web@headerhook\web@lhead\hfil\web@chead\hfil
- \web@rightheader}}
- \renewcommand{\@evenhead}{\@oddhead}
- \renewcommand{\@oddfoot}{\webfootwrapper{%
- \normalfont\ifeqforpaper\else\footnotesize\fi
- \web@footerprivate\web@footerhook\web@lfoot\hfil
- \web@cfoot\hfil\web@rfoot}}
- \renewcommand{\@evenfoot}{\@oddfoot}
+\newcommand{\ps@webheadings}{%
+ \renewcommand{\@oddhead}{\webheadwrapper{%
+ \normalfont\ifeqforpaper\else\footnotesize\fi
+ \web@headerprivate\web@headerhook\web@lhead\hfil\web@chead\hfil
+ \web@rightheader}}
+ \renewcommand{\@evenhead}{\@oddhead}
+ \renewcommand{\@oddfoot}{\webfootwrapper{%
+ \normalfont\ifeqforpaper\else\footnotesize\fi
+ \web@footerprivate\web@footerhook\web@lfoot\hfil
+ \web@cfoot\hfil\web@rfoot}}
+ \renewcommand{\@evenfoot}{\@oddfoot}
}
% \end{macrocode}
% \end{macro}
@@ -2719,7 +2666,7 @@
% header
% \begin{macrocode}
\renewcommand{\sectionmark}[1]{%
- \markboth{}{\web@section\ \thesection: #1}}
+ \markboth{}{\web@section\ \thesection: #1}}
% \end{macrocode}
% \begin{macro}{\noHeadersOnSectionPage}
% \begin{macro}{\headersOnSectionPage}
@@ -2739,18 +2686,18 @@
% on the same page as the beginning of a section.
% \begin{macrocode}
\newcommand{\noHeadersOnSectionPage}{%
- \gdef\web@headerpolicy{%
- \expandafter\aeb@gettopmark\topmark{}{}%
- \expandafter\aeb@getbotmark\botmark{}{}%
- \ifx\aeb@topmark\aeb@botmark\rightmark\fi
- }%
+ \gdef\web@headerpolicy{%
+ \expandafter\aeb@gettopmark\topmark{}{}%
+ \expandafter\aeb@getbotmark\botmark{}{}%
+ \ifx\aeb@topmark\aeb@botmark\rightmark\fi
+ }%
}
% \end{macrocode}
% The default is to show no headers on a page with a section in it.
% \begin{macrocode}
\noHeadersOnSectionPage
\newcommand{\headersOnSectionPage}{%
- \gdef\web@headerpolicy{\rightmark}%
+ \gdef\web@headerpolicy{\rightmark}%
}
\def\aeb@gettopmark#1#2{\def\aeb@topmark{#2}}
\def\aeb@getbotmark#1#2{\def\aeb@botmark{#2}}
@@ -2768,10 +2715,10 @@
% \changes{v4.4a}{2012/08/31}{Introduce \string\cs{ifweb@sectioning} switch}
% \begin{macrocode}
\newcommand{\sectionColor}[1]{\def\web@sectionsColorOld{#1}
- \def\aeb@sectioncolor{#1}}
+ \def\aeb@sectioncolor{#1}}
\sectionColor{blue}
\def\web@inputsectiondefs{\InputIfFileExists{websec.def}{}
- {\PackageError{web}{Cannot find the file websec.def}{}}
+ {\PackageError{web}{Cannot find the file websec.def}{}}
}
\ifweb@sectioning\expandafter\web@inputsectiondefs\fi
%</package>
@@ -2780,26 +2727,26 @@
\renewcommand*\thesubsection{\thesection.\arabic{subsection}}
\renewcommand*{\thesubsubsection}{\textbullet}
\renewcommand{\section}{\renewcommand{\@seccntformat}[1]{%
- \@nameuse{the##1}\web@finalDot\enspace}%
- \@startsection{section}{1}{\z@}%
- {-3ex\@plus -1ex \@minus-.2ex}%
- {1ex\@plus .2ex}% 6pt
- {\noindent\normalfont\normalsize\bfseries
- \color{\web@sectionsColorOld}}}%
+ \@nameuse{the##1}\web@finalDot\enspace}%
+ \@startsection{section}{1}{\z@}%
+ {-3ex\@plus -1ex \@minus-.2ex}%
+ {1ex\@plus .2ex}% 6pt
+ {\noindent\normalfont\normalsize\bfseries
+ \color{\web@sectionsColorOld}}}%
\renewcommand{\subsection}{\renewcommand{\@seccntformat}[1]{%
- \@nameuse{the##1}\web@finalDot\enspace}%
- \@startsection{subsection}{2}{\z@}%
- {-2.5ex\@plus -1ex \@minus -.2ex}%
- {1ex\@plus .2ex}%
- {\noindent\normalfont\normalsize\bfseries
- \color{\web@sectionsColorOld}}}
+ \@nameuse{the##1}\web@finalDot\enspace}%
+ \@startsection{subsection}{2}{\z@}%
+ {-2.5ex\@plus -1ex \@minus -.2ex}%
+ {1ex\@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries
+ \color{\web@sectionsColorOld}}}
\renewcommand{\subsubsection}{%
- \renewcommand{\@seccntformat}[1]{\color{\web@sectionsColorOld}\large
- $\bullet$\enspace}%
- \@startsection{subsubsection}{3}{\z@}%
- {-2ex\@plus -1ex \@minus -.2ex}%
- {.5ex\@plus .2ex}%
- {\noindent\normalfont\normalsize\bfseries}}
+ \renewcommand{\@seccntformat}[1]{\color{\web@sectionsColorOld}\large
+ $\bullet$\enspace}%
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}%
+ {.5ex\@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
% \end{macrocode}
% We define our own \cs{part} command, and reserve it as \cs{@webpart}.
% Commands for handing the \cs{part} format. The formatting of
@@ -2808,8 +2755,7 @@
\def\tocPartTitle#1{\def\web@tocPartTitle##1{#1}}
\tocPartTitle{\thepart\hspace{1em}#1}
\newcommand\@webpart{\secdef\web@@part\web@@spart}
-\def\web@@part[#1]#2{%
- \newpage
+\def\web@@part[#1]#2{\newpage
\def\@currentlabelname{#1}%
\ifnum\Hy@secnum@part>\c@secnumdepth
\phantomsection
@@ -2826,14 +2772,13 @@
\@afterheading
}
\def\web@@spart#1{%
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{part*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }{\web@makesparthead{#1}}%
- \nobreak
- \vskip 1ex
- \@afterheading
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{part*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{\hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }{\web@makesparthead{#1}}%
+ \nobreak
+ \vskip 1ex
+ \@afterheading
}
\let\web@save@part\part
\let\part\@webpart
@@ -2846,29 +2791,28 @@
% looks in the document.
% \begin{macrocode}
\newcommand{\formatPartTitle}[1]{%
- \def\web@formatPartTitle##1{#1}}
-\def\web@defaultFormatPartTitle#1{%
- \large\bfseries
- \ifnum \c@secnumdepth >\m@ne
- \partname~\thepart:\space
- \fi#1}
+ \def\web@formatPartTitle##1{#1}}
+\def\web@defaultFormatPartTitle#1{\large\bfseries
+ \ifnum \c@secnumdepth >\m@ne
+ \partname~\thepart:\space
+ \fi#1}
\let\web@formatPartTitle\web@defaultFormatPartTitle
\newcommand{\restorePartTitleFormat}{%
- \let\web@formatPartTitle\web@defaultFormatPartTitle}
+ \let\web@formatPartTitle\web@defaultFormatPartTitle}
\def\noPartNumbers{\formatPartTitle{\large\bfseries##1}%
- \tocPartTitle{##1}}
+ \tocPartTitle{##1}}
\def\web@makeparthead#1{%
- \parindent\z@\raggedright
- \interlinepenalty \@M
- \normalfont
- \web@formatPartTitle{#1}%
- \markboth{}{}\par
+ \parindent\z@\raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \web@formatPartTitle{#1}%
+ \markboth{}{}\par
}
\def\web@makesparthead#1{%
- \parindent\z@\raggedright
- \interlinepenalty \@M
- \normalfont
- \large\bfseries #1\par
+ \parindent\z@\raggedright
+ \interlinepenalty \@M
+ \normalfont
+ \large\bfseries #1\par
}
% \end{macrocode}
% \end{macro}
@@ -2878,94 +2822,91 @@
% Here's the same thing for \cs{chapter}.
% \begin{macrocode}
\@ifundefined{chapter}{}{%
- \newcommand\@webchapter{%
- \global\@topnum\z@
- \@afterindentfalse
- \secdef\web@@chapter\web@@schapter
- }
- \let\web@save@chapter\chapter
- \let\chapter\@webchapter
- \def\web@@chapter[#1]#2{%
- \def\@currentlabelname{#1}%
- \def\Hy@next{%
- \Hy@GlobalStepCount\Hy@linkcounter
- \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
- \Hy@raisedlink{%
- \hyper@anchorstart{\@currentHref}\hyper@anchorend
- }%
- }%
- \ifnum\c@secnumdepth>\m@ne
- \@ifundefined{if@mainmatter}%
- \iftrue{\@nameuse{if@mainmatter}}%
- \let\Hy@next\relax
- \fi
- \fi
- \Hy@next
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \refstepcounter{chapter}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}%
- {\protect\numberline{\thechapter}#1}%
- \else
- \addcontentsline{toc}{chapter}{{}{}#1}%
- \fi
- \else
- \addcontentsline{toc}{chapter}{{}{}#1}%
- \fi
- \chaptermark{#1}%
- \addtocontents{lof}{\protect\addvspace{10\p@}}%
- \addtocontents{lot}{\protect\addvspace{10\p@}}%
- \if@twocolumn
- \@topnewpage[\web@makechapterhead{#2}]%
- \else
- \web@makechapterhead{#2}%
- \@afterheading
- \fi
- }
- \def\web@@schapter#1{%
- \if@twocolumn
- \@topnewpage[\@makeschapterhead{#1}]%
- \else
- \web@makeschapterhead{#1}%
- \@afterheading
- \fi
- }
+ \newcommand\@webchapter{%
+ \global\@topnum\z@
+ \@afterindentfalse
+ \secdef\web@@chapter\web@@schapter
+ }
+ \let\web@save@chapter\chapter
+ \let\chapter\@webchapter
+ \def\web@@chapter[#1]#2{%
+ \def\@currentlabelname{#1}%
+ \def\Hy@next{%
+ \Hy@GlobalStepCount\Hy@linkcounter
+ \xdef\@currentHref{\Hy@chapapp*.\the\Hy@linkcounter}%
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ }%
+ \ifnum\c@secnumdepth>\m@ne
+ \@ifundefined{if@mainmatter}%
+ \iftrue{\@nameuse{if@mainmatter}}%
+ \let\Hy@next\relax
+ \fi
+ \fi
+ \Hy@next
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter
+ \refstepcounter{chapter}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}%
+ {\protect\numberline{\thechapter}#1}%
+ \else
+ \addcontentsline{toc}{chapter}{{}{}#1}%
+ \fi
+ \else
+ \addcontentsline{toc}{chapter}{{}{}#1}%
+ \fi
+ \chaptermark{#1}%
+ \addtocontents{lof}{\protect\addvspace{10\p@}}%
+ \addtocontents{lot}{\protect\addvspace{10\p@}}%
+ \if@twocolumn
+ \@topnewpage[\web@makechapterhead{#2}]%
+ \else
+ \web@makechapterhead{#2}%
+ \@afterheading
+ \fi
+ }
+ \def\web@@schapter#1{%
+ \if@twocolumn
+ \@topnewpage[\@makeschapterhead{#1}]%
+ \else
+ \web@makeschapterhead{#1}%
+ \@afterheading
+ \fi
+ }
% \end{macrocode}
% \begin{macro}{\web@makechapterhead}
% \begin{macro}{\web@makeschapterhead}
% These commands can be redefined to format who the part text
% looks in the document.
% \begin{macrocode}
- \long\def\formatChapterNumber#1{\def\web@formatChapterNumber{#1}}
- \formatChapterNumber{\large\bfseries
- \@chapapp\space\thechapter\par\nobreak}
- \long\def\formatChapterTitle#1{\def\web@formatChapterTitle##1{#1}}
- \formatChapterTitle{%
- \interlinepenalty\@M
- \noindent\hspace{1em}\large\bfseries#1\par\nobreak
- }
- \def\web@makechapterhead#1{%
- \vspace{3\p@}{%
- \parindent\z@ \raggedright \normalfont
- \ifnum \c@secnumdepth >\m@ne
- \if@mainmatter
- \web@formatChapterNumber
- \fi
- \fi
- \web@formatChapterTitle{#1}%
- \vskip 12\p@
- }%
- }
- \def\web@makeschapterhead#1{%
- \vspace{3\p@}{%
- \parindent\z@\raggedright
- \normalfont
- \interlinepenalty\@M
- \large\bfseries #1\par\nobreak
- \vskip 12\p@
- }%
- }
+ \long\def\formatChapterNumber#1{\def\web@formatChapterNumber{#1}}
+ \formatChapterNumber{\large\bfseries
+ \@chapapp\space\thechapter\par\nobreak}
+ \long\def\formatChapterTitle#1{\def\web@formatChapterTitle##1{#1}}
+ \formatChapterTitle{%
+ \interlinepenalty\@M
+ \noindent\hspace{1em}\large\bfseries#1\par\nobreak
+ }
+ \def\web@makechapterhead#1{%
+ \vspace{3\p@}{%
+ \parindent\z@ \raggedright \normalfont
+ \ifnum \c@secnumdepth >\m@ne
+ \if@mainmatter\web@formatChapterNumber\fi
+ \fi
+ \web@formatChapterTitle{#1}\vskip 12\p@
+ }%
+ }
+ \def\web@makeschapterhead#1{%
+ \vspace{3\p@}{%
+ \parindent\z@\raggedright
+ \normalfont
+ \interlinepenalty\@M
+ \large\bfseries #1\par\nobreak
+ \vskip 12\p@
+ }%
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2976,16 +2917,14 @@
% \end{macrocode}
% \begin{macrocode}
\def\aebwritelastpage{%
- \immediate\write\@auxout{%
-% \string\expandafter\string\gdef
-% \string\csname\space aebLastPage\string\endcsname{\arabic{page}}}%
- \string\w@csarg\string\gdef{aebLastPage}{\arabic{page}}}%
+ \immediate\write\@auxout{%
+ \string\w@csarg\string\gdef{aebLastPage}{\arabic{page}}}%
}
% \end{macrocode}
% \begin{macrocode}
\AtEndDocument{%
- \clearpage\addtocounter{page}{-1}\aebwritelastpage
- \addtocounter{page}{1}}
+ \clearpage\addtocounter{page}{-1}\aebwritelastpage
+ \addtocounter{page}{1}}
% \end{macrocode}
% \subsection{\texorpdfstring{\protect\cs{useFullWidthForPaper}}{\CMD{useFullWidthForPaper}}}
%
@@ -3011,12 +2950,12 @@
\def\useFullWidthForPaper{\ifeqforpaper
\setlength{\textwidth}{\paperwidth-2in}
\setlength{\textheight}
- {\paperheight-2in-\footskip-\topmargin-\headheight-\headsep}
+ {\paperheight-2in-\footskip-\topmargin-\headheight-\headsep}
\oddsidemargin=0pt
\evensidemargin=0pt
\marginparsep=0pt
\marginparwidth=0pt
- \fi
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -3025,23 +2964,24 @@
% option is used, and the \texttt{templatesforpaper} option is not taken.
% \begin{macrocode}
\def\maxtextscreentext{%
- \iftemplatesforpaper\else\ifeqforpaper
- \ifnum\@usetemplates=1
- \ifnum\@panelconfig=1 % left panel
- \setlength{\oddsidemargin}%
- {\@panelwidth+\@panelsep-1in}%
- \setlength{\textwidth}%
- {\paperwidth-\@panelwidth-\@panelsep-%
- \marginparwidth-\marginparsep}%
- \else\ifnum\@panelconfig=2 % right panel
- \setlength{\oddsidemargin}{0in}%
- \setlength{\textwidth}%
- {\paperwidth-\@panelwidth-\@panelsep-%
- \oddsidemargin-\marginparwidth-\marginparsep}%
- \else
- \useFullWidthForPaper
- \fi\fi\fi
- \fi\fi
+ \iftemplatesforpaper\else\ifeqforpaper
+ \ifnum\@usetemplates=\@ne
+ \ifnum\@panelconfig=\@ne % left panel
+ \setlength{\oddsidemargin}%
+ {\@panelwidth+\@panelsep-1in}%
+ \setlength{\textwidth}%
+ {\paperwidth-\@panelwidth-\@panelsep-%
+ \marginparwidth-\marginparsep}%
+ \else
+ \ifnum\@panelconfig=\tw@ % right panel
+ \setlength{\oddsidemargin}{0in}%
+ \setlength{\textwidth}%
+ {\paperwidth-\@panelwidth-\@panelsep-%
+ \oddsidemargin-\marginparwidth-\marginparsep}%
+ \else
+ \useFullWidthForPaper
+ \fi\fi\fi
+ \fi\fi
}
% \end{macrocode}
%
@@ -3053,11 +2993,11 @@
% \changes{v4.4}{2012/08/26}{Added the command \string\cs{centertextonpage}}
% \begin{macrocode}
\newcommand{\centertextonpage}{%
- \ifeqforpaper\AtBeginDocument{\web@centertextonpage}\fi}
+ \ifeqforpaper\AtBeginDocument{\web@centertextonpage}\fi}
\def\web@centertextonpage{%
- \setlength{\oddsidemargin}{\paperwidth-\textwidth-2in}%
- \oddsidemargin=.5\oddsidemargin
- \evensidemargin=\oddsidemargin
+ \setlength{\oddsidemargin}{\paperwidth-\textwidth-2in}%
+ \oddsidemargin=.5\oddsidemargin
+ \evensidemargin=\oddsidemargin
}
% \end{macrocode}
% \end{macro}
@@ -3098,13 +3038,15 @@
% If the user asks for the \texttt{latextoc} option, but wants bullets, we
% adjust things so the bullets look good.
% \begin{macrocode}
-\ifx\web@latextoc\web@YES\ifx\web@bullets\web@YES%
+\ifx\web@latextoc\web@YES
+ \ifx\web@bullets\web@YES
\@ifundefined{chapter} {%
- \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
+ \renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{1.2em}}
}{%
- \renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{1.2em}}
+ \renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{1.2em}}
}%
-\fi\fi
+ \fi
+\fi
% \end{macrocode}
% \begin{macrocode}
\def\tocColor#1{\def\web@tocColor{#1}\def\aeb@toccolor{#1}}
@@ -3122,59 +3064,58 @@
\def\web@Tocpagestyle#1{#1}
\let\web@latextoc@save\tableofcontents
\ifx\web@bullets\web@YES
-\def\tableofcontents
-{%
- \global\let\insertwebtoc\insert@webtoc
+ \def\tableofcontents{\global
+ \let\insertwebtoc\insert@webtoc
\def\contentsname{\web@toc}%
\pdfbookmark[1]{\web@toc}{toc}%
- \web@Tocpagestyle{\thispagestyle{empty}}%
- \markright{{\normalfont\small \web@toc\ (\web@continued)}}%
- \@ifundefined{sectionToc}{%
- \begin{center}\hypertarget{webtoc}{}%
- \normalfont\bfseries\Large\color{\web@tocColor}%
- \contentsname
- \end{center}
- }{\sectionToc{\web@toc}}\par
+ \web@Tocpagestyle{\thispagestyle{empty}}%
+ \markright{{\normalfont\small \web@toc\ (\web@continued)}}%
+ \@ifundefined{sectionToc}{%
+ \begin{center}\hypertarget{webtoc}{}%
+ \normalfont\bfseries\Large\color{\web@tocColor}%
+ \contentsname
+ \end{center}
+ }{\sectionToc{\web@toc}}\par
\ifx\web@latextoc\web@YES
- \@starttoc{toc}% LaTeX toc listing with page numbers
+ \@starttoc{toc}% LaTeX toc listing with page numbers
\else
- \noindent\webtableofcontents
+ \noindent\webtableofcontents
\fi
\newpage
-}
+ }
\else
- \PackageInfo{web}{No Bullets Requested}
- \def\tableofcontents{%
- \begingroup
- \def\contentsname{\web@toc}%
- \let\web@save@mkboth\@mkboth
- \def\@mkboth{\protect\hypertarget{webtoc}{}\web@save@mkboth}%
- \ifx\web@finalDot\@empty\else
- \def\numberline##1{\hb@xt@\@tempdima{##1.\hfil}}\fi
- \web@latextoc@save
- \endgroup\newpage
- }
- \renewcommand\subsubsection{\renewcommand{\@seccntformat}[1]{%
- \@nameuse{the##1}\web@finalDot\enspace}
- \@startsection{subsubsection}{3}{\z@}%
- {-2ex\@plus -1ex \@minus -.2ex}{.5ex \@plus .2ex}%
- {\noindent\normalfont\normalsize\bfseries}}
- \renewcommand*{\thesubsubsection}
- {\thesubsection.\arabic{subsubsection}}
+ \PackageInfo{web}{No Bullets Requested}
+ \def\tableofcontents{%
+ \begingroup
+ \def\contentsname{\web@toc}%
+ \let\web@save@mkboth\@mkboth
+ \def\@mkboth{\protect\hypertarget{webtoc}{}\web@save@mkboth}%
+ \ifx\web@finalDot\@empty\else
+ \def\numberline##1{\hb@xt@\@tempdima{##1.\hfil}}\fi
+ \web@latextoc@save
+ \endgroup
+ \newpage
+ }
+ \renewcommand\subsubsection{\renewcommand{\@seccntformat}[1]{%
+ \@nameuse{the##1}\web@finalDot\enspace}
+ \@startsection{subsubsection}{3}{\z@}%
+ {-2ex\@plus -1ex \@minus -.2ex}{.5ex \@plus .2ex}%
+ {\noindent\normalfont\normalsize\bfseries}}
+ \renewcommand*{\thesubsubsection}
+ {\thesubsection.\arabic{subsubsection}}
\fi
% \end{macrocode}
% \DescribeMacro{\widestNumber}\DescribeMacro{\tocIndent}
% \DescribeMacro{\tocIndentByNumber} These are used for
% setting the amount of indentation for the \cs{webtableofcontents}
% \begin{macrocode}
-\def\widestNumber#1{%
- \def\widest@Number{#1\ }}
+\def\widestNumber#1{\def\widest@Number{#1\ }}
\widestNumber{0.0.}
\newcommand{\tocIndent}[1]{\def\toc@indent{#1}}
\tocIndent{20pt}
\def\tocIndentByNumber#1{{%
- \settowidth{\@tempdima}{\normalfont\textbf{#1\ }}%
- \xdef\toc@indent{\the\@tempdima}%
+ \settowidth{\@tempdima}{\normalfont\textbf{#1\ }}%
+ \xdef\toc@indent{\the\@tempdima}%
}}
\tocIndentByNumber{00.}
% \end{macrocode}
@@ -3186,21 +3127,20 @@
% \DescribeMacro{\webtableofcontents} is the table of contents for
% the \texttt{web} package.
% \begin{macrocode}
-\def\webtableofcontents
-{%
- \begingroup
+\def\webtableofcontents{%
+ \begingroup
% \end{macrocode}
% Sample line from .aux
%\begin{verbatim}
-% \contentsline {section}{\numberline {1}Introduction}{4}{section.1}
-% \contentsline {section}{\numberline {}References}{56}{section*.1}
+% \contentsline {section}{\numberline {1}Introduction}{4}{section.1}
+% \contentsline {section}{\numberline {}References}{56}{section*.1}
% #1 #2 #3
%\end{verbatim}
% \begin{macrocode}
\global\let\isChapter\web@NO
\parskip0pt\parindent\toc@indent\relax
\settowidth{\@tempdima}{\normalfont
- \textbf{\widest@Number}}%
+ \textbf{\widest@Number}}%
\@tempdimb\@tempdima
\advance\@tempdimb by\parindent
\edef\web@subsubSecIndent{\the\@tempdimb}%
@@ -3208,19 +3148,20 @@
\let\numberline\web@numberline
\let\contentsline\web@contentsline
\def\web@section##1##2##3{\web@parse##1\\%
- \web@toc@section{##1}{##2}{##3}}%
+ \web@toc@section{##1}{##2}{##3}}%
\def\web@subsection##1##2##3{\web@parse##1\\%
- \web@toc@subsection{##1}{##2}{##3}}%
+ \web@toc@subsection{##1}{##2}{##3}}%
\def\web@subsubsection##1##2##3{\web@parse##1\\%
- \web@toc@subsubsection{##1}{##2}{##3}}%
+ \web@toc@subsubsection{##1}{##2}{##3}}%
\def\web@part##1##2##3{\web@toc@part{##1}{##2}{##3}}%
\def\web@chapter##1##2##3{\web@parse##1\\%
- \web@toc@chapter{##1}{##2}{##3}}%
+ \web@toc@chapter{##1}{##2}{##3}}%
\@starttoc{toc}%
\setlength{\@tempdimb}{\ifx\isChapter\web@YES
- \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
+ \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
\leftskip\@tempdimb
- \par\endgroup
+ \par
+ \endgroup
}
% \end{macrocode}
% \begin{macro}{\web@toc@part}
@@ -3234,85 +3175,72 @@
% \begin{macrocode}
\def\web@numberline#1{\makebox[0pt]{#1\enspace}}%
\def\web@contentsline#1#2#3#4{%
- \@nameuse{web@#1}{#2}{#3}{#4}}%
+ \@nameuse{web@#1}{#2}{#3}{#4}}%
\def\web@parse#1#2#3\\{%
- \def\web@title{#3}\def\numberline{#2}}%
+ \def\web@title{#3}\def\numberline{#2}}%
\def\web@toc@part#1#2#3{\par\noindent
- {\bfseries\hyperlink{#3}{#1}}\par\smallskip}
+ {\bfseries\hyperlink{#3}{#1}}\par\smallskip}
\def\web@toc@chapter#1#2#3{\global\let\isChapter\web@YES
- \par\mbox{}{\bfseries
- \ifx\numberline\@empty
- \@ifundefined{d@DingToc}{\hyperlink{#3}{\web@title}}
- {%
- \ifx\d@DingToc\@empty
- \hyperlink{#3}{\web@title}%
- \else
- \if\aeb@use@section@numbers0\relax
- \makebox[0pt][r]{\color{\d@DingTocColor}%
- \d@DingToc\space}\hyperlink{#3}{\web@title}%
- \else
- \hyperlink{#3}{\web@title}%
- \fi
- \fi
- }%
+ \par\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{d@DingToc}{\hyperlink{#3}{\web@title}}{%
+ \ifx\d@DingToc\@empty
+ \hyperlink{#3}{\web@title}%
\else
- \makebox[0pt][r]{\hyperlink{#3}{%
- \numberline\web@finalDot}\space}\web@title
- \fi}\par\smallskip
+ \if\aeb@use@section@numbers\web@Zero
+ \makebox[0pt][r]{\color{\d@DingTocColor}%
+ \d@DingToc\space}\hyperlink{#3}{\web@title}\else
+ \hyperlink{#3}{\web@title}\fi
+ \fi
+ }%
+ \else
+ \makebox[0pt][r]{\hyperlink{#3}{%
+ \numberline\web@finalDot}\space}\web@title
+ \fi}\par\smallskip
}
-%\def\web@toc@chapter#1#2#3{\global\let\isChapter\web@YES
-% \par\mbox{}{\bfseries\makebox[0pt][r]{\hyperlink{#3}%
-% {\numberline\web@finalDot}\space}\web@title}\par\smallskip
-%}
\def\web@toc@section#1#2#3{\penalty-500\par
- \hspace*{\if\isChapter y\parindent\else0pt\fi}\mbox{}{\bfseries
- \ifx\numberline\@empty
- \@ifundefined{d@DingToc}{\hyperlink{#3}{\web@title}}
- {%
- \ifx\d@DingToc\@empty
- \hyperlink{#3}{\web@title}%
- \else
- \if\aeb@use@section@numbers0\relax
- \makebox[0pt][r]{\color{\d@DingTocColor}%
- \d@DingToc\space}\hyperlink{#3}{\web@title}%
- \else
- \hyperlink{#3}{\web@title}%
- \fi
- \fi
- }%
- \else
- \makebox[0pt][r]{\hyperlink{#3}{%
- \numberline\web@finalDot}\space}\web@title
- \fi}\endgraf
+ \hspace*{\if\isChapter y\parindent\else0pt\fi}\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{d@DingToc}{\hyperlink{#3}{\web@title}}{%
+ \ifx\d@DingToc\@empty
+ \hyperlink{#3}{\web@title}%
+ \else
+ \if\aeb@use@section@numbers\web@Zero
+ \makebox[0pt][r]{\color{\d@DingTocColor}%
+ \d@DingToc\space}\hyperlink{#3}{\web@title}\else
+ \hyperlink{#3}{\web@title}\fi
+ \fi
+ }%
+ \else
+ \makebox[0pt][r]{\hyperlink{#3}{%
+ \numberline\web@finalDot}\space}\web@title
+ \fi}\endgraf
}%
\def\web@toc@subsection#1#2#3{\par
- \setlength{\@tempdimb}{\ifx\isChapter\web@YES
- \parindent+\@tempdima\else\@tempdima\fi}%
- \penalty-50 \hspace*{\@tempdimb}\mbox{}{\bfseries
- \ifx\numberline\@empty
- \@ifundefined{dd@DingToc}{\hyperlink{#3}{\web@title}}
- {%
- \ifx\dd@DingToc\@empty
- \hyperlink{#3}{\web@title}%
- \else
- \makebox[0pt][r]{\color{\dd@DingTocColor}%
- \dd@DingToc\space}\hyperlink{#3}{\web@title}%
- \fi
- }%
- \else
- \makebox[0pt][r]{\makebox[\@tempdima][l]%
- {\hyperlink{#3}{\numberline\web@finalDot}}}\web@title
- \fi}\endgraf
-}%
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\@tempdima\else\@tempdima\fi}%
+ \penalty-50 \hspace*{\@tempdimb}\mbox{}{\bfseries
+ \ifx\numberline\@empty
+ \@ifundefined{dd@DingToc}{\hyperlink{#3}{\web@title}}{%
+ \ifx\dd@DingToc\@empty
+ \hyperlink{#3}{\web@title}\else
+ \makebox[0pt][r]{\color{\dd@DingTocColor}%
+ \dd@DingToc\space}\hyperlink{#3}{\web@title}\fi
+ }%
+ \else
+ \makebox[0pt][r]{\makebox[\@tempdima][l]%
+ {\hyperlink{#3}{\numberline\web@finalDot}}}\web@title
+ \fi}\endgraf
+}
\def\web@toc@subsubsection#1#2#3{%
- \def\numberline{\strut$\bullet$}%
- \setlength{\@tempdimb}{\ifx\isChapter\web@YES
- \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
- \leftskip\@tempdimb\noindent\unskip\mbox{}\penalty-50
- \@ifundefined{ddd@DingToc}{}{%
- \if\aeb@use@section@numbers0\relax\ifx\ddd@DingToc\@empty\else
+ \def\numberline{\strut$\bullet$}%
+ \setlength{\@tempdimb}{\ifx\isChapter\web@YES
+ \parindent+\web@subsubSecIndent\else\web@subsubSecIndent\fi}%
+ \leftskip\@tempdimb\noindent\unskip\mbox{}\penalty-50
+ \@ifundefined{ddd@DingToc}{}{%
+ \if\aeb@use@section@numbers\web@Zero\ifx\ddd@DingToc\@empty\else
\def\numberline{\color{\ddd@DingTocColor}\strut\ddd@DingToc}%
-\fi\fi}\hyperlink{#3}{\numberline}~\web@title\
+ \fi\fi}\hyperlink{#3}{\numberline}~\web@title\
}%
% \end{macrocode}
% \end{macro}
@@ -3362,14 +3290,12 @@
% background. The command \cs{template} defines \cs{web@template}, which is a text macro
% that actually holds the name of the current graphic.
% \begin{macrocode}
-\newcommand{\template}[2][]
-{%
- \ifweb@allowtemplates
- \def\web@argi{#1}\ifx\web@argi\@empty
- \xdef\web@template@opt@args{\web@addtotemplateArgs}%
- \else\xdef\web@template@opt@args{\web@addtotemplateArgs,#1}%
- \fi\gdef\web@template{#2}%
- \fi
+\newcommand{\template}[2][]{%
+ \ifweb@allowtemplates
+ \def\web@argi{#1}\ifx\web@argi\@empty
+ \xdef\web@template@opt@args{\web@addtotemplateArgs}\else
+ \xdef\web@template@opt@args{\web@addtotemplateArgs,#1}\fi
+ \gdef\web@template{#2}\fi
}
% \end{macrocode}
% The text macro \cs{web@template} holds the name of the current graphic. It starts off as
@@ -3408,36 +3334,34 @@
% background.
% \begin{macrocode}
\let\listAddToTemplates\@empty
-\newcommand{\AddToTemplate}[1]
-{%
- \global\w@csarg\let{eqTmpl#1}\web@YES
- {\toks@=\expandafter{\listAddToTemplates}%
- \xdef\listAddToTemplates{\the\toks@\noexpand\\{#1}}}%
- \ifweb@allowtemplates
- \@AddToTextTemplate{%
+\newcommand{\AddToTemplate}[1]{%
+ \global\w@csarg\let{eqTmpl#1}\web@YES
+ {\toks@=\expandafter{\listAddToTemplates}%
+ \xdef\listAddToTemplates{\the\toks@\noexpand\\{#1}}}%
+ \ifweb@allowtemplates
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
+ \fi
+ }%
+ \else
+ \w@csarg\ifx{#1}\BGColorAndGraphic
+ \@AddToTextTemplate{%
\w@csarg\ifx{eqTmpl#1}\web@YES
- \fboxsep=0pt\setlength{\unitlength}{1pt}%
- \put(\@textX,0){\@nameuse{#1}}%
- \fi
- }%
- \else
- \w@csarg\ifx{#1}\BGColorAndGraphic
- \@AddToTextTemplate{%
- \w@csarg\ifx{eqTmpl#1}\web@YES
- \fboxsep=0pt\setlength{\unitlength}{1pt}%
- \put(\@textX,0){\@nameuse{#1}}%
- \fi
- }%
- \fi
- \w@csarg\ifx{#1}\BGColorAndGraphicFullWidth
- \@AddToTextTemplate{%
- \w@csarg\ifx{eqTmpl#1}\web@YES
- \fboxsep=0pt\setlength{\unitlength}{1pt}%
- \put(\@textX,0){\@nameuse{#1}}%
- \fi
- }%
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}%
\fi
+ }%
+ \fi
+ \w@csarg\ifx{#1}\BGColorAndGraphicFullWidth
+ \@AddToTextTemplate{%
+ \w@csarg\ifx{eqTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@textX,0){\@nameuse{#1}}\fi
+ }%
\fi
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -3454,15 +3378,15 @@
% passing the empty argument (\verb~{}~) yields the default for \cs{xBld}.
% \begin{macrocode}
\newcommand\placeTemplateInLayer[2][webTextBG]{%
- \@ifpackageloaded{aeb_pro}
- {\@ifundefined{xBld}{\PackageWarning{web}
- {The uselayers option
- of aeb_pro is\MessageBreak required with
- \string\placeTemplateInLayer}}
- {\def\b@webTextLayer{\xBld[#2]{#1}}%
- \def\e@webTextLayer{\eBld}}}%
- {\PackageWarning{web}{\string\placeTemplateInLayer\space
- requires the\MessageBreak aeb_pro package}}%
+ \@ifpackageloaded{aeb_pro}
+ {\@ifundefined{xBld}{\PackageWarning{web}
+ {The uselayers option
+ of aeb_pro is\MessageBreak required with
+ \string\placeTemplateInLayer}}
+ {\def\b@webTextLayer{\xBld[#2]{#1}}%
+ \def\e@webTextLayer{\eBld}}}%
+ {\PackageWarning{web}{\string\placeTemplateInLayer\space
+ requires the\MessageBreak aeb_pro package}}%
}
\let\b@webTextLayer\@empty \let\e@webTextLayer\@empty
\newcommand{\BGColorAndGraphic}{%
@@ -3471,20 +3395,20 @@
% up the first argument of the \cs{colorbox}, which is the color. This is what \cs{gobblembox}
% does, it gobbles up the next token, and inserts a \cs{mbox}.
% \begin{macrocode}
- \b@webTextLayer\web@colorbox@w@transparency{\web@textBgColor}%
+ \b@webTextLayer\web@colorbox@w@transparency{\web@textBgColor}%
+ {%
+ \parbox[b][\paperheight]{\textscreenwidth}%
{%
- \parbox[b][\paperheight]{\textscreenwidth}%
- {%
- \ifx\web@template\@empty
- \hfill\vfill
- \else
- \hfuzz=1pt\vfuzz=1pt\expandafter
- \includegraphics\expandafter[\web@template@opt@args,%
- width=\textscreenwidth,height=\paperheight]%
- {\web@template}
- \fi
- }%
- }\e@webTextLayer
+ \ifx\web@template\@empty
+ \hfill\vfill
+ \else
+ \hfuzz=1pt\vfuzz=1pt\expandafter
+ \includegraphics\expandafter[\web@template@opt@args,%
+ width=\textscreenwidth,height=\paperheight]%
+ {\web@template}
+ \fi
+ }%
+ }\e@webTextLayer
}
% \end{macrocode}
% \end{macro}
@@ -3509,33 +3433,32 @@
% background.
% \begin{macrocode}
\let\listAddToPanelTemplates=\@empty
-\newcommand{\AddToPanelTemplate}[1]
-{%
- \global\w@csarg\let{eqPanTmpl#1}\web@YES
- {\toks@=\expandafter{\listAddToPanelTemplates}%
- \xdef\listAddToPanelTemplates{\the\toks@\noexpand\\{#1}}}%
- \ifweb@allowtemplates
+\newcommand{\AddToPanelTemplate}[1]{%
+ \global\w@csarg\let{eqPanTmpl#1}\web@YES
+ {\toks@=\expandafter{\listAddToPanelTemplates}%
+ \xdef\listAddToPanelTemplates{\the\toks@\noexpand\\{#1}}}%
+ \ifweb@allowtemplates
\@AddToPanelTemplate{%
\w@csarg\ifx{eqPanTmpl#1}\web@YES
\fboxsep=0pt\setlength{\unitlength}{1pt}%
\put(\@panelX,0){\@nameuse{#1}}\fi
}%
- \else
- \w@csarg\ifx{#1}\stdPanelBG
- \@AddToPanelTemplate{%
- \w@csarg\ifx{eqPanTmpl#1}\web@YES
- \fboxsep=0pt\setlength{\unitlength}{1pt}%
- \put(\@panelX,0){\@nameuse{#1}}\fi
- }%
- \fi
- \w@csarg\ifx{#1}\stdbldpanel
- \@AddToPanelTemplate{%
- \w@csarg\ifx{eqPanTmpl#1}\web@YES
- \fboxsep=0pt\setlength{\unitlength}{1pt}%
- \put(\@panelX,0){\@nameuse{#1}}\fi
- }%
- \fi
+ \else
+ \w@csarg\ifx{#1}\stdPanelBG
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
+ \fi
+ \w@csarg\ifx{#1}\stdbldpanel
+ \@AddToPanelTemplate{%
+ \w@csarg\ifx{eqPanTmpl#1}\web@YES
+ \fboxsep=0pt\setlength{\unitlength}{1pt}%
+ \put(\@panelX,0){\@nameuse{#1}}\fi
+ }%
\fi
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -3545,17 +3468,15 @@
% case, we use \texttt{natwidth} and \texttt{natheight} as the width and height parameters
% in \cs{includegraphics}.
% \begin{macrocode}
-\newcommand{\paneltemplate}[2][]
-{%
- \ifweb@allowtemplates\def\web@argi{#1}%
- \ifx\web@argi\@empty
- \edef\web@paneltemplate@opt@args{%
- \web@addtopaneltemplateArgs}%
- \else
- \edef\web@paneltemplate@opt@args{%
- \web@addtopaneltemplateArgs,#1}%
- \fi\gdef\web@paneltemplate{#2}%
- \fi
+\newcommand{\paneltemplate}[2][]{%
+ \ifweb@allowtemplates\def\web@argi{#1}%
+ \ifx\web@argi\@empty
+ \edef\web@paneltemplate@opt@args
+ {\web@addtopaneltemplateArgs}\else
+ \edef\web@paneltemplate@opt@args
+ {\web@addtopaneltemplateArgs,#1}\fi
+ \gdef\web@paneltemplate{#2}%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -3570,7 +3491,7 @@
% \begin{macrocode}
\def\addtopaneltemplateArgs#1{\gdef\web@addtopaneltemplateArgs{#1}}
\def\clearpaneltemplateArgs{%
- \global\let\web@addtopaneltemplateArgs=\@empty}
+ \global\let\web@addtopaneltemplateArgs=\@empty}
\let\web@addtopaneltemplateArgs=\@empty
\let\panel@scaletype\@empty
% \end{macrocode}
@@ -3581,9 +3502,8 @@
% Use this command to override the default.
% \begin{macrocode}
\newcommand\panelsep[1]{\bgroup
- \setlength\@tempdima{#1}%
- \xdef\@panelsep{\the\@tempdima}\egroup}
-%\def\@panelsep{10bp}
+ \setlength\@tempdima{#1}%
+ \xdef\@panelsep{\the\@tempdima}\egroup}
\panelsep{10bp}
\def\panelSep{\@panelsep}
% \end{macrocode}
@@ -3595,44 +3515,44 @@
% |\panelwidth{1in}|
% \begin{macrocode}
\newcommand{\panelwidth}[1]{%
- \let\web@next\relax
- \iftemplatesforpaper\else\ifnum\@panelconfig>0
+ \let\web@next\relax
+ \iftemplatesforpaper\else\ifnum\@panelconfig>\z@
% \end{macrocode}
% (2013/09/13) This command only has effect if there is a panel option and if the \cs{templates\-for\-paper}
% option is not in effect.
% \begin{macrocode}
- \ifnum\@panelconfig=1 % left panel
+ \ifnum\@panelconfig=\@ne % left panel
% \end{macrocode}
% (2013/09/13) One of the problems that I've just overcome it with the \cs{panelwidth} command.
% there was always problems about changing the widths of the panel. The solutions is to
% reverse the current effects of the last \cs{InitLayout} before calling \cs{InitLayout}
% with the new panel width. Seems to work. We do this for the left panel and the right panel.
% \begin{macrocode}
- \ifx\web@layout\web@YES
- \addtolength{\textwidth}{\@panelwidth}%
- \addtolength{\textwidth}{\@Rightmargin}%
- \fi
- \addtolength{\textwidth}{\@panelsep}%
- \addtolength{\oddsidemargin}{-\@panelsep}%
- \addtolength{\evensidemargin}{-\@panelsep}%
- \addtolength{\textscreenwidth}{\@panelwidth}%
- \fi
- \ifnum\@panelconfig=2 % panel right
- \ifx\web@layout\web@YES
- \addtolength{\textwidth}{\@panelwidth}%
- \addtolength{\textwidth}{\@Leftmargin}%
- \fi
- \addtolength{\textwidth}{\@panelsep}%
- \addtolength{\textscreenwidth}{\@panelwidth}%
- \fi
+ \ifx\web@layout\web@YES
+ \addtolength{\textwidth}{\@panelwidth}%
+ \addtolength{\textwidth}{\@Rightmargin}%
+ \fi
+ \addtolength{\textwidth}{\@panelsep}%
+ \addtolength{\oddsidemargin}{-\@panelsep}%
+ \addtolength{\evensidemargin}{-\@panelsep}%
+ \addtolength{\textscreenwidth}{\@panelwidth}%
+ \fi
+ \ifnum\@panelconfig=\tw@ % panel right
+ \ifx\web@layout\web@YES
+ \addtolength{\textwidth}{\@panelwidth}%
+ \addtolength{\textwidth}{\@Leftmargin}%
+ \fi
+ \addtolength{\textwidth}{\@panelsep}%
+ \addtolength{\textscreenwidth}{\@panelwidth}%
+ \fi
% \end{macrocode}
% Now record the new panel width and call \cs{InitLayout}
% \begin{macrocode}
- \setlength{\@panelwidth}{#1}%
- \ifdim\@panelwidth<\web@minpanelwidth
- \setlength{\@panelwidth}{\web@minpanelwidth}\fi
- \def\web@next{\InitLayout}%
- \fi\fi\web@next
+ \setlength{\@panelwidth}{#1}%
+ \ifdim\@panelwidth<\web@minpanelwidth
+ \setlength{\@panelwidth}{\web@minpanelwidth}\fi
+ \def\web@next{\InitLayout}%
+ \fi\fi\web@next
}
% \end{macrocode}
% \end{macro}
@@ -3647,26 +3567,25 @@
% need for a background color.
% \begin{macrocode}
\newcommand\placePanelTemplateInLayer[2][webPanelBG]{%
- \@ifpackageloaded{aeb_pro}
- {\@ifundefined{xBld}{\PackageWarning{web}
- {The uselayers option
- of aeb_pro is\MessageBreak required with
- \string\placePanelTemplateInLayer}}
- {\def\b@webPanelLayer{\xBld[#2]{#1}}%
- \def\e@webPanelLayer{\eBld}}}%
- {\PackageWarning{web}{\string\placePanelTemplateInLayer\space
- requires the\MessageBreak aeb_pro package}}%
+ \@ifpackageloaded{aeb_pro}
+ {\@ifundefined{xBld}{\PackageWarning{web}
+ {The uselayers option
+ of aeb_pro is\MessageBreak required with
+ \string\placePanelTemplateInLayer}}
+ {\def\b@webPanelLayer{\xBld[#2]{#1}}%
+ \def\e@webPanelLayer{\eBld}}}%
+ {\PackageWarning{web}{\string\placePanelTemplateInLayer\space
+ requires the\MessageBreak aeb_pro package}}%
}
\let\b@webPanelLayer\@empty \let\e@webPanelLayer\@empty
-\newcommand\stdPanelBG
-{%
- \b@webPanelLayer\web@colorbox@w@transparency{\web@panelBgColor}%
- {\parbox[b][\paperheight]{\@panelwidth}%
- {\ifx\web@paneltemplate\@empty\hfill\vfill\else
- \hfuzz=1pt\vfuzz=1pt\expandafter
- \includegraphics\expandafter[\web@paneltemplate@opt@args,%
- width=\@panelwidth,height=\paperheight]%
- {\web@paneltemplate}\fi}}\e@webPanelLayer
+\newcommand\stdPanelBG{%
+ \b@webPanelLayer\web@colorbox@w@transparency{\web@panelBgColor}%
+ {\parbox[b][\paperheight]{\@panelwidth}%
+ {\ifx\web@paneltemplate\@empty\hfill\vfill\else
+ \hfuzz=1pt\vfuzz=1pt\expandafter
+ \includegraphics\expandafter[\web@paneltemplate@opt@args,%
+ width=\@panelwidth,height=\paperheight]%
+ {\web@paneltemplate}\fi}}\e@webPanelLayer
}
% \end{macrocode}
% Enter \cs{stdPanelBG} into the panel template stack. Any
@@ -3683,19 +3602,16 @@
% The \cs{stdbldpanel} is the macro that actually builds the objects on top of the
% background.
% \begin{macrocode}
-\newcommand{\buildpanel}[1]
-{%
- \gdef\stdbldpanel
- {%
- \parbox[b][\paperheight]{\@panelwidth}%
- {%
- \normalsfcodes\normalfont\normalsize
- \spaceskip=0pt\xspaceskip=0pt
- \par\medskip\vfil
- \centering#1%
- \par\medskip\vfil
- }%
+\newcommand{\buildpanel}[1]{%
+ \gdef\stdbldpanel{%
+ \parbox[b][\paperheight]{\@panelwidth}{%
+ \normalsfcodes\normalfont\normalsize
+ \spaceskip=0pt\xspaceskip=0pt
+ \par\medskip\vfil
+ \centering#1%
+ \par\medskip\vfil
}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -3711,13 +3627,13 @@
% top (for logo); middle (for other content); bottom (for navigation panel)
% \begin{macrocode}
\newcommand{\useStandardPanel}{%
- \buildpanel{%
- \web@panel@top
- \par\vspace{\stretch{1}}%
- \web@panel@middle
- \par\vspace{\stretch{1}}%
- \web@panel@bottom
- }%
+ \buildpanel{%
+ \web@panel@top
+ \par\vspace{\stretch{1}}%
+ \web@panel@middle
+ \par\vspace{\stretch{1}}%
+ \web@panel@bottom
+ }%
}
\newcommand{\panelTop}[1]{\def\web@panel@top{#1}}
\panelTop{}
@@ -3730,20 +3646,18 @@
% \begin{macro}{\ClearTextTemplate}
% Clear the text template
% \begin{macrocode}
-\newcommand{\ClearTextTemplate}
-{%
- \global\let\web@textBgColor\@empty
- \global\let\web@template\@empty
+\newcommand{\ClearTextTemplate}{%
+ \global\let\web@textBgColor\@empty
+ \global\let\web@template\@empty
}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ClearPanelTemplate}
% Clear the panel template
% \begin{macrocode}
-\newcommand{\ClearPanelTemplate}
-{%
- \global\let\web@panelBgColor\@empty
- \global\let\web@paneltemplate\@empty
+\newcommand{\ClearPanelTemplate}{%
+ \global\let\web@panelBgColor\@empty
+ \global\let\web@paneltemplate\@empty
}
% \end{macrocode}
% \end{macro}
@@ -3751,25 +3665,24 @@
% Clear the panel template
% \begin{macrocode}
\newcommand{\ClearBuildPanel}
- {\global\let\stdbldpanel\@empty}
+ {\global\let\stdbldpanel\@empty}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ClearAllTemplates}
% Clear both text and panel templates
% \begin{macrocode}
-\newcommand{\ClearAllTemplates}
-{%
- \ClearTextTemplate
- \ClearPanelTemplate
+\newcommand{\ClearAllTemplates}{%
+ \ClearTextTemplate
+ \ClearPanelTemplate
}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\newcommand{\ClearTextTemplateBuffer}
- {\global\let\web@textTemplate\@empty}
+ {\global\let\web@textTemplate\@empty}
\newcommand{\ClearPanelTemplateBuffer}
- {\global\let\web@panelTemplate\@empty}
+ {\global\let\web@panelTemplate\@empty}
% \end{macrocode}
% (06/15/05) The following two commands save and clears all design elements, and enables
% the restoring of the design state.
@@ -3781,30 +3694,29 @@
% respectively. The twist here is that even though these basic elements have been redefined,
% there original ones can be restored using \cs{restoreElements}.
% \begin{macrocode}
-\newcommand{\saveElements}[1]
-{%
- \begingroup
- \global\w@csarg\let{web@SaveTmpls#1}\@empty
- \toks@={}%
- \def\web@addtoSaveToks##1{%
- \edef\web@let{\global\expandafter
- \let\expandafter\noexpand\csname#1##1\endcsname=%
- \expandafter\noexpand\csname##1\endcsname}%
- \web@let
- \edef\web@SaveTmpls{\the\toks@\noexpand\\{##1}%
- \expandafter\noexpand\csname#1##1\endcsname}%
- \toks@=\expandafter{\web@SaveTmpls}%
- }%
- \web@addtoSaveToks{web@textBgColor}%
- \web@addtoSaveToks{web@template}%
- \web@addtoSaveToks{stdbldpanel}%
- \web@addtoSaveToks{web@panelBgColor}%
- \web@addtoSaveToks{web@paneltemplate}%
- \w@csarg\xdef{web@SaveTmpls#1}{\the\toks@}%
- \endgroup
+\newcommand{\saveElements}[1]{%
+ \begingroup
+ \global\w@csarg\let{web@SaveTmpls#1}\@empty
+ \toks@={}%
+ \def\web@addtoSaveToks##1{%
+ \edef\web@let{\global\expandafter
+ \let\expandafter\noexpand\csname#1##1\endcsname=%
+ \expandafter\noexpand\csname##1\endcsname}%
+ \web@let
+ \edef\web@SaveTmpls{\the\toks@\noexpand\\{##1}%
+ \expandafter\noexpand\csname#1##1\endcsname}%
+ \toks@=\expandafter{\web@SaveTmpls}%
+ }%
+ \web@addtoSaveToks{web@textBgColor}%
+ \web@addtoSaveToks{web@template}%
+ \web@addtoSaveToks{stdbldpanel}%
+ \web@addtoSaveToks{web@panelBgColor}%
+ \web@addtoSaveToks{web@paneltemplate}%
+ \w@csarg\xdef{web@SaveTmpls#1}{\the\toks@}%
+ \endgroup
}
\newcommand{\saveClearElements}[1]{%
- \saveElements{#1}\ClearAllTemplates\ClearBuildPanel
+ \saveElements{#1}\ClearAllTemplates\ClearBuildPanel
}
% \end{macrocode}
% \end{macro}
@@ -3814,11 +3726,11 @@
% a name.
% \begin{macrocode}
\newcommand{\restoreElements}[1]{%
- \ClearAllTemplates\ClearBuildPanel
- \begingroup
- \toks@=\expandafter{\csname web@SaveTmpls#1\endcsname}%
- \def\\##1##2{\global\w@csarg\let{##1}=##2}\the\toks@
- \endgroup
+ \ClearAllTemplates\ClearBuildPanel
+ \begingroup
+ \toks@=\expandafter{\csname web@SaveTmpls#1\endcsname}%
+ \def\\##1##2{\global\w@csarg\let{##1}=##2}\the\toks@
+ \endgroup
}
% \end{macrocode}
% \end{macro}
@@ -3828,18 +3740,17 @@
% only those templates added in by \cs{AddToTemplate}.
% \changes{v6.0k}{2016/06/14}{Fixed error in def of \string\cs{\string\cs{}}}
% \begin{macrocode}
-\newcommand{\disableScreens}[1]
-{%
- \begingroup
+\newcommand{\disableScreens}[1]{%
+ \begingroup
\toks@=\expandafter{\listAddToTemplates}%
\toks2={}%
\def\\##1{\w@csarg\ifx{eqTmpl##1}\web@YES
- \disableTemplate{##1}%
- \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
- \toks2=\expandafter{\web@saveAddTo}\fi}%
+ \disableTemplate{##1}%
+ \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
+ \toks2=\expandafter{\web@saveAddTo}\fi}%
\the\toks@
- \endgroup
- \w@csarg\let{web@DisabledTmpls#1}\web@saveAddTo
+ \endgroup
+ \w@csarg\let{web@DisabledTmpls#1}\web@saveAddTo
}
% \end{macrocode}
% \end{macro}
@@ -3848,12 +3759,11 @@
% under a name, the required argument. Includes
% only those templates added in by \cs{AddToTemplate}.
% \begin{macrocode}
-\newcommand{\restoreScreens}[1]
-{%
- \begingroup
- \toks@=\expandafter{\csname web@DisabledTmpls#1\endcsname}%
- \def\\##1{\enableTemplate{##1}}\the\toks@
- \endgroup
+\newcommand{\restoreScreens}[1]{%
+ \begingroup
+ \toks@=\expandafter{\csname web@DisabledTmpls#1\endcsname}%
+ \def\\##1{\enableTemplate{##1}}\the\toks@
+ \endgroup
}
% \end{macrocode}
% \end{macro}
@@ -3862,18 +3772,17 @@
% saves the list under a name, the required argument. Includes
% only those templates added in by \cs{AddToPanelTemplate}.
% \begin{macrocode}
-\newcommand{\disablePanels}[1]
-{%
- \begingroup
+\newcommand{\disablePanels}[1]{%
+ \begingroup
\toks@ = \expandafter{\listAddToPanelTemplates}%
\toks2 = {}%
\def\\##1{\w@csarg\ifx{eqPanTmpl##1}\web@YES
- \disablePanelTemplate{##1}%
- \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
- \toks2 =\expandafter{\web@saveAddTo}\fi}%
+ \disablePanelTemplate{##1}%
+ \xdef\web@saveAddTo{\the\toks2 \noexpand\\{##1}}%
+ \toks2 =\expandafter{\web@saveAddTo}\fi}%
\the\toks@
- \endgroup
- \global\w@csarg\let{web@DisabledPanelTmpls#1}\web@saveAddTo
+ \endgroup
+ \global\w@csarg\let{web@DisabledPanelTmpls#1}\web@saveAddTo
}
% \end{macrocode}
% \end{macro}
@@ -3882,24 +3791,23 @@
% under a name, the required argument. Includes
% only those templates added in by \cs{AddToPanelTemplate}.
% \begin{macrocode}
-\newcommand{\restorePanels}[1]
-{%
- \begingroup
- \toks@=\expandafter{\csname web@DisabledPanelTmpls#1\endcsname}%
- \def\\##1{\enablePanelTemplate{##1}}\the\toks@
- \endgroup
+\newcommand{\restorePanels}[1]{%
+ \begingroup
+ \toks@=\expandafter{\csname web@DisabledPanelTmpls#1\endcsname}%
+ \def\\##1{\enablePanelTemplate{##1}}\the\toks@
+ \endgroup
}
% \end{macrocode}
% \end{macro}
% \begin{macrocode}
\newcommand{\disableTemplate}[1]{{%
- \global\w@csarg\let{eqTmpl#1}\web@NO}}
+ \global\w@csarg\let{eqTmpl#1}\web@NO}}
\newcommand{\enableTemplate}[1]{{%
- \global\w@csarg\let{eqTmpl#1}\web@YES}}
+ \global\w@csarg\let{eqTmpl#1}\web@YES}}
\newcommand{\disablePanelTemplate}[1]{{%
- \global\w@csarg\let{eqPanTmpl#1}\web@NO}}
+ \global\w@csarg\let{eqPanTmpl#1}\web@NO}}
\newcommand{\enablePanelTemplate}[1]{{%
- \global\w@csarg\let{eqPanTmpl#1}\web@YES}}
+ \global\w@csarg\let{eqPanTmpl#1}\web@YES}}
% \end{macrocode}
% \subsubsection{Support for full-width pages}
% (2013/01/10) When one of the panel options is taken the with of the text screen is reduced.
@@ -3912,19 +3820,19 @@
% We calculate some adjustment values that depend on whether we are left or right panel.
% \begin{macrocode}
\def\calculatefullwidth{%
- \ifeqforpaper
- \let\fullscreenwidthadj\@empty
- \else
- \ifnum\@panelconfig=1\relax % leftpanel
- \bgroup
+ \ifeqforpaper
+ \let\fullscreenwidthadj\@empty
+ \else
+ \ifnum\@panelconfig=\@ne % leftpanel
+ \bgroup
\setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Leftmargin}%
\xdef\web@leftMargAdj{\the\@tempdima}%
\setlength{\@tempdima}{-\@panelwidth-\@panelsep+\@Rightmargin}%
\xdef\web@rightMargAdj{\the\@tempdima}%
- \egroup
- \def\fullscreenwidthadj{\hspace{\web@leftMargAdj}}%
- \fi
+ \egroup
+ \def\fullscreenwidthadj{\hspace{\web@leftMargAdj}}%
\fi
+ \fi
}
% \end{macrocode}
% \DescribeMacro{\makeFullwidthhead}
@@ -3933,19 +3841,19 @@
% \cs{fullscreenwidthadj}.
% \begin{macrocode}
\newcommand{\makeFullwidthhead}{%
- \global\let\web@save@oddhead\@oddhead
- \renewcommand{\@oddhead}{\fullscreenwidthadj
- \hbox to\fullscreenwidth{\normalfont\footnotesize
- \web@headerhook\web@lhead\hfil\web@chead\hfil
- \web@rightheader}\hss}%
+ \global\let\web@save@oddhead\@oddhead
+ \renewcommand{\@oddhead}{\fullscreenwidthadj
+ \hbox to\fullscreenwidth{\normalfont\footnotesize
+ \web@headerhook\web@lhead\hfil\web@chead\hfil
+ \web@rightheader}\hss}%
}
% \end{macrocode}
% \DescribeMacro{\restoreSavedHead} restores previously saved header
% (saved by \cs{makeFullwidthhead}.
% \begin{macrocode}
\newcommand{\restoreSavedHead}{%
- \global\let\@oddhead\web@save@oddhead
- \let\web@save@oddhead\@empty
+ \global\let\@oddhead\web@save@oddhead
+ \let\web@save@oddhead\@empty
}
% \end{macrocode}
% \begin{environment}{Fullwidthtext}
@@ -3955,31 +3863,32 @@
% in the \textsf{eqexam} package.
% \begin{macrocode}
\def\webNotPaneledWarning{%
- The Fullwidthtext environment is valid only\MessageBreak
- for a paneled document, ignoring this\MessageBreak
- environment}
+ The Fullwidthtext environment is valid only\MessageBreak
+ for a paneled document, ignoring this\MessageBreak
+ environment}
\newenvironment{Fullwidthtext}{%
- \ifnum\@panelconfig=0\relax
- \PackageWarning{web}{\webNotPaneledWarning}%
- \let\web@next\relax
- \else
- \def\web@next{%
- \enableTemplate{BGColorAndGraphicFullWidth}%
- \list{}{%
- \setlength{\textwidth}{\fullscreenwidth}%
- \setlength{\linewidth}{\fullscreenwidth}%
- \setlength{\itemindent}{0pt}\setlength{\itemsep}{0pt}%
- \setlength{\topsep}{0pt}\setlength{\parsep}{0pt}%
- \setlength{\listparindent}{\parindent}%
- \setlength{\leftmargin}{\web@leftMargAdj}%
- \setlength{\rightmargin}{-\web@rightMargAdj}%
- }\item\relax}%
- \fi\web@next
+ \ifnum\@panelconfig=\@ne
+ \PackageWarning{web}{\webNotPaneledWarning}%
+ \let\web@next\relax
+ \else
+ \def\web@next{%
+ \enableTemplate{BGColorAndGraphicFullWidth}%
+ \list{}{%
+ \setlength{\textwidth}{\fullscreenwidth}%
+ \setlength{\linewidth}{\fullscreenwidth}%
+ \setlength{\itemindent}{0pt}\setlength{\itemsep}{0pt}%
+ \setlength{\topsep}{0pt}\setlength{\parsep}{0pt}%
+ \setlength{\listparindent}{\parindent}%
+ \setlength{\leftmargin}{\web@leftMargAdj}%
+ \setlength{\rightmargin}{-\web@rightMargAdj}%
+ }\item\relax}%
+ \fi\web@next
}{%
- \ifnum\@panelconfig=0\relax\let\web@next\relax\else
- \def\web@next{\endlist\newpage
- \disableTemplate{BGColorAndGraphicFullWidth}}%
- \fi\web@next
+ \ifnum\@panelconfig=\z@
+ \let\web@next\relax\else
+ \def\web@next{\endlist\newpage
+ \disableTemplate{BGColorAndGraphicFullWidth}}%
+ \fi\web@next
}
% \end{macrocode}
% \end{environment}
@@ -3987,24 +3896,24 @@
% ``full page mode.''
% \begin{macrocode}
\newcommand{\pushToFullWidthPage}{%
- \ifnum\@panelconfig>0\relax
- \disableScreens{gofullwidth}%
- \disablePanels{gofullwidth}%
- \makeFullwidthhead
- \let\web@save@footwrapper\webfootwrapper
- \def\webfootwrapper{\fullscreenwidthadj
- \makebox[\fullscreenwidth]}%
- \fi
- \begin{Fullwidthtext}
+ \ifnum\@panelconfig>\z@
+ \disableScreens{gofullwidth}%
+ \disablePanels{gofullwidth}%
+ \makeFullwidthhead
+ \let\web@save@footwrapper\webfootwrapper
+ \def\webfootwrapper{\fullscreenwidthadj
+ \makebox[\fullscreenwidth]}%
+ \fi
+ \begin{Fullwidthtext}
}
\newcommand{\popFromFullWidthPage}{%
- \end{Fullwidthtext}
- \ifnum\@panelconfig>0\relax
- \restoreScreens{gofullwidth}%
- \restorePanels{gofullwidth}%
- \restoreSavedHead
- \let\webfootwrapper\web@save@footwrapper
- \fi
+ \end{Fullwidthtext}
+ \ifnum\@panelconfig>\z@
+ \restoreScreens{gofullwidth}%
+ \restorePanels{gofullwidth}%
+ \restoreSavedHead
+ \let\webfootwrapper\web@save@footwrapper
+ \fi
}
% \end{macrocode}
% \DescribeMacro{\addtofullwidthtemplateArgs}\DescribeMacro{\clearfullwidthtemplateArgs}
@@ -4024,41 +3933,39 @@
% \end{macrocode}
% \begin{macrocode}
\let\web@fullwidthtemplate\@empty
-\newcommand{\fullwidthtemplate}[2][]
-{%
- \ifweb@allowtemplates
- \def\web@arg{#1}\ifx\web@argi\@empty
- \xdef\web@fullwidthtemplate@opt@args
- {\web@addtofullwidthtemplateArgs}%
- \else
- \xdef\web@fullwidthtemplate@opt@args
- {\web@addtofullwidthtemplateArgs,#1}%
- \fi\gdef\web@fullwidthtemplate{#2}%
- \fi
+\newcommand{\fullwidthtemplate}[2][]{%
+ \ifweb@allowtemplates
+ \def\web@arg{#1}\ifx\web@argi\@empty
+ \xdef\web@fullwidthtemplate@opt@args
+ {\web@addtofullwidthtemplateArgs}%
+ \else
+ \xdef\web@fullwidthtemplate@opt@args
+ {\web@addtofullwidthtemplateArgs,#1}%
+ \fi\gdef\web@fullwidthtemplate{#2}%
+ \fi
}
% \end{macrocode}
% \DescribeMacro{\B{GColorAndGraphicFullWidth}} handles the full-width page
% when left or right panels are in effect.
% \begin{macrocode}
-\newcommand\BGColorAndGraphicFullWidth
-{%
- \put(-\@textX,0){%
- \web@colorbox@w@transparency{\web@fullwidthBgColor}%
- {%
- \parbox[b][\paperheight]{\paperwidth}%
- {%
- \ifx\web@fullwidthtemplate\@empty
- \hfill\vfill
- \else
- \hfuzz=1pt\vfuzz=1pt
- \expandafter\includegraphics\expandafter
- [\web@fullwidthtemplate@opt@args,%
- width=\paperwidth,height=\paperheight]%
- {\web@fullwidthtemplate}%
- \fi
- }%
- }%
+\newcommand\BGColorAndGraphicFullWidth{%
+ \put(-\@textX,0){%
+ \web@colorbox@w@transparency{\web@fullwidthBgColor}%
+ {%
+ \parbox[b][\paperheight]{\paperwidth}%
+ {%
+ \ifx\web@fullwidthtemplate\@empty
+ \hfill\vfill
+ \else
+ \hfuzz=1pt\vfuzz=1pt
+ \expandafter\includegraphics\expandafter
+ [\web@fullwidthtemplate@opt@args,%
+ width=\paperwidth,height=\paperheight]%
+ {\web@fullwidthtemplate}%
+ \fi
+ }%
}%
+ }%
}
% \end{macrocode}
% Here we ``register'' this template with the ``template handler'', and then
@@ -4070,19 +3977,19 @@
% \end{macrocode}
% \subsubsection{\texorpdfstring{\protect\cs{AddToShipoutPicture}}{\CMD{AddToShipoutPicture}}}
% \begin{macrocode}
-\ifnum\@usetemplates>0
- \ifnum\@panelconfig>0
+\ifnum\@usetemplates>\z@
+ \ifnum\@panelconfig>\z@
% \end{macrocode}
% If the user calls for a left or right panel, then we issue separate templates.
% \begin{macrocode}
- \AtBeginDocument{%
- \AddToShipoutPicture{\web@textTemplate\web@panelTemplate}}
- \else
+ \AtBeginDocument{%
+ \AddToShipoutPicture{\web@textTemplate\web@panelTemplate}}
+ \else
% \end{macrocode}
% otherwise, we use only the \cs{web@textTemplate}
% \begin{macrocode}
- \AtBeginDocument{\AddToShipoutPicture{\web@textTemplate}}
- \fi
+ \AtBeginDocument{\AddToShipoutPicture{\web@textTemplate}}
+ \fi
\fi
% \end{macrocode}
% \begin{macrocode}
@@ -4118,7 +4025,7 @@
%\end{verbatim}
% \begin{macrocode}
\newcommand{\DeclareDocInfo}[1]{\setkeys{aebDocInfo}{#1}%
- \ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi}
+ \ifx\web@talkdate@value\@empty\else\let\webversion\webtalkdate\fi}
\@onlypreamble\DeclareDocInfo
% \end{macrocode}
% \end{macro}
@@ -4171,27 +4078,27 @@
% \changes{v4.2h}{2012/01/13}{Added new keys for this set}
% \begin{macrocode}
\define@key{aebDocInfo}{Title}[]%
- {\@ifpackageloaded{aebxmp}{\Title{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\Title{#1}}{}}
\define@key{aebDocInfo}{authors}[]%
- {\@ifpackageloaded{aebxmp}{\Authors{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\Authors{#1}}{}}
\define@key{aebDocInfo}{Subject}[]%
- {\@ifpackageloaded{aebxmp}{\Subject{#1}}{\subject{#1}}}
+ {\@ifpackageloaded{aebxmp}{\Subject{#1}}{\subject{#1}}}
\define@key{aebDocInfo}{Keywords}[]%
- {\@ifpackageloaded{aebxmp}{\Keywords{#1}}{\keywords{#1}}}
+ {\@ifpackageloaded{aebxmp}{\Keywords{#1}}{\keywords{#1}}}
\define@key{aebDocInfo}{lang}[]%
- {\@ifpackageloaded{aebxmp}{\metaLang{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\metaLang{#1}}{}}
\define@key{aebDocInfo}{copyrightStatus}[]%
- {\@ifpackageloaded{aebxmp}{\copyrightStatus{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\copyrightStatus{#1}}{}}
\define@key{aebDocInfo}{copyrightNotice}[]%
- {\@ifpackageloaded{aebxmp}{\copyrightNotice{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\copyrightNotice{#1}}{}}
\define@key{aebDocInfo}{copyrightInfoURL}[]%
- {\@ifpackageloaded{aebxmp}{\copyrightInfoURL{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\copyrightInfoURL{#1}}{}}
\define@key{aebDocInfo}{authortitle}[]%
- {\@ifpackageloaded{aebxmp}{\authortitle{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\authortitle{#1}}{}}
\define@key{aebDocInfo}{descriptionwriter}[]%
- {\@ifpackageloaded{aebxmp}{\descriptionwriter{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\descriptionwriter{#1}}{}}
\define@key{aebDocInfo}{customProperties}[]%
- {\@ifpackageloaded{aebxmp}{\customProperties{#1}}{}}
+ {\@ifpackageloaded{aebxmp}{\customProperties{#1}}{}}
% \end{macrocode}
%
% \subsection{\texorpdfstring{\protect\cs{DeclarePageLayout}}{\CMD{DeclarePageLayout}}}
@@ -4221,39 +4128,34 @@
% footer.
% \begin{macrocode}
\newcommand{\DeclarePageLayout}[1]{\save@prtscr
- \setkeys{web@pl}{topmargin,headheight,marginparsep,%
- marginparwidth,marginparpush,webfootskip}%
-% \setkeys{web@pl}{#1}%
- \protected@edef\web@temp{\noexpand\setkeys{web@pl}{#1}}%
- \web@temp\save@prtscr
-% \setkeys{web@pl}{#1}%
- \ifx\web@pl@screensize\@empty\else
- \expandafter\screensize\web@pl@screensize\fi
- \ifx\web@pl@margins\@empty\else
- \expandafter\margins\web@pl@margins\fi
- \ifeqforpaper\else
- \ifdim\@Leftmargin<\@Rightmargin
- \ifdim\marginparwidth>\@Leftmargin
- \setlength{\marginparwidth}
- {\@Leftmargin-2\marginparsep}%
- \fi
- \else
- \ifdim\marginparwidth>\@Rightmargin
- \setlength{\marginparwidth}
- {\@Rightmargin-2\marginparsep}%
- \fi
- \fi
- \fi
- \ifeqforpaper\else
- \ifdim\@Bottommargin<\web@footskip\relax\PackageError{web}{%
- Error in the value of the webfootskip key\MessageBreak
- of the \string\DeclarePageLayout\space command.\MessageBreak
- The bottom margin must be larger then\MessageBreak
- the value of webfootskip}{%
- Increase the size of the bottom margin,\MessageBreak
- or decrease the value of webfootskip.}\else
- \fi
+ \setkeys{web@pl}{topmargin,headheight,marginparsep,%
+ marginparwidth,marginparpush,webfootskip}%
+ \protected@edef\web@temp{\noexpand\setkeys{web@pl}{#1}}%
+ \web@temp\save@prtscr
+ \ifx\web@pl@screensize\@empty\else
+ \expandafter\screensize\web@pl@screensize\fi
+ \ifx\web@pl@margins\@empty\else
+ \expandafter\margins\web@pl@margins\fi
+ \ifeqforpaper\else
+ \ifdim\@Leftmargin<\@Rightmargin
+ \ifdim\marginparwidth>\@Leftmargin
+ \setlength{\marginparwidth}
+ {\@Leftmargin-2\marginparsep}\fi
+ \else
+ \ifdim\marginparwidth>\@Rightmargin
+ \setlength{\marginparwidth}
+ {\@Rightmargin-2\marginparsep}\fi
\fi
+ \fi
+ \ifeqforpaper\else
+ \ifdim\@Bottommargin<\web@footskip\relax\PackageError{web}{%
+ Error in the value of the webfootskip key\MessageBreak
+ of the \string\DeclarePageLayout\space command.\MessageBreak
+ The bottom margin must be larger then\MessageBreak
+ the value of webfootskip}{%
+ Increase the size of the bottom margin,\MessageBreak
+ or decrease the value of webfootskip.}\fi
+ \fi
\InitLayout
}
\@onlypreamble\DeclarePageLayout
@@ -4271,8 +4173,8 @@
\define@key{web@pl}{margins}[]{\def\web@pl@margins{#1}}
\let\web@pl@margins\@empty
\define@choicekey+{web@pl}{design}[\val\nr]{designi,designii,%
- designiii,designiv,designv,designvi,designvii,designviii,designix}{%
- \ifcase\nr\relax
+ designiii,designiv,designv,designvi,designvii,designviii,designix}{%
+ \ifcase\nr\relax
\web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{3.736in}{4.67in}\or
\web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{4.5in}{5in}\or
\web@MargScrDimOpts{.25in}{.25in}{24pt}{.25in}{5in}{6in}\or
@@ -4282,22 +4184,22 @@
\web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{7.5in}{10in}\or
\web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6.67in}\or
\web@MargScrDimOpts{.5in}{.5in}{24pt}{.5in}{3.75in}{6in}\fi
- }{\PackageWarning{webpro}{%
- Bad choice for design, use designi--designvix. Try again}}
+ }{\PackageWarning{webpro}{%
+ Bad choice for design, use designi--designvix. Try again}}
\define@choicekey+{web@pl}{screensizeOf}[\val\nr]{designi,designii,%
- designiii,designiv,designv,designvi,designvii,designviii,designix}{%
- \ifcase\nr\relax
- \screensize{3.736in}{4.67in}\or
- \screensize{4.5in}{5in}\or
- \screensize{5in}{6in}\or
- \screensize{4in}{5in}\or
- \screensize{4.5in}{6in}\or
- \screensize{4.17in}{4.67in}\or
- \screensize{7.5in}{10in}\or
- \screensize{3.75in}{6.67in}\or
- \screensize{3.75in}{6in}\fi
- }{\PackageWarning{webpro}{%
- Bad choice for screensizeOf, use designi--designvix. Try again}}
+ designiii,designiv,designv,designvi,designvii,designviii,designix}{%
+ \ifcase\nr\relax
+ \screensize{3.736in}{4.67in}\or
+ \screensize{4.5in}{5in}\or
+ \screensize{5in}{6in}\or
+ \screensize{4in}{5in}\or
+ \screensize{4.5in}{6in}\or
+ \screensize{4.17in}{4.67in}\or
+ \screensize{7.5in}{10in}\or
+ \screensize{3.75in}{6.67in}\or
+ \screensize{3.75in}{6in}\fi
+ }{\PackageWarning{webpro}{%
+ Bad choice for screensizeOf, use designi--designvix. Try again}}
\define@key{web@pl}{headheight}[8pt]{\def\websetheadheight{#1}}
% \end{macrocode}
%Key-values of \cs{DeclarePageLayout} continues.
@@ -4308,20 +4210,18 @@
%\IndexKey{evensidemargin}
% \begin{macrocode}
\define@key{web@pl}{topmargin}[\prtscr{\the\topmargin}{8pt}]{%
- \edef\web@argi{#1}\ifx\web@argi\@empty
- \edef\web@argi{\prtscr{\the\topmargin}{8pt}}\fi
- \ifeqforpaper
- \setlength{\topmargin}{\web@argi}%
- \else
- \setlength{\web@Topmargin}{\web@argi}%
- \fi}
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\topmargin}{8pt}}\fi
+ \ifeqforpaper
+ \setlength{\topmargin}{\web@argi}\else
+ \setlength{\web@Topmargin}{\web@argi}\fi}
\define@key{web@pl}{textwidth}[345pt]{\setlength{\textwidth}{#1}}
\define@key{web@pl}{textheight}[43\baselineskip]%
- {\setlength{\textheight}{#1}}
+ {\setlength{\textheight}{#1}}
\define@key{web@pl}{oddsidemargin}[63pt]%
- {\setlength{\oddsidemargin}{#1}}
+ {\setlength{\oddsidemargin}{#1}}
\define@key{web@pl}{evensidemargin}[63pt]%
- {\setlength{\evensidemargin}{#1}}
+ {\setlength{\evensidemargin}{#1}}
% \end{macrocode}
% More key-values of \cs{DeclarePageLayout}.
%\IndexKey{marginparsep}
@@ -4334,23 +4234,23 @@
%\IndexKey{additionalheadsep}
% \begin{macrocode}
\define@key{web@pl}{marginparsep}[\prtscr{\the\marginparsep}{11pt}]{%
- \edef\web@argi{#1}\ifx\web@argi\@empty
- \edef\web@argi{\prtscr{\the\marginparsep}{11pt}}\fi
- \setlength{\marginparsep}{\web@argi}}
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\marginparsep}{11pt}}\fi
+ \setlength{\marginparsep}{\web@argi}}
\define@key{web@pl}{marginparwidth}%
- [\prtscr{\the\marginparwidth}{.25in}]{%
- \edef\web@argi{#1}\ifx\web@argi\@empty
- \edef\web@argi{\prtscr{\the\marginparwidth}{.25in}}\fi
- \setlength{\marginparwidth}{\web@argi}}
+ [\prtscr{\the\marginparwidth}{.25in}]{%
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \edef\web@argi{\prtscr{\the\marginparwidth}{.25in}}\fi
+ \setlength{\marginparwidth}{\web@argi}}
\define@key{web@pl}{marginparpush}[5pt]{%
- \setlength{\marginparpush}{#1}}
+ \setlength{\marginparpush}{#1}}
\define@key{web@pl}{webfootskip}[4pt]{%
- \def\web@footskip{#1}}
+ \def\web@footskip{#1}}
\define@key{web@pl}{footskip}[30pt]{\setlength{\footskip}{#1}}
\define@key{web@pl}{panelwidth}[1in]{\panelwidth{#1}}
\define@key{web@pl}{panelsep}[10pt]{\panelsep{#1}}
\define@key{web@pl}{additionalheadsep}[0pt]%
- {\def\web@additionalheadsep{#1}}
+ {\def\web@additionalheadsep{#1}}
% \end{macrocode}
% \end{macro}
%
@@ -4370,32 +4270,32 @@
% default. The alignment is set by \cs{halignuniversity}. The UI for this
% value is the \texttt{xhalign} key of \cs{universityLayout}.
% \begin{macrocode}
- \vglue\web@aboveTopTitleSkip
- \noindent\makebox[\linewidth][\halignuniversity]{\parbox{%
- \hproportionwebuniversity\linewidth}%
- {\sectionUniversity{\webuniversity}}}%
- \par\ifeqforpaper\else\minimumskip\fi
- \vspace{\stretch{1}}%
+ \vglue\web@aboveTopTitleSkip\noindent
+ \makebox[\linewidth][\halignuniversity]{\parbox{%
+ \hproportionwebuniversity\linewidth}%
+ {\sectionUniversity{\webuniversity}}}\par
+ \ifeqforpaper\else\minimumskip\fi
+ \vspace{\stretch{1}}\noindent
% \end{macrocode}
% Have \cs{webtitle} centered across the top of the title page, by
% default. The alignment is set by \cs{haligntitle}. The UI for this
% value is the \texttt{xhalign} key of \cs{titleLayout}.
% \begin{macrocode}
- \noindent\makebox[\linewidth][\haligntitle]%
- {\parbox{\hproportionwebtitle\linewidth}%
- {\sectionTitle{\webtitle}}}%
- \par\ifeqforpaper\vspace{2\baselineskip}\else
- \minimumskip\vspace{\stretch{1}}\fi
+ \makebox[\linewidth][\haligntitle]%
+ {\parbox{\hproportionwebtitle\linewidth}%
+ {\sectionTitle{\webtitle}}}%
+ \par\ifeqforpaper\vspace{2\baselineskip}\else
+ \minimumskip\vspace{\stretch{1}}\fi\noindent
% \end{macrocode}
% Have \cs{webauthor} centered across the top of the title page, by
% default. The alignment is set by \cs{halignauthor}. The UI for this
% value is the \texttt{xhalign} key of \cs{authorLayout}.
% \begin{macrocode}
- \noindent\makebox[\linewidth][\halignauthor]%
- {\parbox{\hproportionwebauthor\linewidth}%
- {\sectionAuthor{\webauthor}}}
- \par\ifeqforpaper\vspace{2\baselineskip}\else
- \minimumskip\vspace{\stretch{1}}\fi
+ \makebox[\linewidth][\halignauthor]%
+ {\parbox{\hproportionwebauthor\linewidth}%
+ {\sectionAuthor{\webauthor}}}
+ \par\ifeqforpaper\vspace{2\baselineskip}\else
+ \minimumskip\vspace{\stretch{1}}\fi
}
\newcommand{\topTitlePageProportion}[1]{\def\titleauthorproportion{#1}}
% \end{macrocode}
@@ -4409,13 +4309,13 @@
% \begin{macrocode}
\renewcommand{\titlepageTrailer}
{%
- \webtpTrailerWrapper{\makebox[\web@tp@linewidth]{%
- \parbox{\web@tp@linewidth}{%
- \ifx\tpTrailer@textcolor\@empty\else
- \color{\tpTrailer@textcolor}\fi\web@tpTrailer@formatting
- \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
- \maketitle@trailer@ll\hfill\maketitle@trailer@lr
- }}}%
+ \webtpTrailerWrapper{\makebox[\web@tp@linewidth]{%
+ \parbox{\web@tp@linewidth}{%
+ \ifx\tpTrailer@textcolor\@empty\else
+ \color{\tpTrailer@textcolor}\fi\web@tpTrailer@formatting
+ \maketitle@trailer@ul\hfill\maketitle@trailer@ur\\
+ \maketitle@trailer@ll\hfill\maketitle@trailer@lr
+ }}}%
}
% \end{macrocode}
% \end{macro}
@@ -4424,7 +4324,7 @@
% the default.
% \begin{macrocode}
\def\maketitle@trailer@ul{\web@copyright\ \web@copyright@symbol\
- \webcopyrightyears\ \thewebemail}
+ \webcopyrightyears\ \thewebemail}
\def\maketitle@trailer@ll{\aeb@Prepared}
\def\maketitle@trailer@ur{\aeb@talksite}
\def\maketitle@trailer@lr{\webversion}
@@ -4439,12 +4339,12 @@
\def\web@tp@linewidth{\linewidth}
% \end{macrocode}
% Key-values of \cmd{\DesignTitlePageTrailer}
-% \IndexKey{ul}
-% \IndexKey{ll}
-% \IndexKey{ur}
-% \IndexKey{lr}
-% \IndexKey{textColor}
-% \IndexKey{bgColor}
+% \IndexKey{ul}^^A
+% \IndexKey{ll}^^A
+% \IndexKey{ur}^^A
+% \IndexKey{lr}^^A
+% \IndexKey{textColor}^^A
+% \IndexKey{bgColor}^^A
% \begin{macrocode}
\define@key{tpTrailer}{ul}{\def\maketitle@trailer@ul{#1}}
\define@key{tpTrailer}{ll}{\def\maketitle@trailer@ll{#1}}
@@ -4453,12 +4353,12 @@
\define@key{tpTrailer}{textColor}{\def\tpTrailer@textcolor{#1}}
\define@key{tpTrailer}{bgColor}{\def\web@tpTrailerBgColor{#1}}
% \end{macrocode}
-% Key-values of \cmd{\DesignTitlePageTrailer}
-% \IndexKey{borderColor}
-% \IndexKey{fboxsep}
-% \IndexKey{fboxrule}
-% \IndexKey{graphic}
-% \IndexKey{namedgraphic}
+% More key-values of \cmd{\DesignTitlePageTrailer}
+% \IndexKey{borderColor}^^A
+% \IndexKey{fboxsep}^^A
+% \IndexKey{fboxrule}^^A
+% \IndexKey{graphic}^^A
+% \IndexKey{namedgraphic}^^A
% \begin{macrocode}
\define@key{tpTrailer}{borderColor}{\def\web@tpTrailerBorderColor{#1}}
\define@key{tpTrailer}{fboxsep}{\def\web@tpTrailerfboxsep{#1}}
@@ -4467,71 +4367,71 @@
\define@key{tpTrailer}{namedgraphic}{%
\def\web@tpTrailer@namedgraphic{#1}}
% \end{macrocode}
-% Key-values of \cmd{\DesignTitlePageTrailer}
-% \IndexKey{fontSize}
+% Key-values of \cmd{\DesignTitlePageTrailer}, continued.
+% \IndexKey{fontSize}^^A
% \IndexKey{formatting}
-% \IndexKey{raise}
+% \IndexKey{raise}^^A
% \begin{macrocode}
\define@key{tpTrailer}{fontSize}{\renewcommand{\trailerFontSize}{#1}}
\define@key{tpTrailer}{formatting}{\def\web@tpTrailer@formatting{#1}}
\define@key{tpTrailer}{raise}{\def\web@tpTrailer@raise{#1}}
\newcommand{\DesignTitlePageTrailer}[1]
{%
- \setkeys{tpTrailer}{fboxsep=3pt,fboxrule=.4pt}%
- \setkeys{tpTrailer}{#1}%
- \setlength{\fboxsep}{\web@tpTrailerfboxsep}%
- \setlength{\fboxrule}{\web@tpTrailerfboxrule}%
- \let\web@tp@graphic\web@NO
- \ifx\web@tpTrailer@graphic\@empty
- \ifx\web@tpTrailer@namedgraphic\@empty\else
- \let\web@tp@graphic\web@YES\fi
- \else\let\web@tp@graphic\web@YES\fi
- \ifx\web@tp@graphic\web@NO\relax
- \ifx\web@tpTrailerBgColor\@empty
- \def\grfbox@spec##1{##1}%
- \else
- \ifx\web@tpTrailerBorderColor\@empty
- \def\web@tp@linewidth{\linewidth-2\fboxsep}%
- \def\grfbox@spec{\colorbox{\web@tpTrailerBgColor}}%
- \else
- \def\web@tp@linewidth{%
- \linewidth-2\fboxsep-2\fboxrule}%
- \def\grfbox@spec{\fcolorbox{\web@tpTrailerBorderColor}%
- {\web@tpTrailerBgColor}}%
- \fi
- \fi
- \def\webtpTrailerWrapper##1{\smash{\raisebox
- {\web@tpTrailer@raise}{\grfbox@spec{##1}}}}%
+ \setkeys{tpTrailer}{fboxsep=3pt,fboxrule=.4pt}%
+ \setkeys{tpTrailer}{#1}%
+ \setlength{\fboxsep}{\web@tpTrailerfboxsep}%
+ \setlength{\fboxrule}{\web@tpTrailerfboxrule}%
+ \let\web@tp@graphic\web@NO
+ \ifx\web@tpTrailer@graphic\@empty
+ \ifx\web@tpTrailer@namedgraphic\@empty\else
+ \let\web@tp@graphic\web@YES\fi
+ \else\let\web@tp@graphic\web@YES\fi
+ \ifx\web@tp@graphic\web@NO\relax
+ \ifx\web@tpTrailerBgColor\@empty
+ \def\grfbox@spec##1{##1}%
\else
- \@ifundefined{graphicxbox}{\begingroup
- \gdef\webtpTrailerWrapper##1{%
- \edef\web@tmp@opt{\ifx\web@tpTrailer@namedgraphic\@empty\else
- name=\web@tpTrailer@namedgraphic,\fi}%
- \def\web@tp@linewidth{\linewidth-2\fboxsep}%
- \setbox0=\hbox{##1}%
- \noindent\makebox[0pt][l]{%
- \smash{\raisebox{-\dp0-\fboxsep+\web@tpTrailer@raise}{%
- \expandafter\includegraphics\expandafter[\web@tmp@opt
- width=\wd0+2\fboxsep,%
- height=\dp0+\ht0+2\fboxsep]{\web@tpTrailer@graphic}}%
- }}\kern\fboxsep\smash{%
- \raisebox{\web@tpTrailer@raise}{\unhbox0\relax}}%
- }%
- \endgroup}{%
- \xdef\grfbox@spec{%
- \ifx\web@tpTrailerBorderColor\@empty
- \noexpand\graphicxbox\else
- \noexpand\fgraphicxbox{\web@tpTrailerBorderColor}\fi
- \ifx\web@tpTrailer@namedgraphic\@empty\else
- [name=\web@tpTrailer@namedgraphic]\fi}%
- \gdef\webtpTrailerWrapper##1{%
- \edef\web@tp@linewidth{%
- \linewidth-2\fboxsep\ifx\web@tpTrailerBorderColor\@empty
- \else-2\fboxrule\fi}%
- \smash{\raisebox{\web@tpTrailer@raise}{%
- \grfbox@spec{\web@tpTrailer@graphic}{##1}}}}%
- }%
+ \ifx\web@tpTrailerBorderColor\@empty
+ \def\web@tp@linewidth{\linewidth-2\fboxsep}%
+ \def\grfbox@spec{\colorbox{\web@tpTrailerBgColor}}%
+ \else
+ \def\web@tp@linewidth{%
+ \linewidth-2\fboxsep-2\fboxrule}%
+ \def\grfbox@spec{\fcolorbox{\web@tpTrailerBorderColor}%
+ {\web@tpTrailerBgColor}}%
+ \fi
\fi
+ \def\webtpTrailerWrapper##1{\smash{\raisebox
+ {\web@tpTrailer@raise}{\grfbox@spec{##1}}}}%
+ \else
+ \@ifundefined{graphicxbox}{\begingroup
+ \gdef\webtpTrailerWrapper##1{%
+ \edef\web@tmp@opt{\ifx\web@tpTrailer@namedgraphic\@empty\else
+ name=\web@tpTrailer@namedgraphic,\fi}%
+ \def\web@tp@linewidth{\linewidth-2\fboxsep}%
+ \setbox0=\hbox{##1}%
+ \noindent\makebox[0pt][l]{%
+ \smash{\raisebox{-\dp0-\fboxsep+\web@tpTrailer@raise}{%
+ \expandafter\includegraphics\expandafter[\web@tmp@opt
+ width=\wd0+2\fboxsep,%
+ height=\dp0+\ht0+2\fboxsep]{\web@tpTrailer@graphic}}%
+ }}\kern\fboxsep\smash{%
+ \raisebox{\web@tpTrailer@raise}{\unhbox0\relax}}%
+ }%
+ \endgroup}{%
+ \xdef\grfbox@spec{%
+ \ifx\web@tpTrailerBorderColor\@empty
+ \noexpand\graphicxbox\else
+ \noexpand\fgraphicxbox{\web@tpTrailerBorderColor}\fi
+ \ifx\web@tpTrailer@namedgraphic\@empty\else
+ [name=\web@tpTrailer@namedgraphic]\fi}%
+ \gdef\webtpTrailerWrapper##1{%
+ \edef\web@tp@linewidth{%
+ \linewidth-2\fboxsep\ifx\web@tpTrailerBorderColor\@empty
+ \else-2\fboxrule\fi}%
+ \smash{\raisebox{\web@tpTrailer@raise}{%
+ \grfbox@spec{\web@tpTrailer@graphic}{##1}}}}%
+ }%
+ \fi
}
% \end{macrocode}
% \end{macro}
@@ -4548,36 +4448,36 @@
% This value can be set by direct definition, or through the helper command
% \cs{topTitlePageProportion}.
% \begin{macrocode}
- \maketitlepreamble
+ \maketitlepreamble
% \end{macrocode}
% \begin{macrocode}
- \ifeqforpaper\vspace*{2\baselineskip}\else
+ \ifeqforpaper\vspace*{2\baselineskip}\else
\vbox to\titleauthorproportion\textheight\bgroup\fi
% \end{macrocode}
% \begin{macrocode}
- \topTitlePage
+ \topTitlePage
% \end{macrocode}
% \begin{macrocode}
- \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
+ \ifeqforpaper\else\egroup\fi % end of \vbox for title and author
% \end{macrocode}
% Now place the \cs{optionalpagematter}
% \begin{macrocode}
- \begingroup\par
- \aboveOPMvspace
- \noindent\parbox{\linewidth}{\optionalpagematter}%
- \par\endgroup
- \par\vspace{\stretch{1}}
+ \begingroup\par
+ \aboveOPMvspace\noindent
+ \parbox{\linewidth}{\optionalpagematter}\par
+ \endgroup
+ \par\vspace{\stretch{1}}
% \end{macrocode}
% Insert the directory, as desired.
% \begin{macrocode}
- \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
- \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}
+ \ifx\web@directory@option\web@YES\web@directory@hook\webdirectory\fi
+ \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
% \end{macrocode}
% Insert the ``bottom matter''.
% \begin{macrocode}
- \vfill\noindent\begingroup\trailerFontSize\titlepageTrailer
- \par\endgroup
- \maketitlepostamble
+ \vfill\noindent\begingroup\trailerFontSize\titlepageTrailer
+ \par\endgroup
+ \maketitlepostamble
}
\let\web@maketitle@save\maketitle
\let\maketitle\web@maketitle
@@ -4602,7 +4502,7 @@
% to describe where this talk occurred.
% \begin{macrocode}
\def\talkdate#1{\gdef\web@talkdate@value{#1}%
- \edef\webtalkdate{\ifx\web@talkdate@value\@empty
+ \edef\webtalkdate{\ifx\web@talkdate@value\@empty
\else\noexpand\web@talkdatelabel\ #1\fi}}
\let\web@talkdate@value\@empty
%\def\talkdateLabel#1{\def\web@versionlabel{#1}}
@@ -4619,48 +4519,50 @@
% \IndexKey{reset}
% \begin{macrocode}
\define@choicekey+{aebsection}{reset}[\val\nr]{font,all}{%
- \ifcase\nr\relax
- \aeb@reset@section@fonts\or
- \aeb@reset@section@all\fi
+ \ifcase\nr\relax
+ \aeb@reset@section@fonts\or
+ \aeb@reset@section@all
+ \fi
}{\PackageWarning{webpro}{Bad choice for reset, permissible values
are font and all. Try again}}
% \end{macrocode}
% Section headings
-% \IndexKey{type}
-% \IndexKey{special}
+% \IndexKey{type}^^A
+% \IndexKey{special}^^A
% \begin{macrocode}
\define@choicekey+{aebsection}{type}[\val\nr]{section,subsection,%
- subsubsection,university,title,author,toc}%
+ subsubsection,university,title,author,toc}%
{%
- \edef\aeb@section@type{#1}%
- \edef\aeb@section@typeIndex{\nr}%
+ \edef\aeb@section@type{#1}%
+ \edef\aeb@section@typeIndex{\nr}%
}{}{}
\define@key{aebsection}{special}{%
- \edef\aeb@temp@expand{%
- \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
- \aeb@temp@expand{shadow,framebox,colorbox,fcolorbox,frameboxfit,%
- colorboxfit,fcolorboxfit,colorboxfitrule,custom,default}%
+ \edef\aeb@temp@expand{%
+ \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
+ \aeb@temp@expand{shadow,framebox,colorbox,fcolorbox,frameboxfit,%
+ colorboxfit,fcolorboxfit,colorboxfitrule,custom,default}%
{%
\ifcase\nr\relax
- \w@csarg\let{aeb@\aeb@section@type @special}\aeb@shadowHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}\aeb@fcolorboxHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxfitHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxfitHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}
- \aeb@fcolorboxfitHead\or
- \w@csarg\let{aeb@\aeb@section@type @special}
- \aeb@colorboxfitruleHead\or
- \edef\aeb@temp{\noexpand\def\expandafter\noexpand
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@shadowHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@fcolorboxHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@frameboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\aeb@colorboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}
+ \aeb@fcolorboxfitHead\or
+ \w@csarg\let{aeb@\aeb@section@type @special}
+ \aeb@colorboxfitruleHead\or
+ \edef\aeb@temp{\noexpand\def\expandafter\noexpand
\csname aeb@\aeb@section@type @special\endcsname{\expandafter
- \noexpand\csname aeb@\aeb@section@type @customHead\endcsname}}%
- \aeb@temp\or
- \w@csarg\let{aeb@\aeb@section@type @special}\@empty\fi
+ \noexpand\csname aeb@\aeb@section@type @customHead\endcsname}}%
+ \aeb@temp\or
+ \w@csarg\let{aeb@\aeb@section@type @special}\@empty
+ \fi
}{%
- \PackageWarning{webpro}{Bad choice for special, permissible values
- are shadow, framebox, colorbox, fcolorbox, custom and default.
- Try again}}%
+ \PackageWarning{webpro}{Bad choice for special, permissible values
+ are shadow, framebox, colorbox, fcolorbox, custom and default.
+ Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}%
{university}{title}{author}{toc}\do{%
@@ -4694,86 +4596,87 @@
% The command\DescribeMacro{\aeb@frameboxHead} for \texttt{special=framebox}.
% \begin{macrocode}
\def\aeb@frameboxHead#1{%
- \begingroup
+ \begingroup
\@tempdima=\linewidth
\advance\@tempdima-2\fboxsep
\advance\@tempdima-2\fboxrule
\edef\@@aeb@sectionframecolor
- {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
\edef\@@aeb@sectioncolor
- {\@nameuse{aeb@\aeb@section@type color}}%
- \setbox0\vbox{\hsize=\@tempdima#1}\color{\@@aeb@sectionframecolor}%
- \framebox{\color{\@@aeb@sectioncolor}\copy0}%
- \endgroup
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \setbox\z@\vbox{\hsize=\@tempdima#1}%
+ \color{\@@aeb@sectionframecolor}%
+ \framebox{\color{\@@aeb@sectioncolor}\copy\z@}%
+ \endgroup
}
% \end{macrocode}
% The command\DescribeMacro{\aeb@colorboxHead} for \texttt{special=colorbox}.
% \begin{macrocode}
\def\aeb@colorboxHead#1{%
- \begingroup
+ \begingroup
\@tempdima=\linewidth
\advance\@tempdima-2\fboxsep
- \setbox0\vbox{\hsize=\@tempdima#1}%
+ \setbox\z@\vbox{\hsize=\@tempdima#1}%
\edef\@@aeb@sectionbgcolor
{\@nameuse{aeb@\aeb@section@type bgcolor}}%
- \colorbox{\@@aeb@sectionbgcolor}{\copy0}%
- \endgroup
+ \colorbox{\@@aeb@sectionbgcolor}{\copy\z@}%
+ \endgroup
}
% \end{macrocode}
% The command\DescribeMacro{\aeb@fcolorboxHead} for \texttt{special=fcolorbox}.
% \begin{macrocode}
\def\aeb@fcolorboxHead#1{%
- \begingroup
- \@tempdima=\linewidth
+ \begingroup
+ \@tempdima=\linewidth
\advance\@tempdima-2\fboxsep
\advance\@tempdima-2\fboxrule
- \setbox0\vbox{\hsize=\@tempdima#1}%
+ \setbox\z@\vbox{\hsize=\@tempdima#1}%
\edef\@@aeb@sectionbgcolor
- {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
\fcolorbox{\aeb@sectionframecolor}%
- {\@@aeb@sectionbgcolor}{\copy0}
- \endgroup
+ {\@@aeb@sectionbgcolor}{\copy\z@}
+ \endgroup
}
% \end{macrocode}
% The command\DescribeMacro{\aeb@frameboxfitHead} for \texttt{special=frameboxfit}.
% \begin{macrocode}
\def\aeb@frameboxfitHead#1{%
- \begingroup
+ \begingroup
\edef\@@aeb@sectionframecolor
- {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
\edef\@@aeb@sectioncolor
- {\@nameuse{aeb@\aeb@section@type color}}%
+ {\@nameuse{aeb@\aeb@section@type color}}%
\vbox{\color{\@@aeb@sectionframecolor}%
\framebox{\color{\@@aeb@sectioncolor}#1}}%
- \endgroup
+ \endgroup
}
% \end{macrocode}
% The command\DescribeMacro{\aeb@colorboxfitHead} for \texttt{special=colorboxfit}.
% \begin{macrocode}
\def\aeb@colorboxfitHead#1{%
- \begingroup
+ \begingroup
\edef\@@aeb@sectioncolor
- {\@nameuse{aeb@\aeb@section@type color}}%
+ {\@nameuse{aeb@\aeb@section@type color}}%
\edef\@@aeb@sectionbgcolor
- {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
\vbox{\colorbox{\@@aeb@sectionbgcolor}%
- {\color{\@@aeb@sectioncolor}#1}}%
- \endgroup
+ {\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
}
% \end{macrocode}
% The command\DescribeMacro{\aeb@fcolorboxfitHead} for \texttt{special=fcolorboxfit}.
% \begin{macrocode}
\def\aeb@fcolorboxfitHead#1{%
- \begingroup
+ \begingroup
\edef\@@aeb@sectioncolor
- {\@nameuse{aeb@\aeb@section@type color}}%
+ {\@nameuse{aeb@\aeb@section@type color}}%
\edef\@@aeb@sectionbgcolor
- {\@nameuse{aeb@\aeb@section@type bgcolor}}%
+ {\@nameuse{aeb@\aeb@section@type bgcolor}}%
\edef\@@aeb@sectionframecolor
- {\@nameuse{aeb@\aeb@section@type framecolor}}%
+ {\@nameuse{aeb@\aeb@section@type framecolor}}%
\vbox{\fcolorbox{\@@aeb@sectionframecolor}{\@@aeb@sectionbgcolor}%
- {\color{\@@aeb@sectioncolor}#1}}%
- \endgroup
+ {\color{\@@aeb@sectioncolor}#1}}%
+ \endgroup
}
% \end{macrocode}
% Here we define \DescribeMacro{\shadowhoffset}\cs{shadowhoffset} and
@@ -4787,95 +4690,95 @@
% \end{macrocode}
% The command\DescribeMacro{\aeb@shadowHead} for \texttt{special=shadow}.
% \begin{macrocode}
-\def\aeb@shadowHead#1{% dps1
- \begingroup
+\def\aeb@shadowHead#1{%
+ \begingroup
\edef\@@aeb@sectionshadowcolor
- {\@nameuse{aeb@\aeb@section@type shadowcolor}}%
+ {\@nameuse{aeb@\aeb@section@type shadowcolor}}%
\edef\@@aeb@sectioncolor
- {\@nameuse{aeb@\aeb@section@type color}}%
- \setbox0\vbox{\Shadowtrue\hsize=\linewidth #1}%
- \wd0\z@\dp0\z@\relax\raisebox{\aeb@shadowvoffset}%
+ {\@nameuse{aeb@\aeb@section@type color}}%
+ \setbox\z@\vbox{\Shadowtrue\hsize=\linewidth #1}%
+ \wd\z@\z@\dp\z@\z@\raisebox{\aeb@shadowvoffset}%
{\hbox to\z@{\kern\aeb@shadowhoffset%
\Shadowtrue\color{\@@aeb@sectionshadowcolor}
- \box0\hss}}%
- \setbox0\vbox{\Shadowfalse\hsize=\linewidth #1}\box0
- \endgroup
+ \box\z@\hss}}\setbox\z@
+ \vbox{\Shadowfalse\hsize=\linewidth #1}\box\z@
+ \endgroup
}
% \end{macrocode}
% \texttt{usefont}\IndexKey{usefont} allows for a custom shift in font for the title.
% it takes four argument, each of which are enclosed in braces:
-%\begin{verbatim}
-% {<fontencoding>}{<fontfamily>}{<fontseries>}{<fontshape>}
-% {{<fontsize>}{<skip>}}
-%\end{verbatim}
+%\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small,
+%commandchars={!()},codes={\catcode`\%=9}]
+% {!ameta(fontencoding)}{!ameta(fontfamily)}{!ameta(fontseries)}{!ameta(fontshape)}
+% {{!ameta(fontsize)}{!ameta(skip)}}
+%\end{Verbatim}
% \begin{macrocode}
\define@key{aebsection}{usefont}{%
- \w@csarg\def{aeb@\aeb@section@type @usefont}{\aeb@usefont#1}}
+ \w@csarg\def{aeb@\aeb@section@type @usefont}{\aeb@usefont#1}}
\@tfor\@@tmp:={section}{subsection}{subsubsection}
-{university}{title}{author}{toc}\do{%
+ {university}{title}{author}{toc}\do{%
\w@csarg\let{aeb@\@@tmp @usefont}\@empty}
\def\aeb@usefont#1#2#3#4#5{\def\aeb@usefontargv{#5}%
- \ifx\aeb@usefontargv\@empty
+ \ifx\aeb@usefontargv\@empty
% \end{macrocode}
% If the fifth parameter is empty, no font size is specified, we'll
% use the default sizes. We gobble up the next three tokens in the
% definition of \cs{section}, excluding the token that sets size.
% \begin{macrocode}
- \def\aeb@next{\expandafter\@gobble\@gobbletwo}%
- \else
+ \def\aeb@next{\expandafter\@gobble\@gobbletwo}%
+ \else
% \end{macrocode}
% If the fifth parameter is not empty, font size is specified,
% we'll gobble up the next four tokens in the
% definition of \cs{section}, including the token that sets size.
% \begin{macrocode}
- \def\aeb@next{\expandafter\@gobbletwo\@gobbletwo}%
- \fi
- \fontencoding{#1}\fontfamily{#2}%
- \fontseries{#3}\fontshape{#4}\ifx\aeb@usefontargv\@empty\else
- \fontsize#5\fi\selectfont\aeb@next
+ \def\aeb@next{\expandafter\@gobbletwo\@gobbletwo}%
+ \fi
+ \fontencoding{#1}\fontfamily{#2}%
+ \fontseries{#3}\fontshape{#4}\ifx\aeb@usefontargv\@empty\else
+ \fontsize#5\fi\selectfont\aeb@next
}
% \end{macrocode}
% Font related keys.\IndexKey{fontfamily}\IndexKey{fontseries}\IndexKey{fontshape}
% \begin{macrocode}
\define@key{aebsection}{fontfamily}{%
- \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
- \aeb@temp@expand{rmfamily,sffamily,ttfamily}{%
- \w@csarg\def{aeb@\aeb@section@type @fontfamily}{\@nameuse{#1}}%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{rmfamily,sffamily,ttfamily}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontfamily}{\@nameuse{#1}}%
}{\PackageWarning{webpro}{Bad choice for fontfamily, permissible values
- are rmfamily, sffamily and ttfamily. Try again}}%
-}
+ are rmfamily, sffamily and ttfamily. Try again}}}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
-{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontfamily}\aeb@defaultfamily}
+ {author}{toc}\do
+ {\w@csarg\let{aeb@\@@tmp @fontfamily}\aeb@defaultfamily}
\define@key{aebsection}{fontseries}{%
- \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
- \aeb@temp@expand{bfseries,mdseries}{%
- \w@csarg\def{aeb@\aeb@section@type @fontseries}{\@nameuse{#1}}%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{bfseries,mdseries}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontseries}{\@nameuse{#1}}%
}{\PackageWarning{webpro}{Bad choice for fontseries, permissible values
- are bfseries and mdseries. Try again}}%
-}
+ are bfseries and mdseries. Try again}}}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
-{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontseries}\bfseries}
+ {author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontseries}\bfseries}
\define@key{aebsection}{fontshape}{%
- \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
- \aeb@temp@expand{upshape,itshape,scshape,slshape}{%
- \w@csarg\def{aeb@\aeb@section@type @fontshape}{\@nameuse{#1}}%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{upshape,itshape,scshape,slshape}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontshape}{\@nameuse{#1}}%
}{\PackageWarning{webpro}{Bad choice for fontshape, permissible values
are upshape, itshape, scshape and slshape. Try again}}%
}
\@tfor\@@tmp:={section}{subsection}{subsubsection}{university}{title}%
-{author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontshape}\upshape}
+ {author}{toc}\do{\w@csarg\let{aeb@\@@tmp @fontshape}\upshape}
\define@key{aebsection}{fontsize}{%
- \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
- \aeb@temp@expand{tiny,scriptsize,footnotesize,%
- small,normalsize,large,Large,LARGE,huge,Huge}{%
- \w@csarg\def{aeb@\aeb@section@type @fontsize}{\@nameuse{#1}}%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{tiny,scriptsize,footnotesize,%
+ small,normalsize,large,Large,LARGE,huge,Huge}{%
+ \w@csarg\def{aeb@\aeb@section@type @fontsize}{\@nameuse{#1}}%
}{\PackageWarning{webpro}{Bad choice for fontsize, permissible values
- are tiny, scriptsize, footnotesize, small, normalsize,
- large, Large, LARGE, huge and Huge. Try again}}%
+ are tiny, scriptsize, footnotesize, small, normalsize,
+ large, Large, LARGE, huge and Huge. Try again}}%
}
\@tfor\@@tmp:={{section}{\normalsize}}{{subsection}{\normalsize}}%
-{{subsubsection}{\normalsize}}{{university}{\normalsize}}%
-{{title}{\large}}{{author}{\normalsize}}{{toc}{\small}}\do{%
+ {{subsubsection}{\normalsize}}{{university}{\normalsize}}%
+ {{title}{\large}}{{author}{\normalsize}}{{toc}{\small}}\do{%
\expandafter\getargs\@@tmp
\edef\aeb@temp{\global\noexpand
\let\expandafter\noexpand\csname aeb@\aeb@argi @fontsize\endcsname
@@ -4885,23 +4788,22 @@
% Alignment related keys\IndexKey{halign}
% \begin{macrocode}
\define@key{aebsection}{halign}{%
- \edef\aeb@temp@expand{%
- \noexpand\XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
- \aeb@temp@expand{l,c,r}{%
- \ifcase\nr\relax
- \w@csarg\let{aeb@\aeb@section@type @halign}\raggedright\or
- \w@csarg\let{aeb@\aeb@section@type @halign}\centering\or
- \w@csarg\let{aeb@\aeb@section@type @halign}\raggedleft\fi
+ \edef\aeb@temp@expand{\noexpand
+ \XKV@cc+[\noexpand\val\noexpand\nr]{#1}}%
+ \aeb@temp@expand{l,c,r}{%
+ \ifcase\nr\relax
+ \w@csarg\let{aeb@\aeb@section@type @halign}\raggedright\or
+ \w@csarg\let{aeb@\aeb@section@type @halign}\centering\or
+ \w@csarg\let{aeb@\aeb@section@type @halign}\raggedleft\fi
}{\PackageWarning{webpro}{Bad choice for halign, permissible values
are l, c and r. Try again}}%
}
\@tfor\@@tmp:={\aeb@section@halign\raggedright}
-{\aeb@subsection@halign\raggedright}
-{\aeb@subsubsection@halign\raggedright}
-{\aeb@university@halign\centering}
-{\aeb@title@halign\centering}{\aeb@author@halign\centering}%
-{\aeb@toc@halign\centering}\do
-{%
+ {\aeb@subsection@halign\raggedright}
+ {\aeb@subsubsection@halign\raggedright}
+ {\aeb@university@halign\centering}
+ {\aeb@title@halign\centering}{\aeb@author@halign\centering}%
+ {\aeb@toc@halign\centering}\do{%
\expandafter\getargs\@@tmp
\edef\aeb@temp{\noexpand\let\expandafter\noexpand\aeb@argi
\expandafter\noexpand\aeb@argii}\aeb@temp
@@ -4910,20 +4812,20 @@
% Color, rule, and ding related keys\IndexKey{ding}\IndexKey{color}\IndexKey{ruleheight}%
% \IndexKey{ruleheigtht}\IndexKey{numdingcolor}
% \begin{macrocode}
-\define@key{aebsection}{ding}{\if\aeb@use@section@numbers0
- \webtoksi=\expandafter{\expandafter\protect
- \expandafter\web@sel@sec@col\expandafter{\aeb@section@type}#1\ }%
- \w@csarg\edef{aeb@\aeb@section@type Num}##1{\the\webtoksi}%
- \else\PackageWarning{webpro}{The ding key is not available with a
- section numbering system,\MessageBreak
- ignoring request for a ding.}\fi
+\define@key{aebsection}{ding}{\if\aeb@use@section@numbers\web@Zero
+ \webtoksi=\expandafter{\expandafter\protect
+ \expandafter\web@sel@sec@col\expandafter{\aeb@section@type}#1\ }%
+ \w@csarg\edef{aeb@\aeb@section@type Num}##1{\the\webtoksi}%
+ \else\PackageWarning{webpro}{The ding key is not available with a
+ section numbering system,\MessageBreak
+ ignoring request for a ding.}\fi
}
\define@key{aebsection}{color}{%
- \w@csarg\def{aeb@\aeb@section@type color}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type color}{#1}}
\define@key{aebsection}{ruleheight}{%
- \w@csarg\def{aeb@\aeb@section@type ruleheight}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type ruleheight}{#1}}
\define@key{aebsection}{numdingcolor}{%
- \w@csarg\def{aeb@\aeb@section@type numdingcolor}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type numdingcolor}{#1}}
% \end{macrocode}
% Section color defaults
% \begin{macrocode}
@@ -4967,7 +4869,7 @@
\def\aeb@authorframecolor{blue}
\def\aeb@tocframecolor{blue}
\define@key{aebsection}{bgcolor}{%
- \w@csarg\def{aeb@\aeb@section@type bgcolor}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type bgcolor}{#1}}
\def\aeb@sectionbgcolor{cornsilk}
\def\aeb@subsectionbgcolor{cornsilk}
\def\aeb@subsubsectionbgcolor{cornsilk}
@@ -4976,7 +4878,7 @@
\def\aeb@authorbgcolor{cornsilk}
\def\aeb@tocbgcolor{cornsilk}
\define@key{aebsection}{shadowcolor}{%
- \w@csarg\def{aeb@\aeb@section@type shadowcolor}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type shadowcolor}{#1}}
\def\aeb@sectionshadowcolor{black}
\def\aeb@subsectionshadowcolor{black}
\def\aeb@subsubsectionshadowcolor{black}
@@ -4988,9 +4890,9 @@
% Indent\IndexKey{indent}
% \begin{macrocode}
\define@key{aebsection}{indent}[0pt]{%
- \edef\web@argi{#1}\ifx\web@argi\@empty
- \def\web@argi{0pt}\fi
- \w@csarg\edef{aeb@\aeb@section@type @indent}{\web@argi}}
+ \edef\web@argi{#1}\ifx\web@argi\@empty
+ \def\web@argi{0pt}\fi
+ \w@csarg\edef{aeb@\aeb@section@type @indent}{\web@argi}}
\def\aeb@section@indent{\z@}
\def\aeb@subsection@indent{\z@}
\def\aeb@subsubsection@indent{\z@}
@@ -5002,7 +4904,7 @@
%Other keys\IndexKey{beforeskip}\IndexKey{afterskip}
% \begin{macrocode}
\define@key{aebsection}{beforeskip}{%
- \w@csarg\def{aeb@\aeb@section@type @beforeskip}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type @beforeskip}{#1}}
\def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
\def\aeb@subsection@beforeskip{-2.5ex\@plus -1ex \@minus -.2ex}
\def\aeb@subsubsection@beforeskip{-2ex\@plus -1ex \@minus -.2ex}
@@ -5011,7 +4913,7 @@
\def\aeb@author@beforeskip{-1ex\@plus -1ex \@minus-.2ex}
\def\aeb@toc@beforeskip{-3ex\@plus -1ex \@minus-.2ex}
\define@key{aebsection}{afterskip}{%
- \w@csarg\def{aeb@\aeb@section@type @afterskip}{#1}}
+ \w@csarg\def{aeb@\aeb@section@type @afterskip}{#1}}
\def\aeb@section@afterskip{1ex\@plus .2ex}
\def\aeb@subsection@afterskip{1ex\@plus .2ex}
\def\aeb@subsubsection@afterskip{.5ex\@plus .2ex}
@@ -5033,9 +4935,9 @@
% the title or author. This alignment will be across the width of the text region.
% \begin{macrocode}
\define@key{aebsection}{xhalign}{%
- \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
- \aeb@temp@expand{l,c,r}{%
- \w@csarg\def{halign\aeb@section@type}{#1}%
+ \edef\aeb@temp@expand{\noexpand\XKV@cc+{#1}}%
+ \aeb@temp@expand{l,c,r}{%
+ \w@csarg\def{halign\aeb@section@type}{#1}%
}{\PackageWarning{webpro}{Bad choice for xhalign, permissible values
are l, c and r. Try again}}%
}
@@ -5054,58 +4956,56 @@
% \end{macrocode}
% Commands that hold the reset values.
% \begin{macrocode}
-\def\aeb@reset@section@fonts{%
- \normalfont\normalsize
- \ifcase\aeb@section@typeIndex\relax
- \let\aeb@section@usefont\@empty
- \let\aeb@section@fontfamily\aeb@defaultfamily
- \let\aeb@section@fontseries\bfseries
- \let\aeb@section@fontshape\upshape
- \let\aeb@section@fontsize\Large
- \or
- \let\aeb@subsection@usefont\@empty
- \let\aeb@subsection@fontfamily\aeb@defaultfamily
- \let\aeb@subsection@fontseries\bfseries
- \let\aeb@subsection@fontshape\upshape
- \let\aeb@subsection@fontsize\large
- \or
- \let\aeb@subsubsection@usefont\@empty
- \let\aeb@subsubsection@fontfamily\aeb@defaultfamily
- \let\aeb@subsubsection@fontseries\bfseries
- \let\aeb@subsubsection@fontshape\upshape
- \let\aeb@subsubsection@fontsize\normalsize
- \fi
+\def\aeb@reset@section@fonts{\normalfont\normalsize
+ \ifcase\aeb@section@typeIndex\relax
+ \let\aeb@section@usefont\@empty
+ \let\aeb@section@fontfamily\aeb@defaultfamily
+ \let\aeb@section@fontseries\bfseries
+ \let\aeb@section@fontshape\upshape
+ \let\aeb@section@fontsize\Large
+ \or
+ \let\aeb@subsection@usefont\@empty
+ \let\aeb@subsection@fontfamily\aeb@defaultfamily
+ \let\aeb@subsection@fontseries\bfseries
+ \let\aeb@subsection@fontshape\upshape
+ \let\aeb@subsection@fontsize\large
+ \or
+ \let\aeb@subsubsection@usefont\@empty
+ \let\aeb@subsubsection@fontfamily\aeb@defaultfamily
+ \let\aeb@subsubsection@fontseries\bfseries
+ \let\aeb@subsubsection@fontshape\upshape
+ \let\aeb@subsubsection@fontsize\normalsize
+ \fi
}
-\def\aeb@reset@section@all{%
- \aeb@reset@section@fonts
- \ifcase\aeb@section@typeIndex\relax
- \let\aeb@section@halign\raggedright
- \def\aeb@sectioncolor{blue}%
- \def\aeb@sectionshadowcolor{black}%
- \let\aeb@section@special=\@empty
- \def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}%
- \def\aeb@section@afterskip{1ex\@plus .2ex}%
- \def\aeb@sectionframecolor{blue}%
- \def\aeb@sectionframecolor{cornsilk}%
- \or
- \let\aeb@subsection@halign\raggedright
- \def\aeb@subsectioncolor{blue}%
- \def\aeb@subsectionshadowcolor{black}%
- \let\aeb@subsection@special=\@empty
- \def\aeb@subsection@beforeskip{-2.5ex\@plus-1ex \@minus-.2ex}%
- \def\aeb@subsection@afterskip{1ex\@plus .2ex}%
- \def\aeb@subsectionframecolor{blue}%
- \def\aeb@subsectionframecolor{cornsilk}%
- \or
- \let\aeb@subsubsection@halign\raggedright
- \def\aeb@subsubsectioncolor{blue}%
- \def\aeb@subsubsectionshadowcolor{black}%
- \let\aeb@subsubsection@special=\@empty
- \def\aeb@subsubsection@beforeskip{-2ex\@plus-1ex \@minus-.2ex}%
- \def\aeb@subsubsection@afterskip{1ex\@plus .2ex}%
- \def\aeb@subsubsectionframecolor{blue}%
- \def\aeb@subsubsectionframecolor{cornsilk}%
- \fi
+\def\aeb@reset@section@all{\aeb@reset@section@fonts
+ \ifcase\aeb@section@typeIndex\relax
+ \let\aeb@section@halign\raggedright
+ \def\aeb@sectioncolor{blue}%
+ \def\aeb@sectionshadowcolor{black}%
+ \let\aeb@section@special=\@empty
+ \def\aeb@section@beforeskip{-3ex\@plus -1ex \@minus-.2ex}%
+ \def\aeb@section@afterskip{1ex\@plus .2ex}%
+ \def\aeb@sectionframecolor{blue}%
+ \def\aeb@sectionframecolor{cornsilk}%
+ \or
+ \let\aeb@subsection@halign\raggedright
+ \def\aeb@subsectioncolor{blue}%
+ \def\aeb@subsectionshadowcolor{black}%
+ \let\aeb@subsection@special=\@empty
+ \def\aeb@subsection@beforeskip{-2.5ex\@plus-1ex \@minus-.2ex}%
+ \def\aeb@subsection@afterskip{1ex\@plus .2ex}%
+ \def\aeb@subsectionframecolor{blue}%
+ \def\aeb@subsectionframecolor{cornsilk}%
+ \or
+ \let\aeb@subsubsection@halign\raggedright
+ \def\aeb@subsubsectioncolor{blue}%
+ \def\aeb@subsubsectionshadowcolor{black}%
+ \let\aeb@subsubsection@special=\@empty
+ \def\aeb@subsubsection@beforeskip{-2ex\@plus-1ex \@minus-.2ex}%
+ \def\aeb@subsubsection@afterskip{1ex\@plus .2ex}%
+ \def\aeb@subsubsectionframecolor{blue}%
+ \def\aeb@subsubsectionframecolor{cornsilk}%
+ \fi
}
% \end{macrocode}
% Here I've taken the \cs{section} command, as defined in \textsf{web},
@@ -5113,91 +5013,92 @@
% This helps to keep track of the page of the current section; used
% with the panel table of contents.
% \begin{macrocode}
-\renewcommand{\section}{% dps1
- \renewcommand{\@seccntformat}[1]{\aeb@sectionNum{##1}}%
- \@startsection{section}{1}{\aeb@section@indent}%
- {\aeb@section@beforeskip}{\aeb@section@afterskip}%
- {\noindent\xdef\aeb@sectionpage{\the\c@page}%
- \def\aeb@section@type{section}%
- \aeb@section@usefont\aeb@section@fontfamily\aeb@section@fontseries
- \aeb@section@fontshape\aeb@section@fontsize\aeb@section@halign
- \color{\aeb@sectioncolor}\aeb@section@special}}
-\renewcommand\subsection{% dps1
- \renewcommand{\@seccntformat}[1]{\aeb@subsectionNum{##1}}%
- \@startsection{subsection}{2}{\aeb@subsection@indent}%
- {\aeb@subsection@beforeskip}{\aeb@subsection@afterskip}%
- {\noindent\def\aeb@section@type{subsection}%
- \aeb@subsection@usefont\aeb@subsection@fontfamily
- \aeb@subsection@fontseries\aeb@subsection@fontshape
- \aeb@subsection@fontsize\aeb@subsection@halign
- \color{\aeb@subsectioncolor}\aeb@subsection@special}}
+\renewcommand{\section}{%
+ \renewcommand{\@seccntformat}[1]{\aeb@sectionNum{##1}}%
+ \@startsection{section}{1}{\aeb@section@indent}%
+ {\aeb@section@beforeskip}{\aeb@section@afterskip}%
+ {\noindent\xdef\aeb@sectionpage{\the\c@page}%
+ \def\aeb@section@type{section}%
+ \aeb@section@usefont\aeb@section@fontfamily\aeb@section@fontseries
+ \aeb@section@fontshape\aeb@section@fontsize\aeb@section@halign
+ \color{\aeb@sectioncolor}\aeb@section@special}}
+\renewcommand\subsection{%
+ \renewcommand{\@seccntformat}[1]{\aeb@subsectionNum{##1}}%
+ \@startsection{subsection}{2}{\aeb@subsection@indent}%
+ {\aeb@subsection@beforeskip}{\aeb@subsection@afterskip}%
+ {\noindent\def\aeb@section@type{subsection}%
+ \aeb@subsection@usefont\aeb@subsection@fontfamily
+ \aeb@subsection@fontseries\aeb@subsection@fontshape
+ \aeb@subsection@fontsize\aeb@subsection@halign
+ \color{\aeb@subsectioncolor}\aeb@subsection@special}}
\def\subsubDefaultDing#1{\def\web@subsubDefaultDing{{#1}}}
\subsubDefaultDing{\textrm\textbullet}
-\renewcommand\subsubsection{% dps1
- \renewcommand{\@seccntformat}[1]{\aeb@subsubsectionNum{##1}}%
- \@startsection{subsubsection}{3}{\aeb@subsubsection@indent}%
- {\aeb@subsubsection@beforeskip}{\aeb@subsubsection@afterskip}%
- {\noindent\def\aeb@section@type{subsubsection}%
- \aeb@subsubsection@usefont\aeb@subsubsection@fontfamily
- \aeb@subsubsection@fontseries\aeb@subsubsection@fontshape
- \aeb@subsubsection@fontsize\aeb@subsubsection@halign
- \color{\aeb@subsubsectioncolor}\aeb@subsubsection@special}}
+\renewcommand\subsubsection{%
+ \renewcommand{\@seccntformat}[1]{\aeb@subsubsectionNum{##1}}%
+ \@startsection{subsubsection}{3}{\aeb@subsubsection@indent}%
+ {\aeb@subsubsection@beforeskip}{\aeb@subsubsection@afterskip}%
+ {\noindent\def\aeb@section@type{subsubsection}%
+ \aeb@subsubsection@usefont\aeb@subsubsection@fontfamily
+ \aeb@subsubsection@fontseries\aeb@subsubsection@fontshape
+ \aeb@subsubsection@fontsize\aeb@subsubsection@halign
+ \color{\aeb@subsubsectioncolor}\aeb@subsubsection@special}}
\renewcommand*\thesection{%
- \if\aeb@use@section@numbers1\arabic{section}\fi}
+ \if\aeb@use@section@numbers\web@One\arabic{section}\fi}
\renewcommand*\thesubsection{%
- \if\aeb@use@section@numbers1\thesection.\arabic{subsection}\fi}
+ \if\aeb@use@section@numbers\web@One\thesection.\arabic{subsection}\fi}
\renewcommand*{\thesubsubsection}{%
- \if\aeb@use@section@numbers1%
- \if@defaultsubsubding\web@subsubDefaultDing
- \else\thesubsection.\arabic{subsubsection}\fi
- \fi}
+ \if\aeb@use@section@numbers\web@One
+ \if@defaultsubsubding\web@subsubDefaultDing
+ \else\thesubsection.\arabic{subsubsection}\fi
+ \fi
+}
% \end{macrocode}
% We attempt to format the university, title and author in the same way as
% we do the sections
% \begin{macrocode}
\newcommand{\sectionTitle}{\aeb@sectionTitle*}
\newcommand{\aeb@sectionTitle}{%
- \renewcommand{\@seccntformat}[1]{\aeb@titleNum{##1}}%
- \@startsection{section}{1}{\aeb@title@indent}%
- {\aeb@title@beforeskip}{\aeb@title@afterskip}%
- {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{title}%
- \aeb@title@usefont\aeb@title@fontfamily\aeb@title@fontseries
- \aeb@title@fontshape\aeb@title@fontsize\aeb@title@halign
- \ifx\webtitle@color\@empty\else\color{\aeb@titlecolor}\fi
- \aeb@title@special}}
+ \renewcommand{\@seccntformat}[1]{\aeb@titleNum{##1}}%
+ \@startsection{section}{1}{\aeb@title@indent}%
+ {\aeb@title@beforeskip}{\aeb@title@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{title}%
+ \aeb@title@usefont\aeb@title@fontfamily\aeb@title@fontseries
+ \aeb@title@fontshape\aeb@title@fontsize\aeb@title@halign
+ \ifx\webtitle@color\@empty\else\color{\aeb@titlecolor}\fi
+ \aeb@title@special}}
\newcommand{\sectionAuthor}{\aeb@sectionAuthor*}
\newcommand{\aeb@sectionAuthor}{%
- \renewcommand{\@seccntformat}[1]{\aeb@authorNum{##1}}%
- \@startsection{section}{1}{\aeb@author@indent}%
- {\aeb@author@beforeskip}{\aeb@author@afterskip}%
- {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{author}%
- \aeb@author@usefont\aeb@author@fontfamily\aeb@author@fontseries
- \aeb@author@fontshape\aeb@author@fontsize\aeb@author@halign
- \ifx\webauthor@color\@empty\else\color{\aeb@authorcolor}\fi
- \aeb@author@special}}
+ \renewcommand{\@seccntformat}[1]{\aeb@authorNum{##1}}%
+ \@startsection{section}{1}{\aeb@author@indent}%
+ {\aeb@author@beforeskip}{\aeb@author@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{author}%
+ \aeb@author@usefont\aeb@author@fontfamily\aeb@author@fontseries
+ \aeb@author@fontshape\aeb@author@fontsize\aeb@author@halign
+ \ifx\webauthor@color\@empty\else\color{\aeb@authorcolor}\fi
+ \aeb@author@special}}
\newcommand{\sectionUniversity}{\aeb@sectionUniversity*}
\newcommand{\aeb@sectionUniversity}{%
- \renewcommand{\@seccntformat}[1]{\aeb@universityNum{##1}}%
- \@startsection{section}{1}{\aeb@university@indent}%
- {\aeb@university@beforeskip}{\aeb@university@afterskip}%
- {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{university}%
- \aeb@university@usefont\aeb@university@fontfamily
- \aeb@university@fontseries\aeb@university@fontshape
- \aeb@university@fontsize\aeb@university@halign
- \ifx\webuniversity@color\@empty\else
- \color{\aeb@universitycolor}\fi\aeb@university@special}}
+ \renewcommand{\@seccntformat}[1]{\aeb@universityNum{##1}}%
+ \@startsection{section}{1}{\aeb@university@indent}%
+ {\aeb@university@beforeskip}{\aeb@university@afterskip}%
+ {\xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{university}%
+ \aeb@university@usefont\aeb@university@fontfamily
+ \aeb@university@fontseries\aeb@university@fontshape
+ \aeb@university@fontsize\aeb@university@halign
+ \ifx\webuniversity@color\@empty\else
+ \color{\aeb@universitycolor}\fi\aeb@university@special}}
\newcommand{\sectionToc}{\aeb@sectionToc*}
\newcommand{\aeb@sectionToc}{%
- \renewcommand{\@seccntformat}[1]{\aeb@tocNum{##1}}%
- \@startsection{section}{1}{\aeb@toc@indent}%
- {\aeb@toc@beforeskip}{\aeb@toc@afterskip}%
- {\hypertarget{webtoc}{}%
- \xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{toc}%
- \aeb@toc@usefont\aeb@toc@fontfamily
- \aeb@toc@fontseries\aeb@toc@fontshape
- \aeb@toc@fontsize\aeb@toc@halign
- \ifx\aeb@toccolor\@empty\else
- \color{\aeb@toccolor}\fi\aeb@toc@special}}
+ \renewcommand{\@seccntformat}[1]{\aeb@tocNum{##1}}%
+ \@startsection{section}{1}{\aeb@toc@indent}%
+ {\aeb@toc@beforeskip}{\aeb@toc@afterskip}%
+ {\hypertarget{webtoc}{}%
+ \xdef\aeb@titlepage{\the\c@page}\def\aeb@section@type{toc}%
+ \aeb@toc@usefont\aeb@toc@fontfamily
+ \aeb@toc@fontseries\aeb@toc@fontshape
+ \aeb@toc@fontsize\aeb@toc@halign
+ \ifx\aeb@toccolor\@empty\else
+ \color{\aeb@toccolor}\fi\aeb@toc@special}}
% \end{macrocode}
%
% \subsection{Layout Commands}\label{sectionLayout}
@@ -5214,20 +5115,20 @@
% globally reset the values. Here we process the keys devoted to the section layout.
% \begin{macrocode}
\def\save@prtscr{\global\let\prtscr@save\prtscr
- \global\let\prtscr\prtscrA}
+ \global\let\prtscr\prtscrA}
\def\restore@prtscr{\global\let\prtscr\prtscr@save}
\newcommand{\sectionLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=section,color=blue,ruleheight=1pt}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=section,color=blue,ruleheight=1pt}%
+ \protected@edef\x{\noexpand\setkeys{aebsection}{#1}}\x
+ \aeb@temp\restore@prtscr}
\newcommand{\subsectionLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=subsection,color=blue,ruleheight=1pt}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=subsection,color=blue,ruleheight=1pt}%
+ \protected@edef\x{\noexpand\setkeys{aebsection}{#1}}\x
+ \aeb@temp\restore@prtscr}
\newcommand{\subsubsectionLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=subsubsection,color=blue,ruleheight=1pt}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=subsubsection,color=blue,ruleheight=1pt}%
+ \protected@edef\x{\noexpand\setkeys{aebsection}{#1}}\x
+ \aeb@temp\restore@prtscr}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5240,24 +5141,24 @@
% title and author on the title page of the presentation.
% \begin{macrocode}
\newcommand{\universityLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=university}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=university}%
+ \protected@edef\x{\noexpand\setkeys{aebsection}{#1}}\x
+ \aeb@temp\restore@prtscr}
\universityLayout{fontsize={\prtscrA{large}{normalsize}}}
\newcommand{\titleLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=title}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=title}%
+ \protected@edef\x{\noexpand\setkeys{aebsection}{#1}}\x
+ \aeb@temp\restore@prtscr}
\titleLayout{fontsize={\prtscrA{Large}{normalsize}}}
\newcommand{\authorLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=author}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=author}%
+ \protected@edef\x{\noexpand\setkeys{aebsection}{#1}}\x
+ \aeb@temp\restore@prtscr}
\authorLayout{fontsize={\prtscrA{large}{normalsize}}}
\newcommand{\tocLayout}[1]{\save@prtscr
- \setkeys{aebsection}{type=toc,color=\web@tocColor}%
- \protected@edef\aeb@temp{\noexpand\setkeys{aebsection,aebToc}{#1}}%
- \aeb@temp\restore@prtscr}
+ \setkeys{aebsection}{type=toc,color=\web@tocColor}%
+ \protected@edef\x{\noexpand\setkeys{aebsection,aebToc}{#1}}\x
+ \aeb@temp\restore@prtscr}
\tocLayout{fontsize=Large}
% \end{macrocode}
% \end{macro}
@@ -5275,8 +5176,8 @@
% below, and also in the \texttt{ding} key from the \texttt{aebsection} family.
% \begin{macrocode}
\def\web@sel@sec@col#1{\ifShadow
- \color{\@nameuse{aeb@#1shadowcolor}}\else
- \color{\@nameuse{aeb@#1numdingcolor}}\fi}
+ \color{\@nameuse{aeb@#1shadowcolor}}\else
+ \color{\@nameuse{aeb@#1numdingcolor}}\fi}
% \end{macrocode}
% \begin{macro}{\useSectionNumbers}
% \begin{macro}{\noSectionNumbers}
@@ -5286,29 +5187,29 @@
% value at no, i.e., I've executed \cs{noSectionNumbers}.
% \begin{macrocode}
\newcommand{\useSectionNumbers}
-{% dps1
- \let\aeb@use@section@numbers1\relax
- \def\aeb@sectionNum##1{\protect\web@sel@sec@col{section}%
- \@nameuse{the##1}\web@finalDot\ }%
- \def\aeb@subsectionNum##1{\protect\web@sel@sec@col{subsection}%
- \@nameuse{the##1}\web@finalDot\ }%
- \def\aeb@subsubsectionNum##1{%
- \protect\web@sel@sec@col{subsubsection}%
+{%
+ \let\aeb@use@section@numbers\web@One
+ \def\aeb@sectionNum##1{\protect
+ \web@sel@sec@col{section}\@nameuse{the##1}\web@finalDot\ }%
+ \def\aeb@subsectionNum##1{\protect
+ \web@sel@sec@col{subsection}\@nameuse{the##1}\web@finalDot\ }%
+ \def\aeb@subsubsectionNum##1{\protect
+ \web@sel@sec@col{subsubsection}%
\@nameuse{the##1}\if@defaultsubsubding\else\web@finalDot\fi\ }%
\def\sectionmark##1{\markright{##1}}%
}
\newcommand{\noSectionNumbers}
{%
- \ifx\web@latextoc\web@YES
- \PackageInfo{web}{The nobullets or latextoc option
- taken,\MessageBreak
- ignoring \string\noSectionNumbers}%
- \else
- \let\aeb@use@section@numbers0\relax
- \let\aeb@sectionNum\@gobble
- \let\aeb@subsectionNum\@gobble
- \let\aeb@subsubsectionNum\@gobble
- \fi
+ \ifx\web@latextoc\web@YES
+ \PackageInfo{web}{The nobullets or latextoc option
+ taken,\MessageBreak
+ ignoring \string\noSectionNumbers}%
+ \else
+ \let\aeb@use@section@numbers\web@Zero
+ \let\aeb@sectionNum\@gobble
+ \let\aeb@subsectionNum\@gobble
+ \let\aeb@subsubsectionNum\@gobble
+ \fi
}
\useSectionNumbers
% \end{macrocode}
@@ -5332,11 +5233,11 @@
% \IndexKey{urlColor}
% \begin{macrocode}
\define@key{aebcolordesign}{universityColor}{\universityColor{#1}}
- \def\aeb@universitycolor{\webuniversity@color}
+ \def\aeb@universitycolor{\webuniversity@color}
\define@key{aebcolordesign}{titleColor}{\titleColor{#1}}
- \def\aeb@titlecolor{\webtitle@color}
+ \def\aeb@titlecolor{\webtitle@color}
\define@key{aebcolordesign}{authorColor}{\authorColor{#1}}
- \def\aeb@authorcolor{\webauthor@color}
+ \def\aeb@authorcolor{\webauthor@color}
\define@key{aebcolordesign}{textBgColor}{\textBgColor{#1}}
\define@key{aebcolordesign}{panelBgColor}{\panelBgColor{#1}}
\define@key{aebcolordesign}{linkColor}{\def\@linkcolor{#1}}
@@ -5392,7 +5293,7 @@
\ddDingTocColor{blue}
\dddDingTocColor{webgreen}
\@tfor\@@tmp:={d@DingToc}{dd@DingToc}{ddd@DingToc}\do
- {\w@csarg\let{\@@tmp}\@empty}
+ {\w@csarg\let{\@@tmp}\@empty}
% \end{macrocode}
% \begin{macro}{\selectTocDings}
% This is an \textsf{xkeyval} interface to setting the dings used by
@@ -5412,9 +5313,9 @@
% the dings there.
% \begin{macrocode}
\def\@setTocDings{%
- \ifx\d@DingToc\@empty\else\dDing{\d@DingToc}\fi
- \ifx\dd@DingToc\@empty\else\ddDing{\dd@DingToc}\fi
- \ifx\ddd@DingToc\@empty\else\dddDing{\ddd@DingToc}\fi
+ \ifx\d@DingToc\@empty\else\dDing{\d@DingToc}\fi
+ \ifx\dd@DingToc\@empty\else\ddDing{\dd@DingToc}\fi
+ \ifx\ddd@DingToc\@empty\else\dddDing{\ddd@DingToc}\fi
}
% \end{macrocode}
% \end{macro}% Now, if for paper\dots
@@ -5427,9 +5328,9 @@
% comment environments one \texttt{forpaper} and another for
% \texttt{forscreen}.
% \begin{macrocode}
- \includecomment{forpaper}\excludecomment{forscreen}
+ \includecomment{forpaper}\excludecomment{forscreen}
\else
- \includecomment{forscreen}\excludecomment{forpaper}
+ \includecomment{forscreen}\excludecomment{forpaper}
\fi
% \end{macrocode}
% \end{environment}
@@ -5445,16 +5346,16 @@
% D. P. Story
%
\newcommand{\setupFullwidth}{%
- \setlength{\textwidth}{\paperwidth}%
- \advance\textwidth-2in
- \setlength{\linewidth}{\textwidth}%
- \setlength{\columnseprule}{0pt}%
- \setlength{\oddsidemargin}{0in}%
- \setlength{\evensidemargin}{0in}%
+ \setlength{\textwidth}{\paperwidth}%
+ \advance\textwidth-2in
+ \setlength{\linewidth}{\textwidth}%
+ \setlength{\columnseprule}{0pt}%
+ \setlength{\oddsidemargin}{0in}%
+ \setlength{\evensidemargin}{0in}%
}
\makeatletter
\def\clindx{\ifcodeline@index\expandafter\@firstoftwo\else
- \expandafter\@secondoftwo\fi}
+ \expandafter\@secondoftwo\fi}
\GlossaryPrologue{\section{Change History}}
\IndexPrologue{\section{Index}\hfuzz\linewidth
\parbox{\linewidth}{Numbers written in italic
diff --git a/macros/latex/contrib/moderncv/CHANGELOG b/macros/latex/contrib/moderncv/CHANGELOG
index 8e300badd1..41cbe5fb47 100644
--- a/macros/latex/contrib/moderncv/CHANGELOG
+++ b/macros/latex/contrib/moderncv/CHANGELOG
@@ -1,3 +1,14 @@
+version 2.1.0 (21 Jan 2021)
+- maintainer change: now team maintained (https://github.com/moderncv), since
+ original repository is basically dead since 2016.
+- new \social options: Xing, Skype, GitLab, Bitbucket, stack overflow, ORCID,
+ ResearcherID, ResearchGate, Telegram and Google Scholar
+- hyperlinks in phone numbers
+- switch from l3regex to expl3
+- new skill matrix feature
+- move to fonawesome5 package
+- default to https
+
version 2.0.0 (28 Jul 2015)
- refactored the code into heads, body, foot and icon substyles. All styles
(classic, casual, banking and oldstyle) are just a combination of these and
diff --git a/macros/latex/contrib/moderncv/KNOWN_BUGS b/macros/latex/contrib/moderncv/KNOWN_BUGS
index 6566076706..15b86eccbc 100644
--- a/macros/latex/contrib/moderncv/KNOWN_BUGS
+++ b/macros/latex/contrib/moderncv/KNOWN_BUGS
@@ -9,7 +9,7 @@
when used with bibentry, through the output is actually correct. Amongst other,
this causes compilation by LyX to stop.
- The space after a cventry gets eaten up when the last argument contains a nested
- itemize environment. An ugly hack and uncomplete solution was implemented by
+ itemize environment. An ugly hack and incomplete solution was implemented by
including a \strut in every item label, but this doesn't solve the problem for
- multi-line items. Ideally, the strut should end the item, but there seem to be
+ multi-line items. Ideally, the strut should end the item, but there seems to be
no way to do this.
diff --git a/macros/latex/contrib/moderncv/LICENSE.txt b/macros/latex/contrib/moderncv/LICENSE.txt
new file mode 100644
index 0000000000..f8b699e6eb
--- /dev/null
+++ b/macros/latex/contrib/moderncv/LICENSE.txt
@@ -0,0 +1,415 @@
+The LaTeX Project Public License
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+
+LPPL Version 1.3c 2008-05-04
+
+Copyright 1999 2002-2008 LaTeX3 Project
+ Everyone is allowed to distribute verbatim copies of this
+ license document, but modification of it is not allowed.
+
+
+PREAMBLE
+========
+
+The LaTeX Project Public License (LPPL) is the primary license under
+which the LaTeX kernel and the base LaTeX packages are distributed.
+
+You may use this license for any work of which you hold the copyright
+and which you wish to distribute. This license may be particularly
+suitable if your work is TeX-related (such as a LaTeX package), but
+it is written in such a way that you can use it even if your work is
+unrelated to TeX.
+
+The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE',
+below, gives instructions, examples, and recommendations for authors
+who are considering distributing their works under this license.
+
+This license gives conditions under which a work may be distributed
+and modified, as well as conditions under which modified versions of
+that work may be distributed.
+
+We, the LaTeX3 Project, believe that the conditions below give you
+the freedom to make and distribute modified versions of your work
+that conform with whatever technical specifications you wish while
+maintaining the availability, integrity, and reliability of
+that work. If you do not see how to achieve your goal while
+meeting these conditions, then read the document `cfgguide.tex'
+and `modguide.tex' in the base LaTeX distribution for suggestions.
+
+
+DEFINITIONS
+===========
+
+In this license document the following terms are used:
+
+ `Work'
+ Any work being distributed under this License.
+
+ `Derived Work'
+ Any work that under any applicable law is derived from the Work.
+
+ `Modification'
+ Any procedure that produces a Derived Work under any applicable
+ law -- for example, the production of a file containing an
+ original file associated with the Work or a significant portion of
+ such a file, either verbatim or with modifications and/or
+ translated into another language.
+
+ `Modify'
+ To apply any procedure that produces a Derived Work under any
+ applicable law.
+
+ `Distribution'
+ Making copies of the Work available from one person to another, in
+ whole or in part. Distribution includes (but is not limited to)
+ making any electronic components of the Work accessible by
+ file transfer protocols such as FTP or HTTP or by shared file
+ systems such as Sun's Network File System (NFS).
+
+ `Compiled Work'
+ A version of the Work that has been processed into a form where it
+ is directly usable on a computer system. This processing may
+ include using installation facilities provided by the Work,
+ transformations of the Work, copying of components of the Work, or
+ other activities. Note that modification of any installation
+ facilities provided by the Work constitutes modification of the Work.
+
+ `Current Maintainer'
+ A person or persons nominated as such within the Work. If there is
+ no such explicit nomination then it is the `Copyright Holder' under
+ any applicable law.
+
+ `Base Interpreter'
+ A program or process that is normally needed for running or
+ interpreting a part or the whole of the Work.
+
+ A Base Interpreter may depend on external components but these
+ are not considered part of the Base Interpreter provided that each
+ external component clearly identifies itself whenever it is used
+ interactively. Unless explicitly specified when applying the
+ license to the Work, the only applicable Base Interpreter is a
+ `LaTeX-Format' or in the case of files belonging to the
+ `LaTeX-format' a program implementing the `TeX language'.
+
+
+
+CONDITIONS ON DISTRIBUTION AND MODIFICATION
+===========================================
+
+1. Activities other than distribution and/or modification of the Work
+are not covered by this license; they are outside its scope. In
+particular, the act of running the Work is not restricted and no
+requirements are made concerning any offers of support for the Work.
+
+2. You may distribute a complete, unmodified copy of the Work as you
+received it. Distribution of only part of the Work is considered
+modification of the Work, and no right to distribute such a Derived
+Work may be assumed under the terms of this clause.
+
+3. You may distribute a Compiled Work that has been generated from a
+complete, unmodified copy of the Work as distributed under Clause 2
+above, as long as that Compiled Work is distributed in such a way that
+the recipients may install the Compiled Work on their system exactly
+as it would have been installed if they generated a Compiled Work
+directly from the Work.
+
+4. If you are the Current Maintainer of the Work, you may, without
+restriction, modify the Work, thus creating a Derived Work. You may
+also distribute the Derived Work without restriction, including
+Compiled Works generated from the Derived Work. Derived Works
+distributed in this manner by the Current Maintainer are considered to
+be updated versions of the Work.
+
+5. If you are not the Current Maintainer of the Work, you may modify
+your copy of the Work, thus creating a Derived Work based on the Work,
+and compile this Derived Work, thus creating a Compiled Work based on
+the Derived Work.
+
+6. If you are not the Current Maintainer of the Work, you may
+distribute a Derived Work provided the following conditions are met
+for every component of the Work unless that component clearly states
+in the copyright notice that it is exempt from that condition. Only
+the Current Maintainer is allowed to add such statements of exemption
+to a component of the Work.
+
+ a. If a component of this Derived Work can be a direct replacement
+ for a component of the Work when that component is used with the
+ Base Interpreter, then, wherever this component of the Work
+ identifies itself to the user when used interactively with that
+ Base Interpreter, the replacement component of this Derived Work
+ clearly and unambiguously identifies itself as a modified version
+ of this component to the user when used interactively with that
+ Base Interpreter.
+
+ b. Every component of the Derived Work contains prominent notices
+ detailing the nature of the changes to that component, or a
+ prominent reference to another file that is distributed as part
+ of the Derived Work and that contains a complete and accurate log
+ of the changes.
+
+ c. No information in the Derived Work implies that any persons,
+ including (but not limited to) the authors of the original version
+ of the Work, provide any support, including (but not limited to)
+ the reporting and handling of errors, to recipients of the
+ Derived Work unless those persons have stated explicitly that
+ they do provide such support for the Derived Work.
+
+ d. You distribute at least one of the following with the Derived Work:
+
+ 1. A complete, unmodified copy of the Work;
+ if your distribution of a modified component is made by
+ offering access to copy the modified component from a
+ designated place, then offering equivalent access to copy
+ the Work from the same or some similar place meets this
+ condition, even though third parties are not compelled to
+ copy the Work along with the modified component;
+
+ 2. Information that is sufficient to obtain a complete,
+ unmodified copy of the Work.
+
+7. If you are not the Current Maintainer of the Work, you may
+distribute a Compiled Work generated from a Derived Work, as long as
+the Derived Work is distributed to all recipients of the Compiled
+Work, and as long as the conditions of Clause 6, above, are met with
+regard to the Derived Work.
+
+8. The conditions above are not intended to prohibit, and hence do not
+apply to, the modification, by any method, of any component so that it
+becomes identical to an updated version of that component of the Work as
+it is distributed by the Current Maintainer under Clause 4, above.
+
+9. Distribution of the Work or any Derived Work in an alternative
+format, where the Work or that Derived Work (in whole or in part) is
+then produced by applying some process to that format, does not relax or
+nullify any sections of this license as they pertain to the results of
+applying that process.
+
+10. a. A Derived Work may be distributed under a different license
+ provided that license itself honors the conditions listed in
+ Clause 6 above, in regard to the Work, though it does not have
+ to honor the rest of the conditions in this license.
+
+ b. If a Derived Work is distributed under a different license, that
+ Derived Work must provide sufficient documentation as part of
+ itself to allow each recipient of that Derived Work to honor the
+ restrictions in Clause 6 above, concerning changes from the Work.
+
+11. This license places no restrictions on works that are unrelated to
+the Work, nor does this license place any restrictions on aggregating
+such works with the Work by any means.
+
+12. Nothing in this license is intended to, or may be used to, prevent
+complete compliance by all parties with all applicable laws.
+
+
+NO WARRANTY
+===========
+
+There is no warranty for the Work. Except when otherwise stated in
+writing, the Copyright Holder provides the Work `as is', without
+warranty of any kind, either expressed or implied, including, but not
+limited to, the implied warranties of merchantability and fitness for a
+particular purpose. The entire risk as to the quality and performance
+of the Work is with you. Should the Work prove defective, you assume
+the cost of all necessary servicing, repair, or correction.
+
+In no event unless required by applicable law or agreed to in writing
+will The Copyright Holder, or any author named in the components of the
+Work, or any other party who may distribute and/or modify the Work as
+permitted above, be liable to you for damages, including any general,
+special, incidental or consequential damages arising out of any use of
+the Work or out of inability to use the Work (including, but not limited
+to, loss of data, data being rendered inaccurate, or losses sustained by
+anyone as a result of any failure of the Work to operate with any other
+programs), even if the Copyright Holder or said author or said other
+party has been advised of the possibility of such damages.
+
+
+MAINTENANCE OF THE WORK
+=======================
+
+The Work has the status `author-maintained' if the Copyright Holder
+explicitly and prominently states near the primary copyright notice in
+the Work that the Work can only be maintained by the Copyright Holder
+or simply that it is `author-maintained'.
+
+The Work has the status `maintained' if there is a Current Maintainer
+who has indicated in the Work that they are willing to receive error
+reports for the Work (for example, by supplying a valid e-mail
+address). It is not required for the Current Maintainer to acknowledge
+or act upon these error reports.
+
+The Work changes from status `maintained' to `unmaintained' if there
+is no Current Maintainer, or the person stated to be Current
+Maintainer of the work cannot be reached through the indicated means
+of communication for a period of six months, and there are no other
+significant signs of active maintenance.
+
+You can become the Current Maintainer of the Work by agreement with
+any existing Current Maintainer to take over this role.
+
+If the Work is unmaintained, you can become the Current Maintainer of
+the Work through the following steps:
+
+ 1. Make a reasonable attempt to trace the Current Maintainer (and
+ the Copyright Holder, if the two differ) through the means of
+ an Internet or similar search.
+
+ 2. If this search is successful, then enquire whether the Work
+ is still maintained.
+
+ a. If it is being maintained, then ask the Current Maintainer
+ to update their communication data within one month.
+
+ b. If the search is unsuccessful or no action to resume active
+ maintenance is taken by the Current Maintainer, then announce
+ within the pertinent community your intention to take over
+ maintenance. (If the Work is a LaTeX work, this could be
+ done, for example, by posting to comp.text.tex.)
+
+ 3a. If the Current Maintainer is reachable and agrees to pass
+ maintenance of the Work to you, then this takes effect
+ immediately upon announcement.
+
+ b. If the Current Maintainer is not reachable and the Copyright
+ Holder agrees that maintenance of the Work be passed to you,
+ then this takes effect immediately upon announcement.
+
+ 4. If you make an `intention announcement' as described in 2b. above
+ and after three months your intention is challenged neither by
+ the Current Maintainer nor by the Copyright Holder nor by other
+ people, then you may arrange for the Work to be changed so as
+ to name you as the (new) Current Maintainer.
+
+ 5. If the previously unreachable Current Maintainer becomes
+ reachable once more within three months of a change completed
+ under the terms of 3b) or 4), then that Current Maintainer must
+ become or remain the Current Maintainer upon request provided
+ they then update their communication data within one month.
+
+A change in the Current Maintainer does not, of itself, alter the fact
+that the Work is distributed under the LPPL license.
+
+If you become the Current Maintainer of the Work, you should
+immediately provide, within the Work, a prominent and unambiguous
+statement of your status as Current Maintainer. You should also
+announce your new status to the same pertinent community as
+in 2b) above.
+
+
+WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE
+======================================================
+
+This section contains important instructions, examples, and
+recommendations for authors who are considering distributing their
+works under this license. These authors are addressed as `you' in
+this section.
+
+Choosing This License or Another License
+----------------------------------------
+
+If for any part of your work you want or need to use *distribution*
+conditions that differ significantly from those in this license, then
+do not refer to this license anywhere in your work but, instead,
+distribute your work under a different license. You may use the text
+of this license as a model for your own license, but your license
+should not refer to the LPPL or otherwise give the impression that
+your work is distributed under the LPPL.
+
+The document `modguide.tex' in the base LaTeX distribution explains
+the motivation behind the conditions of this license. It explains,
+for example, why distributing LaTeX under the GNU General Public
+License (GPL) was considered inappropriate. Even if your work is
+unrelated to LaTeX, the discussion in `modguide.tex' may still be
+relevant, and authors intending to distribute their works under any
+license are encouraged to read it.
+
+A Recommendation on Modification Without Distribution
+-----------------------------------------------------
+
+It is wise never to modify a component of the Work, even for your own
+personal use, without also meeting the above conditions for
+distributing the modified component. While you might intend that such
+modifications will never be distributed, often this will happen by
+accident -- you may forget that you have modified that component; or
+it may not occur to you when allowing others to access the modified
+version that you are thus distributing it and violating the conditions
+of this license in ways that could have legal implications and, worse,
+cause problems for the community. It is therefore usually in your
+best interest to keep your copy of the Work identical with the public
+one. Many works provide ways to control the behavior of that work
+without altering any of its licensed components.
+
+How to Use This License
+-----------------------
+
+To use this license, place in each of the components of your work both
+an explicit copyright notice including your name and the year the work
+was authored and/or last substantially modified. Include also a
+statement that the distribution and/or modification of that
+component is constrained by the conditions in this license.
+
+Here is an example of such a notice and statement:
+
+ %% pig.dtx
+ %% Copyright 2005 M. Y. Name
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3
+ % 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 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is M. Y. Name.
+ %
+ % This work consists of the files pig.dtx and pig.ins
+ % and the derived file pig.sty.
+
+Given such a notice and statement in a file, the conditions
+given in this license document would apply, with the `Work' referring
+to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being
+generated from `pig.dtx' using `pig.ins'), the `Base Interpreter'
+referring to any `LaTeX-Format', and both `Copyright Holder' and
+`Current Maintainer' referring to the person `M. Y. Name'.
+
+If you do not want the Maintenance section of LPPL to apply to your
+Work, change `maintained' above into `author-maintained'.
+However, we recommend that you use `maintained', as the Maintenance
+section was added in order to ensure that your Work remains useful to
+the community even when you can no longer maintain and support it
+yourself.
+
+Derived Works That Are Not Replacements
+---------------------------------------
+
+Several clauses of the LPPL specify means to provide reliability and
+stability for the user community. They therefore concern themselves
+with the case that a Derived Work is intended to be used as a
+(compatible or incompatible) replacement of the original Work. If
+this is not the case (e.g., if a few lines of code are reused for a
+completely different task), then clauses 6b and 6d shall not apply.
+
+
+Important Recommendations
+-------------------------
+
+ Defining What Constitutes the Work
+
+ The LPPL requires that distributions of the Work contain all the
+ files of the Work. It is therefore important that you provide a
+ way for the licensee to determine which files constitute the Work.
+ This could, for example, be achieved by explicitly listing all the
+ files of the Work near the copyright notice of each file or by
+ using a line such as:
+
+ % This work consists of all files listed in manifest.txt.
+
+ in that place. In the absence of an unequivocal list it might be
+ impossible for the licensee to determine what is considered by you
+ to comprise the Work and, in such a case, the licensee would be
+ entitled to make reasonable conjectures as to which files comprise
+ the Work.
diff --git a/macros/latex/contrib/moderncv/README b/macros/latex/contrib/moderncv/README
deleted file mode 100644
index 3f17b081ac..0000000000
--- a/macros/latex/contrib/moderncv/README
+++ /dev/null
@@ -1,16 +0,0 @@
-moderncv -- a modern curriculum vitae class
-
-Moderncv provides a documentclass for typesetting curricula vitae in various
-styles. Moderncv aims to be both straightforward to use and customizable,
-providing four ready-made styles (classic, casual, banking and oldstyle)
-and allowing one to define his own by modifying colors, fonts, icons, etc.
-
-Most commands are defined in such a way that arguments are optional.
-
-Until a decent manual is written, one can always look in the "examples"
-directory for some examples. Documents can be compiled into dvi, ps or pdf.
-
-
-Author: Xavier Danaux <xdanaux@gmail.com>
-Licence: The LaTeX Project Public Li­cense, version 1.3c
-URL: https://github.com/xdanaux/moderncv
diff --git a/macros/latex/contrib/moderncv/README.md b/macros/latex/contrib/moderncv/README.md
new file mode 100644
index 0000000000..d87ba73ad0
--- /dev/null
+++ b/macros/latex/contrib/moderncv/README.md
@@ -0,0 +1,17 @@
+# moderncv
+
+## A modern curriculum vitae class for LaTeX
+
+**moderncv** provides a documentclass for typesetting curricula vitae in various styles. Moderncv aims to be both straightforward to use and customizable, providing five ready-made styles (classic, casual, banking, oldstyle and fancy) and allowing one to define his own by modifying colors, fonts, icons, etc.
+
+Most commands are defined in such a way that arguments are optional.
+
+Until a decent manual is written, one can always look in the `template.tex` file for an example. It can be compiled to pdf via `latexmk -pdf ./template.tex`.
+
+## Licence
+moderncv is licensed under the [LPPL-1.3c](https://spdx.org/licenses/LPPL-1.3c.html).
+
+## Origin
+Original author: Xavier Danaux <xdanaux@gmail.com><br/>
+Original repository: https://github.com/xdanaux/moderncv<br/>
+This repository is a fork aiming to maintain moderncv inside CTAN, since upstream is dead since 2016.
diff --git a/macros/latex/contrib/moderncv/examples/Makefile b/macros/latex/contrib/moderncv/examples/Makefile
deleted file mode 100644
index 66f85dbead..0000000000
--- a/macros/latex/contrib/moderncv/examples/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-SHAREDFILES = moderncv.cls moderncvcompatibility.sty moderncvcolor*.sty moderncvdebugtools.sty
-
-
-template_classic_*.pdf: $(SHAREDFILES) template.tex template_classic_green.diff moderncvstyleclassic.sty moderncvheadi.sty moderncvbodyi.sty moderncviconsmarvosym.sty
- TARGET=basename($<)
- echo -e "Generating $<\c";
- cp template.tex $TARGET.tex && echo -e ".\c";
- patch --silent $TARGET.tex < $TARGET.diff && echo -e ".\c";
- lualatex --interaction=batchmode --draftmode $TARGET > /dev/null && echo -e ".\c";
- bibtex $TARGET > /dev/null && echo -e ".\c";
- lualatex --interaction=batchmode $TARGET > /dev/null && echo -e ".\c";
- lualatex --interaction=batchmode $TARGET > /dev/null && echo -e " done";
-
-clean:
- rm *.aux *.log *.bbl *.blg *.out;
- rm template_*.tex;
- rm *.sty moderncv.cls;
-
diff --git a/macros/latex/contrib/moderncv/examples/template-es.pdf b/macros/latex/contrib/moderncv/examples/template-es.pdf
deleted file mode 100644
index 450ce70e3a..0000000000
--- a/macros/latex/contrib/moderncv/examples/template-es.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template-es.tex b/macros/latex/contrib/moderncv/examples/template-es.tex
deleted file mode 100644
index e2dae8651c..0000000000
--- a/macros/latex/contrib/moderncv/examples/template-es.tex
+++ /dev/null
@@ -1,131 +0,0 @@
-%% Inicio del archivo `template-es.tex'.
-%% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License version 1.3c,
-% available at http://www.latex-project.org/lppl/.
-
-
-\documentclass[11pt,a4paper,sans]{moderncv} % opciones posibles incluyen tamaño de fuente ('10pt', '11pt' and '12pt'), tamaño de papel ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' y 'landscape') y familia de fuentes ('sans' y 'roman')
-
-% temas de moderncv
-\moderncvstyle{casual} % las opciones de estilo son 'casual' (por omision),'classic', 'oldstyle' y 'banking'
-\moderncvcolor{blue} % opciones de color 'blue' (por omision), 'orange', 'green', 'red', 'purple', 'grey' y 'black'
-%\renewcommand{\familydefault}{\sfdefault} % para seleccionar la fuente por omision, use '\sfdefault' para la fuente sans serif, '\rmdefault' para la fuente roman, o cualquier nombre de fuente
-%\nopagenumbers{} % elimine el comentario para suprimir la numeracion automatica de las paginas para CVs mayores a una pagina
-
-% codificacion de caracteres
-%\usepackage[utf8]{inputenc} % reemplace con su codificacion
-%\usepackage{CJKutf8} % si necesita usa CJK para redactar su CV en chino, japones o coreano
-
-% ajustes para los margenes de pagina
-\usepackage[scale=0.75]{geometry}
-%\setlength{\hintscolumnwidth}{3cm} % si desea cambiar el ando de la columna para las fechas
-
-% datos personales
-\name{John}{Doe}
-\title{T\'itulo del CV (opcional)} % dato opcional, elimine la linea si no desea el dato
-\address{calle y n\'umero}{c\'odigo postal y ciudad} % dato opcional, elimine la linea si no desea el dato
-\phone[mobile]{+1~(234)~567~890} % dato opcional, elimine la linea si no desea el dato
-\phone[fixed]{+2~(345)~678~901} % dato opcional, elimine la linea si no desea el dato
-\phone[fax]{+3~(456)~789~012} % dato opcional, elimine la linea si no desea el dato
-\email{john@doe.org} % dato opcional, elimine la linea si no desea el dato
-\homepage{www.johndoe.com} % dato opcional, elimine la linea si no desea el dato
-\extrainfo{informacion adicional} % dato opcional, elimine la linea si no desea el dato
-\photo[64pt][0.4pt]{picture} % '64pt' es la altura a la que la imagen debe ser ajustada, 0.4pt es grosor del marco que lo contiene (eliga 0pt para eliminar el marco) y 'picture' es el nombre del archivo; dato opcional, elimine la linea si no desea el dato
-\quote{Alguna cita (opcional)} % dato opcional, elimine la linea si no desea el dato
-
-% para mostrar etiquetas numericas en la bibliografia (por omision no se muestran etiquetas), solo es util si desea incluir citas en en CV
-%\makeatletter
-%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
-%\makeatother
-
-% bibliografia con varias fuentes
-%\usepackage{multibib}
-%\newcites{book,misc}{{Libros},{Otros}}
-%----------------------------------------------------------------------------------
-% contenido
-%----------------------------------------------------------------------------------
-\begin{document}
-%\begin{CJK*}{UTF8}{gbsn} % para redactar el CV en chino usando CJK
-\maketitle
-
-\section{Formaci\'on acad\'emica}
-\cventry{a\~no--a\~no}{Grado}{Instituci\'on}{Ciudad}{\textit{Grade}}{Descripci\'on} % Los argumentos del 3 al 6 pueden permanecer vacios
-\cventry{a\~no--a\~no}{Grado}{Instituci\'on}{Ciudad}{\textit{Grade}}{Descripci\'on}
-
-\section{Tesis de maestr\'ia}
-\cvitem{t\'itulo}{\emph{T\'itulo}}
-\cvitem{sinodares}{Sinodales}
-\cvitem{descripci\'on}{Una breve descripci\'on de la tesis}
-
-\section{Experiencia}
-\subsection{Vocacional}
-\cventry{a\~no--a\~no}{t\'itulo del puesto}{Empleador}{Ciudad}{}{Descripci\'on general, no m\'as de 1 \'o 2 l\'ineas.\newline{}%
-Detalle de logros:%
-\begin{itemize}%
-\item Logro 1;
-\item Logro 2, con sub-logros:
- \begin{itemize}%
- \item Sub-logro (a);
- \item Sub-logro (b), con sub-sub-logros (¡evite hacer esto!);
- \begin{itemize}
- \item Sub-sub-logro i;
- \item Sub-sub-logro ii;
- \item Sub-sub-logro iii;
- \end{itemize}
- \item Sub-logro (c);
- \end{itemize}
-\item Logro 3.
-\end{itemize}}
-\cventry{a\~no--a\~no}{t\'itulo del puesto}{Empleador}{Ciudad}{}{Descripci\'on l\'inea 1\newline{}Descripci\'on l\'inea 2}
-\subsection{Miscel\'aneo}
-\cventry{a\~no--a\~no}{t\'itulo del puesto}{Empleador}{Ciudad}{}{Descripci\'on}
-
-\section{Idiomas}
-\cvitemwithcomment{Idioma 1}{nivel}{Comentario}
-\cvitemwithcomment{Idioma 2}{nivel}{Comentario}
-\cvitemwithcomment{Idioma 3}{nivel}{Comentario}
-
-\section{Conocimientos de computaci\'on}
-\cvdoubleitem{categor\'ia 1}{XXX, YYY, ZZZ}{categor\'ia 4}{XXX, YYY, ZZZ}
-\cvdoubleitem{categor\'ia 2}{XXX, YYY, ZZZ}{categor\'ia 5}{XXX, YYY, ZZZ}
-\cvdoubleitem{categor\'ia 3}{XXX, YYY, ZZZ}{categor\'ia 6}{XXX, YYY, ZZZ}
-
-\section{Interests}
-\cvitem{hobby 1}{Descripci\'on}
-\cvitem{hobby 2}{Descripci\'on}
-\cvitem{hobby 3}{Descripci\'on}
-
-\section{Extra 1}
-\cvlistitem{Tema 1}
-\cvlistitem{Tema 2}
-\cvlistitem{Tema 3}
-
-\renewcommand{\listitemsymbol}{-~} % para cambiar el simbolo para las listas
-
-\section{Extra 2}
-\cvlistdoubleitem{Tema 1}{Tema 4}
-\cvlistdoubleitem{Tema 2}{Tema 5\cite{book1}}
-\cvlistdoubleitem{Tema 3}{}
-
-% Las publicaciones tomadas de un archivo de BibTeX sin usar multibib\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
-
-\nocite{*}
-\bibliographystyle{plain}
-\bibliography{publications} % 'publications' es el nombre del archivo BibTeX
-
-% Las publicaciones tomadas de un archivo BibTeX usando el paquete multibib
-%\section{Publicaciones}
-%\nocitebook{book1,book2}
-%\bibliographystylebook{plain}
-%\bibliographybook{publications} % 'publications' es el nombre del archivo BibTeX
-%\nocitemisc{misc1,misc2,misc3}
-%\bibliographystylemisc{plain}
-%\bibliographymisc{publications} % 'publications' es el nombre del archivo BibTeX
-
-%\clearpage\end{CJK*} % si esta redactando su CV en chino usando CJK, \clearpage es requerido por fancyhdr para que funcione correctamente con CJK, aunque esto eliminara la numeracion de pagina al dejar \lastpage como no definido
-\end{document}
-
-
-%% fin del archivo `template-es.tex'.
diff --git a/macros/latex/contrib/moderncv/examples/template-multibib.pdf b/macros/latex/contrib/moderncv/examples/template-multibib.pdf
deleted file mode 100644
index 2346de10d7..0000000000
--- a/macros/latex/contrib/moderncv/examples/template-multibib.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template-multibib.tex b/macros/latex/contrib/moderncv/examples/template-multibib.tex
deleted file mode 100644
index cade26db91..0000000000
--- a/macros/latex/contrib/moderncv/examples/template-multibib.tex
+++ /dev/null
@@ -1,165 +0,0 @@
-%% start of file `template.tex'.
-%% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License version 1.3c,
-% available at http://www.latex-project.org/lppl/.
-
-
-\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
-
-% moderncv themes
-\moderncvstyle{casual} % style options are 'casual' (default), 'classic', 'oldstyle' and 'banking'
-\moderncvcolor{blue} % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
-%\renewcommand{\familydefault}{\sfdefault} % to set the default font; use '\sfdefault' for the default sans serif font, '\rmdefault' for the default roman one, or any tex font name
-%\nopagenumbers{} % uncomment to suppress automatic page numbering for CVs longer than one page
-
-% character encoding
-%\usepackage[utf8]{inputenc} % if you are not using xelatex ou lualatex, replace by the encoding you are using
-%\usepackage{CJKutf8} % if you need to use CJK to typeset your resume in Chinese, Japanese or Korean
-
-% adjust the page margins
-\usepackage[scale=0.75]{geometry}
-%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
-%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
-
-% personal data
-\name{John}{Doe}
-\title{Resumé title} % optional, remove / comment the line if not wanted
-\address{street and number}{postcode city}{country}% optional, remove / comment the line if not wanted; the "postcode city" and "country" arguments can be omitted or provided empty
-\phone[mobile]{+1~(234)~567~890} % optional, remove / comment the line if not wanted; the optional "type" of the phone can be "mobile" (default), "fixed" or "fax"
-\phone[fixed]{+2~(345)~678~901}
-\phone[fax]{+3~(456)~789~012}
-\email{john@doe.org} % optional, remove / comment the line if not wanted
-\homepage{www.johndoe.com} % optional, remove / comment the line if not wanted
-\social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
-\social[twitter]{jdoe} % optional, remove / comment the line if not wanted
-\social[github]{jdoe} % optional, remove / comment the line if not wanted
-\extrainfo{additional information} % optional, remove / comment the line if not wanted
-\photo[64pt][0.4pt]{picture} % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
-\quote{Some quote} % optional, remove / comment the line if not wanted
-
-% to show numerical labels in the bibliography (default is to show no labels); only useful if you make citations in your resume
-%\makeatletter
-%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
-%\makeatother
-%\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}% CONSIDER REPLACING THE ABOVE BY THIS
-
-% bibliography with mutiple entries
-\usepackage{multibib}
-\newcites{book,misc}{{Books},{Others}}
-%----------------------------------------------------------------------------------
-% content
-%----------------------------------------------------------------------------------
-\begin{document}
-%\begin{CJK*}{UTF8}{gbsn} % to typeset your resume in Chinese using CJK
-%----- resume ---------------------------------------------------------
-\makecvtitle
-
-\section{Education}
-\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description} % arguments 3 to 6 can be left empty
-\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
-
-\section{Master thesis}
-\cvitem{title}{\emph{Title}}
-\cvitem{supervisors}{Supervisors}
-\cvitem{description}{Short thesis abstract}
-
-\section{Experience}
-\subsection{Vocational}
-\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
-Detailed achievements:%
-\begin{itemize}%
-\item Achievement 1;
-\item Achievement 2, with sub-achievements:
- \begin{itemize}%
- \item Sub-achievement (a);
- \item Sub-achievement (b), with sub-sub-achievements (don't do this!);
- \begin{itemize}
- \item Sub-sub-achievement i;
- \item Sub-sub-achievement ii;
- \item Sub-sub-achievement iii;
- \end{itemize}
- \item Sub-achievement (c);
- \end{itemize}
-\item Achievement 3.
-\end{itemize}}
-\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
-\subsection{Miscellaneous}
-\cventry{year--year}{Job title}{Employer}{City}{}{Description}
-
-\section{Languages}
-\cvitemwithcomment{Language 1}{Skill level}{Comment}
-\cvitemwithcomment{Language 2}{Skill level}{Comment}
-\cvitemwithcomment{Language 3}{Skill level}{Comment}
-
-\section{Computer skills}
-\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
-\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
-\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
-
-\section{Interests}
-\cvitem{hobby 1}{Description}
-\cvitem{hobby 2}{Description}
-\cvitem{hobby 3}{Description}
-
-\section{Extra 1}
-\cvlistitem{Item 1}
-\cvlistitem{Item 2}
-\cvlistitem{Item 3. This item is particularly long and therefore normally spans over several lines. Did you notice the indentation when the line wraps?}
-
-\section{Extra 2}
-\cvlistdoubleitem{Item 1}{Item 4}
-\cvlistdoubleitem{Item 2}{Item 5\cite{book1}}
-\cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}
-
-\section{References}
-\begin{cvcolumns}
- \cvcolumn{Category 1}{\begin{itemize}\item Person 1\item Person 2\item Person 3\end{itemize}}
- \cvcolumn{Category 2}{Amongst others:\begin{itemize}\item Person 1, and\item Person 2\end{itemize}(more upon request)}
- \cvcolumn[0.5]{All the rest \& some more}{\textit{That} person, and \textbf{those} also (all available upon request).}
-\end{cvcolumns}
-
-% Publications from a BibTeX file without multibib
-% for numerical labels: \renewcommand{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}% CONSIDER MERGING WITH PREAMBLE PART
-% to redefine the heading string ("Publications"): \renewcommand{\refname}{Articles}
-%\nocite{*}
-%\bibliographystyle{plain}
-%\bibliography{publications} % 'publications' is the name of a BibTeX file
-
-% Publications from a BibTeX file using the multibib package
-\section{Publications}
-\nocitebook{book1,book2}
-\bibliographystylebook{plain}
-\bibliographybook{publications} % 'publications' is the name of a BibTeX file
-\nocitemisc{misc1,misc2,misc3}
-\bibliographystylemisc{plain}
-\bibliographymisc{publications} % 'publications' is the name of a BibTeX file
-
-\clearpage
-%----- letter ---------------------------------------------------------
-% recipient data
-\recipient{Company Recruitment team}{Company, Inc.\\123 somestreet\\some city}
-\date{January 01, 1984}
-\opening{Dear Sir or Madam,}
-\closing{Yours faithfully,}
-\enclosure[Attached]{curriculum vit\ae{}} % use an optional argument to use a string other than "Enclosure", or redefine \enclname
-\makelettertitle
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ullamcorper neque sit amet lectus facilisis sed luctus nisl iaculis. Vivamus at neque arcu, sed tempor quam. Curabitur pharetra tincidunt tincidunt. Morbi volutpat feugiat mauris, quis tempor neque vehicula volutpat. Duis tristique justo vel massa fermentum accumsan. Mauris ante elit, feugiat vestibulum tempor eget, eleifend ac ipsum. Donec scelerisque lobortis ipsum eu vestibulum. Pellentesque vel massa at felis accumsan rhoncus.
-
-Suspendisse commodo, massa eu congue tincidunt, elit mauris pellentesque orci, cursus tempor odio nisl euismod augue. Aliquam adipiscing nibh ut odio sodales et pulvinar tortor laoreet. Mauris a accumsan ligula. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse vulputate sem vehicula ipsum varius nec tempus dui dapibus. Phasellus et est urna, ut auctor erat. Sed tincidunt odio id odio aliquam mattis. Donec sapien nulla, feugiat eget adipiscing sit amet, lacinia ut dolor. Phasellus tincidunt, leo a fringilla consectetur, felis diam aliquam urna, vitae aliquet lectus orci nec velit. Vivamus dapibus varius blandit.
-
-Duis sit amet magna ante, at sodales diam. Aenean consectetur porta risus et sagittis. Ut interdum, enim varius pellentesque tincidunt, magna libero sodales tortor, ut fermentum nunc metus a ante. Vivamus odio leo, tincidunt eu luctus ut, sollicitudin sit amet metus. Nunc sed orci lectus. Ut sodales magna sed velit volutpat sit amet pulvinar diam venenatis.
-
-Albert Einstein discovered that $e=mc^2$ in 1905.
-
-\[ e=\lim_{n \to \infty} \left(1+\frac{1}{n}\right)^n \]
-
-\makeletterclosing
-
-%\clearpage\end{CJK*} % if you are typesetting your resume in Chinese using CJK; the \clearpage is required for fancyhdr to work correctly with CJK, though it kills the page numbering by making \lastpage undefined
-\end{document}
-
-
-%% end of file `template.tex'.
diff --git a/macros/latex/contrib/moderncv/examples/template-zh.pdf b/macros/latex/contrib/moderncv/examples/template-zh.pdf
deleted file mode 100644
index de7171771c..0000000000
--- a/macros/latex/contrib/moderncv/examples/template-zh.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template-zh.tex b/macros/latex/contrib/moderncv/examples/template-zh.tex
deleted file mode 100644
index 6d29b828aa..0000000000
--- a/macros/latex/contrib/moderncv/examples/template-zh.tex
+++ /dev/null
@@ -1,130 +0,0 @@
-%% start of file `template-zh.tex'.
-%% Copyright 2006-2013 Xavier Danaux (xdanaux@gmail.com).
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License version 1.3c,
-% available at http://www.latex-project.org/lppl/.
-
-
-\documentclass[11pt,a4paper,sans]{moderncv} % possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
-
-% moderncv 主题
-\moderncvstyle{casual} % 选项参数是 ‘casual’, ‘classic’, ‘oldstyle’ 和 ’banking’
-\moderncvcolor{blue} % 选项参数是 ‘blue’ (默认)、‘orange’、‘green’、‘red’、‘purple’ 和 ‘grey’
-%\nopagenumbers{} % 消除注释以取消自动页码生成功能
-
-% 字符编码
-\usepackage[utf8]{inputenc} % 替换你正在使用的编码
-\usepackage{CJKutf8}
-
-% 调整页面出血
-\usepackage[scale=0.75]{geometry}
-%\setlength{\hintscolumnwidth}{3cm} % 如果你希望改变日期栏的宽度
-
-% 个人信息
-\name{小龙}{李}
-\title{简历题目 (可选项)} % 可选项、如不需要可删除本行
-\address{街道及门牌号}{邮编及城市} % 可选项、如不需要可删除本行
-\phone[mobile]{+1~(234)~567~890} % 可选项、如不需要可删除本行
-\phone[fixed]{+2~(345)~678~901} % 可选项、如不需要可删除本行
-\phone[fax]{+3~(456)~789~012} % 可选项、如不需要可删除本行
-\email{xiaolong@li.com.cn} % 可选项、如不需要可删除本行
-\homepage{www.xialongli.com} % 可选项、如不需要可删除本行
-\extrainfo{附加信息 (可选项)} % 可选项、如不需要可删除本行
-\photo[64pt][0.4pt]{picture} % ‘64pt’是图片必须压缩至的高度、‘0.4pt‘是图片边框的宽度 (如不需要可调节至0pt)、’picture‘ 是图片文件的名字;可选项、如不需要可删除本行
-\quote{引言(可选项)} % 可选项、如不需要可删除本行
-
-% 显示索引号;仅用于在简历中使用了引言
-%\makeatletter
-%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}
-%\makeatother
-
-% 分类索引
-%\usepackage{multibib}
-%\newcites{book,misc}{{Books},{Others}}
-%----------------------------------------------------------------------------------
-% 内容
-%----------------------------------------------------------------------------------
-\begin{document}
-\begin{CJK}{UTF8}{gbsn} % 详情参阅CJK文件包
-\maketitle
-
-\section{教育背景}
-\cventry{年 -- 年}{学位}{院校}{城市}{\textit{成绩}}{说明} % 第3到第6编码可留白
-\cventry{年 -- 年}{学位}{院校}{城市}{\textit{成绩}}{说明}
-
-\section{毕业论文}
-\cvitem{题目}{\emph{题目}}
-\cvitem{导师}{导师}
-\cvitem{说明}{\small 论文简介}
-
-\section{工作背景}
-\subsection{专业}
-\cventry{年 -- 年}{职位}{公司}{城市}{}{不超过1--2行的概况说明\newline{}%
-工作内容:%
-\begin{itemize}%
-\item 工作内容 1;
-\item 工作内容 2、 含二级内容:
- \begin{itemize}%
- \item 二级内容 (a);
- \item 二级内容 (b)、含三级内容 (不建议使用);
- \begin{itemize}
- \item 三级内容 i;
- \item 三级内容 ii;
- \item 三级内容 iii;
- \end{itemize}
- \item 二级内容 (c);
- \end{itemize}
-\item 工作内容 3。
-\end{itemize}}
-\cventry{年 -- 年}{职位}{公司}{城市}{}{说明行1\newline{}说明行2}
-\subsection{其他}
-\cventry{年 -- 年}{职位}{公司}{城市}{}{说明}
-
-\section{语言技能}
-\cvitemwithcomment{语言 1}{水平}{评价}
-\cvitemwithcomment{语言 2}{水平}{评价}
-\cvitemwithcomment{语言 3}{水平}{评价}
-
-\section{计算机技能}
-\cvdoubleitem{类别 1}{XXX, YYY, ZZZ}{类别 4}{XXX, YYY, ZZZ}
-\cvdoubleitem{类别 2}{XXX, YYY, ZZZ}{类别 5}{XXX, YYY, ZZZ}
-\cvdoubleitem{类别 3}{XXX, YYY, ZZZ}{类别 6}{XXX, YYY, ZZZ}
-
-\section{个人兴趣}
-\cvitem{爱好 1}{\small 说明}
-\cvitem{爱好 2}{\small 说明}
-\cvitem{爱好 3}{\small 说明}
-
-\section{其他 1}
-\cvlistitem{项目 1}
-\cvlistitem{项目 2}
-\cvlistitem{项目 3}
-
-\renewcommand{\listitemsymbol}{-} % 改变列表符号
-
-\section{其他 2}
-\cvlistdoubleitem{项目 1}{项目 4}
-\cvlistdoubleitem{项目 2}{项目 5\cite{book1}}
-\cvlistdoubleitem{项目 3}{}
-
-% 来自BibTeX文件但不使用multibib包的出版物
-%\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}% BibTeX的数字标签
-\nocite{*}
-\bibliographystyle{plain}
-\bibliography{publications} % 'publications' 是BibTeX文件的文件名
-
-% 来自BibTeX文件并使用multibib包的出版物
-%\section{出版物}
-%\nocitebook{book1,book2}
-%\bibliographystylebook{plain}
-%\bibliographybook{publications} % 'publications' 是BibTeX文件的文件名
-%\nocitemisc{misc1,misc2,misc3}
-%\bibliographystylemisc{plain}
-%\bibliographymisc{publications} % 'publications' 是BibTeX文件的文件名
-
-\clearpage\end{CJK}
-\end{document}
-
-
-%% 文件结尾 `template-zh.tex'.
diff --git a/macros/latex/contrib/moderncv/examples/template_banking_red-fullrules-center.pdf b/macros/latex/contrib/moderncv/examples/template_banking_red-fullrules-center.pdf
deleted file mode 100644
index 5e4ed3adbf..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_banking_red-fullrules-center.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_banking_red-norules.pdf b/macros/latex/contrib/moderncv/examples/template_banking_red-norules.pdf
deleted file mode 100644
index 212e81cec3..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_banking_red-norules.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_banking_red-shortrules-right.pdf b/macros/latex/contrib/moderncv/examples/template_banking_red-shortrules-right.pdf
deleted file mode 100644
index a1303b4f83..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_banking_red-shortrules-right.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_banking_red.pdf b/macros/latex/contrib/moderncv/examples/template_banking_red.pdf
deleted file mode 100644
index fed8f9e52e..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_banking_red.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_casual_orange-left.pdf b/macros/latex/contrib/moderncv/examples/template_casual_orange-left.pdf
deleted file mode 100644
index f770841377..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_casual_orange-left.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_casual_orange.pdf b/macros/latex/contrib/moderncv/examples/template_casual_orange.pdf
deleted file mode 100644
index 372f62e7bc..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_casual_orange.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_classic_green-right.pdf b/macros/latex/contrib/moderncv/examples/template_classic_green-right.pdf
deleted file mode 100644
index 250643fcc7..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_classic_green-right.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_classic_green.pdf b/macros/latex/contrib/moderncv/examples/template_classic_green.pdf
deleted file mode 100644
index 988f94304c..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_classic_green.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_fancy_purple.pdf b/macros/latex/contrib/moderncv/examples/template_fancy_purple.pdf
deleted file mode 100644
index eb447daa9b..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_fancy_purple.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/template_oldstyle_grey.pdf b/macros/latex/contrib/moderncv/examples/template_oldstyle_grey.pdf
deleted file mode 100644
index 4d914260e2..0000000000
--- a/macros/latex/contrib/moderncv/examples/template_oldstyle_grey.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/moderncv/manual/moderncv_userguide.pdf b/macros/latex/contrib/moderncv/manual/moderncv_userguide.pdf
new file mode 100644
index 0000000000..cadbefe386
--- /dev/null
+++ b/macros/latex/contrib/moderncv/manual/moderncv_userguide.pdf
Binary files differ
diff --git a/macros/latex/contrib/moderncv/manual/moderncv_userguide.tex b/macros/latex/contrib/moderncv/manual/moderncv_userguide.tex
new file mode 100644
index 0000000000..26d2016178
--- /dev/null
+++ b/macros/latex/contrib/moderncv/manual/moderncv_userguide.tex
@@ -0,0 +1,462 @@
+%% moderncv_userguide.tex (compiled with pdfLaTeX)
+%% Copyright 2007 Cristina Sambo
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+\documentclass[a4paper,11pt]{article}
+
+\title{\bfseries Moderncv -- v. 0.6}
+\author{Package by Xavier Danaux \\ \begin{small}Documentation by Cristina Sambo \end{small}}
+\date{}
+
+%language and encoding options
+\usepackage[english]{babel}
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+
+%font options
+\usepackage{txfonts}
+\usepackage{marvosym}
+\usepackage{pifont}
+
+%margins, spacing and page layout
+\usepackage[pdftex,colorlinks=true]{hyperref} %(hyperref must be loaded before geometry)
+\usepackage[pdftex]{geometry}
+\geometry{top=2.5cm, bottom=3cm}
+\setlength{\parindent}{0pt} %(to soppress indentation when starting a new paragraph)
+\frenchspacing %(to soppress additional space after a full stop)
+
+%packages
+\usepackage[pdftex]{graphicx}
+\usepackage[pdftex]{xcolor}
+\usepackage[labelfont=sl,font=small,width=0.9\textwidth]{caption}
+\usepackage{marvosym}
+\usepackage{latexsym}
+
+%pdfLaTeX options
+\pdfpagewidth=\paperwidth
+\pdfpageheight=\paperheight
+\pdfimageresolution=150
+\pdfinfo{
+ /Title (Moderncv -- v. 0.6)
+ /Author (Cristina Sambo)
+ /Subject (Moderncv package user's guide)
+ /Keywords (curriculum vitae, LaTeX)
+}
+
+%my commands
+\definecolor{bluecv}{rgb}{0.25,0.5,0.75}
+\definecolor{greencv}{rgb}{0.55,0.85,0.35}
+\definecolor{redcv}{rgb}{1.00,0.30,0.30}
+\definecolor{orangecv}{rgb}{1,0.65,0.20}
+\definecolor{greycv}{rgb}{0.75,0.75,0.75}
+
+%==================
+% DOCUMENT BEGINNING
+%==================
+\begin{document}
+\maketitle
+
+\begin{abstract}
+\noindent \texttt{Moderncv}, as its author says in the readme file, provides a documentclass for typesetting modern curriculum vitaes in various styles. It is fairly customizable, allowing you to define your own style by changing the colors, the fonts, \dots\ and provides two default styles: classic and casual.
+\end{abstract}
+
+\section{Introduction}
+When I saw for the first time this class I was amazing: ``Here it is what I need'', I thought. Using the very clear examples, was easy to make my first curriculum.
+Indeed the class is very simple to use, in this documentation I will only put together all the things to help users to have all on hand.
+
+\smallskip
+\texttt{Moderncv} requires the following packages: \texttt{ifthen}, \texttt{ifpdf}, \texttt{color}, \texttt{lmodern}, \texttt{marvosym}, \texttt{url}, \texttt{hyperref}, \texttt{longtable}, \texttt{graphicx}, \texttt{fancyhdr}, usually all just included in the \LaTeX\ distributions.
+
+\section{In the preamble}
+
+At the very beginning of your preamble (that is the part before \verb|\begin{document}|) insert:
+
+\begin{verbatim}
+\documentclass[<options>]{moderncv}
+\end{verbatim}
+
+where the options are:
+
+\begin{description}
+ \item[paper size options:] \texttt{a4paper}, \texttt{a5paper}, \texttt{b5paper}, \texttt{letterpaper}, \texttt{legalpaper}, \texttt{ex\-ec\-u\-tive\-pa\-per}, \texttt{landscape}
+ \item[font size options:] \texttt{10pt}, \texttt{11pt}, \texttt{12pt}
+ \item[font option:] \texttt{nolmodern}, for people without the latin modern fonts
+ \item[color option:] \texttt{nocolor}, to have all in black and white
+ \item[draft/final options:] \texttt{draft}, \texttt{final}
+\end{description}
+
+The default options are: \texttt{a4paper}, \texttt{11pt}, \texttt{color}, \texttt{final}.
+
+After the documentclass specification, choose the theme for your curriculum vit\ae:
+
+\begin{verbatim}
+\moderncvtheme[<options>]{casual}
+\end{verbatim}
+
+which is the default theme, or
+
+\begin{verbatim}
+\moderncvtheme[<options>]{classic}
+\end{verbatim}
+
+where the theme options are:
+
+\begin{description}
+ \item[color options:] you can choose between five color:
+ \begin{itemize}
+ \item[\texttt{blue}] {\color{bluecv}\rule{1cm}{2ex}} (default color)
+ \item[\texttt{green}] {\color{greencv}\rule{1cm}{2ex}}
+ \item[\texttt{red}] {\color{redcv}\rule{1cm}{2ex}}
+ \item[\texttt{orange}] {\color{orangecv}\rule{1cm}{2ex}}
+ \item[\texttt{grey}] {\color{greycv}\rule{1cm}{2ex}}
+ \end{itemize}
+ \item[roman option:] \texttt{roman}, for {\fontsize{11}{12} \usefont{T1}{lmr}{m}{n}\selectfont roman} fonts, instead of \fontsize{11}{12} \usefont{T1}{lmss}{m}{n}\selectfont sans serif fonts.
+\end{description}
+
+Then you have to specify the character encoding (utf8, latin1, and so on):
+
+\begin{verbatim}
+\usepackage[<your encoding>]{inputenc}
+\end{verbatim}
+
+and you can adjust the page geometry:
+
+\begin{verbatim}
+\usepackage[<options>]{geometry}
+\recomputelengths
+\end{verbatim}
+
+where \verb|\recomputelengths| is required when changes are made to page layout lengths.
+
+Now we can get into the part most related to our curriculum vit\ae: our personal data. They will be inserted in the header of the first page, in the classic theme, or in the footer of every page, in the case of casual theme.
+
+\begin{itemize}
+\item \verb|\firstname{John}|
+\item \verb|\familyname{Doe}|
+\item \verb|\title{Resum\'e title}|: optional
+\item \verb|\address{street and number}{postcode city}|: optional
+\item \verb|\mobile{mobile}|: optional
+\item \verb|\phone{phone}|: optional
+\item \verb|\fax{fax}|: optional
+\item \verb|\email{email}|: optional
+\item \verb|\extrainfo{additional information}|: optional; here you can put, for example, the address of your website
+\item \verb|\photo[64pt]{picture}|: optional; \texttt{64pt} is the height the picture, you can set here the size you prefer; \texttt{picture} is the name of the picture file
+\item \verb|\quote{Some quote}|: optional
+\end{itemize}
+
+Finally you can suppress automatic page numbering for CVs longer than one page:
+
+\begin{verbatim}
+\nopagenumbers{}
+\end{verbatim}
+
+\subsection{Examples}
+
+In practice, you will type:
+
+\begin{verbatim}
+\documentclass[11pt,a4paper]{moderncv}
+
+% moderncv themes
+\moderncvtheme[green]{casual}
+
+% character encoding
+\usepackage[utf8]{inputenc}
+
+% adjust the page margins
+\usepackage[scale=0.8]{geometry}
+\recomputelengths
+
+% personal data
+\firstname{John}
+\familyname{Doe}
+\title{Design enthusiast}
+\address{12 somestreet}{3456 somecity}
+\mobile{+123 456 7890}
+\phone{+12 (3)456 78 90}
+\fax{+12 (3)456 78 90}
+\email{jdoe@design.org}
+\extrainfo{\weblink{www.ctan.org}}
+\photo[64pt]{jdoe_picture}
+\quote{Any intelligent fool can make things bigger, more complex,
+and more violent. It takes a touch of genius -- and a lot of courage -- to
+move in the opposite direction.}
+
+\begin{document}
+\maketitle
+
+... <what you'll see in the next section>
+
+\end{document}
+\end{verbatim}
+
+to obtain a casual moderncv in green, as shown in figure \ref{fig:casual}, and you will substitute the line describing the theme with:
+
+\begin{verbatim}
+% moderncv themes
+\moderncvtheme[blue]{classic}
+\end{verbatim}
+
+to obtain a classic moderncv in blue, as shown in figure \ref{fig:classic}.
+
+
+\begin{figure}[p]
+ \centering
+ \fbox{\includegraphics[angle=90,width=\textwidth]{cv_casual.pdf}}
+ \caption{An example of casual moderncv in green.}
+ \label{fig:casual}
+\end{figure}
+
+\begin{figure}[p]
+ \centering
+ \fbox{\includegraphics[angle=90,width=\textwidth]{cv_classic.pdf}}
+ \caption{An example of classic moderncv in blue.}
+ \label{fig:classic}
+\end{figure}
+
+\section{Customize sections}
+
+Now we are ready to edit the part between \verb|\begin{document}| and \verb|\end{document}|.
+
+As you can seen in figure \ref{fig:casual} e \ref{fig:classic}, you can divide your CV into sections, each of them describing what you are, what you know and what you have done in your life. Every section is divide into items chosen from different flavours. More in details:
+
+\subsection{Section}
+
+The command to open a new section is:
+
+\begin{verbatim}
+\section{<title>}
+\end{verbatim}
+
+and every section can be divided into subsections:
+
+\begin{verbatim}
+\subsection{<title>}
+\end{verbatim}
+
+If necessary, there is a command to close the section:
+
+\begin{verbatim}
+\closesection{}
+\end{verbatim}
+
+and even one to create an empty section:
+
+\begin{verbatim}
+\emptysection{}
+\end{verbatim}
+
+An example of their usage can be the next one:
+
+\begin{verbatim}
+\section{Section with your own content}\closesection
+Your content here, inside the normal \LaTeX{} environment.
+You can use any regular \LaTeX{} command, display mathematics
+\[e =m\,c^2,\]
+put some table or figure, \dots
+
+\emptysection{}
+\cvitem{Now}{Back to moderncv layout, without making a new section :-)}
+\end{verbatim}
+
+whose results is shown in figure \ref{fig:ex_sec}.
+
+\begin{figure}[!ht]
+ \centering
+ \fbox{\includegraphics[width=0.9\textwidth]{ex_sec}}
+ \caption{Example of usage of section commands.}
+ \label{fig:ex_sec}
+\end{figure}
+
+\subsection{Items}
+
+Inside sections, you can choose between different kind of items depending on the purpose:
+
+\begin{itemize}
+ \item in the sections describing your education or your job experiences, you can use:
+ \begin{verbatim}
+\cventry{years}{degree/job title}{institution/employer}
+{localization}{optional: grade/...}
+{optional: comment/job description}
+ \end{verbatim}
+\vspace{-20pt}
+where the last three arguments are optional
+ \item inside `language' cvsection environment, you can type every entry with:
+ \begin{verbatim}
+\cvlanguage{name}{level}{comment}
+ \end{verbatim}
+ \item inside `computer skills' cvsection environment, you can type every entry with:
+ \begin{verbatim}
+\cvcomputer{category}{programs}{category}{programs}
+ \end{verbatim}
+ \item to typeset lines with a hint on the left:
+ \begin{verbatim}
+\cvline{leftmark}{text}
+ \end{verbatim}
+ \item to typeset entry with a description on the left, but in two columns inside a cvsection:
+ \begin{verbatim}
+\cvdoubleitem{subtitle}{text}{subtitle}{text}
+ \end{verbatim}
+ \item to typeset lists on one column inside a cvsection:
+ \begin{verbatim}
+\cvlistitem{point1}
+ \end{verbatim}
+ \item to typeset lists on two columns inside a cvsection:
+ \begin{verbatim}
+\cvlistdoubleitem{point1}{point2}
+ \end{verbatim}
+ \item to add a section listing all your publications stored in a BibTeX file:
+ \begin{verbatim}
+\nocite{*}
+\bibliographystyle{plain}
+\bibliography{BibTeX_file}
+ \end{verbatim}
+\vspace{-20pt}
+ where the name of the section title can be changed by redefining the \texttt{refname} with \verb|\renewcommand{\refname}{<new_name>}|
+\end{itemize}
+
+\subsubsection*{Example}
+
+Let's put all together and see in figure \ref{fig:sections} what is the result:
+
+\begin{verbatim}
+... preamble ...
+\begin{document}
+\section{Education}
+\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
+\cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}
+%
+\section{Master thesis}
+\cvline{title}{\emph{Title}}
+\cvline{supervisors}{Supervisors}
+\cvline{description}{\small Short thesis abstract}
+%
+\section{Experience}
+\subsection{Vocational}
+\cventry{year--year}{Job title}{Employer}{City}{}{Description}
+\cventry{year--year}{Job title}{Employer}{City}{}{Description}
+\subsection{Miscellaneous}
+\cventry{year--year}{Job title}{Employer}{City}{}%
+ {Description line 1\newline{}Description line 2}
+%
+\section{Languages}
+\cvlanguage{language 1}{Skill level}{Comment}
+\cvlanguage{language 2}{Skill level}{Comment}
+%
+\section{Computer skills}
+\cvcomputer{category 1}{XXX, YYY, ZZZ}{category 3}{XXX, YYY, ZZZ}
+\cvcomputer{category 2}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
+%
+\section{Interests}
+\cvline{hobby 1}{\small Description}
+\cvline{hobby 2}{\small Description}
+\cvline{hobby 3}{\small Description}
+%
+\closesection{}
+\pagebreak
+%
+\section{Extra}
+\cvlistitem{Item 1}
+\cvlistitem{Item 2}
+\cvlistitem{Item 3}
+%
+\section{Extra 2}
+\cvlistdoubleitem{Item 1}{Item 4}
+\cvlistdoubleitem{Item 2}{Item 5}
+\cvlistdoubleitem{Item 3}{}
+%
+% Publications from a BibTeX file
+\nocite{*}
+\bibliographystyle{plain}
+\bibliography{publications} % 'publications' is the name of a BibTeX file
+%
+\end{document}
+\end{verbatim}
+
+\begin{figure}[!ht]
+ \centering
+ \fbox{\includegraphics[angle=90,width=\textwidth]{test_cvsection2.pdf}}\\
+ \fbox{\includegraphics[angle=90,width=\textwidth]{test_cvsection1.pdf}}
+\caption{Example of usage of items inside cvsections.}
+ \label{fig:sections}
+\end{figure}
+
+\section{More customizations}
+
+You have some useful commands to personalize your CV further.
+
+\subsection*{Modifying the symbols}
+You can modify the symbols used for the personal data (phone number, the email, \ldots) redefining \texttt{phonesymbol}, \texttt{emailsymbol}, \texttt{addresssymbol}, \texttt{mobilesymbol}, \texttt{faxsymbol}.
+
+For example: if you want to use the dingbat fonts, load the \texttt{pifont} package in the preamble, then substitute the default symbol \Telefon\ with the dingbat symbol \ding{38}\ by:
+\begin{verbatim}
+\renewcommand{\phonesymbol}{\ding{38}}
+\end{verbatim}
+
+You can change the symbol for lists in two way:
+\begin{itemize}
+ \item redefining the command \texttt{listitemsymbol}: \verb|\renewcommand{\listitemsymbol}{-}|
+ \item adding a specification for the label in \texttt{cvlistitem} and \texttt{cvlistdoubleitem}
+\end{itemize}
+
+For example: the following code produces the result shown in figure \ref{fig:ex_items}.
+
+\begin{verbatim}
+\closesection{} % needed to renewcommands
+\renewcommand{\listitemsymbol}{-} % change the symbol for lists
+
+\section{Extra 1}
+\cvlistitem{Item 1}
+\cvlistitem{Item 2}
+\cvlistitem[+]{Item 3} % optional other symbol
+
+\section{Extra 2}
+\cvlistdoubleitem[\Neutral]{Item 1}{Item 4}
+\cvlistdoubleitem[\Neutral]{Item 2}{Item 5}
+\cvlistdoubleitem[\Neutral]{Item 3}{}
+\end{verbatim}
+
+\begin{figure}[!hbt]
+ \centering
+ \fbox{\includegraphics[width=.8\textwidth]{ex_items.png}}
+ \caption{Example of customization of the list labels.}
+ \label{fig:ex_items}
+\end{figure}
+
+\subsection*{Adjusting lenghts}
+The different lengths used by moderncv are customizable by
+\begin{verbatim}
+\setlength{<length>}{<new_dimensions>}
+\end{verbatim}
+where \texttt{<length>} are \texttt{quote\-width}, \texttt{sep\-a\-ra\-tor\-col\-umn\-width}, \texttt{main\-col\-umn\-width}, \texttt{doub\-le\-i\-tem\-main\-col\-umn\-width}, \texttt{list\-i\-tem\-sym\-bol\-width}, \texttt{list\-doub\-le\-i\-tem\-main\-col\-umn\-width},
+
+In particular, the first column, can be set to any width. You can do that in two way:
+\begin{itemize}
+ \item using \verb|\sethintscolumnlength{<length>}|, where \texttt{<length>} is the desired length in a unit LaTeX understands
+ \item using \verb|\sethintscolumntowidth{<string>}|, where \texttt{<string>} is a string of the desired length (usually, the longest string that has to appear in the column)
+\end{itemize}
+
+\subsection*{Additional commands}
+There are commands to manage hypertextual links:
+\begin{itemize}
+ \item[-] \verb|\weblink[optional text]{link}|
+ \item[-] \verb|\httplink[optional text]{link}|
+ \item[-] \verb|\emaillink[optional text]{link}|
+\end{itemize}
+
+There is a \verb|\today| command, useful for example if you need to add the date the CV was produced.
+
+\subsection*{Putting things at the end of CV}
+Sometimes there is the need to add some lines at the end of the CV. For example, in Italy is necessary to add the permission to treat the personal data contained in the r\'esum\'e. You can do that dropping out of the layout of \texttt{moderncv} and pushing the lines at the end by the command \verb|\vfill|:
+\begin{verbatim}
+\emptysection{}\closesection
+\vfill
+\begin{center}
+\textit{\small Ai sensi del D. Lgs. 196/2003 ...}
+\end{center}
+\end{verbatim}
+
+\end{document}
diff --git a/macros/latex/contrib/moderncv/moderncv.cls b/macros/latex/contrib/moderncv/moderncv.cls
index 193f8e2bb6..2facfcd8d4 100644
--- a/macros/latex/contrib/moderncv/moderncv.cls
+++ b/macros/latex/contrib/moderncv/moderncv.cls
@@ -1,5 +1,5 @@
%% start of file `moderncv.cls'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{moderncv}[2015/07/28 v2.0.0 modern curriculum vitae and letter document class]
+\ProvidesClass{moderncv}[2021/01/21 v2.1.0 modern curriculum vitae and letter document class]
%-------------------------------------------------------------------------------
@@ -95,21 +95,34 @@
\xetexorluatexfalse
\fi
\fi
-% automatic loading of latin modern fonts
-%\ifxetexorluatex
-% \RequirePackage{fontspec}
-% \defaultfontfeatures{Ligatures=TeX}
-% \RequirePackage{unicode-math}
-% \setmainfont{Latin Modern}
-% \setsansfont{Latin Modern Sans}
-% \setmathfont{Latin Modern Math}
-%\else
- \RequirePackage[T1]{fontenc}
- \IfFileExists{lmodern.sty}%
- {\RequirePackage{lmodern}}%
- {}
-%\fi
+% do not use inputenc and do not automatically load lmodern to avoid problems with German
+% charactes, see
+% https://tex.stackexchange.com/questions/496630/lualatex-problems-with-german-characters
+\ifxetexorluatex
+% \RequirePackage{fontspec}
+% \defaultfontfeatures{Ligatures=TeX}
+% \RequirePackage{unicode-math}
+% \setmainfont{Latin Modern}
+% \setsansfont{Latin Modern Sans}
+% \setmathfont{Latin Modern Math}
+% \ifluatex
+% \usepackage{luatextra}
+% \usepackage{lualatex-math} %loads fontspec
+% \usepackage{shellesc} % fix a bug for lualatex shellescape
+% \fi
+\else
+ \RequirePackage[utf8]{inputenc}
+% \RequirePackage[utf8]{inputenx}
+% %additions for utf8
+% \input{ix-utf8enc.dfu}
+ \RequirePackage[T1]{fontenc}
+ % loading lmodern can cause issues with certain special characters. avoid.
+% \IfFileExists{lmodern.sty}%
+% {\RequirePackage{lmodern}}%
+% {}
+% \fi
+\fi
% hyper links (hyperref is loaded at the end of the preamble to pass options required by loaded packages such as CJK)
\newcommand*\pdfpagemode{UseNone}% do not show thumbnails or bookmarks on opening (on supporting browsers); set \pdfpagemode to "UseOutlines" to show bookmarks
\RequirePackage{url}
@@ -129,8 +142,8 @@
bookmarksdepth= 2,% to show sections and subsections
pdfauthor = {\@firstname{}~\@lastname{}},
pdftitle = {\@firstname{}~\@lastname{}\notblank{\@title}{ -- \@title}{}},
- pdfsubject = {Resum\'{e} of \@firstname{}~\@lastname{}},
- pdfkeywords = {\@firstname{}~\@lastname{}, curriculum vit\ae{}, resum\'{e}}}}
+ pdfsubject = {R\'{e}sum\'{e} of \@firstname{}~\@lastname{}},
+ pdfkeywords = {\@firstname{}~\@lastname{}, curriculum vit\ae{}, r\'{e}sum\'{e}}}}
% graphics
\RequirePackage{graphicx}
@@ -155,13 +168,13 @@
\settowidth{\pagenumberwidth}{\color{color2}\addressfont\itshape\strut\thepage/\pageref{lastpage}}%
\fancypagestyle{plain}{%
\fancyfoot[r]{\parbox[b]{\pagenumberwidth}{\color{color2}\pagenumberfont\strut\thepage/\pageref{lastpage}}}}% the parbox is required to ensure alignment with a possible center footer (e.g., as in the casual style)
- \pagestyle{plain}}{}}%
- \AtEndDocument{\label{lastpage}}\else\fi}}
+ \pagestyle{plain}}{}}\fi}%
+ \AtEndDocument{\label{lastpage}}}
\pagestyle{plain}
% reduced list spacing
% package providing hooks into lists
-% originally developped by Jakob Schiøtz (see http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty)
+% originally developped by Jakob Schiotz (see http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty)
% modified and distributed with moderncv(not available otherwise on ctan)
\RequirePackage{tweaklist}
\renewcommand*{\itemhook}{%
@@ -191,6 +204,7 @@
% compatibility package with older versions of moderncv
\RequirePackageWithOptions{moderncvcompatibility}
+\RequirePackage{expl3}
%-------------------------------------------------------------------------------
% class definition
@@ -247,20 +261,39 @@
% usage: \phone[<optional type>]{<number>}
% where <optional type> should be either "fixed" (default), "mobile" or "fax
\collectionnew{phones}
-\newcommand*{\phone}[2][fixed]{\collectionadd[#1]{phones}{#2}}
+\NewDocumentCommand{\phone}{O{fixed}m}{%
+ \ifthenelse{\equal{#1}{fax}}%
+ {\collectionadd[#1]{phones}{#2}}
+ {\collectionadd[#1]{phones}{\protect\tellink{#2}}}
+ }
+
+% http://latex.org/forum/viewtopic.php?t=12239
+\def\SplitMyMacro#1/#2{#2}
+
+
% adds a social link to one's personal information (optional)
% usage: \social[<optional type>][<optional url>]{<account name>}
-% where <optional type> should be either "linkedin", "twitter" or "github"
+% where <optional type> should be either "linkedin", "xing", "twitter", "github", "gitlab", "bitbucket" or "skype"
\collectionnew{socials}
\NewDocumentCommand{\social}{O{}O{}m}{%
\ifthenelse{\equal{#2}{}}%
{%
- \ifthenelse{\equal{#1}{linkedin}}{\collectionadd[linkedin]{socials}{\protect\httplink[#3]{www.linkedin.com/in/#3}}}{}%
- \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httplink[#3]{www.twitter.com/#3}}} {}%
- \ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httplink[#3]{www.github.com/#3}}} {}%
- }
- {\collectionadd[#1]{socials}{\protect\httplink[#3]{#2}}}}
+ \ifthenelse{\equal{#1}{linkedin}} {\collectionadd[linkedin]{socials} {\protect\httpslink[#3]{www.linkedin.com/in/#3}}} {}%
+ \ifthenelse{\equal{#1}{xing}} {\collectionadd[xing]{socials} {\protect\httpslink[#3]{www.xing.com/profile/#3}}} {}%
+ \ifthenelse{\equal{#1}{twitter}} {\collectionadd[twitter]{socials} {\protect\httpslink[#3]{www.twitter.com/#3}}} {}%
+ \ifthenelse{\equal{#1}{github}} {\collectionadd[github]{socials} {\protect\httpslink[#3]{www.github.com/#3}}} {}%
+ \ifthenelse{\equal{#1}{gitlab}} {\collectionadd[gitlab]{socials} {\protect\httpslink[#3]{www.gitlab.com/#3}}} {}%
+ \ifthenelse{\equal{#1}{stackoverflow}}{\collectionadd[stackoverflow]{socials}{\protect\httpslink[#3]{stackoverflow.com/users/#3}}} {}%
+ \ifthenelse{\equal{#1}{bitbucket}} {\collectionadd[bitbucket]{socials} {\protect\httpslink[#3]{www.bitbucket.org/#3}}} {}%
+ \ifthenelse{\equal{#1}{skype}} {\collectionadd[skype]{socials} {#3}} {}%
+ \ifthenelse{\equal{#1}{orcid}} {\collectionadd[orcid]{socials} {\protect\httpslink[#3]{orcid.org/#3}}} {}%
+ \ifthenelse{\equal{#1}{researchgate}} {\collectionadd[researchgate]{socials} {\protect\httpslink[#3]{www.researchgate.net/profile/#3}}} {}%
+ \ifthenelse{\equal{#1}{researcherid}} {\collectionadd[researcherid]{socials} {\protect\httpslink[#3]{www.researcherid.com/rid/#3}}} {}%
+ \ifthenelse{\equal{#1}{telegram}} {\collectionadd[telegram]{socials} {\protect\httpslink[#3]{t.me/#3}}} {}%
+ \ifthenelse{\equal{#1}{googlescholar}}{\collectionadd[googlescholar]{socials}{\protect\httpslink[#3]{scholar.google.com/citations?user=#3}}} {}% {}%
+ }
+ {\collectionadd[#1]{socials}{\protect\httpslink[#3]{#2}}}}
% defines additional personal information (optional)
% usage: \extrainfo{<text>}
@@ -288,16 +321,26 @@
\renewcommand{\theenumiv} {\@Alph\c@enumiv}
% other symbols
-\newcommand*{\listitemsymbol} {\labelitemi~}
-\newcommand*{\addresssymbol} {}
-\newcommand*{\mobilephonesymbol} {}
-\newcommand*{\fixedphonesymbol} {}
-\newcommand*{\faxphonesymbol} {}
-\newcommand*{\emailsymbol} {}
-\newcommand*{\homepagesymbol} {}
-\newcommand*{\linkedinsocialsymbol}{}
-\newcommand*{\twittersocialsymbol} {}
-\newcommand*{\githubsocialsymbol} {}
+\newcommand*{\listitemsymbol} {\labelitemi~}
+\newcommand*{\addresssymbol} {}
+\newcommand*{\mobilephonesymbol} {}
+\newcommand*{\fixedphonesymbol} {}
+\newcommand*{\faxphonesymbol} {}
+\newcommand*{\emailsymbol} {}
+\newcommand*{\homepagesymbol} {}
+\newcommand*{\linkedinsocialsymbol} {}
+\newcommand*{\xingsocialsymbol} {}
+\newcommand*{\twittersocialsymbol} {}
+\newcommand*{\githubsocialsymbol} {}
+\newcommand*{\gitlabsocialsymbol} {}
+\newcommand*{\stackoverflowsocialsymbol}{}
+\newcommand*{\bitbucketsocialsymbol} {}
+\newcommand*{\skypesocialsymbol} {}
+\newcommand*{\orcidsocialsymbol} {}
+\newcommand*{\researchgatesocialsymbol} {}
+\newcommand*{\researchidsocialsymbol} {}
+\newcommand*{\googlescholarsocialsymbol}{}
+\newcommand*{\telegramsocialsymbol} {}
% other
%------
@@ -312,34 +355,39 @@
% usage: \makefooter
\newcommand*{\makefooter}{}%
+\newcommand*{\@loadmoderncvpackage}[3][]{%
+ \begingroup\edef\x{\endgroup%
+ \noexpand\RequirePackage[#1]{moderncv#2\ifcase#3\or i\or ii\or iii\or iv\or v\or vi\or vii\or viii\or ix\or x\fi}%
+ }\x}
+
% loads a style variant (a combination of header, body and footer)
% usage: \moderncvstyle{<style variant name>}
-\newcommand*{\moderncvstyle}[2][]{
+\newcommand*{\moderncvstyle}[2][]{%
\RequirePackage[#1]{moderncvstyle#2}}
% loads a header variant
% usage: \moderncvhead[<optional head option>]{<header variant number>}
-\newcommand*{\moderncvhead}[2][]{
- \expandafter\RequirePackage\expandafter[\expandafter#1\expandafter]{\expandafter moderncvhead\romannumeral #2}}
+\newcommand*{\moderncvhead}[2][]{%
+ \@loadmoderncvpackage[#1]{head}{#2}}
% loads a body variant
% usage: \moderncvbody[<optional body option>]{<body variant number>}
-\newcommand*{\moderncvbody}[2][]{
- \expandafter\RequirePackage\expandafter[\expandafter#1\expandafter]{\expandafter moderncvbody\romannumeral #2}}
+\newcommand*{\moderncvbody}[2][]{%
+ \@loadmoderncvpackage[#1]{body}{#2}}
% loads a footer variant
-% usage: \moderncvfoot{<footer variant number>}
-\newcommand*{\moderncvfoot}[1]{
- \expandafter\RequirePackage\expandafter{\expandafter moderncvfoot\romannumeral #1}}
+% usage: \moderncvfoot[<optional foot option>]{<foot variant number>}
+\newcommand*{\moderncvfoot}[2][]{%
+ \@loadmoderncvpackage[#1]{foot}{#2}}
% loads a color scheme
% usage: \moderncvcolor{<color scheme name>}
-\newcommand*{\moderncvcolor}[1]{
+\newcommand*{\moderncvcolor}[1]{%
\RequirePackage{moderncvcolor#1}}
% loads an icons set
% usage: \moderncvicons{<icon set name>}
-\newcommand*{\moderncvicons}[1]{
+\newcommand*{\moderncvicons}[1]{%
\RequirePackage{moderncvicons#1}}
% recomputes all automatic lengths
@@ -481,21 +529,45 @@
\newcommand*{\link}[2][]{%
\ifthenelse{\equal{#1}{}}%
{\href{#2}{#2}}%
- {\href{#2}{#1}}}
+ {\href{#2}{\detokenize{#1}}}}
% makes a http hyperlink
% usage: \httplink[optional text]{link}
\newcommand*{\httplink}[2][]{%
\ifthenelse{\equal{#1}{}}%
{\href{http://#2}{#2}}%
- {\href{http://#2}{#1}}}
+ {\href{http://#2}{\detokenize{#1}}}}
+
+
+% makes an https hyperlink
+% usage: \httpslink[optional text]{link}
+\newcommand*{\httpslink}[2][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\href{https://#2}{#2}}%
+ {\href{https://#2}{\detokenize{#1}}}}
% makes an email hyperlink
% usage: \emaillink[optional text]{link}
\newcommand*{\emaillink}[2][]{%
\ifthenelse{\equal{#1}{}}%
{\href{mailto:#2}{#2}}%
- {\href{mailto:#2}{#1}}}
+
+ {\href{mailto:#2}{\detokenize{#1}}}}
+% makes a tel hyperlink
+% usage: \tellink[optional text]{link}
+\newcommand*{\tellink}[2][]{%
+ \ifthenelse{\equal{#1}{}}%
+ {\expandafter\onlynumberslink\expandafter{#2}{#2}}%
+ {\expandafter\onlynumberslink\expandafter{#2}{#1}}}
+
+\ExplSyntaxOn
+\tl_new:N \l_onlynumberslink_tl
+\cs_new:Npn \onlynumberslink #1 #2 {
+ \tl_set:Nn \l_onlynumberslink_tl {#1}
+ \regex_replace_all:nnN {[^0-9+]} {} \l_onlynumberslink_tl
+ \href{ tel\token_to_str:N : \tl_use:N \l_onlynumberslink_tl}{ #2 }
+}
+\ExplSyntaxOff
% cvcolumns environment, where every column is created through \cvcolumn
% usage: \begin{cvcolumns}
diff --git a/macros/latex/contrib/moderncv/moderncvbodyi.sty b/macros/latex/contrib/moderncv/moderncvbodyi.sty
index a86bcf2425..b30af90b5f 100644
--- a/macros/latex/contrib/moderncv/moderncvbodyi.sty
+++ b/macros/latex/contrib/moderncv/moderncvbodyi.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvbodyi.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,13 +10,15 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvbodyi}[2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 1]
+\ProvidesPackage{moderncvbodyi}[2021/01/21 v2.1.0 modern curriculum vitae and letter body variant: 1]
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
-
+% provides the commands for the skillmatrix as well as the command
+% \recompute@cvskillmatrix@lengths
+\RequirePackage[moderncvbodyi]{moderncvskillmatrix}
%-------------------------------------------------------------------------------
% overall body definition
@@ -59,9 +61,11 @@
\setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
\setlength{\listdoubleitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemcolumnwidth}{0.5\listdoubleitemcolumnwidth}%
+ \recompute@cvskillmatrix@lengths
% regular lengths
\setlength{\parskip}{0\p@}}
+
\@initializelength{\baseletterheight}
\settoheight{\baseletterheight}{\sectionstyle{o}}
\setlength{\baseletterheight}{\baseletterheight-0.95ex}
diff --git a/macros/latex/contrib/moderncv/moderncvbodyii.sty b/macros/latex/contrib/moderncv/moderncvbodyii.sty
index a86bcf2425..acab69f5b3 100644..120000
--- a/macros/latex/contrib/moderncv/moderncvbodyii.sty
+++ b/macros/latex/contrib/moderncv/moderncvbodyii.sty
@@ -1,174 +1 @@
-%% start of file `moderncvbodyi.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
-%
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License version 1.3c,
-% available at http://www.latex-project.org/lppl/.
-
-
-%-------------------------------------------------------------------------------
-% identification
-%-------------------------------------------------------------------------------
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvbodyi}[2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 1]
-
-
-%-------------------------------------------------------------------------------
-% required packages
-%-------------------------------------------------------------------------------
-
-
-%-------------------------------------------------------------------------------
-% overall body definition
-%-------------------------------------------------------------------------------
-% fonts
-\renewcommand*{\sectionfont}{\Large\mdseries\upshape}
-\renewcommand*{\subsectionfont}{\large\mdseries\upshape}
-\renewcommand*{\hintfont}{}
-
-% styles
-\renewcommand*{\sectionstyle}[1]{{\sectionfont\textcolor{color1}{#1}}}
-\renewcommand*{\subsectionstyle}[1]{{\subsectionfont\textcolor{color1}{#1}}}
-\renewcommand*{\hintstyle}[1]{{\hintfont\textcolor{color0}{#1}}}
-
-
-%-------------------------------------------------------------------------------
-% resume body definition
-%-------------------------------------------------------------------------------
-% lengths
-% used by \cvitem (and all children command)
-\@initializelength{\hintscolumnwidth} \setlength{\hintscolumnwidth}{0.175\textwidth}
-\@initializelength{\separatorcolumnwidth} \setlength{\separatorcolumnwidth}{0.025\textwidth}
-\@initializelength{\maincolumnwidth}
-% used by \cvdoubleitem
-\@initializelength{\doubleitemcolumnwidth}
-% used by \cvlistitem
-\@initializelength{\listitemsymbolwidth} \settowidth{\listitemsymbolwidth}{\listitemsymbol}
-\@initializelength{\listitemcolumnwidth}
-% used by \cvlistdoubleitem
-\@initializelength{\listdoubleitemcolumnwidth}
-% default moderncv \photo (change the definition such that by default the photo and its box align with the section bars
-\RenewDocumentCommand{\photo}{O{\hintscolumnwidth-0.8pt-2\fboxsep}O{0.4pt}m}{\def\@photowidth{#1}\def\@photoframewidth{#2}\def\@photo{#3}}%
-
-% commands
-\renewcommand*{\recomputecvbodylengths}{%
- % body lengths
- \setlength{\maincolumnwidth}{\textwidth-\leftskip-\rightskip-\separatorcolumnwidth-\hintscolumnwidth}%
- \setlength{\listitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth}%
- \setlength{\doubleitemcolumnwidth}{\maincolumnwidth-\hintscolumnwidth-\separatorcolumnwidth-\separatorcolumnwidth}%
- \setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
- \setlength{\listdoubleitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
- \setlength{\listdoubleitemcolumnwidth}{0.5\listdoubleitemcolumnwidth}%
- % regular lengths
- \setlength{\parskip}{0\p@}}
-
-\@initializelength{\baseletterheight}
-\settoheight{\baseletterheight}{\sectionstyle{o}}
-\setlength{\baseletterheight}{\baseletterheight-0.95ex}
-\RenewDocumentCommand{\section}{sm}{%
- \par\addvspace{2.5ex}%
- \phantomsection{}% reset the anchor for hyperrefs
- \addcontentsline{toc}{section}{#2}%
- \cvitem[0ex]{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}{\strut\sectionstyle{#2}}%
- \par\nobreak\addvspace{1ex}\@afterheading}% to avoid a pagebreak after the heading
-
-\RenewDocumentCommand{\subsection}{sm}{%
- \par\addvspace{1ex}%
- \phantomsection{}% reset the anchor for hyperrefs
- \addcontentsline{toc}{subsection}{#2}%
- \cvitem[0ex]{}{\strut\subsectionstyle{#2}}%
- \par\nobreak\addvspace{.5ex}\@afterheading}% to avoid a pagebreak after the heading
-
-\renewcommand*{\cvitem}[3][.25em]{%
- \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%
- \raggedleft\hintstyle{#2} &{#3}%
- \end{tabular}%
- \par\addvspace{#1}}
-
-\renewcommand*{\cvdoubleitem}[5][.25em]{%
- \cvitem[#1]{#2}{%
- \begin{minipage}[t]{\doubleitemcolumnwidth}#3\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\hintscolumnwidth}\raggedleft\hintstyle{#4}\end{minipage}%
- \hspace*{\separatorcolumnwidth}%
- \begin{minipage}[t]{\doubleitemcolumnwidth}#5\end{minipage}}}
-
-\renewcommand*{\cvlistitem}[2][.25em]{%
- \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listitemcolumnwidth}#2\end{minipage}}}
-
-\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
- \cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \ifthenelse{\equal{#3}{}}%
- {}%
- {\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
-
-\renewcommand*{\cventry}[7][.25em]{%
- \cvitem[#1]{#2}{%
- {\bfseries#3}%
- \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%
- \ifthenelse{\equal{#5}{}}{}{, #5}%
- \ifthenelse{\equal{#6}{}}{}{, #6}%
- .\strut%
- \ifx&#7&%
- \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}
-
-\@initializebox{\cvitemwithcommentbox}
-\@initializelength{\cvitemwithcommentskilllength}
-\@initializelength{\cvitemwithcommentcommentlength}
-\renewcommand*{\cvitemwithcomment}[4][.25em]{%
- \savebox{\cvitemwithcommentbox}{{#3}}%
- \setlength{\cvitemwithcommentskilllength}{\widthof{\usebox{\cvitemwithcommentbox}}}%
- \setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentskilllength}%
- \cvitem[#1]{#2}{%
- \begin{minipage}[t]{\cvitemwithcommentskilllength}\usebox{\cvitemwithcommentbox}\end{minipage}%
- \hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\cvitemwithcommentcommentlength}\raggedleft\small\itshape#4\end{minipage}}}
-
-\renewenvironment{thebibliography}[1]%
- {%
- \bibliographyhead{\refname}%
-% \small%
- \begin{list}{\bibliographyitemlabel}%
- {%
- \setlength{\topsep}{0pt}%
- \setlength{\labelwidth}{\hintscolumnwidth}%
- \setlength{\labelsep}{\separatorcolumnwidth}%
- \leftmargin\labelwidth%
- \advance\leftmargin\labelsep%
- \@openbib@code%
- \usecounter{enumiv}%
- \let\p@enumiv\@empty%
- \renewcommand\theenumiv{\@arabic\c@enumiv}}%
- \sloppy%
- \clubpenalty4000%\@clubpenalty \clubpenalty%
- \widowpenalty4000%
- \sfcode`\.\@m%
- \sfcode `\=1000\relax}%
- {%
- \def\@noitemerr{\@latex@warning{Empty `thebibliography' environment}}%
- \end{list}}
-
-
-%-------------------------------------------------------------------------------
-% letter style definition
-%-------------------------------------------------------------------------------
-% commands
-\renewcommand*{\recomputeletterbodylengths}{%
- \recomputecvlengths%
- \setlength{\parskip}{6\p@}}
-
-\renewcommand*{\makeletterclosing}{
- \@closing\\[3em]%
- {\bfseries\@firstname~\@lastname}%
- \ifthenelse{\isundefined{\@enclosure}}{}{%
- \\%
- \vfil%
- {\color{color2}\itshape\enclname: \@enclosure}}%
- \vfil}
-
-
-\endinput
-
-
-%% end of file `moderncvbodyi.sty'.
+moderncvbodyi.sty \ No newline at end of file
diff --git a/macros/latex/contrib/moderncv/moderncvbodyiii.sty b/macros/latex/contrib/moderncv/moderncvbodyiii.sty
index a2de047a55..85fff25478 100644
--- a/macros/latex/contrib/moderncv/moderncvbodyiii.sty
+++ b/macros/latex/contrib/moderncv/moderncvbodyiii.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvbodyiii.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvbodyiii}[2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 3]
+\ProvidesPackage{moderncvbodyiii}[2021/01/21 v2.1.0 modern curriculum vitae and letter body variant: 3]
% rules type options: "fullrules", "shortrules", "mixedrules" (default) or "norules"
\@initializeif{\if@fullrules}\@fullrulesfalse
@@ -37,7 +37,9 @@
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
-
+% provides the commands for the skillmatrix as well as the command
+% \recompute@cvskillmatrix@lengths
+\RequirePackage[moderncvbodyiii]{moderncvskillmatrix}
%-------------------------------------------------------------------------------
% overall body definition
@@ -96,6 +98,7 @@
\setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
\setlength{\listdoubleitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemcolumnwidth}{0.5\listdoubleitemcolumnwidth}%
+ \recompute@cvskillmatrix@lengths
% regular lengths
\setlength{\parskip}{0\p@}}
@@ -143,13 +146,13 @@
\renewcommand*{\subsectionrule}{}\fi
\renewcommand*{\cvitem}[3][.25em]{%
- \ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }{#3}%
+ \ifstrempty{#2}{}{\hintstyle{#2}: }{#3}%
\par\addvspace{#1}}
\renewcommand*{\cvdoubleitem}[5][.25em]{%
\begin{minipage}[t]{\doubleitemcolumnwidth}\hintstyle{#2}: #3\end{minipage}%
\hfill% fill of \separatorcolumnwidth
- \begin{minipage}[t]{\doubleitemcolumnwidth}\ifthenelse{\equal{#4}{}}{}{\hintstyle{#4}: }#5\end{minipage}%
+ \begin{minipage}[t]{\doubleitemcolumnwidth}\ifstrempty{#4}{}{\hintstyle{#4}: }#5\end{minipage}%
\par\addvspace{#1}}
\renewcommand*{\cvlistitem}[2][.25em]{%
@@ -159,14 +162,20 @@
\renewcommand*{\cvlistdoubleitem}[3][.25em]{%
\cvitem[#1]{}{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#2\end{minipage}%
\hfill% fill of \separatorcolumnwidth
- \ifthenelse{\equal{#3}{}}%
+ \ifstrempty{#3}%
{}%
{\listitemsymbol\begin{minipage}[t]{\listdoubleitemcolumnwidth}#3\end{minipage}}}}
\renewcommand*{\cventry}[7][.25em]{
\begin{tabular*}{\maincolumnwidth}{l@{\extracolsep{\fill}}r}%
- {\bfseries #4} & {\bfseries #5}\\%
- {\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}} & {\itshape #2}\\%
+ % skip the company name and location line if both are empty, allowing one to show multiple roles within the same company without repeating it
+ \ifboolexpr{%
+ test {\ifstrempty{#4}}
+ and
+ test {\ifstrempty{#5}}}%
+ {}%
+ {{\bfseries #4} & {\bfseries #5}\\}%
+ {\itshape #3\ifstrempty{#6}{}{, #6}} & {\itshape #2}\\%
\end{tabular*}%
\ifx&#7&%
\else{\\%
@@ -179,7 +188,7 @@
\@initializelength{\cvitemwithcommentmainlength}
\@initializelength{\cvitemwithcommentcommentlength}
\renewcommand*{\cvitemwithcomment}[4][.25em]{%
- \savebox{\cvitemwithcommentmainbox}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }#3}%
+ \savebox{\cvitemwithcommentmainbox}{\ifstrempty{#2}{}{\hintstyle{#2}: }#3}%
\setlength{\cvitemwithcommentmainlength}{\widthof{\usebox{\cvitemwithcommentmainbox}}}%
\setlength{\cvitemwithcommentcommentlength}{\maincolumnwidth-\separatorcolumnwidth-\cvitemwithcommentmainlength}%
\begin{minipage}[t]{\cvitemwithcommentmainlength}\usebox{\cvitemwithcommentmainbox}\end{minipage}%
diff --git a/macros/latex/contrib/moderncv/moderncvbodyiv.sty b/macros/latex/contrib/moderncv/moderncvbodyiv.sty
index 20af5e48d3..54f47517ff 100644
--- a/macros/latex/contrib/moderncv/moderncvbodyiv.sty
+++ b/macros/latex/contrib/moderncv/moderncvbodyiv.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvbodyiv.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,13 +10,15 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvbodyiv}[2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 4]
+\ProvidesPackage{moderncvbodyiv}[2021/01/21 v2.1.0 modern curriculum vitae and letter body variant: 4]
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
-
+% provides the commands for the skillmatrix as well as the command
+% \recompute@cvskillmatrix@lengths
+\RequirePackage[moderncvbodyiv]{moderncvskillmatrix}
%-------------------------------------------------------------------------------
% overall body definition
@@ -57,6 +59,7 @@
\setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
\setlength{\listdoubleitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemcolumnwidth}{0.5\listdoubleitemcolumnwidth}%
+ \recompute@cvskillmatrix@lengths
% regular lengths
\setlength{\parskip}{0\p@}}
diff --git a/macros/latex/contrib/moderncv/moderncvbodyv.sty b/macros/latex/contrib/moderncv/moderncvbodyv.sty
index 8888fe5ed5..81c9db5340 100644
--- a/macros/latex/contrib/moderncv/moderncvbodyv.sty
+++ b/macros/latex/contrib/moderncv/moderncvbodyv.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvbodyv.sty'.
-%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,13 +10,15 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvbodyv}[2015/07/28 v2.0.0 modern curriculum vitae and letter body variant: 5]
+\ProvidesPackage{moderncvbodyv}[2021/01/21 v2.1.0 modern curriculum vitae and letter body variant: 5]
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
-
+% provides the commands for the skillmatrix as well as the command
+% \recompute@cvskillmatrix@lengths
+\RequirePackage[moderncvbodyv]{moderncvskillmatrix}
%-------------------------------------------------------------------------------
% overall style definition
@@ -61,6 +63,7 @@
\setlength{\doubleitemcolumnwidth}{0.5\doubleitemcolumnwidth}%
\setlength{\listdoubleitemcolumnwidth}{\maincolumnwidth-\listitemsymbolwidth-\separatorcolumnwidth-\listitemsymbolwidth}%
\setlength{\listdoubleitemcolumnwidth}{0.5\listdoubleitemcolumnwidth}%
+ \recompute@cvskillmatrix@lengths
% regular lengths
\setlength{\parskip}{0\p@}}
@@ -84,7 +87,15 @@
\nobreak\@afterheading\@aftersectiontrue\ignorespaces}
\renewcommand*{\cvitem}[3][.5ex]{%
- \@cvitem[#1]{}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }{#3}}}
+ \@cvitem[#1]{}{\ifthenelse{\equal{#2}{}}{}{\hintstyle{#2}: }{#3}}%
+ }
+% \RenewDocumentCommand{\cvitem}{+O{.5ex} +m +m}{%
+% \IfNoValueTF{#2}{%
+% \@cvitem[#1]{}{#3}%
+% }{%
+% \@cvitem[#1]{}{\hintstyle{#2}: {#3}}%
+% }%
+% }
% underlying command to implement \cvitem, \subsection and \section
\newcommand*{\@cvitem}[3][.5ex]{%
diff --git a/macros/latex/contrib/moderncv/moderncvcollection.sty b/macros/latex/contrib/moderncv/moderncvcollection.sty
index 909d234933..73db08ed29 100644
--- a/macros/latex/contrib/moderncv/moderncvcollection.sty
+++ b/macros/latex/contrib/moderncv/moderncvcollection.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcollection.sty'.
-%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcollection}[2015/07/28 v2.0.0 moderncv collections]
+\ProvidesPackage{moderncvcollection}[2021/01/21 v2.1.0 moderncv collections]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorblack.sty b/macros/latex/contrib/moderncv/moderncvcolorblack.sty
index 24a911ed8e..9382609003 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorblack.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorblack.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorblack.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorblack}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: black]
+\ProvidesPackage{moderncvcolorblack}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: black]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorblue.sty b/macros/latex/contrib/moderncv/moderncvcolorblue.sty
index 39f5f42d31..75a994867b 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorblue.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorblue.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorblue.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorblue}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: blue]
+\ProvidesPackage{moderncvcolorblue}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: blue]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorburgundy.sty b/macros/latex/contrib/moderncv/moderncvcolorburgundy.sty
index 28f5b2c1d5..a1c833141c 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorburgundy.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorburgundy.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorburgundy.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorburgundy}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: burgundy]
+\ProvidesPackage{moderncvcolorburgundy}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: burgundy]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorgreen.sty b/macros/latex/contrib/moderncv/moderncvcolorgreen.sty
index 1e4eadcbed..5f7deaa7ac 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorgreen.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorgreen.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorgreen.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorgreen}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: green]
+\ProvidesPackage{moderncvcolorgreen}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: green]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorgrey.sty b/macros/latex/contrib/moderncv/moderncvcolorgrey.sty
index 8934deeeb0..988d596902 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorgrey.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorgrey.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorgrey.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorgrey}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: grey]
+\ProvidesPackage{moderncvcolorgrey}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: grey]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolororange.sty b/macros/latex/contrib/moderncv/moderncvcolororange.sty
index cc0a62e346..357cc96d1b 100644
--- a/macros/latex/contrib/moderncv/moderncvcolororange.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolororange.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolororange.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolororange}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: orange]
+\ProvidesPackage{moderncvcolororange}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: orange]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorpurple.sty b/macros/latex/contrib/moderncv/moderncvcolorpurple.sty
index 2c63aaf351..7603043045 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorpurple.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorpurple.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorpurple.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorpurple}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: purple]
+\ProvidesPackage{moderncvcolorpurple}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: purple]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcolorred.sty b/macros/latex/contrib/moderncv/moderncvcolorred.sty
index be178aa9e5..1716781272 100644
--- a/macros/latex/contrib/moderncv/moderncvcolorred.sty
+++ b/macros/latex/contrib/moderncv/moderncvcolorred.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcolorred.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcolorred}[2015/07/28 v2.0.0 modern curriculum vitae and letter color scheme: red]
+\ProvidesPackage{moderncvcolorred}[2021/01/21 v2.1.0 modern curriculum vitae and letter color scheme: red]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvcompatibility.sty b/macros/latex/contrib/moderncv/moderncvcompatibility.sty
index 681eaf4eb0..2a5f15c445 100644
--- a/macros/latex/contrib/moderncv/moderncvcompatibility.sty
+++ b/macros/latex/contrib/moderncv/moderncvcompatibility.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvcompatibility.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvcompatibility}[2015/07/28 v2.0.0 modern curriculum vitae and letter compatibility patches]
+\ProvidesPackage{moderncvcompatibility}[2021/01/21 v2.1.0 modern curriculum vitae and letter compatibility patches]
%-------------------------------------------------------------------------------
@@ -97,6 +97,9 @@
\newcommand*{\mobilesymbol}{\mobilephonesymbol}
\newcommand*{\faxsymbol}{\faxphonesymbol}
+% compatibility with versions <= 1.5.1
+\newcommand*{\makecvtitlenamewidth}{\makecvheadnamewidth} % only used in header variants 1 and 4, themself used by the classic and oldstyle styles
+
\endinput
diff --git a/macros/latex/contrib/moderncv/moderncvdebugtools.sty b/macros/latex/contrib/moderncv/moderncvdebugtools.sty
index 04ad305b75..3e8f81b86a 100644
--- a/macros/latex/contrib/moderncv/moderncvdebugtools.sty
+++ b/macros/latex/contrib/moderncv/moderncvdebugtools.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvdebugtools.sty'.
-%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvdebugtools}[2015/07/28 v2.0.0 modern curriculum vitae and letter debug tools]
+\ProvidesPackage{moderncvdebugtools}[2021/01/21 v2.1.0 modern curriculum vitae and letter debug tools]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvfooti.sty b/macros/latex/contrib/moderncv/moderncvfooti.sty
index 1a66d0f64e..751216c092 100644
--- a/macros/latex/contrib/moderncv/moderncvfooti.sty
+++ b/macros/latex/contrib/moderncv/moderncvfooti.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvfooti.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvfooti}[2015/07/28 v2.0.0 modern curriculum vitae and letter footer variant: 1]
+\ProvidesPackage{moderncvfooti}[2021/01/21 v2.1.0 modern curriculum vitae and letter footer variant: 1]
%-------------------------------------------------------------------------------
@@ -88,7 +88,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httplink{\@homepage}}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%
@@ -119,7 +119,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtofoot{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtofoot{\emailsymbol\emaillink{\@email}}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httplink{\@homepage}}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\addtofoot{\homepagesymbol\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtofoot{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtofoot{\@extrainfo}}%
diff --git a/macros/latex/contrib/moderncv/moderncvheadi.sty b/macros/latex/contrib/moderncv/moderncvheadi.sty
index 3c578914c2..ff447025d7 100644
--- a/macros/latex/contrib/moderncv/moderncvheadi.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadi.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadi.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadi}[2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 1]
+\ProvidesPackage{moderncvheadi}[2021/01/21 v2.1.0 modern curriculum vitae and letter header variant: 1]
% details options: "details" (default) or "nodetails"
\@initializeif{\if@details}\@detailsfalse
@@ -54,8 +54,7 @@
%-------------------------------------------------------------------------------
% lengths
\@initializelength{\quotewidth}
-% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically)
-\@initializelength{\makecvheadnamewidth}
+\@initializelength{\makecvheadnamewidth}% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically)
\renewcommand*{\recomputecvheadlengths}{%
\setlength{\quotewidth}{0.65\textwidth}}
@@ -81,7 +80,7 @@
\ifthenelse{\equal{\@addresscountry}{}}{}{\makenewline\@addresscountry}}%
\phonesdetails% needs to be pre-rendered as loops and tabulars seem to conflict
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
\socialsdetails% needs to be pre-rendered as loops and tabulars seem to conflict
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}%
\end{tabular}
@@ -159,7 +158,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[1em]
% recipient block
diff --git a/macros/latex/contrib/moderncv/moderncvheadii.sty b/macros/latex/contrib/moderncv/moderncvheadii.sty
index f6d19c3738..ecfaf13347 100644
--- a/macros/latex/contrib/moderncv/moderncvheadii.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadii.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadii.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadii}[2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 2]
+\ProvidesPackage{moderncvheadii}[2021/01/21 v2.1.0 modern curriculum vitae and letter header variant: 2]
% details options: "details" or "nodetails" (default)
\@initializeif{\if@details}\@detailsfalse
@@ -93,8 +93,6 @@
%-------------------------------------------------------------------------------
% lengths
\@initializelength{\quotewidth}
-% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically)
-\@initializelength{\makecvheadnamewidth}
\renewcommand*{\recomputecvheadlengths}{%
\setlength{\makeheaddetailswidth}{\textwidth}%
\setlength{\quotewidth}{0.65\textwidth}}
@@ -145,7 +143,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httplink{\@homepage}}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%
diff --git a/macros/latex/contrib/moderncv/moderncvheadiii.sty b/macros/latex/contrib/moderncv/moderncvheadiii.sty
index 54f86cb5fd..d851785326 100644
--- a/macros/latex/contrib/moderncv/moderncvheadiii.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadiii.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadiii.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadiii}[2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 3]
+\ProvidesPackage{moderncvheadiii}[2021/01/21 v2.1.0 modern curriculum vitae and letter header variant: 3]
% details options: "details" (default) or "nodetails"
\@initializeif{\if@details}\@detailsfalse
@@ -70,10 +70,11 @@
\@firstmakeheaddetailselementfalse\fi}
% internal command to flush the makehead
\@initializecommand{\flushmakeheaddetails}{%
- \strut\usebox{\makeheaddetailsbox}%
- \savebox{\makeheaddetailsbox}{}%
- \savebox{\makeheaddetailstempbox}{}%
- \setlength{\makeheaddetailsboxwidth}{0pt}}
+ \ifnum\makeheaddetailsboxwidth>0%
+ \strut\usebox{\makeheaddetailsbox}%
+ \savebox{\makeheaddetailsbox}{}%
+ \savebox{\makeheaddetailstempbox}{}%
+ \setlength{\makeheaddetailsboxwidth}{0pt}\fi}
\@initializecommand{\makehead}{%
\setlength{\makeheaddetailswidth}{0.8\textwidth}%
\hfil%
@@ -81,9 +82,10 @@
\centering%
% name and title
\namestyle{\@firstname~\@lastname}%
- \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}\\% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
+ \ifthenelse{\equal{\@title}{}}{}{\titlestyle{~|~\@title}}% \isundefined doesn't work on \@title, as LaTeX itself defines \@title (before it possibly gets redefined by \title)
% optional detailed information
\if@details{%
+ \\%
\addressfont\color{color2}%
\ifthenelse{\isundefined{\@addressstreet}}{}{\addtomakeheaddetails{\addresssymbol\@addressstreet}%
\ifthenelse{\equal{\@addresscity}{}}{}{\addtomakeheaddetails[~--~]{\@addresscity}}% if \addresstreet is defined, \addresscity and \addresscountry will always be defined but could be empty
@@ -92,11 +94,11 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httplink{\@homepage}}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%
- \flushmakeheaddetails}\fi}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \makehead
+ \flushmakeheaddetails}\fi}\\[2.5em]}% need to force a \par after this to avoid weird spacing bug at the first section if no blank line is left after \makehead
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvheadiv.sty b/macros/latex/contrib/moderncv/moderncvheadiv.sty
index bed59f55fb..2f9b8e0587 100644
--- a/macros/latex/contrib/moderncv/moderncvheadiv.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadiv.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadiv.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadiv}[2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 4]
+\ProvidesPackage{moderncvheadiv}[2021/01/21 v2.1.0 modern curriculum vitae and letter header variant: 4]
% details options: "details" (default) or "nodetails"
\@initializeif{\if@details}\@detailsfalse
@@ -49,6 +49,7 @@
%-------------------------------------------------------------------------------
% lengths
\@initializelength{\quotewidth}
+\@initializelength{\makecvheadnamewidth}% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically)
\setlength{\marginparwidth}{0\p@}
\setlength{\marginparsep}{0\p@}
\renewcommand*{\recomputecvheadlengths}{%
@@ -86,7 +87,9 @@
\framebox{\includegraphics[width=\@photowidth]{\@photo}}}}%
% name and optional title
\newlength{\makecvheadpicturewidth}\settowidth{\makecvheadpicturewidth}{\usebox{\makecvheadpicturebox}}%
- \newlength{\makecvheadnamewidth}\setlength{\makecvheadnamewidth}{\textwidth-\makecvheadpicturewidth}%
+ \ifthenelse{\lengthtest{\makecvheadnamewidth=0pt}}% check for dummy value (equivalent to \ifdim\makecvheadnamewidth=0pt)
+ {\setlength{\makecvheadnamewidth}{\textwidth-\makecvheadpicturewidth}}%
+ {}%
\begin{minipage}[b]{\makecvheadnamewidth}%
\namestyle{\@firstname\ \@lastname}%
\ifthenelse{\equal{\@title}{}}{}{\\[1.25em]\titlestyle{\@title}}%
@@ -107,7 +110,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httplink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httpslink{\@homepage}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi}
@@ -153,7 +156,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\hbox to 1.0em{\csname\collectionloopkey phonesymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\hbox to 1.0em{\emailsymbol}~\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httplink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\hbox to 1.0em{\homepagesymbol}~\httpslink{\@homepage}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\hbox to 1.0em{\csname\collectionloopkey socialsymbol\endcsname}~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}}%
diff --git a/macros/latex/contrib/moderncv/moderncvheadv.sty b/macros/latex/contrib/moderncv/moderncvheadv.sty
index e00be88d88..2f8478596b 100644
--- a/macros/latex/contrib/moderncv/moderncvheadv.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadv.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadv.sty'.
-%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadv}[2015/07/28 v2.0.0 modern curriculum vitae and letter header variant: 5]
+\ProvidesPackage{moderncvheadv}[2021/01/21 v2.1.0 modern curriculum vitae and letter header variant: 5]
% details options: "details" (default) or "nodetails"
\@initializeif{\if@details}\@detailsfalse
@@ -48,8 +48,6 @@
%-------------------------------------------------------------------------------
% lengths
\@initializelength{\quotewidth}
-% optional makecvheadname width to force a certain width (if set/remains to 0pt, the width is calculated automatically)
-\@initializelength{\makecvheadnamewidth}
\renewcommand*{\recomputecvheadlengths}{%
\setlength{\quotewidth}{0.65\textwidth}}
@@ -84,7 +82,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol~\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~\httplink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol~\httpslink{\@homepage}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\makenewline\csname\collectionloopkey socialsymbol\endcsname~\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}\fi}%
@@ -142,7 +140,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@email}}{}{\makenewline\emailsymbol\emaillink{\@email}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httplink{\@homepage}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\makenewline\homepagesymbol\httpslink{\@homepage}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}\fi%
\end{minipage}\\[1em]
% recipient block
diff --git a/macros/latex/contrib/moderncv/moderncvheadvi.sty b/macros/latex/contrib/moderncv/moderncvheadvi.sty
index 83c1055b9b..e6478795d8 100644
--- a/macros/latex/contrib/moderncv/moderncvheadvi.sty
+++ b/macros/latex/contrib/moderncv/moderncvheadvi.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvheadvi.sty'.
-%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvheadvi}[2015/07/28 v2.0.0 modern curriculum vitae and letter header: 6]
+\ProvidesPackage{moderncvheadvi}[2021/01/21 v2.1.0 modern curriculum vitae and letter header: 6]
% details options: "details" (default) or "nodetails"
\@initializeif{\if@details}\@detailsfalse
@@ -115,7 +115,7 @@
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\addtomakeheaddetails{\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@email}}{}{\addtomakeheaddetails{\emailsymbol\emaillink{\@email}}}%
- \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httplink{\@homepage}}}%
+ \ifthenelse{\isundefined{\@homepage}}{}{\addtomakeheaddetails{\homepagesymbol\httpslink{\@homepage}}}%
\collectionloop{socials}{% the key holds the social type (=symbol command prefix), the item holds the link
\addtomakeheaddetails{\csname\collectionloopkey socialsymbol\endcsname\collectionloopitem}}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\addtomakeheaddetails{\@extrainfo}}%
diff --git a/macros/latex/contrib/moderncv/moderncviconsawesome.sty b/macros/latex/contrib/moderncv/moderncviconsawesome.sty
index 92f2dbf309..f821130dd6 100644
--- a/macros/latex/contrib/moderncv/moderncviconsawesome.sty
+++ b/macros/latex/contrib/moderncv/moderncviconsawesome.sty
@@ -1,5 +1,5 @@
%% start of file `moderncviconsawesome.sty'.
-%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,33 +10,44 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncviconsawesome}[2015/07/28 v2.0.0 modern curriculum vitae and letter icons: awesome]
+\ProvidesPackage{moderncviconsawesome}[2021/01/21 v2.1.0 modern curriculum vitae and letter icons: awesome]
%-------------------------------------------------------------------------------
% required packages
%-------------------------------------------------------------------------------
% Font Awesome font
-\RequirePackage{fontawesome}
+\RequirePackage{fontawesome5}
+% Package for academic icons
+\RequirePackage{academicons}
%-------------------------------------------------------------------------------
% symbols definition
%-------------------------------------------------------------------------------
-\renewcommand*{\labelitemi} {\strut\textcolor{color1}{\tiny\faCircleO}}
+\renewcommand*{\labelitemi} {\strut\textcolor{color1}{\tiny\faCircle}}
%\renewcommand*{\labelitemii} {\strut\textcolor{color1}{\large\bfseries-}} % no change from default in moderncv.cls
%\renewcommand*{\labelitemiii} {\strut\textcolor{color1}{\rmfamily\textperiodcentered}}% no change from default in moderncv.cls
%\renewcommand*{\labelitemiv} {\labelitemiii} % no change from default in moderncv.cls
-\renewcommand*{\addresssymbol} {}
-\renewcommand*{\mobilephonesymbol} {{\Large\faMobile}~}
-\renewcommand*{\fixedphonesymbol} {\faPhone~}
-\renewcommand*{\faxphonesymbol} {{\small\faFax}~} % alternative: \faPrint
-\renewcommand*{\emailsymbol} {{\small\faEnvelopeO}~} % alternative: \faInbox
-\renewcommand*{\homepagesymbol} {{\small\faGlobe}~} % alternative: \faHome
-\renewcommand*{\linkedinsocialsymbol}{{\small\faLinkedin}~} % alternative: \faLinkedinSquare
-\renewcommand*{\twittersocialsymbol} {{\small\faTwitter}~} % alternative: \faTwitterSquare
-\renewcommand*{\githubsocialsymbol} {{\small\faGithub}~} % alternative: \faGithubSquare, \faGithubSquare
-
+\renewcommand*{\addresssymbol} {}
+\renewcommand*{\mobilephonesymbol} {{\small\faMobile}~}
+\renewcommand*{\fixedphonesymbol} {{\small\faPhone}~}
+\renewcommand*{\faxphonesymbol} {{\small\faFax}~} % alternative: \faPrint
+\renewcommand*{\emailsymbol} {{\small\faEnvelope}~} % alternative: \faInbox
+\renewcommand*{\homepagesymbol} {{\small\faGlobe}~} % alternative: \faHome
+\renewcommand*{\linkedinsocialsymbol} {{\small\faLinkedin}~} % alternative: \faLinkedinSquare
+\renewcommand*{\xingsocialsymbol} {{\small\faXing}~} % alternative: \faXingSquare
+\renewcommand*{\twittersocialsymbol} {{\small\faTwitter}~} % alternative: \faTwitterSquare
+\renewcommand*{\githubsocialsymbol} {{\small\faGithub}~} % alternative: \faGithubSquare, \faGithubSquare
+\renewcommand*{\gitlabsocialsymbol} {{\small\faGitlab}~}
+\renewcommand*{\stackoverflowsocialsymbol}{{\small\faStackOverflow}~}
+\renewcommand*{\bitbucketsocialsymbol} {{\small\faBitbucket}~}
+\renewcommand*{\skypesocialsymbol} {{\small\faSkype}~}
+\renewcommand*{\orcidsocialsymbol} {{\small\aiOrcid}~}
+\renewcommand*{\researchgatesocialsymbol} {{\small\aiResearchGate}~}
+\renewcommand*{\researchidsocialsymbol} {{\small\aiResearcherID}~}
+\renewcommand*{\telegramsocialsymbol} {{\small\faTelegram}~}
+\renewcommand*{\googlescholarsocialsymbol}{{\small\aiGoogleScholar}~}
\endinput
diff --git a/macros/latex/contrib/moderncv/moderncviconsletters.sty b/macros/latex/contrib/moderncv/moderncviconsletters.sty
index 8339b01fef..79bb73f03a 100644
--- a/macros/latex/contrib/moderncv/moderncviconsletters.sty
+++ b/macros/latex/contrib/moderncv/moderncviconsletters.sty
@@ -1,5 +1,5 @@
%% start of file `moderncviconsletters.sty'.
-%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncviconsletters}[2015/07/28 v2.0.0 modern curriculum vitae and letter icons: letters]
+\ProvidesPackage{moderncviconsletters}[2021/01/21 v2.1.0 modern curriculum vitae and letter icons: letters]
%-------------------------------------------------------------------------------
@@ -34,15 +34,25 @@
%\renewcommand*{\labelitemiii} {\strut\textcolor{color1}{\rmfamily\textperiodcentered}}% no change from default in moderncv.cls
%\renewcommand*{\labelitemiv} {\labelitemiii} % no change from default in moderncv.cls
-\renewcommand*{\addresssymbol} {}
-\renewcommand*{\mobilephonesymbol} {\textbf{M}~}
-\renewcommand*{\fixedphonesymbol} {\textbf{T}~}
-\renewcommand*{\faxphonesymbol} {\textbf{F}~}
-\renewcommand*{\emailsymbol} {\textbf{E}~}
-\renewcommand*{\homepagesymbol} {\textbf{W}~}
-\renewcommand*{\linkedinsocialsymbol}{\textbf{in}~}
-\renewcommand*{\twittersocialsymbol} {\textbf{tw}~}
-\renewcommand*{\githubsocialsymbol} {\textbf{gh}~}
+\renewcommand*{\addresssymbol} {}
+\renewcommand*{\mobilephonesymbol} {\textbf{M}~}
+\renewcommand*{\fixedphonesymbol} {\textbf{T}~}
+\renewcommand*{\faxphonesymbol} {\textbf{F}~}
+\renewcommand*{\emailsymbol} {\textbf{E}~}
+\renewcommand*{\homepagesymbol} {\textbf{W}~}
+\renewcommand*{\linkedinsocialsymbol} {\textbf{in}~}
+\renewcommand*{\xingsocialsymbol} {\textbf{xi}~}
+\renewcommand*{\twittersocialsymbol} {\textbf{tw}~}
+\renewcommand*{\githubsocialsymbol} {\textbf{gh}~}
+\renewcommand*{\gitlabsocialsymbol} {\textbf{gl}~}
+\renewcommand*{\stackoverflowsocialsymbol}{\textbf{so}~}
+\renewcommand*{\bitbucketsocialsymbol} {\textbf{bb}~}
+\renewcommand*{\skypesocialsymbol} {\textbf{sk}~}
+\renewcommand*{\orcidsocialsymbol} {\textbf{orcid}~}
+\renewcommand*{\researchgatesocialsymbol} {\textbf{rg}~}
+\renewcommand*{\researchidsocialsymbol} {\textbf{ri}~}
+\renewcommand*{\telegramsocialsymbol} {\textbf{tg}~}
+\renewcommand*{\googlescholarsocialsymbol}{\textbf{gs}~}
\renewcommand*{\listitemsymbol} {\labelitemi~}
diff --git a/macros/latex/contrib/moderncv/moderncviconsmarvosym.sty b/macros/latex/contrib/moderncv/moderncviconsmarvosym.sty
index c6ab035e35..43b4602c57 100644
--- a/macros/latex/contrib/moderncv/moderncviconsmarvosym.sty
+++ b/macros/latex/contrib/moderncv/moderncviconsmarvosym.sty
@@ -1,5 +1,5 @@
%% start of file `moderncviconsmarvosym.sty'.
-%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2013-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncviconsmarvosym}[2015/07/28 v2.0.0 modern curriculum vitae and letter icons: marvosym]
+\ProvidesPackage{moderncviconsmarvosym}[2021/01/21 v2.1.0 modern curriculum vitae and letter icons: marvosym]
%-------------------------------------------------------------------------------
@@ -86,6 +86,7 @@
\protect\end{scope}%
\protect\end{tikzpicture}}%
~}
+\renewcommand*{\xingsocialsymbol}{}
\renewcommand*{\twittersocialsymbol} {%
\protect\raisebox{0em}{%
\protect\begin{tikzpicture}[x=0.08em, y=0.08em, xscale=0.005, yscale=-0.005, inner sep=0pt, outer sep=0pt]
@@ -222,6 +223,47 @@
\protect\end{scope}%
\protect\end{tikzpicture}}%
~}
+\renewcommand*{\gitlabsocialsymbol}{}
+\renewcommand*{\stackoverflowsocialsymbol}{}
+\renewcommand*{\googlescholarsocialsymbol}{}
+\renewcommand*{\telegramsocialsymbol}{}
+\renewcommand*{\orcidsocialsymbol}{}
+\renewcommand*{\researchgatesocialsymbol}{}
+\renewcommand*{\researchidsocialsymbol}{}
+\renewcommand*{\bitbucketsocialsymbol}{}
+\renewcommand*{\skypesocialsymbol} {%
+ \protect\raisebox{-0.15em}{%
+ \protect\begin{tikzpicture}[y=0.08em, x=0.08em, xscale=0.020, yscale=-0.020, inner sep=0pt, outer sep=0pt]
+ \protect\begin{scope}[shift={(507,387)}]
+ \protect\path[fill=color2,even odd rule]
+ (487.6550,288.9690) .. controls (489.0610,278.5690) and (489.8700,267.9960) ..
+ (489.8700,257.2330) .. controls (489.8700,128.0770) and (384.5990,23.3610) ..
+ (254.7670,23.3610) .. controls (241.8630,23.3610) and (229.2120,24.4210) ..
+ (216.9010,26.4410) .. controls (194.8280,12.0570) and (168.5590,3.6740) ..
+ (140.2880,3.6740) .. controls (62.7660,3.6740) and (0.0000,66.4820) ..
+ (0.0000,143.9800) .. controls (0.0000,172.1780) and (8.2990,198.3740) ..
+ (22.5900,220.3690) .. controls (20.6650,232.3860) and (19.6810,244.6920) ..
+ (19.6810,257.2290) .. controls (19.6810,386.4050) and (124.8980,491.1100) ..
+ (254.7660,491.1100) .. controls (269.4230,491.1100) and (283.6930,489.6840) ..
+ (297.5620,487.1780) .. controls (319.1120,500.5470) and (344.4960,508.3260) ..
+ (371.7080,508.3260) .. controls (449.2100,508.3260) and (512.0010,445.5020) ..
+ (512.0010,368.0120) .. controls (511.9980,338.7190) and (503.0410,311.4840) ..
+ (487.6550,288.9690) -- cycle(276.7400,429.5960) .. controls (202.0340,433.4870) and (167.0750,416.9590) .. (135.0500,386.9050) .. controls (99.2850,353.3370) and (113.6520,315.0500) ..
+ (142.7900,313.1040) .. controls (171.9120,311.1590) and (189.3980,346.1160) ..
+ (204.9410,355.8400) .. controls (220.4650,365.5280) and (279.5340,387.6000) ..
+ (310.7350,351.9320) .. controls (344.7100,313.1040) and (288.1410,293.0120) ..
+ (246.6760,286.9300) .. controls (187.4730,278.1640) and (112.7260,246.1370) ..
+ (118.5410,183.0230) .. controls (124.3580,119.9490) and (172.1230,87.6090) ..
+ (222.3910,83.0470) .. controls (286.4680,77.2300) and (328.1820,92.7540) ..
+ (361.1760,120.9070) .. controls (399.3270,153.4360) and (378.6840,189.8010) ..
+ (354.3770,192.7270) .. controls (330.1660,195.6360) and (302.9730,139.2230) ..
+ (249.5860,138.3750) .. controls (194.5590,137.5110) and (157.3690,195.6360) ..
+ (225.3000,212.1590) .. controls (293.2660,228.6640) and (366.0500,235.4450) ..
+ (392.2610,297.5760) .. controls (418.4900,359.7130) and (351.5070,425.7010) ..
+ (276.7400,429.5960) -- cycle;
+ \protect\end{scope}%
+ \protect\end{tikzpicture}}%
+ ~}
\endinput
diff --git a/macros/latex/contrib/moderncv/moderncvskillmatrix.sty b/macros/latex/contrib/moderncv/moderncvskillmatrix.sty
new file mode 100644
index 0000000000..d339f35473
--- /dev/null
+++ b/macros/latex/contrib/moderncv/moderncvskillmatrix.sty
@@ -0,0 +1,1051 @@
+%% start of file `moderncvskillmatrix.sty'.
+%% Copyright 2021 David Seus (cryptointerest@posteo.de).
+%
+% This package provides a skill matrix template for the moderncv package.
+% Some recruiting firms require applicants to rate their skills, computer
+% skills, management tools, or similar in a table involving a graphical
+% illustration of their skill level. This package implements this idea
+% and provides the following commands to use within the moderncv
+% package:
+%
+%
+% PUBLIC COMMANDS
+% \cvskill{<1-5>}
+% Illustrate skill level with little colored boxes.
+% By default five skill levels are predefined.
+%
+% Input:
+% input_1: integer between 0 and 5
+%
+% Example usages:
+% \cvskill{3}
+%
+%
+% \cvskilllegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
+% Print legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
+%
+% Input:
+% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
+% For the fancy style, the asterix has no meaning.
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
+% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
+% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
+% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
+% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
+% input_7: string giving a name to the legend, default: <>
+%
+% Example usages:
+% \cvskilllegend{} print default legend
+% \cvskilllegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
+% \cvskilllegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
+%
+% Note:
+% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
+% -The design of the table is such that the <second_level> entry stands in the first column but
+% occupies rows two and three. This has been done to accomodate english and german defaults.
+% An alternative is provided by \cvskillplainlegend
+%
+%
+% \cvskillplainlegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
+% Print alternative legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
+% In this legend, the first three skill levels are in one column
+%
+% Input:
+% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
+% For the fancy style, the asterix has no meaning.
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
+% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
+% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
+% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
+% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
+% input_7: string giving a name to the legend, default: <>
+%
+% Example usages:
+% \cvskillplainlegend{} print default legend
+% \cvskillplainlegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
+% \cvskillplainlegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
+%
+% Note:
+% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
+%
+%
+% \cvskillhead[<post_padding>][<Level>][<Skill>][<Years>][<Comment>]%
+% add skill matrix line acting as header explaining the meaning of columns.
+%
+% Input:
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2 (optional): string naming the level column (2nd column), default: <Level>
+% input_3 (optional): string naming the skill column (3nd column), default: <Skill>
+% input_4 (optional): string naming the experience-in-years column (4th column), default: <Years>
+% input_5 (optional): string naming the comment column (5th column), default: <Comment>
+%
+% Example usages:
+% \cvskillhead print default head.
+% \cvskillhead[0.5em] print default head, but adjust post padding.
+% \cvskillhead[0.25em][Level][F\"ahigkeit][Jahre][Bemerkung] Fully adjust head to German example
+%
+% Note:
+% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
+%
+%
+% \cvskillentry[*][<post_padding>]{<skill_cathegory>}{<0-5>}{<skill_name>}{<years_of_experience>}{<comment>}%
+% add cvskill matrix row.
+%
+% Input:
+% asterix (optional): include horizontal (dashed) line above the entered line. This behaviour depends on the body style.
+% For the fancy style, the asterix has no meaning.
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2: string, naming skill cathegory, default: <>
+% input_3: integer between 0 and 5, describing level of skill. \cvskill{input_2} is called internally, default: <>
+% input_4: string, naming the skill, default: <>
+% input_5: positive real number, stating the number of years of experience with this skill , default: <>
+% input_6: string, explaining details w.r.t. that particual skill default: <>
+%
+% Example usages:
+% \cvskillentry*{Language:}{3}{Python}{2}{I have done a million projects with Python}
+% \cvskillentry{}{2}{Lilypond}{14}{So much sheet music! Man I'm the best!}
+% \cvskillentry{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
+% \cvskillentry*[1.5em]{OS:}{3}{Linux}{2}{I only use Archlinux}
+%
+% Note:
+% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
+%
+%
+% \setcvskillcolumns[<width>][<factor>][<exp_width>]
+% adjust column width of skill table
+%
+% The \cvskillentry command comes with default FIXED width definitions of the kill matrix for the columns
+% based on the author's own skill matrix. This is necessary to ensure that the entries are nicely aligned
+% and actually yield a decent looking table. The defaults depend on the style used and are chosen reasonably.
+% However, depending on the user input and the style that is used some of the columns might need adjustments.
+% The \setcvskillcolumns command provides means to influence the width of the first, the third and the fourth
+% skill matrix column. The second column containg the output of \cvskill remains fixed width. The last column,
+% the comment column gets recalculated according to the setting of the other columns.
+%
+% Input
+% Input_1 (optional): width smaller than \textwidth, default <\skillmatrix@hintscolumnwidth>
+% Input_2 (optional): float between 0 and 1 adjusting how much percent of the table width without
+% the first column is used columns two, three and four. Through this parameter
+% the width of the 3rd column (skill name) can be adjusted, default <\skillmatrix@columnwidth>
+% Input_3 (optional): width smaller than \textwidth, setting the width of the 4th column
+% (Years of experience), default <\cvskill@experiencewidth>
+%
+% Example usage
+% \setcvskillcolumns[5em][][]% adjust first column. Same as \setcvskillcolumns[5em]
+% \setcvskillcolumns[][0.45][]% adjust third (skill) column. Same as \setcvskillcolumns[][0.45]
+% \setcvskillcolumns[][][\widthof{``Year''}]% adjust fourth (years) column.
+% \setcvskillcolumns[\widthof{``Language''}][0.48][]% adjust 1st and 3rd columns. Same as \setcvskillcolumns[\widthof{``Language''}][0.45]
+% \setcvskillcolumns[\widthof{``Management Tools''}][0.6][3em]% ajust all at once.
+%
+% Note
+% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
+% it aligns with the rest of the entries. A readjustment of the first column should therefor
+% be avoided. It is recomended to only use \setcvskillcolumns in the form of
+% \setcvskillcolumns[][<factor>][<width>], thereby leaving the defaults in place for the first column.
+%
+%
+% \setcvskilllegendcolumns[<width>][<factor>]
+% adjust column width of legend
+%
+% The \cvskilllegend command comes with default FIXED width definitions for the columns of the legend matrix
+% such that the default english and german examples look good.
+% However, depending on the user input (translation) and the style that is used some adjustment might be needed.
+% The \setcvskilllegendcolumns command provides means to influence all columns except the ones containing
+% \cvskill commands. The second column containg the output of \cvskill remains fixed width. The last column,
+% the comment column gets recalculated according to the setting of the other columns.
+%
+% Input
+% Input_1 (optional): length smaller than \textwidth influencing the width of the first column
+% where depending on the style the legend_string gets printed. In case the
+% string is left empty adjusting this width allows moving the legend horizontally.
+% Default <\skilllegend@hintscolumnwidth>
+% Input_2 (optional): float between 0 and 1 influencing the width of the left legend descritor column,
+% aka \cvskilllegend@leftdescriptorwidth. The desriptor column on the right,
+% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>.
+% Default <\skilllegend@leftdesriptorfactor>
+%
+% Example usage
+% \setcvskilllegendcolumns[][0.45]%% adjust left desriptor column.
+% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]% adjust both left descriptor column and string column
+%
+% Note
+% - Due to implementation of \cvskilllegend for style 'fancy' (moderncvbodyv)
+% the first optional variable has no effect in this case.
+% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
+% it aligns with the rest of the entries. A readjustment of the first column should therefor
+% be avoided. It is recomended to only use \cvskilllegend in the form of
+% \cvskilllegend[][<factor>], thereby leaving the defaults in place for the first column.
+% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
+% Therefor adjusting the first column can be used to widen the table while moving it around. If no
+% legend string is used, setting \cvskilllegend[0em] maximises the real enstate for the legend.
+%
+%
+% PRIVATE COMMANDS
+%
+% \recompute@cvskillmatrix@lengths
+% compute all lengths necessary for the skill matrix depending on
+% the moderncv style (moderncvbody)
+%
+% Input: none
+%
+% Example usage (only internally in moderncvbody<i-v>.sty)
+% \recompute@cvskillmatrix@lengths
+%
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License version 1.3c,
+% available at http://www.latex-project.org/lppl/.
+
+
+%-------------------------------------------------------------------------------
+% identification
+%-------------------------------------------------------------------------------
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{moderncvskillmatrix}[2021/01/21 v2.1.0 modern curriculum vitae and letter skill matrix]
+
+% The definitions need to be adjusted depending on which moderncvbody<i-v>.sty style is usde.
+% body type options: "moderncvbodyi" (default), "moderncvbodyii", "moderncvbodyiii", "moderncvbodyiv" or "moderncvbodyv"
+\@initializeif{\if@moderncvbodyi}\@moderncvbodyifalse
+\DeclareOption{moderncvbodyi}{\@moderncvbodyitrue\@moderncvbodyiifalse\@moderncvbodyiiifalse\@moderncvbodyivfalse\@moderncvbodyvfalse}
+\@initializeif{\if@moderncvbodyii}\@moderncvbodyiifalse % this option is added in case moderncvbodyii gets implemented standalone
+\DeclareOption{moderncvbodyii}{\@moderncvbodyifalse\@moderncvbodyiitrue\@moderncvbodyiiifalse\@moderncvbodyivfalse\@moderncvbodyvfalse}
+\@initializeif{\if@moderncvbodyiii}\@moderncvbodyiiifalse
+\DeclareOption{moderncvbodyiii}{\@moderncvbodyifalse\@moderncvbodyiifalse\@moderncvbodyiiitrue\@moderncvbodyivfalse\@moderncvbodyvfalse}
+\@initializeif{\if@moderncvbodyiv}\@moderncvbodyivfalse
+\DeclareOption{moderncvbodyiv}{\@moderncvbodyifalse\@moderncvbodyiifalse\@moderncvbodyiiifalse\@moderncvbodyivtrue\@moderncvbodyvfalse}
+\@initializeif{\if@moderncvbodyv}\@moderncvbodyvfalse
+\DeclareOption{moderncvbodyv}{\@moderncvbodyifalse\@moderncvbodyiifalse\@moderncvbodyiiifalse\@moderncvbodyivfalse\@moderncvbodyvtrue}
+
+\DeclareOption*{}% avoid choking on unknown options
+\ExecuteOptions{moderncvbodyi}
+\ProcessOptions*\relax% \ProcessOptions* processes the options in the order provided (i.e., with the later ones possibly overriding the former ones), while \ProcessOptions processes them in the order of the package
+
+%-------------------------------------------------------------------------------
+% required packages
+%-------------------------------------------------------------------------------
+\RequirePackage{tikz}
+\RequirePackage{multirow}
+% package arydshln is needed for the dashed lines but is incompatible with fancy style
+\if@moderncvbodyv%
+% \RequirePackage{arydshln} % incompatible with fancy style
+\else%
+ \RequirePackage{arydshln} % incompatible with fancy style
+\fi
+
+% %-------------------------------------------------------------------------------
+% % \cvskill command
+% %-------------------------------------------------------------------------------
+% The code for the Skilllevel illustration with the little boxes.
+% This is idea stolen from the limecv package, see https://github.com/opieters/limecv.git
+\@initializelength{\cvSkill@RectangleSize}
+\setlength{\cvSkill@RectangleSize}{1.2ex}
+\newcount\my@repeat@count
+\DeclareDocumentCommand{\cvskill}{m}{%
+% Illustrate skill level with little colored boxes.
+% By default five skill levels are predefined.
+%
+% Input:
+% integer between 0 and 5
+% Example usage:
+% \cvskill{3}
+ \begingroup
+ \my@repeat@count=\z@
+ \@whilenum\my@repeat@count<#1\do{\tikz\filldraw[color1] (0, 0) rectangle (\cvSkill@RectangleSize, \cvSkill@RectangleSize);\advance%
+ \my@repeat@count\@ne\,}%
+ \my@repeat@count=\numexpr5-\z@\relax
+ \@whilenum\my@repeat@count>#1\do{\tikz\filldraw[color2!30] (0, 0) rectangle (\cvSkill@RectangleSize, \cvSkill@RectangleSize);\advance%
+ \my@repeat@count\m@ne\,}%
+ \endgroup
+}% end \cvskill
+
+% %-------------------------------------------------------------------------------
+% % \recompute@cvskillmatrix@lengths
+% %-------------------------------------------------------------------------------
+
+% initialise lengths needed for the skillmatrix
+\@initializelength{\cvskill@width}
+\@initializelength{\cvskill@descriptorwidth}
+\@initializelength{\cvskill@experiencewidth}
+\@initializelength{\skillmatrix@columnwidth}
+\@initializelength{\skillmatrix@commentwidth}
+\@initializelength{\skillmatrix@padding}
+\@initializelength{\skillmatrix@hintscolumnwidth}
+\@initializelength{\skillmatrix@bodylength}
+\@initializelength{\cvskilllegend@leftdescriptorwidth}
+\@initializelength{\cvskilllegend@rightdescriptorwidth}
+\@initializelength{\skilllegend@hintscolumnwidth}
+\@initializelength{\skilllegend@padding}
+\@initializelength{\skilllegend@bodylength}
+
+% \separatorrulewidth is defined in moderncvbodyv.sty and we need to
+% define it to not throw an error in the other cases
+\if@moderncvbodyv%
+%
+\else%
+ \@initializelength{\separatorrulewidth}
+ \setlength{\separatorrulewidth}{1ex}
+\fi
+
+\DeclareDocumentCommand{\skilllegend@leftdesriptorfactor}{}{}%
+%% DEFINITION \recompute@cvskillmatrix@lengths
+% declare the command \recompute@cvskillmatrix@lengths empty
+\DeclareDocumentCommand{\recompute@cvskillmatrix@lengths}{}{}%
+% compute all lengths necessary for the skill matrix depending on
+% the moderncv style (moderncvbody)
+%
+% Input: none
+%
+% Example usage (only internally in moderncvbody<i-v>.sty)
+% \recompute@cvskillmatrix@lengths
+
+% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyi
+\if@moderncvbodyi%
+ \RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
+ \setlength{\skillmatrix@padding}{1ex}%
+ \setlength{\skillmatrix@hintscolumnwidth}{\hintscolumnwidth}%
+ \setlength{\cvskill@width}{\widthof{\cvskill{5}}}%
+ \setlength{\cvskill@experiencewidth}{\widthof{``Year''}}%
+ \setlength{\skillmatrix@bodylength}{\maincolumnwidth}%
+ \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
+ % lengths and definitions needed for the legends
+ % note that \skillmatrix@padding also affects the appearance of legends
+ \setlength{\skilllegend@padding}{0.25ex}%
+ \setlength{\skilllegend@hintscolumnwidth}{\hintscolumnwidth}%
+ \setlength{\skilllegend@bodylength}{\skillmatrix@bodylength}%
+ \RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.5}%
+ }
+\fi
+% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyiii
+\if@moderncvbodyiii%
+ \RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
+ \setlength{\skillmatrix@padding}{1ex}%
+ \setlength{\separatorcolumnwidth}{\skillmatrix@padding}%
+ \setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Language''}}%
+ \setlength{\cvskill@width}{\widthof{\cvskill{5}}}%
+ \setlength{\cvskill@experiencewidth}{\widthof{``Year''}}%
+ \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}%
+ \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
+ % lengths and definitions needed for the legends
+ % note that \skillmatrix@padding also affects the appearance of legends
+ \setlength{\skilllegend@padding}{0.25ex}%
+ \setlength{\skilllegend@hintscolumnwidth}{\skillmatrix@hintscolumnwidth}%
+ \setlength{\skilllegend@bodylength}{\skillmatrix@bodylength}%
+ \RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.5}%
+ }
+\fi
+% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyiv
+\if@moderncvbodyiv%
+ \RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
+ \setlength{\skillmatrix@padding}{1ex}
+ \setlength{\separatorcolumnwidth}{\skillmatrix@padding}
+ \setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Languagi''}}
+ \setlength{\cvskill@width}{\widthof{\cvskill{5}}}
+ \setlength{\cvskill@experiencewidth}{\widthof{``Year''}}
+ \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}
+ \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}
+ \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
+ % lengths and definitions needed for the legends
+ % note that \skillmatrix@padding also affects the appearance of legends
+ \setlength{\skilllegend@padding}{0.25ex}
+ \setlength{\skilllegend@hintscolumnwidth}{0ex}%\skillmatrix@hintscolumnwidth
+ \setlength{\skilllegend@bodylength}{\maincolumnwidth}
+ \RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.45}%
+ }
+\fi
+% Definition of \recompute@cvskillmatrix@lengths for moderncvbodyv
+\if@moderncvbodyv%
+ \RenewDocumentCommand{\recompute@cvskillmatrix@lengths}{}{%
+ \setlength{\skillmatrix@padding}{1ex}%
+ \setlength{\skillmatrix@hintscolumnwidth}{\widthof{``Languages''}}%
+ \setlength{\cvskill@width}{\widthof{\cvskill{5}}}%
+ \setlength{\cvskill@experiencewidth}{\widthof{``Year''}}%
+ \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\skillmatrix@padding}%\skillmatrix@hintscolumnwidth
+ \setlength{\skillmatrix@columnwidth}{0.45\skillmatrix@bodylength}%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
+ % lengths and definitions needed for the legends
+ % note that \skillmatrix@padding also affects the appearance of legends
+ \setlength{\skilllegend@padding}{0.25ex}%
+ \setlength{\skilllegend@hintscolumnwidth}{\skillmatrix@hintscolumnwidth}%
+ \setlength{\skilllegend@bodylength}{\maincolumnwidth}%
+ \RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{0.48}%
+ }%
+\fi
+
+% %-------------------------------------------------------------------------------
+% % \setcvskillcolumns and \setcvskilllegendcolumns
+% %-------------------------------------------------------------------------------
+% \setcvskillcolumns[<width>][<factor>][<exp_width>]
+\DeclareDocumentCommand{\setcvskillcolumns}{+O{\skillmatrix@hintscolumnwidth} +O{\skillmatrix@columnwidth} +O{\cvskill@experiencewidth}}{%
+% adjust column width of skill table
+%
+% The \cvskillentry command comes with default FIXED width definitions of the kill matrix for the columns
+% based on the author's own skill matrix. This is necessary to ensure that the entries are nicely aligned
+% and actually yield a decent looking table. The defaults depend on the style used and are chosen reasonably.
+% However, depending on the user input and the style that is used some of the columns might need adjustments.
+% The \setcvskillcolumns command provides means to influence the width of the first, the third and the fourth
+% skill matrix column. The second column containg the output of \cvskill remains fixed width. The last column,
+% the comment column gets recalculated according to the setting of the other columns.
+%
+% Input
+% Input_1 (optional): width smaller than \textwidth, default <\skillmatrix@hintscolumnwidth>
+% Input_2 (optional): float between 0 and 1 adjusting how much percent of the table width without
+% the first column is used columns two, three and four. Through this parameter
+% the width of the 3rd column (skill name) can be adjusted, default <\skillmatrix@columnwidth>
+% Input_3 (optional): width smaller than \textwidth, setting the width of the 4th column
+% (Years of experience), default <\cvskill@experiencewidth>
+%
+% Example usage
+% \setcvskillcolumns[5em][][]% adjust first column. Same as \setcvskillcolumns[5em]
+% \setcvskillcolumns[][0.45][]% adjust third (skill) column. Same as \setcvskillcolumns[][0.45]
+% \setcvskillcolumns[][][\widthof{``Year''}]% adjust fourth (years) column.
+% \setcvskillcolumns[\widthof{``Language''}][0.48][]% adjust 1st and 3rd columns. Same as \setcvskillcolumns[\widthof{``Language''}][0.45]
+% \setcvskillcolumns[\widthof{``Management Tools''}][0.6][3em]% ajust all at once.
+%
+% Note
+% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
+% it aligns with the rest of the entries. A readjustment of the first column should therefor
+% be avoided. It is recomended to only use \setcvskillcolumns in the form of
+% \setcvskillcolumns[][<factor>][<width>], thereby leaving the defaults in place for the first column.
+%
+ \def\arg@new@hintscolumnwidth{#1}% <-- all these terminal % signs are necessary for the fancy style to not show weird spaces!!!
+ \def\arg@new@bodyLengthFactor{#2}%
+ \def\arg@new@experienceWidth{#3}%
+ % Check for empty arguments. Defaults are given. Thus a call of \setcvskillcolumns
+ % without any arguments leads to nonempty arguments \arg@new@hintscolumnwidth and
+ % \def\arg@new@bodyLengthFactor{#2}. However, we need to take care of calls like
+ % \setcvskillcolumns[], \setcvskillcolumns[][], \setcvskillcolumns[][][] or even
+ % \setcvskillcolumns[<somelength>][], \setcvskillcolumns[][<somefactor>] \setcvskillcolumns[][][<length>]
+ \ifdefempty{\arg@new@hintscolumnwidth}{%
+ % Case \setcvskillcolumns[], \setcvskillcolumns[][] or \setcvskillcolumns[][<somefactor>]
+ \ifdefempty{\arg@new@bodyLengthFactor}{%
+ % Case \setcvskillcolumns[][] do nothing here and check if third argument is empty
+ \ifdefempty{\arg@new@experienceWidth}{%
+ % Case \setcvskillcolumns[][][] do nothing here
+ }{%
+ % Case \setcvskillcolumns[][][<length>]. reset \cvskill@experiencewidth and
+ % \cvskill@descriptorwidth accordingly
+ \setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ }%
+ }{%
+ % Case \setcvskillcolumns[][<somefactor>], \setcvskillcolumns[][<somefactor>][<possilly length>]
+ \setlength{\skillmatrix@columnwidth}{\arg@new@bodyLengthFactor\skillmatrix@bodylength}%
+ \ifdefempty{\arg@new@experienceWidth}{%
+ % Case \setcvskillcolumns[][<somefactor>][] do nothing here
+ }{%
+ % Case \setcvskillcolumns[][<somefactor>][<length>]. reset \cvskill@experiencewidth and
+ % \cvskill@descriptorwidth accordingly
+ \setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ }%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
+ }%
+ % Case \setcvskillcolumns[] nothing needs to be done here recalculate lengths affected by the change
+ }{%
+ % Case \setcvskillcolumns, \setcvskillcolumns[<width>], \setcvskillcolumns[<width>][]
+ % or \setcvskillcolumns[<width>][<somefactor>]
+ \setlength{\skillmatrix@hintscolumnwidth}{\arg@new@hintscolumnwidth}%
+ \setlength{\skillmatrix@bodylength}{\maincolumnwidth-\skillmatrix@hintscolumnwidth-\separatorcolumnwidth}%
+ % in case second argument is given but left empty use default
+ \ifdefempty{\arg@new@bodyLengthFactor}{%
+ % Case \setcvskillcolumns[<width>][] do nothing here and use default
+ % \skillmatrix@columnwidth and check third argument
+ \ifdefempty{\arg@new@experienceWidth}{%
+ % Case \setcvskillcolumns[<width>][][] do nothing here
+ }{%
+ % Case \setcvskillcolumns[<width>][][<length>]. reset \cvskill@experiencewidth and
+ % \cvskill@descriptorwidth accordingly
+ \setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
+% \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ }%
+ }{%
+ % Case \setcvskillcolumns, \setcvskillcolumns[<width>], \setcvskillcolumns[<width>][<somefactor>]
+ \setlength{\skillmatrix@columnwidth}{\arg@new@bodyLengthFactor\skillmatrix@bodylength}%
+ \ifdefempty{\arg@new@experienceWidth}{%
+ % Case \setcvskillcolumns[<width>][<somefactor>][] do nothing here
+ }{%
+ % Case \setcvskillcolumns[<width>][<somefactor>][<length>]. reset \cvskill@experiencewidth and
+ % \cvskill@descriptorwidth accordingly
+ \setlength{\cvskill@experiencewidth}{\arg@new@experienceWidth}%
+% \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ }%
+ }%
+ \setlength{\cvskill@descriptorwidth}{\skillmatrix@columnwidth-\cvskill@width-\cvskill@experiencewidth}%
+ \setlength{\skillmatrix@commentwidth}{\skillmatrix@bodylength-\skillmatrix@columnwidth-3\skillmatrix@padding}%
+ }%
+}%
+%
+% \setcvskilllegendcolumns[<width>][<factor>]
+\DeclareDocumentCommand{\setcvskilllegendcolumns}{+O{\skilllegend@hintscolumnwidth} +O{\skilllegend@leftdesriptorfactor}}{%
+% adjust column width of legend
+%
+% The \cvskilllegend command comes with default FIXED width definitions for the columns of the legend matrix
+% such that the default english and german examples look good.
+% However, depending on the user input (translation) and the style that is used some adjustment might be needed.
+% The \setcvskilllegendcolumns command provides means to influence all columns except the ones containing
+% \cvskill commands. The second column containg the output of \cvskill remains fixed width. The last column,
+% the comment column gets recalculated according to the setting of the other columns.
+%
+% Input
+% Input_1 (optional): length smaller than \textwidth influencing the width of the first column
+% where depending on the style the legend_string gets printed. In case the
+% string is left empty adjusting this width allows moving the legend horizontally.
+% Default <\skilllegend@hintscolumnwidth>
+% Input_2 (optional): float between 0 and 1 influencing the width of the left legend descritor column,
+% aka \cvskilllegend@leftdescriptorwidth. The desriptor column on the right,
+% \cvskilllegend@rightdescriptorwidth is influenced by the factor 1-<factor>.
+% Default <\skilllegend@leftdesriptorfactor>
+%
+% Example usage
+% \setcvskilllegendcolumns[][0.45]%% adjust left desriptor column.
+% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]% adjust both left descriptor column and string column
+%
+% Note
+% - Due to implementation of \cvskilllegend for style 'fancy' (moderncvbodyv)
+% the first optional variable has no effect in this case.
+% - For the styles 'classic' and 'casual' the first column is set to hintscolumnwidth such that
+% it aligns with the rest of the entries. A readjustment of the first column should therefor
+% be avoided. It is recomended to only use \cvskilllegend in the form of
+% \cvskilllegend[][<factor>], thereby leaving the defaults in place for the first column.
+% - For style 'banking' the first column is set to align with the rest of the \cvskillentry entries
+% Therefor adjusting the first column can be used to widen the table while moving it around. If no
+% legend string is used, setting \cvskilllegend[0em] maximises the real enstate for the legend.
+%
+ \def\arg@new@legend@hintscolumnwidth{#1}%
+ \def\arg@new@legend@leftDescriptorFactor{#2}%
+ % Check for empty arguments. See explanation above
+ \ifdefempty{\arg@new@legend@hintscolumnwidth}{%
+ % Case \setcvskilllegendcolumns[], \setcvskilllegendcolumns[][] or \setcvskilllegendcolumns[][<somefactor>]
+ \ifdefempty{\arg@new@legend@leftDescriptorFactor}{%
+% % Case \setcvskilllegendcolumns[][] do nothing here, i.e. leave default values unaltered
+ }{%
+ % Case \setcvskilllegendcolumns[][<somefactor>], \setcvskilllegendcolumns[][<somefactor>]
+ \RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{\arg@new@legend@leftDescriptorFactor}%
+ }%
+% % Case \setcvskilllegendcolumns[] nothing needs to be done here i.e. leave default values unaltered
+ }{%
+ % Case \setcvskilllegendcolumns, \setcvskilllegendcolumns[<width>], \setcvskilllegendcolumns[<width>][]
+ % or \setcvskilllegendcolumns[<width>][<somefactor>]
+ \setlength{\skilllegend@hintscolumnwidth}{\arg@new@legend@hintscolumnwidth}%
+ \if@moderncvbodyi%
+ \setlength{\skilllegend@bodylength}{\textwidth-\skilllegend@hintscolumnwidth-\separatorcolumnwidth}%
+ \fi%
+ \if@moderncvbodyiii%
+ \setlength{\skilllegend@bodylength}{\textwidth-\skilllegend@hintscolumnwidth-\separatorcolumnwidth}%
+ \fi%
+ \if@moderncvbodyiv%
+ \setlength{\skilllegend@bodylength}{\maincolumnwidth-\skilllegend@hintscolumnwidth-\separatorcolumnwidth}%
+ \fi%
+ % in case second argument is given but left empty use default
+ \ifdefempty{\arg@new@legend@leftDescriptorFactor}{%
+ % Case \setcvskilllegendcolumns[<width>][] do nothing here and leave default values unaltered
+ }{%
+ % Case \setcvskilllegendcolumns, \setcvskilllegendcolumns[<width>], \setcvskilllegendcolumns[<width>][<somefactor>]
+ \RenewDocumentCommand{\skilllegend@leftdesriptorfactor}{}{\arg@new@legend@leftDescriptorFactor}%
+ }%
+ }%
+}%
+%
+% %-------------------------------------------------------------------------------
+% % \cvskilllegend
+% %-------------------------------------------------------------------------------
+% default legend style
+% \cvskilllegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
+\NewDocumentCommand\skillLegend@FontSize{}{\scriptsize}
+\DeclareDocumentCommand\cvskilllegend{s +O{} +O{} +O{} +O{} +O{} +O{} +m}{}%
+% Print legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
+%
+% Input:
+% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
+% For the fancy style, the asterix has no meaning.
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
+% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
+% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
+% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
+% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
+% input_7: string giving a name to the legend, default: <>
+%
+% Example usages:
+% \cvskilllegend{} print default legend
+% \cvskilllegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
+% \cvskilllegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
+%
+% Note:
+% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
+% -The design of the table is such that the <second_level> entry stands in the first column but
+% occupies rows two and three. This has been done to accomodate english and german defaults.
+% An alternative is provided by \cvskillplainlegend
+
+% declare default legend entries
+\NewDocumentCommand\skillLegend@defaultLevelOne{}{basic knowledge}
+\NewDocumentCommand\skillLegend@defaultLevelTwo{}{intermediate knowledge with some project experience}
+\NewDocumentCommand\skillLegend@defaultLevelThree{}{extensive project experience}
+\NewDocumentCommand\skillLegend@defaultLevelFour{}{deepened expert knowledge}
+\NewDocumentCommand\skillLegend@defaultLevelFive{}{expert\,/\,specialist}
+% Redefinition of \cvskilllegend valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii
+\RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
+ \IfBooleanTF#1{% if a star is given, add dashed line
+ \begingroup%
+ \arrayrulecolor{color1}%
+ % calculate descriptor widths
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
+ @{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%%
+ p{2\skilllegend@padding}p{\cvskilllegend@leftdescriptorwidth}@{}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
+ p{2\skilllegend@padding}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{#8} & \cvskill{1}& & {\skillLegend@FontSize #3} & \cvskill{3}& &{\skillLegend@FontSize #5 } \\%
+ %
+ & \cvskill{2} & & \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}& & {\skillLegend@FontSize #6 } \\%
+ %
+ & & & & \cvskill{5}& & {\skillLegend@FontSize #7 }%
+ \end{tabular}%
+ \endgroup
+ \par\addvspace{#2}}{%
+ % if no star is given, do not add dashed line. We need less padding in this case
+ \begingroup%
+ % calculate descriptor columns width. note the adjusted padding
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-1\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-1\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
+ @{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{#8} & \cvskill{1}\, & \,{\skillLegend@FontSize #3} & \cvskill{3}\, &\,{\skillLegend@FontSize #5 } \\%
+ %
+ & \cvskill{2}\, & \,\multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}\, &\,{\skillLegend@FontSize #6 } \\%
+ %
+ & & & \cvskill{5}\, &\,{\skillLegend@FontSize #7 }%
+ \end{tabular}%
+ \endgroup%
+ \par\addvspace{#2}%
+ }%
+}%
+% Redefinition of \cvskilllegend valid for moderncvbodyiv
+\if@moderncvbodyiv%
+ \RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
+ \def\arg@legendString{#8}%
+ \ifdefempty{\arg@legendString}{%
+ }{%
+ \cvitem[0.25em]{\hintstyle{#8}}{}%
+ }%
+ \IfBooleanTF#1{% if a star is given, add dashed line
+ \begingroup%
+ % recalculate desrciptor widths on the fly. Allows for different padding
+ % in the stared and nonstared case
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
+ \arrayrulecolor{color1}
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
+ @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
+ p{2\skilllegend@padding}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
+ p{2\skilllegend@padding}p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{} & \cvskill{1} & & {\skillLegend@FontSize #3} & \cvskill{3} & & {\skillLegend@FontSize #5 } \\
+ %
+ & \cvskill{2} & & \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4} & &{\skillLegend@FontSize #6 } \\
+ %
+ & & & & \cvskill{5}& & {\skillLegend@FontSize #7 }
+ \end{tabular}%
+ \endgroup%
+ \par\addvspace{#2}}{
+ \begingroup%
+ % oddly enough, we should only need to subtract 2 paddings in the descritorwidths.
+ % but while testing I got overflow of text into the margin
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-5\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
+ @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{3} & {\skillLegend@FontSize #5 } \\
+ %
+ & \cvskill{2} & \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4} &{\skillLegend@FontSize #6 } \\
+ %
+ & & & \cvskill{5} & {\skillLegend@FontSize #7 }
+ \end{tabular}%
+ \endgroup%
+ \par\addvspace{#2}
+ }
+ }
+\fi
+% Redefinition of \cvskilllegend valid for moderncvbodyv
+\if@moderncvbodyv%
+ \DeclareDocumentCommand\@starIndependentTabular{}{}%
+ \RenewDocumentCommand\cvskilllegend{s +O{.25em} +O{\skillLegend@defaultLevelOne} +O{\skillLegend@defaultLevelTwo} +O{\skillLegend@defaultLevelThree} +O{\skillLegend@defaultLevelFour} +O{\skillLegend@defaultLevelFive} +m}{%
+ % check whether Argument #8 is given and if so provide it as cvitem
+ \def\arg@legendString{#8}%
+ \ifdefempty{\arg@legendString}{%
+ \vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
+ }{%
+ \cvitem[-0.5em]{#8}{}%
+ }%
+ \arrayrulecolor{color1}%
+ \setlength\arrayrulewidth{\separatorrulewidth}%
+ \RenewDocumentCommand{\@starIndependentTabular}{}{%
+ \begingroup%
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+% \renewcommand{\arraystretch}{1.0}%
+ \begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegend@hintscolumnwidth
+ @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{3\skilllegend@padding}}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{3\skilllegend@padding}}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \@moderncvstrut{4pt}{16pt} & \cvskill{1}& {\skillLegend@FontSize #3} & \cvskill{3}& {\skillLegend@FontSize #5 }\\%
+ %
+ & \cvskill{2}& \multirow{2}{\cvskilllegend@leftdescriptorwidth}{{\skillLegend@FontSize #4}} & \cvskill{4}& {\skillLegend@FontSize #6 }\\%
+ %
+ & & & \cvskill{5} & {\skillLegend@FontSize #7 }\\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly
+ \end{tabular}%
+ \endgroup%
+ \par\@aftersectionfalse\ignorespaces%
+ }%
+ % because of this weird style and the position of the parameter [#2], the dashed lines of the other version look bad. So no lines.
+ \IfBooleanTF#1{%
+ \@starIndependentTabular%
+ }{%
+ \@starIndependentTabular%
+ }%
+ }%
+\fi
+
+% %-------------------------------------------------------------------------------
+% % \cvskillplainlegend
+% %-------------------------------------------------------------------------------
+% alternative legend style
+% \cvskillplainlegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
+\DeclareDocumentCommand\cvskillplainlegend{s +O{} +O{} +O{} +O{} +O{} +O{} +m}{}%
+% Print alternative legend table explaining the meaning of \cvskill{1}...\cvskill{5}.
+% In this legend, the first three skill levels are in one column
+%
+% Input:
+% asterix (optional): include vertical (dashed) lines. This behaviour depends on the body style.
+% For the fancy style, the asterix has no meaning.
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2 (optional): string describing meaning of \cvskill{1}, default: <basic knowledge>
+% input_3 (optional): string describing meaning of \cvskill{2}, default: <intermediate knowledge with some project experience>
+% input_4 (optional): string describing meaning of \cvskill{3}, default: <extensive project experience>
+% input_5 (optional): string describing meaning of \cvskill{4}, default: <deepened expert knowledge>
+% input_6 (optional): string describing meaning of \cvskill{5}, default: <expert/guru>
+% input_7: string giving a name to the legend, default: <>
+%
+% Example usages:
+% \cvskillplainlegend{} print default legend
+% \cvskillplainlegend[0.5em]{Legend} print default legend, but adjust post padding and display the word ``Legend''.
+% \cvskillplainlegend*[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende} Fully adjust legend to German example and including dashed lines
+%
+% Note:
+% -The width of the columns can be adjusted by the \setcvskilllegendcolumns, see \setcvskilllegendcolumns
+
+% declare default legend entries
+\NewDocumentCommand\skillPlainLegend@defaultLevelOne{}{basic knowlegde}
+\NewDocumentCommand\skillPlainLegend@defaultLevelTwo{}{intermediate knowledge, some project experience}
+\NewDocumentCommand\skillPlainLegend@defaultLevelThree{}{extensive project experience}
+\NewDocumentCommand\skillPlainLegend@defaultLevelFour{}{deepened expert knowledge}
+\NewDocumentCommand\skillPlainLegend@defaultLevelFive{}{expert/guru}
+% Redefinition of \cvskillplainlegend valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii
+\RenewDocumentCommand\cvskillplainlegend{s +O{.25em} +O{\skillPlainLegend@defaultLevelOne} +O{\skillPlainLegend@defaultLevelTwo} +O{\skillPlainLegend@defaultLevelThree} +O{\skillPlainLegend@defaultLevelFour} +O{\skillPlainLegend@defaultLevelFive} +m}{%
+ \IfBooleanTF#1{% if a star is given, add dashed line
+ \begingroup%
+ \arrayrulecolor{color1}%
+ % calculate descriptor widths
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
+ @{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%%
+ p{2\skilllegend@padding}p{\cvskilllegend@leftdescriptorwidth}@{}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
+ p{2\skilllegend@padding}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{#8} & \cvskill{1}& & {\skillLegend@FontSize #3} & \cvskill{4}& &{\skillLegend@FontSize #6} \\%
+ %
+ & \cvskill{2} & & {\skillLegend@FontSize #4} & \cvskill{5}& & {\skillLegend@FontSize #7} \\%
+ %
+ & \cvskill{3} & & {\skillLegend@FontSize #5} & & & %
+ \end{tabular}%
+ \endgroup%
+ \par\addvspace{#2}}{%
+ % if no star is given, do not add dashed line
+ \begingroup%
+ % calculate descriptor widths, note that we use less padding
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}%
+ @{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{#8} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{4} &{\skillLegend@FontSize #6} \\%
+ %
+ & \cvskill{2} & {\skillLegend@FontSize #4} & \cvskill{5} &{\skillLegend@FontSize #7} \\%
+ %
+ & \cvskill{3} & {\skillLegend@FontSize #5 } & & %
+ \end{tabular}%
+ \endgroup%
+ \par\addvspace{#2}%
+ }%
+}%
+% Redefinition of \cvskillplainlegend valid for moderncvbodyiv
+\if@moderncvbodyiv%
+ \RenewDocumentCommand\cvskillplainlegend{s +O{.25em} +O{\skillPlainLegend@defaultLevelOne} +O{\skillPlainLegend@defaultLevelTwo} +O{\skillPlainLegend@defaultLevelThree} +O{\skillPlainLegend@defaultLevelFour} +O{\skillPlainLegend@defaultLevelFive} +m}{%
+ \def\arg@legendString{#8}%
+ \ifdefempty{\arg@legendString}{%
+ }{%
+ \cvitem[0.25em]{\hintstyle{#8}}{}%
+ }%
+ \IfBooleanTF#1{% if a star is given, add dashed line
+ \begingroup%
+ \arrayrulecolor{color1}
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-6\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-6\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
+ @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
+ p{2\skilllegend@padding}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}};{.6pt/1pt}%
+ p{2\skilllegend@padding}p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{} & \cvskill{1} & & {\skillLegend@FontSize#3} & \cvskill{4} & & {\skillLegend@FontSize#6}\\%
+ %
+ & \cvskill{2} & &{\skillLegend@FontSize#4} & \cvskill{5} & &{\skillLegend@FontSize#7}\\%
+ %
+ & \cvskill{3} & &{\skillLegend@FontSize#5} & & &%
+ \end{tabular}%
+ \endgroup%
+ \par\addvspace{#2}}{
+ % if no star is given, do not add dashed line
+ \begingroup
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-3\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-4\skilllegend@padding}%
+ \begin{tabular}{@{}p{\skilllegend@hintscolumnwidth}
+ @{\hspace{\separatorcolumnwidth}}p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skilllegend@padding}}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \raggedleft\hintstyle{} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{4} & {\skillLegend@FontSize #6} \\
+ %
+ & \cvskill{2} & {\skillLegend@FontSize #4} & \cvskill{5} & {\skillLegend@FontSize #7} \\
+ %
+ & \cvskill{3} & {\skillLegend@FontSize #5} & & %
+ \end{tabular}%
+ \endgroup
+ \par\addvspace{#2}
+ }
+ }
+\fi
+% Redefinition of \cvskillplainlegend valid for moderncvbodyv
+\if@moderncvbodyv%
+ \RenewDocumentCommand\cvskillplainlegend{s +O{.25em} +O{\skillPlainLegend@defaultLevelOne} +O{\skillPlainLegend@defaultLevelTwo} +O{\skillPlainLegend@defaultLevelThree} +O{\skillPlainLegend@defaultLevelFour} +O{\skillPlainLegend@defaultLevelFive} +m}{%
+ % check whether Argument #8 is given and if so provide it as cvitem
+ \def\arg@legendString{#8}%
+ \ifdefempty{\arg@legendString}{%
+ \vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
+ }{%
+ \cvitem[-0.5em]{#8}{}%
+ }%
+ \arrayrulecolor{color1}%
+ \setlength\arrayrulewidth{\separatorrulewidth}%
+ \RenewDocumentCommand{\@starIndependentTabular}{}{%
+ \begingroup%
+% \renewcommand{\arraystretch}{1.0}%
+ \setlength{\cvskilllegend@leftdescriptorwidth}{\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
+ \setlength{\cvskilllegend@rightdescriptorwidth}{\skilllegend@bodylength-\skilllegend@leftdesriptorfactor\skilllegend@bodylength-\cvskill@width-\skillmatrix@padding-2\skilllegend@padding}%
+ \begin{tabular}[t]{@{}p{\hintscolumnwidth}%\skilllegend@hintscolumnwidth
+ @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
+ p{\cvskilllegend@leftdescriptorwidth}@{\hspace{2\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{2\skilllegend@padding}}%
+ p{\cvskilllegend@rightdescriptorwidth}@{}}%
+ \@moderncvstrut{4pt}{16pt} & \cvskill{1} & {\skillLegend@FontSize #3} & \cvskill{4} & {\skillLegend@FontSize #6}\\%
+ %
+ & \cvskill{2} & {\skillLegend@FontSize #4} & \cvskill{5} & {\skillLegend@FontSize #7}\\%
+ %
+ & \cvskill{3} & {\skillLegend@FontSize #5} & & \\[#2]% the spacing needs to be inside the cell for the vertical rule to extend correctly
+ \end{tabular}%
+ \endgroup%
+ \par\@aftersectionfalse\ignorespaces%
+ }%
+ % because of this weird style and the position of the parameter [#2], the dashed lines of the other version look bad. So no lines.
+ \IfBooleanTF#1{%
+ \@starIndependentTabular%
+ }{%
+ \@starIndependentTabular%
+ }%
+ }%
+\fi
+
+% %-------------------------------------------------------------------------------
+% % \cvskillhead
+% %-------------------------------------------------------------------------------
+\NewDocumentCommand\cvSkillMatrix@HeadFont{}{\normalfont}
+\DeclareDocumentCommand\cvskillhead{+O{} +O{} +O{} +O{} +O{}}{}%
+% add skill matrix line acting as header explaining the meaning of columns.
+%
+% Input:
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2 (optional): string naming the level column (2nd column), default: <Level>
+% input_3 (optional): string naming the skill column (3nd column), default: <Skill>
+% input_4 (optional): string naming the experience-in-years column (4th column), default: <Years>
+% input_5 (optional): string naming the comment column (5th column), default: <Comment>
+%
+% Example usages:
+% \cvskillhead print default head.
+% \cvskillhead[0.5em] print default head, but adjust post padding.
+% \cvskillhead[0.25em][Level][F\"ahigkeit][Jahre][Bemerkung] Fully adjust head to German example
+%
+% Note:
+% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
+
+\NewDocumentCommand\skillMatrix@HeaderDefaultOne{}{Level}
+\NewDocumentCommand\skillMatrix@HeaderDefaultTwo{}{Skill}
+\NewDocumentCommand\skillMatrix@HeaderDefaultThree{}{Years}
+\NewDocumentCommand\skillMatrix@HeaderDefaultFour{}{Comment}
+% Definition of \cvskillhead valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv
+\RenewDocumentCommand\cvskillhead{O{.25em} +O{\skillMatrix@HeaderDefaultOne} +O{\skillMatrix@HeaderDefaultTwo} +O{\skillMatrix@HeaderDefaultThree} +O{\skillMatrix@HeaderDefaultFour}}{%
+ \begingroup
+ \renewcommand{\arraystretch}{1.25}
+ \arrayrulecolor{color1}
+ \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@experiencewidth}@{\hspace{\skillmatrix@padding}}
+ p{\skillmatrix@commentwidth}@{}}%
+ & \centering{\cvSkillMatrix@HeadFont #2} & \centering{\cvSkillMatrix@HeadFont #3} & \centering{\cvSkillMatrix@HeadFont #4} & {\cvSkillMatrix@HeadFont #5}
+ \end{tabular}%
+ \endgroup
+ \par\addvspace{#1}
+}
+% Definition of \cvskillhead valid moderncvbodyv
+\if@moderncvbodyv%
+ \RenewDocumentCommand\cvskillhead{O{.25em} +O{\skillMatrix@HeaderDefaultOne} +O{\skillMatrix@HeaderDefaultTwo} +O{\skillMatrix@HeaderDefaultThree} +O{\skillMatrix@HeaderDefaultFour}}{%
+ \arrayrulecolor{color1}%
+ \setlength\arrayrulewidth{\separatorrulewidth}%
+ \vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
+ \begingroup%
+ % \renewcommand{\arraystretch}{1.25}%
+ \begin{tabular}[t]{@{}p{\hintscolumnwidth}%
+ @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}%
+ p{\skillmatrix@hintscolumnwidth}%
+ @{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@experiencewidth}@{\hspace{\skillmatrix@padding}}%
+ p{\skillmatrix@commentwidth}@{}}%
+ & & \centering{\cvSkillMatrix@HeadFont#2} & \centering{\cvSkillMatrix@HeadFont#3} & \centering{\cvSkillMatrix@HeadFont#4} & {\cvSkillMatrix@HeadFont#5} \\[#1]% the spacing needs to be inside the cell for the vertical rule to extend correctly
+ \end{tabular}%
+ \endgroup%
+ \par\@aftersectionfalse\ignorespaces%
+ }%
+\fi
+
+% %-------------------------------------------------------------------------------
+% % \cvskillentry
+% %-------------------------------------------------------------------------------
+% \cvskillentry[*][<post_padding>]{<skill_cathegory>}{<0-5>}{<skill_name>}{<years_of_experience>}{<comment>}%
+\DeclareDocumentCommand\cvskillentry{s +O{} +m +m +m +m +m}{}%
+% add cvskill matrix row.
+%
+% Input:
+% asterix (optional): include horizontal (dashed) line above the entered line. This behaviour depends on the body style.
+% For the fancy style, the asterix has no meaning.
+% input_1 (optional): padding length appended to the legend, default: <0.25em>
+% input_2: string, naming skill cathegory, default: <>
+% input_3: integer between 0 and 5, describing level of skill. \cvskill{input_2} is called internally, default: <>
+% input_4: string, naming the skill, default: <>
+% input_5: positive real number, stating the number of years of experience with this skill , default: <>
+% input_6: string, explaining details w.r.t. that particual skill default: <>
+%
+% Example usages:
+% \cvskillentry*{Language:}{3}{Python}{2}{I have done a million projects with Python}
+% \cvskillentry{}{2}{Lilypond}{14}{So much sheet music! Man I'm the best!}
+% \cvskillentry{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
+% \cvskillentry*[1.5em]{OS:}{3}{Linux}{2}{I only use Archlinux}
+%
+% Note:
+% - The width of the columns can be adjusted by the \setcvskillcolumns command, see \setcvskillcolumns.
+
+% Definition of \cvskillentry valid for moderncvbodyi, moderncvbodyii, moderncvbodyiii, moderncvbodyiv
+\RenewDocumentCommand\cvskillentry{s +O{.25em} +m +m +m +m +m}{%
+ %test for the star * in the command
+ \IfBooleanTF{#1}{% If a star is seen a dotted line is drawn above the entry
+ \begingroup
+ \renewcommand{\arraystretch}{1.25}
+ \arrayrulecolor{color1}
+ \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@padding}}%
+ p{\skillmatrix@commentwidth}@{}}%
+ \cdashline{2-5}[.6pt/1pt]
+ \raggedleft\hintstyle{#3} &\centering \cvskill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
+ \end{tabular}%
+ \endgroup
+ \par\addvspace{#2}
+ }{% If no star is seen no line is drawn
+ \begin{tabular}{@{}p{\skillmatrix@hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}%
+ p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@experiencewidth}%
+ @{\hspace{\skillmatrix@padding}}%
+ p{\skillmatrix@commentwidth}@{}}%
+ \raggedleft\hintstyle{#3} &\centering \cvskill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}%
+ \end{tabular}%
+ \par\addvspace{#2}
+ }
+}
+
+% Definition of \cvskillentry valid for moderncvbodyv
+\if@moderncvbodyv%
+ \DeclareDocumentCommand\@starIndependentMatrixEntry{}{}%
+ \RenewDocumentCommand\cvskillentry{s O{.25em} +m +m +m +m +m}{%
+ \arrayrulecolor{color1}%
+ \setlength\arrayrulewidth{\separatorrulewidth}%
+ \vspace*{-\separatorrulewidth}% HACK; I don't understand where the space is coming from, nor what it's exact value is :(
+ %test for the star * in the command
+ \RenewDocumentCommand{\@starIndependentMatrixEntry}{}{%
+ \begingroup%
+ \renewcommand{\arraystretch}{1.25}%
+ \begin{tabular}[t]{@{}p{\hintscolumnwidth}%
+ @{\hspace{\separatorcolumnwidth}}|@{\hspace{\separatorcolumnwidth}}p{\skillmatrix@hintscolumnwidth}
+ @{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@width}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@descriptorwidth}@{\hspace{\skillmatrix@padding}}%
+ p{\cvskill@experiencewidth} @{\hspace{\skillmatrix@padding}}p{\skillmatrix@commentwidth}@{}}%
+ % \cline{3-6}%
+ & \raggedleft\hintstyle{#3} &\centering \cvskill{#4} &\centering {#5} & \centering {#6} &{\itshape#7}\\[#2]%
+ \end{tabular}%
+ \endgroup%
+ }%
+ \IfBooleanTF{#1}{% the star does not do anything here
+ \@starIndependentMatrixEntry%
+ }{%
+ \@starIndependentMatrixEntry%
+ }%
+ \par\@aftersectionfalse\ignorespaces%
+ }%
+\fi
+%
+\endinput
+
+
+%% end of file `moderncvskillmatrix.sty'.
diff --git a/macros/latex/contrib/moderncv/moderncvstylebanking.sty b/macros/latex/contrib/moderncv/moderncvstylebanking.sty
index 783f9606a4..e9ced7fba1 100644
--- a/macros/latex/contrib/moderncv/moderncvstylebanking.sty
+++ b/macros/latex/contrib/moderncv/moderncvstylebanking.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstylebanking.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstylebanking}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: banking]
+\ProvidesPackage{moderncvstylebanking}[2021/01/21 v2.1.0 modern curriculum vitae and letter style scheme: banking]
% body rules type options: "fullrules", "shortrules", "mixedrules" (default) or "norules"
\@initializecommand{\moderncvstylebodyoptions}{}
@@ -49,7 +49,12 @@
%\fi
% symbols
-\moderncvicons{awesome}
+\RequirePackage{ifxetex}
+\ifxetexorluatex
+ \moderncvicons{awesome}
+\else
+ \moderncvicons{marvosym}
+\fi
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvstylecasual.sty b/macros/latex/contrib/moderncv/moderncvstylecasual.sty
index b50886fe8f..a3eed14091 100644
--- a/macros/latex/contrib/moderncv/moderncvstylecasual.sty
+++ b/macros/latex/contrib/moderncv/moderncvstylecasual.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstylecasual.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstylecasual}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: casual]
+\ProvidesPackage{moderncvstylecasual}[2021/01/21 v2.1.0 modern curriculum vitae and letter style scheme: casual]
% head section alignment options: "left" (default) or "right"
\@initializecommand{\moderncvstyleheadoptions}{}
@@ -36,7 +36,12 @@
%\fi
% symbols
-\moderncvicons{awesome}
+\RequirePackage{ifxetex}
+\ifxetexorluatex
+ \moderncvicons{awesome}
+\else
+ \moderncvicons{marvosym}
+\fi
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvstyleclassic.sty b/macros/latex/contrib/moderncv/moderncvstyleclassic.sty
index 6addabb2c2..2f94813368 100644
--- a/macros/latex/contrib/moderncv/moderncvstyleclassic.sty
+++ b/macros/latex/contrib/moderncv/moderncvstyleclassic.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstyleclassic.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstyleclassic}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: classic]
+\ProvidesPackage{moderncvstyleclassic}[2021/01/21 v2.1.0 modern curriculum vitae and letter style scheme: classic]
% head section alignment options: "left" (default) or "right"
\@initializecommand{\moderncvstyleheadoptions}{}
@@ -36,7 +36,12 @@
%\fi
% symbols
-\moderncvicons{marvosym}
+\RequirePackage{ifxetex}
+\ifxetexorluatex
+ \moderncvicons{awesome}
+\else
+ \moderncvicons{marvosym}
+\fi
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvstyleempty.sty b/macros/latex/contrib/moderncv/moderncvstyleempty.sty
index 815a4d754f..cadc9307c0 100644
--- a/macros/latex/contrib/moderncv/moderncvstyleempty.sty
+++ b/macros/latex/contrib/moderncv/moderncvstyleempty.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstyleempty.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstyleempty}[2015/07/28 v2.0.0 modern curriculum vitae scheme: empty]
+\ProvidesPackage{moderncvstyleempty}[2021/01/21 v2.1.0 modern curriculum vitae scheme: empty]
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvstylefancy.sty b/macros/latex/contrib/moderncv/moderncvstylefancy.sty
index b44f378326..940f943d52 100644
--- a/macros/latex/contrib/moderncv/moderncvstylefancy.sty
+++ b/macros/latex/contrib/moderncv/moderncvstylefancy.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstylefancy.sty'.
-%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2015-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstylefancy}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: fancy]
+\ProvidesPackage{moderncvstylefancy}[2021/01/21 v2.1.0 modern curriculum vitae and letter style scheme: fancy]
\DeclareOption*{}% avoid choking on unknown options
\ExecuteOptions{}
@@ -31,7 +31,12 @@
%\fi
% symbols
-\moderncvicons{awesome}
+\RequirePackage{ifxetex}
+\ifxetexorluatex
+ \moderncvicons{awesome}
+\else
+ \moderncvicons{marvosym}
+\fi
%-------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/moderncv/moderncvstyleoldstyle.sty b/macros/latex/contrib/moderncv/moderncvstyleoldstyle.sty
index 9046fda54b..13e270c85e 100644
--- a/macros/latex/contrib/moderncv/moderncvstyleoldstyle.sty
+++ b/macros/latex/contrib/moderncv/moderncvstyleoldstyle.sty
@@ -1,5 +1,5 @@
%% start of file `moderncvstyleoldstyle.sty'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -10,7 +10,7 @@
% identification
%-------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moderncvstyleoldstyle}[2015/07/28 v2.0.0 modern curriculum vitae and letter style scheme: oldstyle]
+\ProvidesPackage{moderncvstyleoldstyle}[2021/01/21 v2.1.0 modern curriculum vitae and letter style scheme: oldstyle]
\DeclareOption*{}% avoid choking on unknown options
\ExecuteOptions{}
diff --git a/macros/latex/contrib/moderncv/examples/picture.eps b/macros/latex/contrib/moderncv/picture.eps
index e7415b0093..e7415b0093 100644
--- a/macros/latex/contrib/moderncv/examples/picture.eps
+++ b/macros/latex/contrib/moderncv/picture.eps
diff --git a/macros/latex/contrib/moderncv/examples/picture.jpg b/macros/latex/contrib/moderncv/picture.jpg
index 6b54f4d090..6b54f4d090 100644
--- a/macros/latex/contrib/moderncv/examples/picture.jpg
+++ b/macros/latex/contrib/moderncv/picture.jpg
Binary files differ
diff --git a/macros/latex/contrib/moderncv/examples/publications.bib b/macros/latex/contrib/moderncv/publications.bib
index 2b97096793..2b97096793 100644
--- a/macros/latex/contrib/moderncv/examples/publications.bib
+++ b/macros/latex/contrib/moderncv/publications.bib
diff --git a/macros/latex/contrib/moderncv/examples/template.tex b/macros/latex/contrib/moderncv/template.tex
index fbfd3477f4..77ea54ad98 100644
--- a/macros/latex/contrib/moderncv/examples/template.tex
+++ b/macros/latex/contrib/moderncv/template.tex
@@ -1,5 +1,5 @@
%% start of file `template.tex'.
-%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com).
+%% Copyright 2006-2015 Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License version 1.3c,
@@ -21,7 +21,8 @@
% adjust the page margins
\usepackage[scale=0.75]{geometry}
%\setlength{\hintscolumnwidth}{3cm} % if you want to change the width of the column with the dates
-%\setlength{\makecvtitlenamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
+%\setlength{\makecvheadnamewidth}{10cm} % for the 'classic' style, if you want to force the width allocated to your name and avoid line breaks. be careful though, the length is normally calculated to avoid any overlap with your personal info; use this at your own typographical risks...
+
% personal data
\name{John}{Doe}
@@ -32,16 +33,31 @@
\phone[fax]{+3~(456)~789~012}
\email{john@doe.org} % optional, remove / comment the line if not wanted
\homepage{www.johndoe.com} % optional, remove / comment the line if not wanted
+
+% Social icons
\social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
+\social[xing]{john\_doe} % optional, remove / comment the line if not wanted
\social[twitter]{jdoe} % optional, remove / comment the line if not wanted
\social[github]{jdoe} % optional, remove / comment the line if not wanted
+\social[gitlab]{jdoe} % optional, remove / comment the line if not wanted
+\social[stackoverflow]{0000000/johndoe} % optional, remove / comment the line if not wanted
+\social[bitbucket]{jdoe} % optional, remove / comment the line if not wanted
+\social[skype]{jdoe} % optional, remove / comment the line if not wanted
+\social[orcid]{0000-0000-000-000} % optional, remove / comment the line if not wanted
+\social[researchgate]{jdoe} % optional, remove / comment the line if not wanted
+\social[researcherid]{jdoe} % optional, remove / comment the line if not wanted
+\social[telegram]{jdoe} % optional, remove / comment the line if not wanted
+\social[googlescholar]{googlescholarid} % optional, remove / comment the line if not wanted
+
+
\extrainfo{additional information} % optional, remove / comment the line if not wanted
\photo[64pt][0.4pt]{picture} % optional, remove / comment the line if not wanted; '64pt' is the height the picture must be resized to, 0.4pt is the thickness of the frame around it (put it to 0pt for no frame) and 'picture' is the name of the picture file
\quote{Some quote} % optional, remove / comment the line if not wanted
-% bibliography adjustements (only useful if you make citations in your resume, or print a list of publications using BibTeX)
+% bibliography adjustments (only useful if you make citations in your resume, or print a list of publications using BibTeX)
% to show numerical labels in the bibliography (default is to show no labels)
-\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
+%\makeatletter\renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}\makeatother
+\renewcommand*{\bibliographyitemlabel}{[\arabic{enumiv}]}
% to redefine the bibliography heading string ("Publications")
%\renewcommand{\refname}{Articles}
@@ -67,12 +83,12 @@
\section{Experience}
\subsection{Vocational}
-\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%
-Detailed achievements:%
-\begin{itemize}%
-\item Achievement 1;
-\item Achievement 2, with sub-achievements:
- \begin{itemize}%
+\cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}
+Detailed achievements:
+\begin{itemize}
+\item Achievement 1
+\item Achievement 2 (with sub-achievements)
+ \begin{itemize}
\item Sub-achievement (a);
\item Sub-achievement (b), with sub-sub-achievements (don't do this!);
\begin{itemize}
@@ -82,9 +98,10 @@ Detailed achievements:%
\end{itemize}
\item Sub-achievement (c);
\end{itemize}
-\item Achievement 3.
+\item Achievement 3
+\item Achievement 4
\end{itemize}}
-\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}
+\cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2\newline{}}
\subsection{Miscellaneous}
\cventry{year--year}{Job title}{Employer}{City}{}{Description}
@@ -92,12 +109,66 @@ Detailed achievements:%
\cvitemwithcomment{Language 1}{Skill level}{Comment}
\cvitemwithcomment{Language 2}{Skill level}{Comment}
\cvitemwithcomment{Language 3}{Skill level}{Comment}
+\cvitemwithcomment{Language 4}{Skill level}{Comment}
\section{Computer skills}
\cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}
\cvdoubleitem{category 2}{XXX, YYY, ZZZ}{category 5}{XXX, YYY, ZZZ}
\cvdoubleitem{category 3}{XXX, YYY, ZZZ}{category 6}{XXX, YYY, ZZZ}
+\section{Skill matrix}
+\cvitem{Skill matrix}{Alternatively, provide a skill matrix to show off your skills}
+%% Skill matrix as an alternative to rate one's skills, computer or other.
+
+%% Adjusts width of skill matrix columns.
+%% Usage \setcvskillcolumns[<width>][<factor>][<exp_width>]
+%% <width>, <exp_width> should be lengths smaller than \textwidth, <factor> needs to be between 0 and 1.
+%% Examples:
+% \setcvskillcolumns[5em][][]% adjust first column. Same as \setcvskillcolumns[5em]
+% \setcvskillcolumns[][0.45][]% adjust third (skill) column. Same as \setcvskillcolumns[][0.45]
+% \setcvskillcolumns[][][\widthof{``Year''}]% adjust fourth (years) column.
+% \setcvskillcolumns[][0.45][\widthof{``Year''}]%
+% \setcvskillcolumns[\widthof{``Languag''}][0.48][]
+% \setcvskillcolumns[\widthof{``Languag''}]%
+
+%% Adjusts width of legend columns. Usage \setcvskilllegendcolumns[<width>][<factor>]
+%% <factor> needs to be between 0 and 1. <width> should be a length smaller than \textwidth
+%% Examples:
+% \setcvskilllegendcolumns[][0.45]
+% \setcvskilllegendcolumns[\widthof{``Legend''}][0.45]
+% \setcvskilllegendcolumns[0ex][0.46]% this is usefull for the banking style
+
+%% Add a legend if you are using \cvskill{<1-5>} command or \cvskillentry
+%% Usage \cvskilllegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
+% \cvskilllegend % insert default legend without lines
+\cvskilllegend*[1em]{}% adjust post spacing
+% \cvskilllegend*{Legend}% Alternatively add a description string
+%% adjust the legend entries for other languages, here German
+% \cvskilllegend[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte\,/\,Spezialist]{Legende}
+
+%% Alternative legend style with the first three skill levels in one column
+%% Usage \cvskillplainlegend[*][<post_padding>][<first_level>][<second_level>][<third_level>][<fourth_level>][<fifth_level>]{<name>}
+% \setcvskilllegendcolumns[][0.6]% works for classic, casual, banking
+% \setcvskilllegendcolumns[][0.55]% works better for oldstyle and fancy
+% \cvskillplainlegend{}
+% \cvskillplainlegend[0.2em][Grundkenntnisse][Grundkenntnisse und eigene Erfahrung in Projekten][Umfangreiche Erfahrung in Projekten][Vertiefte Expertenkenntnisse][Experte/Guru]{Legende}
+
+%% Add a head of the skill matrix table with descriptions.
+%% Usage \cvskillhead[<post_padding>][<Level>][<Skill>][<Years>][<Comment>]%
+\cvskillhead[-0.1em]% this inserts the standard legend in english and adjust padding
+%% Adjust head of the skill matrix for other languages
+% \cvskillhead[0.25em][Level][F\"ahigkeit][Jahre][Bemerkung]
+
+%% \cvskillentry[*][<post_padding>]{<skill_cathegory>}{<0-5>}{<skill_name>}{<years_of_experience>}{<comment>}%
+%% Example usages:
+\cvskillentry*{Language:}{3}{Python}{2}{I'm so experienced in Python and have realised a million projects. At least.}
+\cvskillentry{}{2}{Lilypond}{14}{So much sheet music! Man, I'm the best!}
+\cvskillentry{}{3}{\LaTeX}{14}{Clearly I rock at \LaTeX}
+\cvskillentry*{OS:}{3}{Linux}{2}{I only use Archlinux btw}% notice the use of the starred command and the optional
+\cvskillentry*[1em]{Methods}{4}{SCRUM}{8}{SCRUM master for 5 years}
+%% \cvskill{<0-5>} command
+% \cvitem{\textbackslash{cvskill}:}{Skills can be visually expressed by the \textbackslash{cvskill} command, e.g. \cvskill{2}}
+
\section{Interests}
\cvitem{hobby 1}{Description}
\cvitem{hobby 2}{Description}
@@ -110,7 +181,7 @@ Detailed achievements:%
\section{Extra 2}
\cvlistdoubleitem{Item 1}{Item 4}
-\cvlistdoubleitem{Item 2}{Item 5\cite{book1}}
+\cvlistdoubleitem{Item 2}{Item 5\cite{book2}}
\cvlistdoubleitem{Item 3}{Item 6. Like item 3 in the single column list before, this item is particularly long to wrap over several lines.}
\section{References}
@@ -163,3 +234,4 @@ Albert Einstein discovered that $e=mc^2$ in 1905.
%% end of file `template.tex'.
+
diff --git a/macros/latex/contrib/moderncv/tweaklist.sty b/macros/latex/contrib/moderncv/tweaklist.sty
index adc9398932..8e369d9cbe 100644
--- a/macros/latex/contrib/moderncv/tweaklist.sty
+++ b/macros/latex/contrib/moderncv/tweaklist.sty
@@ -1,6 +1,6 @@
%% start of file `tweaklist.sty'.
-%% Original by Jakob Schiøtz, downloaded from http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty; not found on ctan.
-%% Modified by Xavier Danaux (xdanaux@gmail.com).
+%% Original by Jakob Schiotz, downloaded from http://dcwww.camd.dtu.dk/~schiotz/comp/LatexTips/tweaklist.sty; not found on ctan.
+%% Modified by Xavier Danaux (xdanaux@gmail.com), 2020-2021 moderncv maintainers (github.com/moderncv).
%
% The tweaklist.sty package redefines the itemize, enumerate and description packages, so that all parameters can be adjusted.
% This was done by copying the original definitions, and adding "hook commands" that are executed when entering the environment.