summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/generic/chemfig/README4
-rw-r--r--macros/generic/chemfig/chemfig-en.pdfbin1087797 -> 1092263 bytes
-rw-r--r--macros/generic/chemfig/chemfig-en.tex32
-rw-r--r--macros/generic/chemfig/chemfig-fr.pdfbin1116449 -> 1120059 bytes
-rw-r--r--macros/generic/chemfig/chemfig-fr.tex32
-rw-r--r--macros/generic/chemfig/chemfig.tex64
-rw-r--r--macros/latex/contrib/artthreads/README.md14
-rw-r--r--macros/latex/contrib/artthreads/artthreads.dtx513
-rw-r--r--macros/latex/contrib/artthreads/docs/artthreads.pdfbin0 -> 1725574 bytes
-rw-r--r--macros/latex/contrib/artthreads/docs/artthreads_man.pdfbin141045 -> 315175 bytes
-rw-r--r--macros/latex/contrib/artthreads/docs/artthreads_man.tex393
-rw-r--r--macros/latex/contrib/artthreads/examples/article_tech.pdfbin0 -> 95016 bytes
-rw-r--r--macros/latex/contrib/artthreads/examples/article_tech.tex56
-rw-r--r--macros/latex/contrib/artthreads/examples/article_tst.tex62
-rw-r--r--macros/latex/required/babel/base/README.md21
-rw-r--r--macros/latex/required/babel/base/babel.dtx105
-rw-r--r--macros/latex/required/babel/base/babel.ins2
-rw-r--r--macros/latex/required/babel/base/babel.pdfbin793176 -> 792238 bytes
-rw-r--r--macros/latex/required/babel/base/bbcompat.dtx2
-rw-r--r--macros/luatex/latex/lua-ul/lua-ul.dtx55
-rw-r--r--macros/luatex/latex/lua-ul/lua-ul.pdfbin93565 -> 95868 bytes
21 files changed, 930 insertions, 425 deletions
diff --git a/macros/generic/chemfig/README b/macros/generic/chemfig/README
index cad2e43174..de87a14c9b 100644
--- a/macros/generic/chemfig/README
+++ b/macros/generic/chemfig/README
@@ -2,9 +2,9 @@ ___________________________________
The
Chemfig package
- v1.55
+ v1.56
- 2020/06/15
+ 2020/07/13
___________________________________
Maintainer: Christian Tellechea
diff --git a/macros/generic/chemfig/chemfig-en.pdf b/macros/generic/chemfig/chemfig-en.pdf
index 5ec811ed99..990c8454ba 100644
--- a/macros/generic/chemfig/chemfig-en.pdf
+++ b/macros/generic/chemfig/chemfig-en.pdf
Binary files differ
diff --git a/macros/generic/chemfig/chemfig-en.tex b/macros/generic/chemfig/chemfig-en.tex
index d7e5474480..281530c1cd 100644
--- a/macros/generic/chemfig/chemfig-en.tex
+++ b/macros/generic/chemfig/chemfig-en.tex
@@ -247,6 +247,9 @@ Together with the use of the macro \verb|\charge|, this new feature makes it pos
\exemple{Consecutive bonds}/\chemfig{[:30]-\charge{90=\:}{}
-[:-30]\charge{-90=\"}{}-\charge{90:2pt=$\delta^+$}{}-[:-30]}/
+\subsection{Center of rings}
+The center of each ring is reachable with a \TIKZ node. See page~\pageref{centre_cycle}.
+
\subsection{Manual Update}
More detailed explanations are given on:
\begin{itemize}
@@ -313,16 +316,18 @@ Here is the complete list of parameters as well as their default values\label{li
\CFparam{lewis sep}
\CFparam{lewis length}
\CFparam{lewis style}
- \CFparam{lewis dist}\hline
+ \CFparam{lewis dist}
+ \CFparam{lewis radius}
+ \CFparam{lewis diag coeff}
+ \CFparam{cycle radius coeff}
+ \CFparam{stack sep}
+ \CFparam{show cntcycle}
+ \CFparam{autoreset cntcycle}\hline
\end{longtable}
\end{minipage}\hfill
\begin{minipage}[t]{.45\linewidth}
\begin{longtable}{rl}\hline
\chevrons{keys} & default \chevrons{values}\\\hline\endhead
- \CFparam{lewis radius}
- \CFparam{lewis diag coeff}
- \CFparam{cycle radius coeff}
- \CFparam{stack sep}
\CFparam{scheme debug}
\CFparam{compound style}
\CFparam{compound sep}
@@ -799,6 +804,21 @@ Some care must be taken with rings when one or more vertices are made up of grou
In order for the ring to have a regular shape, it is necessary to override the \CF mechanism which automatically calculates the departure and arrival atoms of bonds. Here, \verb/C-F/ and \verb/F-G/ must be connected by using the optional argument of these bonds:
\exemple{Forced departure and arrival atoms}|\chemfig{AB*5(-CDE-[,,1]F-[,,,1]GH-I-)}|
+\subsection{Center of rings}\label{centre_cycle}
+Each ring has at its center a node of zero dimension whose name is \Verb|centrecycle<n>| where \Verb|<n>| is the number of the ring, (the rings are numbered in the order in which they are drawn). It is possible to display the number of each ring by setting the boolean \CFkey{show cntcycle} to true.
+
+The default true boolean \CFkey{autoreset cntcycle} resets the ring counter at the beginning of each molecule to 0 (i.e., each time \verb|\chemfig| is executed).
+
+\exemple{Centre of rings}/\chemfig{*5(---(-*3(---))--)}
+\chemmove{\draw[red](cyclecenter1)to[out=20,in=-45](cyclecenter2);}
+\qquad
+\chemfig{*6(-=-=-=)}
+\chemmove{%
+ \node[at=(cyclecenter1)](){.+}
+ node [at=(cyclecenter1),shift=(120:1.75cm)](end){\printatom{R^1}};
+ \draw[-,shorten <=.5cm](cyclecenter1)--(end);
+}/
+
\section{Representing electron movements}\label{mecanismes-reactionnels}
Starting with \CF version 0.3, we can represent the movement of electrons in mesomeric effects or reaction mechanisms. This is done by marking the departure and arrival points of the electron movement arrow using the syntax ``\Verb-@{<argument>}-''. This syntax allows a \TIKZ node to be placed and makes this node accessible outside the argument of the \verb-\chemfig- command thanks to the ``\texttt{remember picture}'' option which is passed to all the ``\falseverb{tikzpicture}'' environments. It is assumed that the viewer supports ``\falseverb{picture remembering}'' and that the compilation is done twice.
@@ -2457,6 +2477,8 @@ The commands created by \CF are:
\item \CFkv{lewis diag coeff} {1}: factor that multiplies the distance to Lewis formulas in odd directions
\item \CFkv{cycle radius coeff} {0.75}: shrinkage ratio of the circle or arc inside cycles
\item \CFkv{stack sep} {1.5pt}: vertical gap between arguments of \verb-\chemabove- and \verb-\chembelow- macros
+ \item \CFkv{show cntcycle} {false}: show rings numbers
+ \item \CFkv{autoreset cntcycle} {true}: reset ring counter at \verb|\chemfig| execution
\item \CFkv{compound style} {{}}: style of compounds
\item \CFkv{compound sep} {5em}: space between compounds
\item \CFkv{arrow offset} {4pt}: space between compound and arrow
diff --git a/macros/generic/chemfig/chemfig-fr.pdf b/macros/generic/chemfig/chemfig-fr.pdf
index f773cb1b4b..1777f6d5b9 100644
--- a/macros/generic/chemfig/chemfig-fr.pdf
+++ b/macros/generic/chemfig/chemfig-fr.pdf
Binary files differ
diff --git a/macros/generic/chemfig/chemfig-fr.tex b/macros/generic/chemfig/chemfig-fr.tex
index de76a743a3..d52bb1259e 100644
--- a/macros/generic/chemfig/chemfig-fr.tex
+++ b/macros/generic/chemfig/chemfig-fr.tex
@@ -247,6 +247,9 @@ Conjointement à l'utilisation de la macro \verb|\charge|, cette nouvelle foncti
\exemple{Liaisons jointives}/\chemfig{[:30]-\charge{90=\:}{}
-[:-30]\charge{-90=\"}{}-\charge{90:2pt=$\delta^+$}{}-[:-30]}/
+\subsection{Centre des cycles}
+Le centre de chaque cycle est désormais accessible via un nœud de \TIKZ. Voir page~\pageref{centre_cycle}.
+
\subsection{Mise à jour du manuel}
Des explications plus détaillées sont données sur:
\begin{itemize}
@@ -313,16 +316,18 @@ Voici la liste exhaustive des paramètres ainsi que leurs valeurs par défaut\la
\CFparam{lewis sep}
\CFparam{lewis length}
\CFparam{lewis style}
- \CFparam{lewis dist}\hline
+ \CFparam{lewis dist}
+ \CFparam{lewis radius}
+ \CFparam{lewis diag coeff}
+ \CFparam{cycle radius coeff}
+ \CFparam{stack sep}
+ \CFparam{show cntcycle}
+ \CFparam{autoreset cntcycle}\hline
\end{longtable}
\end{minipage}\hfill
\begin{minipage}[t]{.45\linewidth}
\begin{longtable}{rl}\hline
\chevrons{clés} & \chevrons{valeurs} par défaut\\\hline\endhead
- \CFparam{lewis radius}
- \CFparam{lewis diag coeff}
- \CFparam{cycle radius coeff}
- \CFparam{stack sep}
\CFparam{scheme debug}
\CFparam{compound style}
\CFparam{compound sep}
@@ -799,6 +804,21 @@ Il faut prendre des précautions avec les cycles lorsque un ou plusieurs sommets
Pour que le cycle ait une forme régulière, il faut passer outre le mécanisme de \CF qui calcule automatiquement les atomes de départ et d'arrivée des liaisons. Ici, il faut relier \verb/C-F/ et \verb/F-G/ en le spécifiant avec l'argument optionnel de ces liaisons :
\exemple{Atomes de départ et d'arrivée imposés}|\chemfig{AB*5(-CDE-[,,1]F-[,,,1]GH-I-)}|
+\subsection{Centre du cycle}\label{centre_cycle}
+Chaque cycle porte en son centre un nœud de dimension nulle dont le nom est \Verb|centrecycle<n>| où \Verb|<n>| est le numéro du cycle, entendu que les cycles sont numérotés dans l'ordre où ils sont tracés. Il est possible d'afficher le numéro de chaque cycle en mettant à vrai la \chevrons{clé} booléenne \CFkey{show cntcycle}.
+
+La \chevrons{clé} booléenne \CFkey{autoreset cntcycle}, vraie par défaut, remet à 0 le compteur de cycle au début de chaque molécule tracée (c'est-à-dire à chaque appel de \verb|\chemfig|).
+
+\exemple{Centre de cycle}/\chemfig{*5(---(-*3(---))--)}
+\chemmove{\draw[red](cyclecenter1)to[out=20,in=-45](cyclecenter2);}
+\qquad
+\chemfig{*6(-=-=-=)}
+\chemmove{%
+ \node[at=(cyclecenter1)](){.+}
+ node [at=(cyclecenter1),shift=(120:1.75cm)](end){\printatom{R^1}};
+ \draw[-,shorten <=.5cm](cyclecenter1)--(end);
+}/
+
\section{Représentation des déplacements d'électrons}\label{mecanismes-reactionnels}
Depuis la version 0.3 de \CF, on peut représenter les déplacements d'électrons des effets mésomères ou des mécanismes réactionnels. Cela est rendu possible en marquant le point de départ et le point d'arrivée de la flèche que l'on utilise pour indiquer la migration des électrons à l'aide de la syntaxe «\Verb-@{<argument>}-». Cette syntaxe permet de poser un nœud (au sens de \TIKZ) en rendant ce nœud accessible en dehors de l'argument de la commande \verb-\chemfig- grâce à l'option «\texttt{remember picture}» qui est passée à tous les environnements «\falseverb{tikzpicture}». Cela suppose que le visualiseur prenne en charge le «\falseverb{picture remembering}» et que la compilation soit lancée deux fois.
@@ -2457,6 +2477,8 @@ Les commandes créées par \CF sont :
\item \CFkv{lewis diag coeff} {1}: coefficient multiplicatif de la distance dans les directions impaires
\item \CFkv{cycle radius coeff} {0.75}: coefficient du cercle ou de l'arc de cercle tracé dans les cycles
\item \CFkv{stack sep} {1.5pt}: espacement vertical pour les arguments des macros \verb-\chemabove- et \verb-\chembelow-
+ \item \CFkv{show cntcycle} {false}: affichage des numéros des cycles
+ \item \CFkv{autoreset cntcycle} {true}: remise à 0 du compteur de cycles à chaque exécution de \verb|\chemfig|
\item \CFkv{compound style} {{}}: style des composés
\item \CFkv{compound sep} {5em}: espacement entre 2 composés
\item \CFkv{arrow offset} {4pt}: espacement entre un composé et la flèche
diff --git a/macros/generic/chemfig/chemfig.tex b/macros/generic/chemfig/chemfig.tex
index 456b400edb..6c743b24e3 100644
--- a/macros/generic/chemfig/chemfig.tex
+++ b/macros/generic/chemfig/chemfig.tex
@@ -4,9 +4,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
\def\CFname {chemfig} %
-\def\CFver {1.55} %
+\def\CFver {1.56} %
% %
-\def\CFdate {2020/06/15} %
+\def\CFdate {2020/07/13} %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -56,22 +56,18 @@
%-------------------- Vérification des prérequis ---------------------
\def\CF_error#1{\errmessage{Package \CFname\space Error: #1.}}
\def\CF_warning#1{\immediate\write-1{Package \CFname\space Warning: #1^^J}}
-\def\CF_checkprimitive#1#2#3{% Vérifie que #1 est une primitive et sinon, émet le message #2 et exécute #3
+\def\CF_checkprimitive#1#2{% Vérifie que #1 est une primitive et sinon, émet le message #2 et exécute \endinput
\begingroup
\edef\__tempa{\meaning#1}\edef\__tempb{\string#1}\expandafter
\endgroup
\ifx\__tempa\__tempb\else
\CF_error{#2}%
- \def\CF_temp{\CFrestorecatcode#3}%
+ \def\CF_temp{\CFrestorecatcode\endinput}%
\expandafter\CF_temp
\fi
}
-\CF_checkprimitive\eTeXversion
- {You are not using an eTeX engine, \CFname\space cannot work.}
- {\endinput}%
-\CF_checkprimitive\expanded
- {the \string\expanded\space primitive is not provided by your TeX engine, \CFname\space cannot work.}
- {\endinput}%
+\CF_checkprimitive\eTeXversion{You are not using an eTeX engine, \CFname\space cannot work.}
+\CF_checkprimitive\expanded{the \string\expanded\space primitive is not provided by your TeX engine, \CFname\space cannot work.}
%------------------------ Chargement simplekv ------------------------
\input simplekv.tex
@@ -88,6 +84,7 @@
\newcount\CF_cntgroup
\newcount\CF_cntatom
\newcount\CF_cntcycle
+\newcount\CF_cntcyclebonds
\newcount\CF_cntcompound
\newif\ifCF_incycle
@@ -185,7 +182,7 @@
\def\CF_ifinteger#1{%
\begingroup
\afterassignment\CF_afterinteger
- \CF_cntcycle0#1\relax
+ \CF_cntcyclebonds0#1\relax
}
\def\CF_afterinteger#1\relax{%
\endgroup
@@ -434,7 +431,9 @@
arrow head = -CF,
+ sep left = 0.5em,
+ sep right = 0.5em,
- + vshift = 0pt
+ + vshift = 0pt,
+ autoreset cntcycle = true,
+ show cntcycle = false,
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -823,6 +822,9 @@
{\let\CF_clipcramornot\clip}%
\CF_incyclefalse
\CF_cntgroup0
+ \ifboolKV[chemfig]{autoreset cntcycle}
+ {\global\CF_cntcycle0 }
+ {}%
\let\CF_lastaction\CF_zero% 0=début du dessin 1=tracé d'un noeud 2=tracé d'une liaison
\let\CF_startoffset\empty
\let\CF_endoffset\empty
@@ -854,7 +856,7 @@
\ifCF_incycle
\def\CF_defaultangle{0}%
\else
- \ifnum\CF_cntcycle=0 % si c'est le début d'un cycle
+ \ifnum\CF_cntcyclebonds=0 % si c'est le début d'un cycle
\pgfmathsetmacro\CF_defaultangle{\CF_previousangle+180+\CF_cycleanglecorrection}% on met la liaison à +180° + correction
\else
\pgfmathsetmacro\CF_defaultangle{\CF_previousangle-90+180/\CF_cyclenum}% sinon à la bissectrice du sommet du cycle
@@ -884,13 +886,16 @@
\let\CF_currenttikz\CF_defaulttikz
\ifCF_incycle% si on commence un cycle
\let\CF_currentangle\CF_previousangle
+ \pgfmathsetmacro\CF_cyclearcinitangle{\CF_currentangle+\CF_initcycleangle+180/\CF_cyclenum+90}%
+ \pgfmathsetmacro\CF_centeroffset{\CF_currentlength*\CF_atomsep/(2*sin(180/\CF_cyclenum))}%
+ \node[at=(\CF_bondoutnode),shift=(\CF_cyclearcinitangle:\CF_centeroffset pt),anchor=center](cyclecenter\number\CF_cntcycle){};% le centre du cycle
+ \ifboolKV[chemfig]{show cntcycle}
+ {\node[at=(cyclecenter\number\CF_cntcycle),anchor=center,overlay]{\tiny\number\CF_cntcycle};}
+ {}%
\ifCF_cyclearc% on doit tracer l'arc de cercle dans le cycle ?
\pgfmathsetmacro\CF_cyclearcradius{\CF_cycleradiuscoeff*\CF_currentlength*\CF_atomsep/(2*tan(180/\CF_cyclenum))}%
- \pgfmathsetmacro\CF_cyclearcinitangle{\CF_currentangle+\CF_initcycleangle+180/\CF_cyclenum+90}
- \pgfmathparse{\CF_currentlength*\CF_atomsep/(2*sin(180/\CF_cyclenum))}%
- \node[at=(\CF_bondoutnode),shift=(\CF_cyclearcinitangle:\pgfmathresult pt)](arccenter){};% le centre de l'arc
- \node[at=(arccenter),shift=(\CF_cyclearcstartangle:\CF_cyclearcradius pt)](initarc){};% le début de l'arc
- \CF_expafter{\draw[}\CF_cyclearcdirecttikz](initarc) arc (\CF_cyclearcstartangle:\CF_cyclearcendangle:\CF_cyclearcradius pt);
+ \node[at=(cyclecenter\number\CF_cntcycle),shift=(\CF_cyclearcstartangle:\CF_cyclearcradius pt)](initarc){};% le début de l'arc
+ \CF_expafter{\draw[}\CF_cyclearcdirecttikz](initarc) arc (\CF_cyclearcstartangle:\CF_cyclearcendangle:\CF_cyclearcradius pt);%
\fi
\else
\let\CF_currentangle\CF_defaultangle
@@ -934,16 +939,16 @@
\edef\CF_bondoutnode{\CF_bondoutnode}%
\else
\ifCF_incycle
- \advance\CF_cntcycle1
+ \advance\CF_cntcyclebonds1
\fi
\CF_expsecond\CF_analysebond{\CF_molecule}\CF_bondtype
\edef\CF_bondoutnode{\CF_bondoutnode}%
\let\CF_molecule\CF_remainafterbond
\ifCF_incycle
- \ifnum\CF_cntcycle=\CF_cyclenum\relax
+ \ifnum\CF_cntcyclebonds=\CF_cyclenum\relax
\CF_threeea\CF_execfirst
\else
- \ifnum\CF_cntcycle=1
+ \ifnum\CF_cntcyclebonds=1
\let\CF_cyclefirsttikz\CF_currenttikz
\CF_doifnotempty\CF_startoffset{\let\CF_cyclejoinlast\CF_zero}%
\fi
@@ -1006,13 +1011,14 @@
{\expandafter\CF_cycleparsepreamble\CF_molecule\_nil% \begingroup inclus
\CF_cyclearcfalse
}%
- \CF_cntcycle0
+ \CF_cntcyclebonds0
\edef\CF_hookcycle{\CF_bondoutnode}%
\let\CF_hookatomgroup\CF_previousatomgroup
\CF_ifzerodim\CF_hookatomgroup
{\def\CF_cyclejoinlast{1}}% joindre le dernier
{\def\CF_cyclejoinlast{0}}%
\CF_incycletrue
+ \global\advance\CF_cntcycle1
\ifnum\CF_lastaction=3
\pgfmathsetmacro\CF_initcycleangle{360/\CF_lastcyclenum-180}% c'est un cycle dans un cycle
\else
@@ -1234,12 +1240,12 @@
\def\CF_drawaxisbondnojoin#1#2{\CF_drawbonda(#1@@)--(#2@@);}
\def\CF_drawaxisbondjoin#1#2{% dessine une liaison simple dans l'axe avec raccord rétrograde
- \ifCF_incycle\ifnum\CF_cntcycle=\CF_cyclenum\relax
+ \ifCF_incycle\ifnum\CF_cntcyclebonds=\CF_cyclenum\relax
\let\CF_nexttikz\CF_cyclefirsttikz
\fi\fi
\ifnum\CF_joinbond=0
\ifCF_incycle
- \ifnum\CF_cntcycle=\CF_cyclenum\relax
+ \ifnum\CF_cntcyclebonds=\CF_cyclenum\relax
\ifnum\CF_cyclejoinlast=1
\CF_drawbonda(#1@@)--(#2@@)--%
([shift=(\CF_previousbondangle+2*\CF_cycleincrementangle:.5\pgflinewidth)]#2@@);
@@ -1262,7 +1268,7 @@
}
{\ifdim\CF_startoffset=0pt
\ifCF_incycle
- \ifnum\CF_cntcycle=\CF_cyclenum\relax
+ \ifnum\CF_cntcyclebonds=\CF_cyclenum\relax
\ifnum\CF_cyclejoinlast=1
\CF_ifx\CF_cyclefirsttikz\CF_currenttikz
{\CF_drawbonda([shift=(\CF_previousbondangle:-.5\pgflinewidth)]#1@@)--(#1@@)--(#2@@)--%
@@ -1287,7 +1293,7 @@
{\CF_drawbonda(#1@@)--(#2@@);}%
}
{\ifCF_incycle
- \ifnum\CF_cntcycle=\CF_cyclenum\relax
+ \ifnum\CF_cntcyclebonds=\CF_cyclenum\relax
\ifnum\CF_cyclejoinlast=1
\CF_ifx\CF_nexttikz\CF_currenttikz
{\CF_drawbonda(#1@@)--(#2@@)--([shift=(\CF_previousbondangle+2*\CF_cycleincrementangle:.5\pgflinewidth)]#2@@);}%
@@ -3086,4 +3092,8 @@ v1.54 2020/05/21
v1.55 2020/06/15
- chemfig est incompatible avec conTeXt, vu que ce moteur redéfinit
des primitives telles que \expanded, \unexpanded et peut être
- d'autres. \ No newline at end of file
+ d'autres.
+----------------------------------------------------------------------
+v1.56 2020/07/13
+ - le centre des cycles est désormais accessible via un noeud
+ spécifique pour chacun d'eux. \ No newline at end of file
diff --git a/macros/latex/contrib/artthreads/README.md b/macros/latex/contrib/artthreads/README.md
index d3cb0470cd..1d8f1249fa 100644
--- a/macros/latex/contrib/artthreads/README.md
+++ b/macros/latex/contrib/artthreads/README.md
@@ -1,21 +1,23 @@
The artthreads Package
Author: D. P. Story
-Version: v1.1
-Dated: 2016/04/09
+Version: v1.3.1
+Dated: 2020-07-09
Through the commands of the artthreads package, create PDF article threads,
a concept/feature of Adobe Reader/Acrobat that has been around since the
product's beginning. The use of article threads typically only makes sense in
-a document in which the text is in a multi-column format.
+a document in which the text is in a multi-column format or in narrow columns.
Set the article threads after the composition of the document is completed.
The method of setting the threads is very visual not automatic as in the
threadcol package of Scott Patkin (available for pdftex only).
-The artthreads package supports all drivers: dvips, pdflatex (which includes
-lualatex), dvipdfm, dvipdfmx, and xelatex.
+The artthreads package supports all drivers: dvips, pdflatex,
+lualatex, xelatex, dvipdfm, and dvipdfmx.
-Unpack the distribution by latexing artthreads.ins.
+What's New v1.3.1 (2020-07-09) Fixed some issues with lualatex.
+Additonal built-in push buttons and link actions to direct the
+reader to a particular thread.
Enjoy.
diff --git a/macros/latex/contrib/artthreads/artthreads.dtx b/macros/latex/contrib/artthreads/artthreads.dtx
index 3eda077151..ad68e80464 100644
--- a/macros/latex/contrib/artthreads/artthreads.dtx
+++ b/macros/latex/contrib/artthreads/artthreads.dtx
@@ -1,8 +1,8 @@
%\iffalse
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% artthreads.sty package, 2016-04-09 %%
-%% Copyright (C) 2016 D. P. Story %%
+%% artthreads.sty package, %%
+%% Copyright (C) 2016 -- 2020 %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -14,20 +14,29 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{artthreads}
-%<package> [2016/04/09 v1.1 Support for article threads (dps)]
+%<package> [2020/07/09 v1.3.1 Support for article threads (dps)]
%<*driver>
\documentclass{ltxdoc}
-\usepackage[colorlinks,hyperindex]{hyperref}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
\usepackage{fancyvrb,array,calc}
%\pdfstringdefDisableCommands{\let\\\textbackslash}
-%\EnableCrossrefs \CodelineIndex
+\EnableCrossrefs
+\CodelineIndex
\RecordChanges
\bgroup\ttfamily
\gdef\brpr#1{\char123\relax#1\char125\relax}\egroup
+\let\darg\brpr
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\pkg\textsf
+\let\tops\texorpdfstring
+\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
\def\ameta#1{\ensuremath{\langle\textsl{\texttt{#1}}\rangle}}
\def\meta#1{\textsl{\texttt{#1}}}
\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
\def\cs#1{\texttt{\bslash#1}}
+\def\EXCL{!}
\DeclareRobustCommand{\tmspace}[3]{%
\ifmmode\mskip#1#2\else\kern#1#3\fi\relax}
\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
@@ -47,10 +56,13 @@
\renewenvironment{quote}[1][]
{\def\@rgi{#1}\ifx\@rgi\@empty
\let\rghtm\@empty\else\def\rghtm{\rightmargin\leftmargin}\fi
- \list{}{\rghtm} %{\rightmargin\leftmargin}%
+ \list{}{\rghtm}%{\rightmargin\leftmargin}%
\item\relax}
{\endlist}
\makeatother
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{artthreads}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{artthreads}{aebdocfmt.def cannot be found}}
\begin{document}
\def\CMD#1{\textbackslash#1}
\GetFileInfo{artthreads.sty}
@@ -60,28 +72,27 @@
\date{processed \today}
\maketitle
\tableofcontents
- \let\Email\texttt
- \renewenvironment{theglossary}{%
- \let\efill\relax
- \begin{itemize}}{\end{itemize}}
- \value{GlossaryColumns}=1
\DocInput{artthreads.dtx}
- \PrintIndex
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index}
+ The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o artthreads.ind artthreads.idx} on the command line
+ and recompile \texttt{artthreads.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of
+ changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o artthreads.gls artthreads.glo} on the command line
+ and recompile \texttt{artthreads.dtx}.}
\end{document}
%</driver>
% \fi
-% \MakeShortVerb{|}
-% \StopEventually{}
%
-% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
-% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
-% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
-% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
-% \DoNotIndex{\space,\@empty,\special}
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{artthreads}{Inputting aebdonotindex.def}}
+% {\PackageInfo{artthreads}{aebdonotindex.def cannot be found}}
%
% \begin{macrocode}
%<*package>
% \end{macrocode}
+% \changes{v1.2}{2016/05/02}{Modified documentation to reflect new \string\textsf{DC} thread icons.}
%
% \section{Introduction}
% This package is used to create \textit{article threads} around blocks of content. Generally,
@@ -96,80 +107,102 @@
% \section{Options and Required Packages}
% \begin{macrocode}
\RequirePackage{xkeyval}
-\RequirePackage{ifpdf}[2006/02/20]
-\RequirePackage{ifxetex}[2006/08/21]
-\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse
-\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi
-% \end{macrocode}
-% \paragraph*{Driver options.} Three options, \DescribeMacro{dvips,dvipsone}\texttt{dvips} (the default)
-% and \texttt{dvipsone}, both of which require \textbf{Adobe Distiller}
-% as the PDF creator; the \DescribeMacro{pdftex}\texttt{pdftex} allows for the same functionality
-% for the \textsf{pdflatex} executable. We also support \DescribeMacro{xetex,dvipdfm,dvipdfmx}\texttt{dvipdfm}
-% and its extensions.
+% \end{macrocode}
+% \paragraph*{Driver options.} These options are \opt{dvips} (the default),
+% \opt{pdftex}, \opt{luatex}, and \opt{xetex}
+% are automatically detected, other drivers supported are \opt{dvipdfm} and
+% \opt{dvipdfmx}.
%
-% \paragraph*{Preview options.} The \DescribeMacro{preview}\texttt{preview}
+% \paragraph*{Preview options.} The \texttt{preview}
% option is a carry over from \textsf{eforms}. When selected, all form fields are outlined; useful when
% setting the location of fields in a dvi previewer. The other option is \texttt{viewMagWin}
-% \DescribeMacro{viewMagWin} will show the viewing windows surrounding the target. This is the rectangle
+% will show the viewing windows surrounding the target. This is the rectangle
% that will be jumped to. Use this option to adjust the size of the window to your needs.
% When either of the last two options has an exclamation point prior, that means to
% turn off the switch. You can conveniently use \texttt{viewMagWin} to see the viewing window,
-% then change it to \DescribeMacro{!viewMagWin}\texttt{!viewMagWin} to remove the visible window. Cool.
-% Similarly, you can turn off \texttt{preview} using \DescribeMacro{!preview}\texttt{!preview}.
+% then change it to \texttt{!viewMagWin} to remove the visible window. Cool.
+% Similarly, you can turn off \texttt{preview} using \texttt{!preview}.
% \begin{macrocode}
% \end{macrocode}
-% All options are passed to the \textsf{fitr} package, which contains a lot of the code
+% \leavevmode\IndexOpt{pdftex}^^A
+% \IndexOpt{luatex}^^A
+% All options are passed to the \pkg{fitr} package, which contains a lot of the code
% used in this package.
% \begin{macrocode}
\DeclareOptionX{pdftex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{luatex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
% \end{macrocode}
+% \leavevmode\IndexOpt{dvips}^^A
+% \IndexOpt{dvipsone}^^A
% Distiller based drivers.
% \begin{macrocode}
\DeclareOptionX{dvips}{\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{dvipsone}{\PassOptionsToPackage{\CurrentOption}{fitr}}
% \end{macrocode}
-% \textsf{dvipdfm} and its variants.
+% \leavevmode\IndexOpt{xetex}^^A
+% \IndexOpt{dvipdfm}^^A
+% \IndexOpt{dvipdfmx}^^A
+% \opt{xetex} and its variants.
% \begin{macrocode}
\DeclareOptionX{dvipdfm}{\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{dvipdfmx}{\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{xetex}{\PassOptionsToPackage{\CurrentOption}{fitr}}
% \end{macrocode}
+% \leavevmode\IndexOpt{preview}^^A
+% \IndexOpt[\protect\EXCL]{!preview}^^A
+% \IndexOpt{viewMagWin}^^A
+% \IndexOpt[\protect\EXCL]{!viewMagWin}^^A
+% Preview preferences
% \begin{macrocode}
-\DeclareOptionX{preview}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{!preview}{\PassOptionsToPackage{\CurrentOption}{fitr}}
-\DeclareOptionX{viewMagWin}{\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{preview}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{!preview}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+\DeclareOptionX{viewMagWin}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
\DeclareOptionX{!viewMagWin}
- {\PassOptionsToPackage{\CurrentOption}{fitr}}
+ {\PassOptionsToPackage{\CurrentOption}{fitr}}
+% \end{macrocode}
+% Any other options are passed on to \pkg{fitr}. One useful
+% option is \opt{gonative}, which creates no document JavaScript.
+% Consequently, the \texttt{latex\,->\,dvips\,->\,ps2pdf} workflow
+% is supported.
+% \begin{macrocode}
+\DeclareOptionX*{\PassOptionsToPackage{\CurrentOption}{fitr}}
\ProcessOptionsX
% \end{macrocode}
% \section{The Main Code}
% We require the package \textsf{fitr}, as we use many commands from that package.
% We pass all options to \textsf{fitr}.
+% \changes{v1.3.1}{2020/07/09}{Require \string\pkg{fitr} package, dated 2020/07/09}
% \begin{macrocode}
-\RequirePackage{fitr}[2016/04/04]
+\RequirePackage{fitr}[2020/07/09]
% \end{macrocode}
% Some scratch counters, lengths, boxes.
% \begin{macrocode}
\newif\ifnewarticle
-\newcounter{artthrdcnt}
+\newcounter{@rtBtnCnt}
\def\CntArt{0}\def\CntArtInfo{0}
\def\inc@CntMacro#1{{\@tempcnta#1\relax\advance\@tempcnta1\relax
\xdef#1{\the\@tempcnta}}}
\def\artM@rk{[\space}
% \end{macrocode}
-% \paragraph*{Key-values for \cs{setThreadInfo}} We set up
-% key-values\DescribeMacro{title}\DescribeMacro{author}\DescribeMacro{subject}^^A
-% \DescribeMacro{keywords} for the thread \textsf{Info} dictionary. Only the title
-% is required, that's why a default value of \texttt{thread-<num>} is otherwise provided.
+% \subsection{\tops{\protect\cs{setThreadInfo}}{\textbackslash{setThreadInfo}} and its KV-pairs}
+% We set up
+% key-values\IndexKey{title}\IndexKey{author}\IndexKey{subject}^^A
+% \IndexKey{keywords} for the thread \textsf{Info} dictionary. Only the title
+% is required, that's why a default value of \texttt{thread-\ameta{num}} is otherwise provided.
+% For \app{pdflatex} and \app{lualtex}, only \texttt{title} is supported.
% \begin{macrocode}
-\define@key{artthrd}{title}[]{\def\threadTitle{#1}}
- \let\threadTitle\@empty
-\define@key{artthrd}{author}[]{\def\threadAuthor{#1}}
- \let\threadAuthor\@empty
-\define@key{artthrd}{keywords}[]{\def\threadKeywords{#1}}
- \let\threadKeywords\@empty
-\define@key{artthrd}{subject}[]{\def\threadSubject{#1}}
- \let\threadSubject\@empty
+\define@key{artthrd}{title}[]{\Hy@unicodefalse
+ \pdfstringdef\threadTitle{#1}}
+ \let\threadTitle\@empty
+\define@key{artthrd}{author}[]{\pdfstringdef\threadAuthor{#1}}
+ \let\threadAuthor\@empty
+\define@key{artthrd}{keywords}[]{\pdfstringdef\threadKeywords{#1}}
+ \let\threadKeywords\@empty
+\define@key{artthrd}{subject}[]{\pdfstringdef\threadSubject{#1}}
+ \let\threadSubject\@empty
% \end{macrocode}
% Use \DescribeMacro{\setThreadInfo}\cmd{\setThreadInfo} prior to the opening of a
% new thread using \cs{cArticle}. Through its key-values, set the title, author,
@@ -179,16 +212,15 @@
\let\threadTitle\@empty\let\threadAuthor\@empty
\let\threadKeywords\@empty\let\threadSubject\@empty
\setkeys{artthrd}{#1}\ifx\threadTitle\@empty
- \def\threadTitle{thread-\CntArtInfo}\fi
-}
+ \def\threadTitle{thread-\CntArtInfo}\fi}
\def\bArtErrMsg{When starting a new article thread
- (\string\cArticle)\MessageBreak
+ (\string\bArticle)\MessageBreak
first use \string\setThreadInfo\space to set the title,\MessageBreak
author, subject, and keywords}
% \end{macrocode}
% \paragraph*{Additional key-values for threads} In addition to the key-values provided
% by \textsf{fitr}, we provide a few more. The two keys
-% \DescribeMacro{addtow}\texttt{addtow} and \DescribeMacro{addtoh}\texttt{addtoh}
+% \IndexKey{addtow}\texttt{addtow} and \IndexKey{addtoh}\texttt{addtoh}
% adds to the reading border of the threads. These are set through the
% command \DescribeMacro{\setAddToBorder}\cs{setAddToBorder}. For the most part,
% choices for \texttt{addtow} (add to the width) and \texttt{addtoh} (add to the height)
@@ -202,20 +234,20 @@
\def\artthrd@@addtoh{0}
\newcommand{\setAddToBorder}[1]{\setkeys{@rtthrd}{#1}}
% \end{macrocode}
+% \subsection{The \tops{\protect\cs{bArticle} and \protect\cs{cArticle}}{\textbackslash{bArticle} and \textbackslash{cArticle}} commands}
% The \DescribeMacro{\bArticle}\cmd{\bArticle} is used to start an article thread. The thread
% may continue with \cs{cArticle}. Both commands have a required argument, consisting of
% key-values defined by \textsf{fitr}.
% The following is the syntax, with appropriate keys defined in \texttt{fitr}.
-% \begin{quote}\ttfamily
-% \string\cArticle\char123lift=\ameta{length},width=\ameta{length},height=\ameta{length}\char125
-% \end{quote}
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\cArticle{lift=!ameta(length),width=!ameta(length),height=!ameta(length)}
+%\end{Verbatim}
% \begin{macrocode}
\newcommand{\bArticle}{\begingroup\inc@CntMacro\CntArt
\ifnum\CntArt=\CntArtInfo\relax\else
\PackageError{artthreads}{\bArtErrMsg}{See package documentation
for \string\setThreadInfo}\fi
- \newarticletrue\set@rectart
-}
+ \newarticletrue\set@rectart}
% \end{macrocode}
% The only difference between \DescribeMacro{\cArticle}\cmd{\cArticle} and
% \cmd{\bArticle} is the stepping of the counter \cmd{\CntArt}
@@ -225,164 +257,275 @@
% \end{macrocode}
% \cmd{\set@rectart} continues \cs{bArticle}/\cs{cArticle}.
% \begin{macrocode}
-\newcommand{\set@rectart}[1]{\def\fitr@artrect@argi{#1}%
+\newcommand{\set@rectart}[1]{%\def\fitr@artrect@argi{#1}% dps
\edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
\set@@rectart}
% \end{macrocode}
% \cmd{\set@@rectart} is the main command for building the thread.
% \begin{macrocode}
\def\set@@rectart{\def\fitr@setBL{0pt}%
- \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
- {\let\fitr@FLB@ction\ef@Bbox}%
- \get@fitr@dimen{%
- \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
- {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
- }%
- \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
- \raisebox{\fitr@@lift-\fitr@setBL}{%
+ \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
+ {\let\fitr@FLB@ction\ef@Bbox}%
+ \get@fitr@dimen{%
+ \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
+ {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
+ }%
+ \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
+ \raisebox{\fitr@@lift-\fitr@setBL}{%
% \end{macrocode}
% Actually insert the thread code here by inserting \cs{setThre@d}.
% \begin{macrocode}
- \setThre@d{\artthrd@@addtow}{\artthrd@@addtoh}%
- \unhbox\fitr@bbox
- \fitr@urxury@fixup{\artthrd@@addtow}{\artthrd@@addtoh}{}%
- }}}\setlength{\fboxsep}{0pt}%
+ \setThre@d{\artthrd@@addtow}{\artthrd@@addtoh}%
+ \unhbox\fitr@bbox
+ \fitr@urxury@fixup{\artthrd@@addtow}{\artthrd@@addtoh}{}%
+ }}}\setlength{\fboxsep}{0pt}%
% \end{macrocode}
% Now place an extended border around the viewing area
% \begin{macrocode}
- \ifviewMagWin
- \fitr@length=\artthrd@@addtow bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@width}%
- \edef\fitr@@width{\the\fitr@length}%
- \fitr@length=\artthrd@@addtoh bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@height}%
- \edef\fitr@@height{\the\fitr@length}%
- \setlength\fitr@length{-\artthrd@@addtow bp}%
- \addtolength\fitr@length{\fitr@@shift}%
- \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
- \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
- \if\fitr@@refPt b%
- \addtolength\fitr@length{-\artthrd@@addtoh bp}\else
- \if\fitr@@refPt t%
- \addtolength\fitr@length{\artthrd@@addtoh bp}%
- \fi\fi
- \raisebox{\fitr@length}%
- {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
- {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
- }%
- \fi
+ \ifviewMagWin
+ \fitr@length=\artthrd@@addtow bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@width}%
+ \edef\fitr@@width{\the\fitr@length}%
+ \fitr@length=\artthrd@@addtoh bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@height}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \setlength\fitr@length{-\artthrd@@addtow bp}%
+ \addtolength\fitr@length{\fitr@@shift}%
+ \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
+ \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
+ \if\fitr@@refPt b%
+ \addtolength\fitr@length{-\artthrd@@addtoh bp}\else
+ \if\fitr@@refPt t%
+ \addtolength\fitr@length{\artthrd@@addtoh bp}%
+ \fi\fi
+ \raisebox{\fitr@length}%
+ {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
+ {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
+ }%
+ \fi
\endgroup}
% \end{macrocode}
-% \paragraph*{Driver dependent macros} The \cs{ThrBbox} macros perform different tasks
-% depending on the driver.
+% \subsection{The driver dependent commands}
+% We begin with a required definition to enable \app{lualatex} to function correctly.
+% \begin{macrocode}
+\ifluatex\protected\def\pdfthread{\pdfextension thread }\fi
+% \end{macrocode}
+% \DescribeMacro\AT@ThrBbox\nmpsep{\darg{\ameta{add-wd}\darg{\ameta{add-ht}}}} The definition
+% of \cmd{\set@rtThrd} depends on the driver. The arguments are dimensionless numbers, representing
+% Adobe points. The \cs{AT@ThrBbox} macros perform different tasks, one of which is to calculate the dimensions
+% of the bounding box for the viewing rectangle. It is used in \cs{set@rtThrd}, defined below.
+% \changes{v1.3}{2020/07/03}{Add special definition for threads in the case of lualatex}
+% \changes{v1.3}{2020/07/03}{Added \string\cs{Thread}}
% \begin{macrocode}
\if@fitr@dvipdfm
% \end{macrocode}
-% For the \textsf{dvipdfm} and friends
+% For the \app{xelatex} and friends
% \begin{macrocode}
-\def\ThrBbox#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@xetex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@xetex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@xetex@view@depth{\the\fitr@length}%
-}\else\ifx\fitr@driver\fitr@pdftex@driver
-% \end{macrocode}
-% For the \textsf{pdftex} and friends
-% \begin{macrocode}
-\def\ThrBbox#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@pdftex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@pdftex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@pdftex@view@depth{\the\fitr@length}%
-}\else\ifx\fitr@driver\fitr@dvipsone@driver
-% \end{macrocode}
-% For the \textsf{dvipsone} driver
-% \begin{macrocode}
-\def\ThrBbox#1#2{%
- currentpoint 2 copy %
- \the\fitr@depth\space add #2\space PDFtoTeX add % y1
- exch #1\space PDFtoTeX sub exch % x1
- 4 2 roll exch
- \the\fitr@width\space add #1\space PDFtoTeX add exch % x2
- \the\fitr@height\space sub #2\space PDFtoTeX sub} % y2
-\else\ifx\fitr@driver\fitr@dvips@driver
-% \end{macrocode}
-% For the \textsf{dvips} driver
-% \begin{macrocode}
-\def\ThrBbox#1#2{% Uses \fitr@bbox
- currentpoint 2 copy %
- \the\fitr@depth\space SPtoDvips add
- #2\space BPToDvips add % y1
- exch #1\space BPToDvips sub exch % x1
- 4 2 roll exch
- \the\fitr@width\space SPtoDvips add
- #1\space BPToDvips add exch % x2
- \the\fitr@height \space SPtoDvips sub
- #2\space BPToDvips sub} % y2
+\def\AT@ThrBbox#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@xetex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@xetex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@xetex@view@depth{\the\fitr@length}%
+}\else
+\ifpdf
+% \end{macrocode}
+% For the \app{pdftex} and friends
+% \changes{v1.3}{2020/07/03}{Use \string\cs{ifpdf}}
+% \begin{macrocode}
+\def\AT@ThrBbox#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@pdftex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@pdftex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@pdftex@view@depth{\the\fitr@length}%
+}\else
+\ifx\fitr@driver\fitr@dvipsone@driver
+% \end{macrocode}
+% For the \app{dvipsone} driver
+% \begin{macrocode}
+\def\AT@ThrBbox#1#2{%
+ currentpoint 2 copy %
+ \the\fitr@depth\space add #2\space PDFtoTeX add % y1
+ exch #1\space PDFtoTeX sub exch % x1
+ 4 2 roll exch
+ \the\fitr@width\space add #1\space PDFtoTeX add exch % x2
+ \the\fitr@height\space sub #2\space PDFtoTeX sub} % y2
+\else
+\ifx\fitr@driver\fitr@dvips@driver
+% \end{macrocode}
+% For the \app{dvips} driver
+% \begin{macrocode}
+\def\AT@ThrBbox#1#2{% Uses \fitr@bbox
+ currentpoint 2 copy %
+ \the\fitr@depth\space SPtoDvips add
+ #2\space BPToDvips add % y1
+ exch #1\space BPToDvips sub exch % x1
+ 4 2 roll exch
+ \the\fitr@width\space SPtoDvips add
+ #1\space BPToDvips add exch % x2
+ \the\fitr@height \space SPtoDvips sub
+ #2\space BPToDvips sub} % y2
\fi\fi\fi\fi
% \end{macrocode}
% \paragraph*{Code to set the thread} The \cs{setThre@d} macros are driver dependent.
+% \medskip\par\noindent
+% \DescribeMacro\setThre@d\nmpsep{\darg{\ameta{add-wd}\darg{\ameta{add-ht}}}} This macro
+% strips out the dimensions of its arguments (10bp becomes 10) and passes these new arguments
+% to \cmd{\set@rtThrd}.
% \begin{macrocode}
\def\setThre@d#1#2{%
- \fitr@defaultbp{\aWd}{#1}\fitr@defaultbp{\aHt}{#2}%
- \edef\tmp@exp{\noexpand\set@rtThrd{\aWd}{\aHt}}\tmp@exp
-}
+ \fitr@defaultbp{\aWd}{#1}\fitr@defaultbp{\aHt}{#2}%
+ \edef\tmp@exp{\noexpand\set@rtThrd{\aWd}{\aHt}}\tmp@exp}
\if@fitr@dvipdfm
% \end{macrocode}
-% For the \textsf{dvipdfm} and friends
-% \begin{macrocode}
-\def\set@rtThrd#1#2{\ThrBbox{#1}{#2}%
- \smash{\raisebox{-\fitr@xetex@view@height+#2bp}%
- {\makebox[0pt][l]{\hspace*{-#1bp}%
- \@pdfm@mark{thread @artthrd\CntArt\space
- width \fitr@xetex@view@width\space
- height \fitr@xetex@view@height\space
- depth \fitr@xetex@view@depth\space
- << /Title (\threadTitle)
-\ifnewarticle
- /Author (\threadAuthor)
- /Subject (\threadSubject)
- /Keywords (\threadKeywords)
-\fi >>}}}}}\else\ifx\fitr@driver\fitr@pdftex@driver
+% \DescribeMacro\set@rtThrd\nmpsep{\darg{\ameta{add-wd}\darg{\ameta{add-ht}}}} The definition
+% of \cmd{\set@rtThrd} depends on the driver. The arguments are dimensionless numbers, representing
+% Adobe points.\medskip\par\noindent
+% For the \textsf{xelatex} and friends
+% \begin{macrocode}
+\def\set@rtThrd#1#2{\AT@ThrBbox{#1}{#2}%
+ \smash{\raisebox{-\fitr@xetex@view@height+#2bp}%
+ {\makebox[0pt][l]{\hspace*{-#1bp}%
+ \@pdfm@mark{thread @artthrd\CntArt\space
+ width \fitr@xetex@view@width\space
+ height \fitr@xetex@view@height\space
+ depth \fitr@xetex@view@depth\space
+ << /Title (\threadTitle)
+ \ifnewarticle
+ /Author (\threadAuthor)
+ /Subject (\threadSubject)
+ /Keywords (\threadKeywords)\fi >>}}}}}\else
+\ifpdf
% \end{macrocode}
-% \textsf{pdftex} and friends
+% For \app{pdftex} and friends
+% \changes{v1.3}{2020/07/03}{Use \string\cs{ifpdf}}
% \begin{macrocode}
-\def\set@rtThrd#1#2{\ThrBbox{#1}{#2}%
- \makebox[0pt][l]{\hspace*{-#1bp}%
- \pdfthread
- width \fitr@pdftex@view@width\space
- height \fitr@pdftex@view@height\space
- depth \fitr@pdftex@view@depth\space
- name {\threadTitle}}}\else
+\def\set@rtThrd#1#2{\AT@ThrBbox{#1}{#2}%
+ \makebox[0pt][l]{\hspace*{-#1bp}%
+ \pdfthread
+ width \fitr@pdftex@view@width\space
+ height \fitr@pdftex@view@height\space
+ depth \fitr@pdftex@view@depth\space
+ name {\threadTitle}}}\else
% \end{macrocode}
-% For drivers that use PostScript and the \textbf{pdfmark}.
-% \changes{v1.1}{2016/04/09}{Removed the Page key and dependence on the refcount package}
+% For drivers that use PostScript and the \textsf{\textbf{pdfmark}}.
+% \changes{v1.1}{2016/04/09}{Removed the Page key and dependence on the
+% \string\textsf{refcount} package}
% \begin{macrocode}
\def\set@rtThrd#1#2{\literalps@out{\artM@rk
- /Rect [\ThrBbox{\artthrd@@addtow}{\artthrd@@addtoh}]
- /Title (\threadTitle)
-\ifnewarticle
+ /Rect [\AT@ThrBbox{\artthrd@@addtow}{\artthrd@@addtoh}]
+ /Title (\threadTitle)
+ \ifnewarticle
/Author (\threadAuthor)
/Subject (\threadSubject)
- /Keywords (\threadKeywords)
-\fi
+ /Keywords (\threadKeywords)\fi
/ARTICLE pdfmark}}
\fi\fi
% \end{macrocode}
+% \subsection{Some navigation commands}
+% \begin{macrocode}
+\let\threadTitle\@empty
+% \end{macrocode}
+% \DescribeMacro{\Thread}\nmpsep{\darg{\ameta{thread-title}}} The action to start
+% read a thread whose title is \ameta{thread-title}. For example,
+% |\setLink[\A{\Thread{Lipsum}}]{Read Lipsum}| \medskip
+% \begin{macrocode}
+\providecommand{\Thread}[1]{/S/Thread/D(#1)}
+% \end{macrocode}
+% \DescribeMacro\shArticlesPaneActn\DescribeMacro\sArticlesPaneActn Actions for show/hid
+% articles pane and to just show articles pane (The named action \texttt{ArticleThreads} is
+% undocumented, don't remember show I got this name.) In addition to these two, we combine
+% them with read thread actions: \DescribeMacro\shArticlesPaneReadActn\DescribeMacro\sArticlesPaneReadActn
+% \begin{macrocode}
+\def\shArticlesPaneActn{\Named{ShowHideArticles}}
+\def\sArticlesPaneActn{\Named{ArticleThreads}}
+\def\shArticlesPaneReadActn{\shArticlesPaneActn
+ \Next{\Thread{\threadTitle}}}
+\def\sArticlesPaneReadActn{\sArticlesPaneActn
+ \Next{\Thread{\threadTitle}}}
+% \end{macrocode}
+% \DescribeMacro\readArticle\nmpsep{\darg{\ameta{thread-title}}} is a macro intended
+% to be passed to a push button action through the \cs{cmd} key. For example,\medskip
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\showArticlePaneRead[!textbf(\cmd{\readArticle{more Lipsum}})]{}{11bp}
+%\end{Verbatim}
+%It should be used with \cs{toggleArticlePaneRead} and \cs{showArticlePaneRead} (push buttons). Alternatively,
+%these actions can be done through a link:
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\setLink[\cmd{\readArticle{Lipsum}}
+%\A{\shArticlesPaneReadActn}]{Lipsum}
+%\end{Verbatim}
+% \begin{macrocode}
+\def\readArticle#1{\Hy@unicodefalse
+ \pdfstringdef\AT@x{#1}\edef\threadTitle{\AT@x}}
+\def\chkThreadName{%
+ \ifx\threadTitle\@empty
+ \global\let\isThrTtl\ef@NO
+ \def\readArtPresets{\cmd{\let\Next\@gobble}}\else
+ \global\let\isThrTtl\ef@YES
+ \let\readArtPresets\@empty
+ \fi
+}
+\def\readThreadMsg{\ifx\isThrTtl\ef@NO
+ \PackageWarning{artthreads}{No thread title specified to read}\fi}
+% \end{macrocode}
+% \DescribeMacro\toggleArticlePane\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button whose action toggles the Articles pane open and closed.
+% \begin{macrocode}
+\newcommand{\toggleArticlePane}[3][]{\stepcounter{@rtBtnCnt}%
+ \pushButton[\CA{Article}\TU{Toggle Articles Pane}#1
+ \A{\shArticlesPaneActn}
+]{TAPBtn\the@rtBtnCnt}{#2}{#3}}
+% \end{macrocode}
+% \DescribeMacro\toggleArticlePaneRead\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button whose action us to toggle the Articles pane state (show/hide) and to begin reading the
+% thread titled \cs{threadTitle}. If this command is placed after the \cs{setThreadInfo}
+% command, then \cs{threadTitle} is the title set by the title key of \cs{setThreadInfo}.
+% \begin{macrocode}
+\def\tooltipTogglePaneRead#1{\def\ttToggleP@neRead{#1}}
+\tooltipTogglePaneRead{Toggle Articles pane and read
+ the article \threadTitle}
+\newcommand{\toggleArticlePaneRead}[3][]{\begingroup
+ \stepcounter{@rtBtnCnt}\pushButton[\CA{Article}#1
+ \TU{\ttToggleP@neRead}\cmd{\chkThreadName}
+ \presets{\readArtPresets}\A{\shArticlesPaneReadActn}
+]{TAPRBtn\the@rtBtnCnt}{#2}{#3}\readThreadMsg\endgroup}
+% \end{macrocode}
+% \DescribeMacro\showArticlePane\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}} A push button
+% whose action is to show the Articles pane.
+% \begin{macrocode}
+\newcommand{\showArticlePane}[3][]{\stepcounter{@rtBtnCnt}%
+ \pushButton[\CA{Article}\TU{Show Articles Pane}#1
+ \A{\sArticlesPaneActn}
+]{SAPBtn\the@rtBtnCnt}{#2}{#3}}
+% \end{macrocode}
+% \DescribeMacro\showArticlePaneRead\nmpsep{[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}
+% A push button whose action is to show the Articles and to begin reading the
+% thread titled \cs{threadTitle}. If this command is placed after the \cs{setThreadInfo}
+% command, then \cs{threadTitle} is the title set by the title key of \cs{setThreadInfo}.
+% \begin{macrocode}
+\def\tooltipShowPaneRead#1{\def\ttShowP@neRead{#1}}
+\tooltipShowPaneRead{Show Articles pane and read
+ the article \threadTitle}
+\newcommand{\showArticlePaneRead}[3][]{\begingroup
+ \stepcounter{@rtBtnCnt}\pushButton[\CA{Article}#1
+ \TU{\ttShowP@neRead}\cmd{\chkThreadName}
+ \presets{\readArtPresets}\A{\sArticlesPaneReadActn}
+]{SAPRBtn\the@rtBtnCnt}{#2}{#3}\readThreadMsg\endgroup}
+% \end{macrocode}
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/macros/latex/contrib/artthreads/docs/artthreads.pdf b/macros/latex/contrib/artthreads/docs/artthreads.pdf
new file mode 100644
index 0000000000..23158680b4
--- /dev/null
+++ b/macros/latex/contrib/artthreads/docs/artthreads.pdf
Binary files differ
diff --git a/macros/latex/contrib/artthreads/docs/artthreads_man.pdf b/macros/latex/contrib/artthreads/docs/artthreads_man.pdf
index 5420d548a7..3d5dbdea64 100644
--- a/macros/latex/contrib/artthreads/docs/artthreads_man.pdf
+++ b/macros/latex/contrib/artthreads/docs/artthreads_man.pdf
Binary files differ
diff --git a/macros/latex/contrib/artthreads/docs/artthreads_man.tex b/macros/latex/contrib/artthreads/docs/artthreads_man.tex
index 93967ebf06..a8d7ff659b 100644
--- a/macros/latex/contrib/artthreads/docs/artthreads_man.tex
+++ b/macros/latex/contrib/artthreads/docs/artthreads_man.tex
@@ -10,10 +10,12 @@
%\usepackage{calibri}
\usepackage[altbullet]{lucidbry}
-\usepackage[dvipsone,!viewMagWin,!preview]{artthreads}
+\usepackage[!viewMagWin,!preview]{artthreads}
\usepackage{lipsum,multicol}
\raggedcolumns
+%\previewOn\pmpvOn
+
\makeatletter
\renewenvironment{quote}[1][]
{\def\@rgi{#1}\ifx\@rgi\@empty
@@ -27,15 +29,16 @@
%\usepackage{makeidx}
%\makeindex
\usepackage{acroman}
+\usepackage[active]{srcltx}
+\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{\raisebox{#1}{\parbox{\marginparwidth}{\slshape\raggedleft\small#2}}}}
+\addtolength{\marginparwidth}{1in}
-\usepackage[active]{srcltx}
+\let\uif\textsf
-\urlstyle{tt}
+\leftmargini\amtIndent\relax
-%\def\tutpath{doc/tutorial}
-%\def\tutpathi{tutorial}
-%\def\expath{../examples}
+\urlstyle{tt}
\DeclareDocInfo
{
@@ -46,7 +49,7 @@
email={dpstory@acrotex.net},
subject=Documentation for artthreads package,
talksite={\url{www.acrotex.net}},
- version={1.0},
+ version={1.3.1, 2020/07/09},
Keywords={LaTeX, article threads, multi-column documents, AcroTeX},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, D. P. Story},
@@ -63,31 +66,101 @@
\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
\optionalPageMatter{%
+\setThreadInfo{title=Stop!,author=D. P. Story,
+ subject=Some early advice,keywords={AeB, PDF, LaTeX}}%
\begin{center}
-\fcolorbox{blue}{webyellow}{
+\fcolorbox{blue}{webyellow}{%\previewOn
\begin{minipage}{.67\linewidth}%
-\textbf{\textcolor{red}{Stop!}} Before you read this documentation, take a moment to change
-your preferences: On your menu system if \app{Adobe Acrobat/Reader}, select \textsf{Edit\,>\,\penalty0Preferences\,>\,\penalty0General}, and \emph{clear
+\bArticle{lift=\baselineskip-1pt,shift=-\fboxsep-\fboxrule,width=\linewidth+2\fboxsep+2\fboxrule,height=13\baselineskip+\fboxsep+6pt}%
+\textbf{\textcolor{red}{Stop!}} Before you read this documentation, take a
+moment to change your preferences: On your menu system of \app{Adobe
+Acrobat/Reader}, select
+\textsf{Edit\,>\,\penalty0Preferences\,>\,\penalty0General}, and \emph{clear
the checkbox} for the item named \textsf{Make Hand tool select text \&
images}, as listed under \textsf{Basic Tools} on that dialog box.
-(\textsf{Ctrl+K} or \textsf{Command+K} is the shortcut to the Preferences
-dialog box on \app{Windows} and \app{Mac OS}, respectively.) This makes reading an article thread
-much easier. Look for the hand icon with a down arrow on it.\hfill\dps
+(\textsf{Ctrl+K} or \textsf{Command+K} is the shortcut to the \textsf{Preferences}
+dialog box on \app{Windows} or \app{Mac OS}, respectively.) This makes
+reading an article thread much easier. Look for the hand icon with a down
+arrow on it.\medskip
+
+Article threads are an \app{Adobe Reader}/\app{Acrobat} feature. To my knowledge, they
+have not been implemented in any other PDF viewer. So, a PDF containing article threads
+must be viewed in \app{Adobe Reader} or \app{Acrobat}\hfill\dps
\end{minipage}}
\end{center}
}
-
+\def\bART{\placeImage{Art-Start}{10bp}{10bp}}
+\def\cART{\placeImage{Art-Down}{10bp}{10bp}}
+\def\rART{\placeImage{Art-Up}{10bp}{10bp}}
+\def\eART{\placeImage{Art-End}{10bp}{10bp}}
+\def\bARTDC{\placeImage{Art-StartDC}{10bp}{10bp}}
+\def\cARTDC{\placeImage{Art-DownDC}{10bp}{10bp}}
+\def\rARTDC{\placeImage{Art-UpDC}{10bp}{10bp}}
+\def\eARTDC{\placeImage{Art-EndDC}{10bp}{10bp}}
+
+
+\declareMultiImages
+{%
+ {path=article_icons.pdf,page=0,placement={Art-Start}}
+ {path=article_icons.pdf,page=1,placement={Art-Down}}
+ {path=article_icons.pdf,page=2,placement={Art-Up}}
+ {path=article_icons.pdf,page=3,placement={Art-End}}
+% New DC icons
+ {path=article_icons.pdf,page=4,placement={Art-StartDC}}
+ {path=article_icons.pdf,page=5,placement={Art-DownDC}}
+ {path=article_icons.pdf,page=6,placement={Art-UpDC}}
+ {path=article_icons.pdf,page=7,placement={Art-EndDC}}
+}
+%\begin{docassembly}
+%\insertPreDocAssembly
+%\addWatermarkFromFile({
+% bOnTop:false,
+% cDIPath:"C:/Users/Public/Documents/ManualBGs/Manual_BG_Print_AeB.pdf"
+%});
+%\executeSave();
+%\end{docassembly}
+
+\chngDocObjectTo{\newDO}{doc}
\begin{docassembly}
+\insertPreDocAssembly
+var titleOfManual="The artthreads Package";
+var manualfilename="Manual_BG_Print_artthreads.pdf";
+var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown
+var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate;
+var doc;
+var buildIt=false;
+if ( buildIt ) {
+ console.println("Creating new " + manualfilename + " file.");
+ doc = \appopenDoc({cPath: _pathToBlank, bHidden: true});
+ var _path=this.path;
+ var pos=_path.lastIndexOf("/");
+ _path=_path.substring(0,pos)+"/"+manualfilename;
+ \docSaveAs\newDO ({ cPath: _path });
+ doc.closeDoc();
+ doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true});
+ f=doc.getField("ManualTitle");
+ f.value=titleOfManual;
+ doc.flattenPages();
+ \docSaveAs\newDO({ cPath: manualfilename });
+ doc.closeDoc();
+} else {
+ console.println("Using the current "+manualfilename+" file.");
+}
+var _path=this.path;
+var pos=_path.lastIndexOf("/");
+_path=_path.substring(0,pos)+"/"+manualfilename;
\addWatermarkFromFile({
bOnTop:false,
- cDIPath:"C:/Users/Public/Documents/ManualBGs/Manual_BG_Print_AeB.pdf"
+ bOnPrint:false,
+ cDIPath:_path
});
\executeSave();
\end{docassembly}
\begin{document}
+
\maketitle
\selectColors{linkColor=black}
@@ -96,9 +169,9 @@ much easier. Look for the hand icon with a down arrow on it.\hfill\dps
\setAddToBorder{addtow=5bp,addtoh=0bp}
-\newcommand\showArtPanel[1][Article]{\pushButton[
- \CA{#1}\A{\Named{ArticleThreads}
- \Next{/S/Thread /D(\threadTitle)}}]{Btn}{}{11bp}}
+%\newcommand\showArtPanel[1][Article]{\pushButton[
+% \CA{#1}\A{\Named{ArticleThreads}
+% \Next{/S/Thread /D(\threadTitle)}}]{Btn}{}{11bp}}
\section{Introduction}
@@ -107,8 +180,12 @@ much easier. Look for the hand icon with a down arrow on it.\hfill\dps
subject=Introduction to article threads,keywords={AeB, PDF, LaTeX}}%
+%\makebox[0pt][r]{\showArtPanel[Intro]\relax\kern11bp}%
+%\showArticlePaneRead
+%\showArticlePaneRead[\CA{Intro}]{}{11bp}
+
\begin{multicols}{2}
-\noindent\makebox[0pt][r]{\showArtPanel[Intro]\relax\kern11bp}%
+\noindent\makebox[0pt][r]{\pushButton[\CA{Intro}\A{\Thread{Introduction}}]{BtnIntro}{}{11bp}\kern11bp}%
\bArticle{lift=\baselineskip,width=\linewidth,height=2.5in}%
\noindent Through the commands of the \pkg{artthreads} package, you can
create \textit{article threads}, a concept/feature of \app{Adobe
@@ -118,14 +195,14 @@ is in a multi-column format, or, perhaps, a single narrow column.
When a document uses a multiple column format, it is often difficult, or at
the very least inconvenient, to read it. When document page is fit into the viewing
-window, the text may be two small to read. This requires the reader, that's
+window, the text may be too small to read. This requires the reader, that's
you, to adjust the magnification (zoom) level of the page to fit a column of
text comfortably in the application window.\vadjust{\noindent
\cArticle{lift=2\baselineskip,width=\linewidth,height=2.5in}}
Once the column is fitted, additional navigation is needed to move the window
view down one column, then up to the top of the next column. Think of trying
to read a digital newspaper with many columns. Such navigation is tedious and
-distracts from reading the information begin presented.
+distracts from reading the information being presented.
Set the article threads after the composition of the document is completed.
The method of setting the threads is \emph{very visual} not automatic as in
@@ -138,13 +215,16 @@ the \pkg{threadcol} package of Scott Patkin.
\setThreadInfo{title=Navigation,author=D. P. Story,
subject=Navigation to article threads,keywords={AeB, PDF, LaTeX}}%
+%\makebox[0pt][r]{\showArtPanel[Navigate]\kern11bp}%
+%\showArticlePaneRead[\CA{Navigate}]{}{11bp}
+
\begin{multicols}{2}
-\noindent\makebox[0pt][r]{\showArtPanel[Navigate]\kern11bp}%
+\noindent\makebox[0pt][r]{\pushButton[\CA{Navigate}\A{\Thread{Navigation}}]{BtnNavi}{}{11bp}\kern11bp}%
\bArticle{lift=\baselineskip,width=\linewidth,height=4.2in}%
-\noindent Perhaps you noticed the `Intro' button on exhibit in this previous
-section or the `Navigate' button in this section as well. Clicking these
-buttons reveals the \textsf{Article} panel in the left-hand navigation pane.
-Listed there are all the articles created for this documentation.
+\noindent Perhaps you've noticed the `Intro' button on exhibit in this
+previous section or the `Navigate' button in this section as well. Clicking
+these buttons reveals the \mlsetLink[\linktxtcolor{red}\A{\shArticlesPaneActn}]{\kern0pt\sffamily Articles \normalfont panel} in the left-hand navigation
+pane. Listed there are all the articles created for this documentation.
Right-clicking on any of the listed article names brings up a context menu;
select \textsf{Read Article} to begin reading or choose \textsf{Properties}
to see the thread info, which (may) include the title, author, subject, and
@@ -155,17 +235,18 @@ reading a thread: (1)~first open the \textsf{Article} pane
(\textsf{View\,\penalty0>\penalty0\,\penalty0Show/Hide\,\penalty0>\,\penalty0Navigation
Panes\,>\,Articles}), left-click an article title and select \textsf{Read
Article}, or simple double-click an article title; or (2) place your mouse
-pointer over text, if it changes to a hand with an arrow on it, the text is
+pointer over text, if it changes to a hand with an arrow on it (\bART), the text is
part of an article thread, simply click on it to begin.
\paragraph*{Navigating a thread.} Once you have initiated \textsf{Read
Article}, you can navigate through the article thread using any of the
following methods\vadjust{\noindent
\cArticle{lift=2\baselineskip,width=\linewidth,height=4.2in}}: (1)~click in
-an area when the mouse is a hand icon with an arrow on it to move forward
-(shift-click to move back); (2) press the \textsf{Enter} key to move forward
+an area when the mouse is a hand icon with an arrow on it (\cART) to move forward
+(shift-click to move back (\rART)); (2) press the \textsf{Enter} key to move forward
(or shift+\textsf{Enter} to move back); or (3) the page down (or page up)
-keys will also move you around within the thread.
+keys will also move you around within the thread. At the end of the thread, you'll
+see this hand icon \eART.
There may be problems in getting the hand icon with the arrow on it to
appear, if this is the case, open the \textsf{Preferences} menu,
@@ -180,6 +261,10 @@ article threads and see how they work, the next thing to do is to see how
they are created with the \pkg{artthreads} package.
\end{multicols}
+It should be noted that in recent versions of \app{DC}, the thread icons are
+changed from \bART, \cART, \rART, and {\eART} to \bARTDC, \cARTDC,
+\rARTDC, and \eARTDC, respectively.
+
\section{Creating article threads}
We begin by including the \pkg{artthreads} package in your document.
@@ -188,7 +273,7 @@ We begin by including the \pkg{artthreads} package in your document.
\end{Verbatim}
The \pkg{artthreads} package brings in the \pkg{fitr} package
(\url{http://ctan.org/pkg/fitr}), many commands from that package are used.
-In fact, the same set of package options are used.
+All options of \pkg{artthreads} are passed to \pkg{fitr}.
\setThreadInfo{title=Package options,author=D. P. Story,
subject=options of the artthreads package,keywords={AeB, PDF, LaTeX}}%
@@ -197,21 +282,22 @@ In fact, the same set of package options are used.
\paragraph*{Package options.}
The package has ten options: six driver options and four viewing
options.
-\begin{multicols}{2}\previewtrue\viewMagWintrue
+\begin{multicols}{2}\previewOn\viewMagWinOn
\setAddToBorder{addtow=10bp,addtoh=10bp}
\begin{itemize}
\item \bArticle{lift=\baselineskip,width=\linewidth,height=2.5in}%
- \textbf{Driver Options:} These are \texttt{dvips} (the default),
- \texttt{dvipsone}, and \texttt{pdftex} (which includes the use of
- \textsf{lualatex}), \texttt{dvipdfm}, \texttt{dvipdfmx}, and
- \texttt{xetex}. If you specify one of the first two, it is assumed that
- you are using \textsf{Adobe Distiller} as your PDF creator.
-
- The \textsf{fitr} package checks whether the \textsf{web} package is
- loaded, if so, its uses the driver used by \textsf{web}; otherwise
- \textsf{fitr} auto-detects for \textsf{pdftex} and \textsf{xetex}. If
- no driver is passed, and neither \textsf{pdftex} nor \textsf{xetex} are
- detected, then \textsf{dvips} is the default driver.
+ \textbf{Driver Options:} The major driver options are \opt{dvips} (the
+ default), \opt{pdftex}, \opt{luatex}, and \opt{xetex}; there are two
+ minor driver options, these are \opt{dvipdfm} and \opt{dvipdfmx}. If
+ you specify \opt{dvips}, it is assumed the PDF creator is \app{Adobe
+ Distiller}.\footnote{You can use \app{dvips\,->\,ps2pdf} if there
+ are no document JavaScripts.}
+
+ The \pkg{artthreads} package uses the driver of the \pkg{web} package,
+ if it is loaded; otherwise \pkg{artthreads} auto-detects for
+ \app{pdflatex}, \app{lualatex} and \app{xelatex}. If no driver is
+ passed and no driver is automatically detected, the \app{dvips} driver
+ is used.
\setAddToBorder{addtow=0bp,addtoh=0bp}
@@ -221,7 +307,7 @@ options.
dvi-previewer (or the PDF document); you can turn off this preview
by specifying \texttt{!preview} (or removing \texttt{preview}
entirely from the option list). The other option type is
- \texttt{viewMagWin}, when this option the viewing window, a
+ \texttt{viewMagWin}. When this option is specified, the viewing window, a
rectangular region, becomes visible in the dvi-previewer (or in the
PDF document); specifying \texttt{!viewMagWin} turns off this type
of preview.
@@ -229,21 +315,21 @@ options.
%\item[] The effects of the viewing options will be illustrated later in this
%document, see \autoref{previewEx} on page~\pageref*{previewEx}.
\end{itemize}
-\end{multicols}
+\end{multicols}\noindent
You'll notice the two rectangular regions around the left column. The inner
one is made visible by the \texttt{preview} option (or locally by
-\cs{previewtrue}), you can see that it covers `precisely' the text of the
+\cs{previewOn}), you can see that it covers `precisely' the text of the
item. The outer rectangle is exposed by the \texttt{viewMagWin} option (or
-locally by \cs{viewMagWintrue}). When you view the thread -- and you do not
+locally by \cs{viewMagWinOn}). When you view the thread -- and you do not
define an `extra' border around the viewing area -- the inner rectangle is
-use. The text in this inner rectangle may not be entirely adequate for
+used. The text in this inner rectangle may not be entirely adequate for
reading as it is very `tight' around the text. It is for this reason, we
expand the viewing area by a specified amount. Compare the reading comfort of
-the left column verses the right column. (Try viewing the column thread with
+the left column versus the right column. (Try viewing the column thread with
a narrow application window.)
-You may have also that the viewer returns to the same page view the page was
-in prior to reading the thread.
+You may have noticed that the viewer returns to the same page view the page
+was in prior to reading the thread.
\paragraph*{The article info.} The specifications for an article thread require
it to have a title, and to optionally have key-values for author, subject, and keywords.
@@ -256,9 +342,9 @@ it to have a title, and to optionally have key-values for author, subject, and k
a generated value of \texttt{thread-\ameta{num}}. The \cs{setThreadInfo}
command must appear prior to the opening the thread (see \cs{bArticle} below)
to which it applies, if it does not, a {\LaTeX} error occurs. The drivers
-\opt{dvips}, \opt{dvipsone}, \opt{xetex} (\opt{dvipdfm}, \opt{dvipdfmx})
-support all four keys; however, \opt{pdftex} only supports the \texttt{title}
-key.
+\opt{dvips} and \opt{xetex} (\opt{dvipdfm}, \opt{dvipdfmx}) support all four
+keys; however, \opt{pdftex} and \opt{lualatex} only supports the
+\texttt{title} key.
\paragraph*{The article thread commands.} There is one command
(\cs{bArticle}) for beginning an article thread, and another (\cs{cArticle})
@@ -274,8 +360,7 @@ to continue that thread.
\item \texttt{width=\ameta{length}}: The value of \opt{width} sets the
width of the thread to \ameta{length}; \ameta{length} is usually, but
not always, \cs{linewidth}. Dimension arithmetic is supported with the
- value of \opt{width} (\texttt{width=\cs{linewidth}\,+\,3pt}, for
- example).
+ value of \opt{width}; for example, \texttt{width=\cs{linewidth}\,+\,3pt}.
\item \texttt{height=\ameta{length}}: The value of \opt{height} sets the
height of the thread to \ameta{length}. As with the \opt{width} key,
@@ -308,16 +393,16 @@ sides of the rectangular boundary of the thread; \opt{addtoh} adds
\ameta{length} to the top and bottom of the rectangular boundary of the
thread. The default dimensions for these two keys are \texttt{0pt}.
\begin{multicols}{2}\setThreadInfo{title=Illustrate \string\\setAddToBorder}%
-\noindent\setAddToBorder{addtow=10bp,addtoh=10bp}\previewtrue\viewMagWintrue
+\noindent\setAddToBorder{addtow=10bp,addtoh=10bp}\previewOn\viewMagWinOn
{\small\verb|\setAddToBorder{addtow=10bp,|\\
-\null\qquad\verb|addtoh=10bp}|}\\\vadjust{\noindent\bArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}
+\null\quad\verb|addtoh=10bp}|}\\\vadjust{\noindent\bArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}%
In this column we've set a \texttt{10bp} border around the thread. When you click
on the reading area, the viewer should zoom to the width of the wider rectangle.
\vfill
\columnbreak
-\noindent\setAddToBorder{addtow=4bp,addtoh=4bp}\previewtrue\viewMagWintrue
+\noindent\setAddToBorder{addtow=4bp,addtoh=4bp}\previewOn\viewMagWinOn
{\small\verb|\setAddToBorder{addtow=4bp,|\\
-\null\qquad\verb|addtoh=4bp}|}\\\vadjust{\noindent\cArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}
+\null\quad\verb|addtoh=4bp}|}\\\vadjust{\noindent\cArticle{lift=3\baselineskip,width=\linewidth,height=6\baselineskip}}%
In this column, we've set a \texttt{4bp} border. Again, when you click on the
reading area, the viewer should zoom to the width of the wider rectangle.
\end{multicols}
@@ -329,56 +414,74 @@ Postscript or PDF dimensions, depending on the driver.
documentation, a description of the methodology, accompanied by examples. As
pointed out early in this documentation, the method for applying the article
threads is very visual. Compose your document content first, and then insert the
-document threads. Page~\arabic{page}
-\begin{center}\previewtrue\viewMagWintrue
+document threads.
+\begin{center}\previewOn\viewMagWinOn
\begin{minipage}{.8\linewidth}\parindent=20pt\relax
-We illustrate the techniques in a single column of goodly width.
+We illustrate the techniques in a single column with a generous width.
First we declare our add to border dimension and article info
-\begin{Verbatim}[fontsize=\small]
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
\setAddToBorder{addtow=4bp,addtoh=4bp}
\setThreadInfo{title=Methodology,author=D. P. Story}
\end{Verbatim}
There are two places to begin a thread: (1) at the very beginning of a paragraph;
and (2) from within a paragraph. Method~(1) is preferred. We begin the next paragraph
with
-\begin{Verbatim}[fontsize=\small]
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
\noindent\bArticle{lift=\baselineskip,
width=\linewidth,height=1in+3\baselineskip}%
Now we begin our deep thoughts...
\end{Verbatim}
+\end{minipage}
+\end{center}
\setAddToBorder{addtow=4bp,addtoh=4bp}
\setThreadInfo{title=Methodology,author=D. P. Story}
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=1in+3\baselineskip}%
+
+\def\pi{\noindent\makebox[0pt][r]{\ding{182}\hskip\marginparsep}}
+\def\pii{\noindent\makebox[0pt][r]{\ding{183}\hskip\marginparsep}}
+\def\piii{\noindent\makebox[0pt][r]{\ding{184}\hskip\marginparsep}}
+
+\begin{center}\previewOn\viewMagWinOn
+\begin{minipage}{.8\linewidth}\parindent=\amtIndent\relax
+\newtopic\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=1in+3\baselineskip}%
+\pi\indent
Now we begin our deep thoughts. During this development phase, the options
\opt{preview} and \opt{viewMagWin} should be in effect. In a \EXT{DVI}
-viewer, we can see the bounding rectangles. We can see its too low, too long
+viewer, we can see the bounding rectangles. We can see it is too low, too long
and so on. For users of \app{pdflatex}, \app{xelatex}, etc., view your
documents in the \EXT{DVI} previewer first (or view them as a \EXT{PDF}).
I've used \texttt{lift=\string\baselineskip} to raise up the thread rectangle
by that mount to enclose the first line. The value of \opt{width} is usually
\cs{linewidth}, but the value of \opt{height} may have to be adjusted, in this
example, I've ``tweaked'' the \texttt{1in} by \texttt{3\string\baselineskip}.
+\end{minipage}
+\end{center}
-\newtopic Naturally, after you're satisfied, you then remove
+\begin{center}\previewOn\viewMagWinOn
+\begin{minipage}{.8\linewidth}\parindent=\amtIndent\relax
+\newtopic\pii Naturally, after you're satisfied, you then remove
\opt{preview} and \opt{viewMagWin} or change them to
\opt{!preview} and \opt{!viewMagWin}. Another possible location is from within
a paragraph, here, we continue the previous thread using the \cs{cArticle} command
in conjunction with the \cs{vadjust} {\TeX} primitive\vadjust{\noindent
\cArticle{lift=5\baselineskip,width=\linewidth,height=2in+\baselineskip}}.
-Between the end of the word `primitive' and the period (.) ending the sentence, I've place
+Between the end of the word `primitive' and the period (.) ending the sentence, I've placed,
\begin{Verbatim}[fontsize=\small]
primitive\vadjust{\noindent\cArticle{lift=5\baselineskip,
width=\linewidth,height=2in+\baselineskip}}. Between the
\end{Verbatim}
-The value of \texttt{lift=5\string\baselineskip} we chosen because the
+We chose \texttt{lift=5\string\baselineskip} because the
original positioning of the thread rectangle was too low by about five lines.
The value of \texttt{height} was chosen to cover the paragraph once the
complete paragraph was composed.
+\end{minipage}
+\end{center}
-\previewfalse\viewMagWinfalse
-We now declare \verb|\previewfalse\viewMagWinfalse|.
+\previewOff\viewMagWinOff
+\begin{center}
+\begin{minipage}{.8\linewidth}\parindent=20pt\relax
+We now declare \verb|\previewOff\viewMagWinOff|.
-\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=.5in+3\baselineskip}\indent
+\noindent\piii\cArticle{lift=\baselineskip,width=\linewidth,height=.5in+3\baselineskip}\indent
Of course, in this example, it was entirely unnecessary to insert the
\cs{cArticle} mid-paragraph, it would have been better placed at the
beginning of the paragraph. Placing \cs{cArticle} mid-paragraph is useful for
@@ -391,34 +494,44 @@ By the way, notice the use of \cs{noindent}, this is
oftentimes needed to position the article thread in the left margin of the
text block.
-\paragraph*{The demo file.} The demo file \texttt{article\_tech.tex}
+\paragraph*{Continuing a thread from one page to the next.} To continue
+reading across a page boundary, continue the thread on the previous page
+using \cs{cArticle}. For example, the most recent thread begins with
+paragraph~\ding{182} (\cs{bArticle}) and continues with paragraph~\ding{183}
+and~\ding{184} (\cs{cArticle}). Paragraphs~\ding{182} and~\ding{183} are on
+the previous page, while paragraph~\ding{184} is on this page. As you read
+this thread, paragraph~\ding{182} is presented first, followed by
+paragraph~\ding{183}, and finally, paragraph~\ding{185} on the subsequent
+page.
+
+\paragraph*{The demo files.} The demo file \texttt{article\_tech.tex}
reproduces the discussion on methods, it is found in the \texttt{examples}
folder.
-
\setThreadInfo{title=Final Thread,{author=D. P. Story, Ph.D.}}
\newtopic\noindent In this documentation, I've covered the content with many article threads; normally,
-for multi-column content, one thread per column is sufficient.
-\begin{multicols}{2} %\previewtrue
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=6.7in}\indent
+for multi-column content, one thread per column is sufficient. The thread for this article continues
+on to the next page, as this Lipsum text illustrates.
+\begin{multicols}{2} %\previewOn
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=4.1in-\baselineskip}\relax
\lipsum[2]
\lipsum[4]
+\noindent\cArticle{lift=4\baselineskip,width=\linewidth,height=4.1in-\baselineskip}\indent
\lipsum[6]
-\noindent\cArticle{lift=3\baselineskip,width=\linewidth,height=6.7in}\indent
\lipsum[7]
+\noindent\cArticle{lift=11\baselineskip,width=\linewidth,height=6.25in+\baselineskip}\indent
\lipsum[10]
\lipsum[12]
-\noindent\cArticle{lift=10\baselineskip,width=\linewidth,height=4in-\baselineskip}\indent
+\noindent\cArticle{lift=2\baselineskip,width=\linewidth,height=6.25in+\baselineskip}\indent
\lipsum[14]
-\noindent\cArticle{lift=8\baselineskip,width=\linewidth,height=4in-\baselineskip}\indent
\lipsum[16]
\end{multicols}
@@ -426,6 +539,124 @@ for multi-column content, one thread per column is sufficient.
\paragraph*{The demo file.} The demo file for this package is \texttt{article\_tst.tex},
available in the \texttt{examples} folder.
+\section{Other navigation commands}
+
+There are several commands for creating links or push button actions that
+open the \uif{Articles} pane and/or begin reading a specified article.
+
+\paragraph*{Manipulating the \uif{Articles} pane.} The following two commands represent
+actions that toggle the \uif{Articles} pane (\cs{shArticlesPaneActn}) or just open/show the \uif{Articles} pane (\cs{sArticlesPaneActn}).
+\bVerb\takeMeasure{\string\shArticlesPaneReadActn}%
+\setlength{\dimen0}{\bxSize}%
+\def\1{\rlap{\hskip\dimen0\relax\sffamily(Toggle Articles pane action)}}
+\def\2{\rlap{\hskip\dimen0\relax\sffamily(Show Articles pane action)}}
+\def\3{\rlap{\hskip\dimen0\relax\sffamily(Toggle Articles pane and read article action)}}
+\def\4{\rlap{\hskip\dimen0\relax\sffamily(Show Articles pane and read article action)}}
+\begin{dCmd}[commandchars=!()]{\bxSize}
+!1\shArticlesPaneActn
+!2\sArticlesPaneActn
+!3\shArticlesPaneReadActn
+!4\sArticlesPaneReadActn
+\end{dCmd}
+\eVerb For example,
+\begin{quote}
+ \setLink[\A{\shArticlesPaneActn}]{Toggle \uif{Articles} pane}\\
+ \verb!\setLink[\A{\shArticlesPaneActn}]{Toggle \textsf{Articles} pane}!\\[3pt]
+ \setLink[\A{\sArticlesPaneActn}]{Show \uif{Articles} pane}\\
+ \verb!\setLink[\A{\sArticlesPaneActn}]{Show \textsf{Articles} pane}!
+\end{quote}
+These two actions can be used by push buttons as well.
+
+\paragraph*{Reading a thread.} To create an action to read a thread with a title of \ameta{thread-title},
+use \cs{Thread\darg{\ameta{thread-title}}}. For example,
+\begin{quote}
+ Read about the \setLink[\A{\Thread{Package options}}]{Package options}.\\
+ \verb~\setLink[\A{\Thread{Package options}}]{Package options}.~
+\end{quote}
+Again notice that the viewer returns you to the jumping off point after
+you've finished reading the thread. The \cs{Thread\darg{\ameta{thread-title}}}
+action can be part of a push button action as well.
+
+\paragraph*{Some push buttons.} \pkg{artthreads} has some push buttons with common actions,
+these are,
+\bVerb\takeMeasure{\string\toggleArticlePaneRead[\ameta{KV-pairs}]\darg{\ameta{wd}}\darg{\ameta{ht}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\toggleArticlePane[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\toggleArticlePaneRead[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\showArticlePane[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\showArticlePaneRead[!ameta(KV-pairs)]{!ameta(wd)}{!ameta(ht)}
+\end{dCmd}
+\eVerb The names of the commands describe the action they perform. However,
+the commands \cs{toggleArticlePaneRead} and \cs{showArticlePaneRead} require special comment.
+Each begins an article thread, but which article thread?
+\begin{quote}%\previewOn\pmpvOn
+ \showArticlePaneRead{}{11bp}\\[2bp]
+ \verb!\showArticlePaneRead{}{11bp}!
+\end{quote}
+Without any further qualifiers, this button begins reading the thread as
+determined by the value of the \texttt{title} key of the last
+\cs{setThreadInfo} command declared. So, the above push button should begin
+the thread titled ``\threadTitle''. However, to program the button to begin
+reading the thread titled \ameta{thread-title}, use the following syntax:
+\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
+\showArticlePaneRead[!textbf(\cmd{\readArticle{!ameta(thread-title)}})]{}{11bp}
+\end{Verbatim}
+We illustrate by using \cs{showArticlePaneRead} to read the thread with title
+``Package options,'' and the same action in a link.
+\begin{quote} %\previewOn\pmpvOn
+ \showArticlePaneRead[\cmd{\readArticle{Package options}}]{}{11bp}\\[2bp]
+ \verb~\showArticlePaneRead[\cmd{\readArticle{Package options}}]{}{11bp}~\\[4bp]
+ \setLink[\cmd{\readArticle{Package options}}\A{\sArticlesPaneReadActn}]{Show \textsf{Articles} pane and read the Package options article}\\[2bp]
+ \verb~\setLink[\cmd{\readArticle{Package options}}~\\
+ \null\quad\verb~\A{\sArticlesPaneReadActn}]{Show \textsf{Articles} pane~\\
+ \null\quad\verb~and read the Package options article}~
+\end{quote}
+
+\subparagraph*{Tooltips for push buttons.} The tooltips for the commands
+\cs{toggleArticlePane} and \cs{showArticlePane} are \textsf{Toggle Articles
+Pane} and \textsf{Show Articles Pane}, respectively. These can be localized
+using the \cs{TU} key if \pkg{eforms}; for example,
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={|()}]
+\showArticlePane[|textbf(\TU{Umschalten der Artikel Schaltfl\"{a}che})]{}{11bp}
+\end{Verbatim}
+which may be German for \textsf{Toggle Articles Pane}.
+
+For the other two, \cs{toggleArticlePaneRead} and \cs{showArticlePaneRead}, two convenience
+commands are defined.
+\bVerb\takeMeasure{\string\tooltipTogglePaneRead\darg{\ameta{text}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\tooltipTogglePaneRead{!ameta(text)}
+\tooltipShowPaneRead{!ameta(text)}}
+\end{dCmd}
+\eVerb The values of \ameta{text} allows for the inclusion of the command
+\cs{threadTitle}, which expands to the current title of the thread article.
+The default definitions are,
+\begin{Verbatim}[xleftmargin=\amtIndent]
+\tooltipTogglePaneRead{Toggle Articles pane and
+ read the article \threadTitle}
+\tooltipShowPaneRead{Show Articles pane and
+ read the article \threadTitle}
+\end{Verbatim}
+If you roll over the button at the top of the this page, its tooltip will read \textsf{Show Articles pane and
+ read the article Package options}. The two commands may be declare with an appropriate language localization.
+
+\setThreadInfo{%
+ title=J\"{u}rgen's Thread,
+ author={D. P. Story, J\"{u}rgen},
+ subject=Discussion of the PDFDocEncloding Character Set,
+ keywords={AeB, PDF, LaTeX}
+}
+
+%\previewOn
+\noindent\bArticle{lift=-\medskipamount-4pt,width=\linewidth,height=5\baselineskip+6pt}%
+\paragraph*{Beyond Basic ASCII.} Begin by reading \setLink[\cmd{\readArticle{J\"{u}rgen's Thread}}\linktxtcolor{red}\A{\Thread{\threadTitle}}]{J\"{u}rgen's Thread}.
+The examples of this reference and, for the most part in the sample
+files, use Basic ASCII as the thread titles; however, the full PDFDocEncoding
+character set is also supported. The sample file \texttt{article\_tech.tex}
+provides a more complete discussion of this topic, as well as a more
+complicated example. Check out the
+\setLink[\linktxtcolor{red}\A{\sArticlesPaneActn}]{\textsf{Articles}} pane to
+see the title of this thread listed.
\section{My retirement}
diff --git a/macros/latex/contrib/artthreads/examples/article_tech.pdf b/macros/latex/contrib/artthreads/examples/article_tech.pdf
new file mode 100644
index 0000000000..efbc05736a
--- /dev/null
+++ b/macros/latex/contrib/artthreads/examples/article_tech.pdf
Binary files differ
diff --git a/macros/latex/contrib/artthreads/examples/article_tech.tex b/macros/latex/contrib/artthreads/examples/article_tech.tex
index 10505b3cad..b9483dd9db 100644
--- a/macros/latex/contrib/artthreads/examples/article_tech.tex
+++ b/macros/latex/contrib/artthreads/examples/article_tech.tex
@@ -1,26 +1,15 @@
\documentclass{article}
\usepackage[forcolorpaper]{web}
+% To compiles with latex > dvips > ps2pdf, use the option gonative, which gets
+% passed on to fitr. With gonative, no document JavaScript is created, which
+% is not supported by a non-Acrobat PDF viewer.
\usepackage[!viewMagWin,!preview]{artthreads}
\usepackage{fancyvrb}
\usepackage{multicol}
\useFullWidthForPaper % from web
\providecommand{\cs}[1]{\texttt{\char`\\#1}}
-
-% A selection of pushbutton actions for articles
-\def\toggleArticlePane{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}}]{TAPBtn}{}{11bp}}
-\def\toggleArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}
- \Next{/S/Thread/D(\threadTitle)}}]{TAPRBtn}{}{11bp}}
-\def\showArticlePane{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}}]{SAPBtn}{}{11bp}}
-\def\showArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}
- \Next{/S/Thread /D(\threadTitle)}}]{SAPRBtn}{}{11bp}}
-% Links may be used as well, here is only one such, this link below is hard-wired
-% modify as needed.
-%\setLink[\A{/S/Thread/D(Methodology)}]{Read Article}
+\let\pkg\textsf
\setAddToBorder{addtow=4bp,addtoh=4bp}
@@ -32,14 +21,14 @@
\noindent
-Below is a description of the \setLink[\linktxtcolor{red}\A{/S/Thread/D(Methodology)}]{methodology}
+Below is a description of the \setLink[\linktxtcolor{red}\A{\Thread{Methodology}}]{methodology}
for developing article threads. You
may compile this document using any of the usual drivers (options
\texttt{dvips}, \texttt{pdftex}, \texttt{xetex}, \texttt{dvipdfm}, \texttt{dvipdfmx}).
Play around with various combinations of \texttt{preview}, \texttt{!preview},
\texttt{viewMagWin}, and \texttt{!viewMagWin}.
-\setThreadInfo{
+\setThreadInfo{%
title=Methodology,
author=D. P. Story,
subject=Article thread test,
@@ -47,14 +36,14 @@ Play around with various combinations of \texttt{preview}, \texttt{!preview},
}
\begin{multicols}{2}
-\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=4in+2\baselineskip}\indent
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=4in+2\baselineskip}%
There are two places to begin a thread: (1) at the very beginning of a paragraph;
and (2) from within a paragraph. Method~(1) is preferred. We began this paragraph
with
\begin{Verbatim}[xleftmargin=\parindent,fontsize=\small]
\noindent\bArticle{lift=\baselineskip,
width=\linewidth,
- height=4in+2\baselineskip}\indent
+ height=4in+2\baselineskip}%
There are two places...
\end{Verbatim}
Place article threads after you've finished composing your document. While
@@ -106,4 +95,33 @@ text block.
Adding text to the columns will change the positions of the article threads, for
this reason, the threads need to be inserted after the document is finished.
+
+\setThreadInfo{%
+ title=\textbraceleft J\"{u}rgen's Thread\textbraceright,
+ author={D. P. Story, J\"{u}rgen},
+ subject=Discussion of the PDFDocEncloding Character Set,
+ keywords={AeB, PDF, LaTeX}
+}
+
+% Pass the title through \pdfstringdef, then pass directly as the argument of \Thread
+\pdfstringdef\JT{\textbraceleft J\"{u}rgen's Thread\textbraceright}
+% Here is a link with the thread title pass directly to the \Thread command.
+% \setLink[\linktxtcolor{red}\A{\Thread{\JT}}]{\textbraceleft{J\"{u}rgen's Thread}\textbraceright}
+\begin{center}
+\setLink[\cmd{\readArticle{\textbraceleft J\"{u}rgen's Thread\textbraceright}}\linktxtcolor{red}\A{\Thread{\threadTitle}}]{\textbraceleft{J\"{u}rgen's Thread}\textbraceright}\\[10bp]
+\begin{minipage}{5in}
+\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=12\baselineskip+6pt}%
+The \pkg{artthreads} package does support, through \pkg{hyperref}, the PDFDocEncloding Character Set. This thread offers
+a brief discussion of the topic. The \texttt{title} of this thread is
+\verb~\textbraceleft J\"{u}rgen's Thread\textbraceright~, which is properly understood to be
+``\textbraceleft J\"{u}rgen's Thread\textbraceright'' and appears correctly in the \setLink[\linktxtcolor{red}\A{\sArticlesPaneActn}]{\textsf{Articles}} pane.
+Use standard {\LaTeX} markup for accents, as in \verb~J\"{u}rgen~. Creating a link to such ``special titles''
+requires a little bit of trouble. When using the \cs{Thread} command to create an action to read an article thread,
+rather than passing the thread title directly as an argument, pass \verb~\A{\Thread{\threadTitle}}~ in the optional
+argument of a link, prior to that, insert \verb~\cmd{<thread-title>}}~ in the optional argument. See
+the link created for this article. You can also pass the thread title directly to \cs{Thread} but you must
+pass the title through \cs{pdfstringdef} first, the source of this file for details.
+\end{minipage}
+\end{center}
+
\end{document}
diff --git a/macros/latex/contrib/artthreads/examples/article_tst.tex b/macros/latex/contrib/artthreads/examples/article_tst.tex
index 6333cf24d6..1d63fb0d5b 100644
--- a/macros/latex/contrib/artthreads/examples/article_tst.tex
+++ b/macros/latex/contrib/artthreads/examples/article_tst.tex
@@ -1,77 +1,61 @@
\documentclass{article}
-\usepackage[dvipsone,!viewMagWin,!preview]{artthreads}
+\usepackage[!viewMagWin,!preview]{artthreads}
\usepackage{multicol,lipsum}
\hypersetup{colorlinks}
-% A selection of pushbutton actions for articles
-\def\toggleArticlePane{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}}]{TAPBtn}{}{11bp}}
-\def\toggleArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ShowHideArticles}
- \Next{/S/Thread/D(\threadTitle)}}]{TAPRBtn}{}{11bp}}
-\def\showArticlePane{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}}]{SAPBtn}{}{11bp}}
-\def\showArticlePaneRead{\pushButton[
- \CA{Article}\A{\Named{ArticleThreads}
- \Next{/S/Thread /D(\threadTitle)}}]{SAPRBtn}{}{11bp}}
-% Links may be used as well, here is only one such, this link below is hard-wired
-% modify as needed.
-%\setLink[\A{/S/Thread/D(Lipsum)}]{Read Article}
-
\setAddToBorder{addtow=10bp,addtoh=10bp}
\begin{document}
\noindent
-The two article threads: \setLink[\A{/S/Thread/D(Lipsum)}]{Read Lipsum}
-and \setLink[\A{/S/Thread/D(more Lipsum)}]{Read more Lipsum}.
-
+The two article threads: \setLink[\A{\Thread{Lipsum}}]{Read Lipsum}
+and \setLink[\A{\Thread{more Lipsum}}]{Read more Lipsum}.
\setThreadInfo{title=Lipsum,author=D. P. Story,subject=Article thread test,keywords={AeB, PDF, LaTeX}}%
\raggedcolumns
\begin{multicols}{2}
-\noindent\makebox[0pt][r]{\showArticlePaneRead\kern11bp}%
-\bArticle{lift=\baselineskip,width=\linewidth,height=\textheight}%
-This is a series of paragraphs to fill the multi-columns of this document. It is imperative
-that we have a lot of text to fill these columns, but I fear that I don't know what to write.
+\noindent\makebox[0pt][r]{\showArticlePaneRead{}{11bp}\hspace{\marginparsep}}%
+\bArticle{lift=\baselineskip,width=\linewidth,height=\textheight-2\baselineskip}%
+\textsl{This is a series of paragraphs to fill the multi-columns of this document. It is imperative
+that we have a lot of text to fill these columns, but I fear that I don't know what to write.}
-Well, here goes. \lipsum[2]
+\textsl{Well, here goes.} \lipsum[2]
-That went well, more? \lipsum[4]
+\textsl{That want well, more?} \lipsum[4]
-Ok, I have the hang of it now. \lipsum[6]
+\textsl{Ok, I have the hang of it now.} \lipsum[6]
-\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=\textheight}\indent
-Continuing now with \lipsum[8]
+\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=\textheight-2\baselineskip}\indent
+\textsl{Continuing now with} \lipsum[8]
-I'm on a roll, \lipsum[10]
+\textsl{I'm on a roll!} \lipsum[10]
\end{multicols}
\newpage
-\noindent
+\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=1.5\baselineskip}%
Same `article' but broken down into smaller pieces as an exercise.
\setThreadInfo{title=more Lipsum,author=D. P. Story,subject=Article thread test,keywords={AeB, PDF, LaTeX}}%
-\begin{multicols}{2}\previewtrue % locally turn on preview
+\begin{multicols}{2}\previewOn % locally turn on preview
\noindent\bArticle{lift=\baselineskip,width=\linewidth,height=3in+3\baselineskip}%
-This is a series of paragraphs to fill the multi-columns of this document. It is imperative
-that we have a lot of text to fill these columns, but I fear that I don't know what to write.
+\textsl{This is a series of paragraphs to fill the multi-columns of this document. It is imperative
+that we have a lot of text to fill these columns, but I fear that I don't know what to write.}
-Well, here goes. \lipsum[2]
+\textsl{Well, here goes.} \lipsum[2]
-\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=4in-2\baselineskip}\indent
-That went well, more? \lipsum[4]
+\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=4in-1.5\baselineskip}\indent
+\textsl{That want well, more?} \lipsum[4]
-Ok, I have the hang of it now. \lipsum[6]
+\textsl{Ok, I have the hang of it now.} \lipsum[6]
\noindent\cArticle{lift=9\baselineskip,width=\linewidth,height=4in+2\baselineskip}\indent
-Continuing now with \lipsum[8]
+\textsl{Continuing now with,} \lipsum[8]
\noindent\cArticle{lift=\baselineskip,width=\linewidth,height=3in-\baselineskip}\indent
-I'm on a roll, \lipsum[10]
+\textsl{I'm on a roll!} \lipsum[10]
\end{multicols}
diff --git a/macros/latex/required/babel/base/README.md b/macros/latex/required/babel/base/README.md
index 6ac28f4107..51b28dd172 100644
--- a/macros/latex/required/babel/base/README.md
+++ b/macros/latex/required/babel/base/README.md
@@ -1,4 +1,4 @@
-## Babel 3.46
+## Babel 3.47
This package manages culturally-determined typographical (and other)
rules, and hyphenation patterns for a wide range of languages. Many
@@ -7,11 +7,11 @@ lualatex out of the box. A few even work with plain formats.
The latest stable version is available on <https://ctan.org/pkg/babel>.
-Changes in version 3.46 are described in:
+Changes in version 3.47 are described in:
-https://github.com/latex3/babel/wiki/What's-new-in-babel-3.46
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.47
-Included is a set of ini files for about 200 languages.
+Included is a set of ini files for about 200 languages.
The best way to install and/or update it is with the help of package
managers.
@@ -44,7 +44,19 @@ respective authors.
### Latest changes
```
+3.47 2020-07-13
+ - Fixes:
+ - Spurious spaces when autoloading locales (bug introduced
+ in 3.46 when fixing #80).
+ - In dtx files, autoloading printed some spurious text
+ (because % is set to ignore, #87).
+ - New - \getlocaleproperty*, which doesn't raise an error.
+ - Basic ini+tex templates for about 500 languages in the GitHub
+ repository.
+
3.46 2020-07-06
+ - Languages can now be optionally selected with their BCP 47
+ tags.
- \BabelEnsureInfo now loads the basic data for the requested
languages immediately (formerly it was done at the end of the
preamble).
@@ -56,6 +68,7 @@ respective authors.
- Locale info was not loaded if the name had uppercase letters
in some OSs (#80).
- The [..|..] syntax in ini dates didn't recognize 'digits'.
+https://github.com/latex3/babel/wiki/What's-new-in-babel-3.46
3.45 2020-06-10
- Minor fixes in Hindi, Ancient Greek, Macedonian.
diff --git a/macros/latex/required/babel/base/babel.dtx b/macros/latex/required/babel/base/babel.dtx
index 736f7e25bf..acc0b3953c 100644
--- a/macros/latex/required/babel/base/babel.dtx
+++ b/macros/latex/required/babel/base/babel.dtx
@@ -31,7 +31,7 @@
%
% \iffalse
%<*filedriver>
-\ProvidesFile{babel.dtx}[2020/07/07 v3.46 The Babel package]
+\ProvidesFile{babel.dtx}[2020/07/13 v3.47 The Babel package]
\documentclass{ltxdoc}
\GetFileInfo{babel.dtx}
\usepackage{fontspec}
@@ -2304,13 +2304,15 @@ Conveniently, some options allow to fill the language, and \babel{}
warns you about what to do if there is a missing string. Very likely
you will find alerts like that in the |log| file:
\begin{verbatim}
-Package babel Warning: \mylangchaptername not set. Please, define
-(babel) it in the preamble with something like:
+Package babel Warning: \mylangchaptername not set. Please, define it
+(babel) after the language has been loaded (typically
+(babel) in the preamble) with something like:
(babel) \renewcommand\maylangchaptername{..}
(babel) Reported on input line 18.
\end{verbatim}
-In most cases, you will only need to define a few macros.
+In most cases, you will only need to define a few macros. Note
+languages loaded on the fly are not yet available in the preamble.
\begin{example}
If you need a language named |arhinish|:
@@ -2710,7 +2712,9 @@ expandable, and the available fields are:
counterintuitive.
\end{warning}
-\Describe{\getlocaleproperty}{\marg{macro}\marg{locale}\marg{property}}
+\Describe{\getlocaleproperty}{%
+ \colorbox{thegrey}{\ttfamily\hskip-.2em*\hskip-.2em}%
+ \marg{macro}\marg{locale}\marg{property}}
\New{3.42} The value of any locale property as set by the |ini| files
(or added/modified with |\babelprovide|) can be retrieved and stored in
@@ -2721,6 +2725,10 @@ a macro with this command. For example, after:
the macro |\hechap| will contain the string
{\fontspec[Scale=.87,Script=Hebrew]{Liberation Mono}\textdir TRT פרק}.
+If the key does not exist, the macro is set to |\relax| and an error is
+raised. \New{3.47} With the starred version no error is raised, so that
+you can take your own actions with undefined properties.
+
\Babel{} remembers which |ini| files have been loaded. There is a loop
named |\LocaleForEach| to traverse the list, where |#1| is the name of
the current item, so that |\LocaleForEach{\message{ **#1** }}| just
@@ -3942,7 +3950,8 @@ but if you want to do it, here are a few guidelines.
\end{itemize}
The following page provides a starting point:
-\texttt{http://www.texnia.com/incubator.html}.
+\texttt{http://www.texnia.com/incubator.html}. See also
+\texttt{https://github.com/latex3/babel/wiki/List-of-locale-templates}.
If you need further assistance and technical advice in the
development of language styles, I am willing to help you. And of
@@ -4682,8 +4691,8 @@ help from Bernd Raichle, for which I am grateful.
% \section{Tools}
%
% \begin{macrocode}
-%<<version=3.46>>
-%<<date=2020/07/07>>
+%<<version=3.47>>
+%<<date=2020/07/13>>
% \end{macrocode}
%
% \textbf{Do not use the following macros in \texttt{ldf} files. They
@@ -4965,6 +4974,19 @@ help from Bernd Raichle, for which I am grateful.
\else
\@ne
\fi
+% \end{macrocode}
+%
+% A somewhat hackish tool (hence its name) to avoid spurious spaces in
+% some contexts.
+%
+% \begin{macrocode}
+\def\bbl@bsphack{%
+ \ifhmode
+ \hskip\z@skip
+ \def\bbl@esphack{\loop\ifdim\lastskip>\z@\unskip\repeat\unskip}%
+ \else
+ \let\bbl@esphack\@empty
+ \fi}
%<</Basic macros>>
% \end{macrocode}
%
@@ -5090,8 +5112,9 @@ help from Bernd Raichle, for which I am grateful.
\global\@namedef{#2}{\textbf{?#1?}}%
\@nameuse{#2}%
\bbl@warning{%
- \@backslashchar#2 not set. Please, define\\%
- it in the preamble with something like:\\%
+ \@backslashchar#2 not set. Please, define it\\%
+ after the language has been loaded (typically\\%
+ in the preamble) with something like:\\%
\string\renewcommand\@backslashchar#2{..}\\%
Reported}}
\def\bbl@tentative{\protect\bbl@tentative@i}
@@ -7204,18 +7227,12 @@ help from Bernd Raichle, for which I am grateful.
\bbl@id@assign
% switch captions, date
\ifcase\bbl@select@type
- \ifhmode
- \hskip\z@skip % trick to ignore spaces
- \csname captions#1\endcsname\relax
- \csname date#1\endcsname\relax
- \loop\ifdim\lastskip>\z@\unskip\repeat\unskip
- \else
+ \bbl@bsphack
\csname captions#1\endcsname\relax
\csname date#1\endcsname\relax
- \fi
+ \bbl@esphack
\else
- \ifhmode
- \hskip\z@skip % trick to ignore spaces
+ \bbl@bsphack
\bbl@xin@{,captions,}{,\bbl@select@opts,}%
\ifin@
\csname captions#1\endcsname\relax
@@ -7224,17 +7241,7 @@ help from Bernd Raichle, for which I am grateful.
\ifin@ % if \foreign... within \<lang>date
\csname date#1\endcsname\relax
\fi
- \loop\ifdim\lastskip>\z@\unskip\repeat\unskip
- \else
- \bbl@xin@{,captions,}{,\bbl@select@opts,}%
- \ifin@
- \csname captions#1\endcsname\relax
- \fi
- \bbl@xin@{,date,}{,\bbl@select@opts,}%
- \ifin@
- \csname date#1\endcsname\relax
- \fi
- \fi
+ \bbl@esphack
\fi
% switch extras
\bbl@usehooks{beforeextras}{}%
@@ -7651,8 +7658,9 @@ help from Bernd Raichle, for which I am grateful.
\global\@namedef{#2}{\textbf{?#1?}}%
\@nameuse{#2}%
\bbl@warning{%
- \@backslashchar#2 not set. Please, define\\%
- it in the preamble with something like:\\%
+ \@backslashchar#2 not set. Please, define it\\%
+ after the language has been loaded (typically\\%
+ in the preamble) with something like:\\%
\string\renewcommand\@backslashchar#2{..}\\%
Reported}}
\def\bbl@tentative{\protect\bbl@tentative@i}
@@ -10278,6 +10286,7 @@ help from Bernd Raichle, for which I am grateful.
% \global\@namedef{bbl@lcname@#2}{#2}%
\bbl@id@assign
\let\bbl@KVP@captions\@nil
+ \let\bbl@KVP@date\@nil
\let\bbl@KVP@import\@nil
\let\bbl@KVP@main\@nil
\let\bbl@KVP@script\@nil
@@ -10306,7 +10315,7 @@ help from Bernd Raichle, for which I am grateful.
{\ifx\bbl@initoload\relax
\begingroup
\def\BabelBeforeIni##1##2{\gdef\bbl@KVP@import{##1}\endinput}%
- \bbl@input@ini{#2}%
+ \bbl@input@texini{#2}%
\endgroup
\else
\xdef\bbl@KVP@import{\bbl@initoload}%
@@ -10548,7 +10557,7 @@ help from Bernd Raichle, for which I am grateful.
\let\BabelBeforeIni\@gobbletwo
\chardef\atcatcode=\catcode`\@
\catcode`\@=11\relax
- \bbl@input@ini{\bbl@cs{rqtex@\languagename}}%
+ \bbl@input@texini{\bbl@cs{rqtex@\languagename}}%
\catcode`\@=\atcatcode
\let\atcatcode\relax
\fi}%
@@ -10674,7 +10683,7 @@ help from Bernd Raichle, for which I am grateful.
{\def\BabelBeforeIni##1##2{%
\begingroup
\catcode`\[=12 \catcode`\]=12 \catcode`\==12
- \catcode`\;=12 \catcode`\|=12 %
+ \catcode`\;=12 \catcode`\|=12 \catcode`\%=14
\let\bbl@ini@captions@aux\@gobbletwo
\def\bbl@inidate ####1.####2.####3.####4\relax ####5####6{}%
\bbl@read@ini{##1}0%
@@ -10692,7 +10701,7 @@ help from Bernd Raichle, for which I am grateful.
\endgroup}%
\begingroup % boxed, to avoid extra spaces:
\ifx\bbl@initoload\relax
- \bbl@input@ini{#1}%
+ \bbl@input@texini{#1}%
\else
\setbox\z@\hbox{\BabelBeforeIni{\bbl@initoload}{}}%
\fi
@@ -10748,8 +10757,13 @@ help from Bernd Raichle, for which I am grateful.
\ifx\bbl@readstream\@undefined
\csname newread\endcsname\bbl@readstream
\fi
-\def\bbl@input@ini#1{%
- \bbl@exp{\lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}}}
+\def\bbl@input@texini#1{%
+ \bbl@bsphack
+ \bbl@exp{%
+ \catcode`\\\%=14
+ \lowercase{\\\InputIfFileExists{babel-#1.tex}{}{}}%
+ \catcode`\\\%=\the\catcode`\%\relax}%
+ \bbl@esphack}
\def\bbl@inipreread#1=#2\@@{%
\bbl@trim@def\bbl@tempa{#1}% Redundant below !!
\bbl@trim\toks@{#2}%
@@ -11187,11 +11201,11 @@ help from Bernd Raichle, for which I am grateful.
\begingroup
\bbl@add\bbl@secpost@identification{\closein\bbl@readstream }%
\catcode`\[=12 \catcode`\]=12 \catcode`\==12
- \catcode`\;=12 \catcode`\|=12 %
+ \catcode`\;=12 \catcode`\|=12 \catcode`\%=14
\bbl@read@ini{##1}1%
\endinput % babel- .tex may contain onlypreamble's
\endgroup}% boxed, to avoid extra spaces:
- {\bbl@input@ini{#1}}}
+ {\bbl@input@texini{#1}}}
% \end{macrocode}
%
% Alphabetic counters must be converted from a space separated list to
@@ -11287,14 +11301,18 @@ help from Bernd Raichle, for which I am grateful.
% |\bbl@read@ini|.
%
% \begin{macrocode}
-\newcommand\getlocaleproperty[3]{%
+\newcommand\getlocaleproperty{%
+ \@ifstar\bbl@getproperty@s\bbl@getproperty@x}
+\def\bbl@getproperty@s#1#2#3{%
\let#1\relax
\def\bbl@elt##1##2##3{%
\bbl@ifsamestring{##1/##2}{#3}%
{\providecommand#1{##3}%
\def\bbl@elt####1####2####3{}}%
{}}%
- \bbl@cs{inidata@#2}%
+ \bbl@cs{inidata@#2}}%
+\def\bbl@getproperty@x#1#2#3{%
+ \bbl@getproperty@s{#1}{#2}{#3}%
\ifx#1\relax
\bbl@error
{Unknown key for locale '#2':\\%
@@ -11386,8 +11404,7 @@ help from Bernd Raichle, for which I am grateful.
\newif\ifbbl@bcptoname
\@namedef{bbl@ADJ@bcp47.toname@on}{%
\bbl@bcptonametrue
- \BabelEnsureInfo
- }
+ \BabelEnsureInfo}
\@namedef{bbl@ADJ@bcp47.toname@off}{%
\bbl@bcptonamefalse}
% TODO: use babel name, override
diff --git a/macros/latex/required/babel/base/babel.ins b/macros/latex/required/babel/base/babel.ins
index 5c8abdc75d..f967de9e71 100644
--- a/macros/latex/required/babel/base/babel.ins
+++ b/macros/latex/required/babel/base/babel.ins
@@ -26,7 +26,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
-\def\filedate{2020/07/07}
+\def\filedate{2020/07/13}
\def\batchfile{babel.ins}
\input docstrip.tex
diff --git a/macros/latex/required/babel/base/babel.pdf b/macros/latex/required/babel/base/babel.pdf
index 0a1444e583..1e8c2a087d 100644
--- a/macros/latex/required/babel/base/babel.pdf
+++ b/macros/latex/required/babel/base/babel.pdf
Binary files differ
diff --git a/macros/latex/required/babel/base/bbcompat.dtx b/macros/latex/required/babel/base/bbcompat.dtx
index 84777f9f2a..9a2431ff45 100644
--- a/macros/latex/required/babel/base/bbcompat.dtx
+++ b/macros/latex/required/babel/base/bbcompat.dtx
@@ -30,7 +30,7 @@
%
% \iffalse
%<*dtx>
-\ProvidesFile{bbcompat.dtx}[2020/07/07 v3.46]
+\ProvidesFile{bbcompat.dtx}[2020/07/13 v3.47]
%</dtx>
%
%% File 'bbcompat.dtx'
diff --git a/macros/luatex/latex/lua-ul/lua-ul.dtx b/macros/luatex/latex/lua-ul/lua-ul.dtx
index b4c33d7b13..14aa2fae0a 100644
--- a/macros/luatex/latex/lua-ul/lua-ul.dtx
+++ b/macros/luatex/latex/lua-ul/lua-ul.dtx
@@ -335,9 +335,11 @@ local set_lua = token.set_lua
local scan_keyword = token.scan_keyword
local scan_list = token.scan_list
local scan_int = token.scan_int
+local scan_toks = token.scan_toks
local put_next = token.put_next
local texerror = tex.error
+local functions = lua.get_functions_table()
local char_given = token.command_id'char_given'
local underlineattrs = {}
@@ -355,6 +357,48 @@ local vmode do
end
local texnest = tex.nest
+% \end{macrocode}
+% \changes{0.1.0}{2020-07-13}{Ensure that \texttt{\string\everyhbox} doesn't interfere with hlist scanning}
+% To avoid influence from \texttt{\string\everyhbox} we reset \texttt{\string\everyhbox} to an empty token list directly before scanning.
+% As an added complication, we need to use a name which is guaranteed to be the primitive tokenlist and we
+% might have to restore it before reading the actual argument (There might be a reason why \texttt{\string\everyhbox} was sat after all.
+% Also we have to ensure that braces swallowed by LuaTeX are balanced, otherwise we get hard to trace errors in alignment contexts.
+% \begin{macrocode}
+local scan_raw_hlist do
+ local create = token.create
+ local lbrace, rbrace = token.new(0x7B, 1), token.new(0x7D, 2)
+ tex.enableprimitives('luaul@', {'everyhbox'})
+ local set_everyhbox do
+ local set_toks1, set_toks2 = {create'immediateassignment',
+ create'luaul@everyhbox', lbrace},
+ {rbrace, create'relax'}
+ function set_everyhbox(t)
+ token.put_next(set_toks2)
+ token.put_next(t)
+ token.put_next(set_toks1)
+ token.scan_token()
+ end
+ end
+ local func = luatexbase.new_luafunction"luaul.restore_everyhbox"
+ local everyhbox_saved
+ functions[func] = function() set_everyhbox(everyhbox_saved) end
+ local toks = {rbrace, -- Housekeeping, only for balance reasons
+ lbrace, create'the', create'luaul@everyhbox', rbrace,
+ create'hpack', lbrace,
+ token.new(func, token.command_id'lua_call')}
+ function scan_raw_hlist()
+ assert(token.get_next().command == 1)
+ put_next(toks)
+ token.get_next() -- Scan a corresponding brace to keep TeX's brace tracking happy
+ local saved_toks = scan_toks(false, true)
+ everyhbox_saved = saved_toks
+ set_everyhbox{}
+ local list = scan_list()
+ set_everyhbox(saved_toks)
+ return list
+ end
+end
+
local saved_values = {}
local function new_underline_type()
for i=1,#underlineattrs do
@@ -364,7 +408,7 @@ local function new_underline_type()
end
local strict_flag = scan_keyword'strict'
local over_flag = scan_keyword'over'
- local b = todirect(scan_list())
+ local b = todirect(scan_raw_hlist())
for i=1,#underlineattrs do
tex.attribute[underlineattrs[i]] = saved_values[i]
end
@@ -457,7 +501,6 @@ local function reset_underline()
end
tex.attribute[j] = -0x7FFFFFFF
end
-local functions = lua.get_functions_table()
local new_underline_type_func =
luatexbase.new_luafunction"luaul.new_underline_type"
local set_underline_func =
@@ -748,7 +791,7 @@ luatexbase.add_to_callback('vpack_filter',
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage
{lua-ul}
- [2020/03/31 v0.0.4 Underlining and related functionality for LuaTeX]
+ [2020/07/13 v0.1.0 Underlining and related functionality for LuaTeX]
% \fi
% Only \LuaLaTeX{} is supported.
@@ -762,7 +805,7 @@ luatexbase.add_to_callback('vpack_filter',
\directlua{require'lua-ul'}
\RequirePackage{xparse}
% \end{macrocode}
-% We support some options. Especially \verb+minimal+ will disable the predefined commands \verb+\underLine+ and \verb+\strikeThrough+ and allow you to define similar commands with your custom settings instead, \verb+soul+ tries to replicate names of the \verb soul package.
+% We support some options. Especially \verb+minimal+ will disable the predefined commands \verb+\underLine+ and \verb+\strikeThrough+ and allow you to define similar commands with your custom settings instead, \verb+soul+ tries to replicate names of the \verb+soul+ package.
% \begin{macrocode}
\newif\ifluaul@predefined
\newif\ifluaul@soulnames
@@ -802,7 +845,7 @@ luatexbase.add_to_callback('vpack_filter',
\expandafter\luaul@maybedefineuse
\expanded{{\csstring#2@@#3}}%
{\LuaULSetUnderline
- \LuaULNewUnderlineType#1\hbox{#4\hskip0pt}%
+ \LuaULNewUnderlineType#1{#4\hskip0pt}%
}}%
}
\ifluaul@predefined
@@ -818,7 +861,7 @@ luatexbase.add_to_callback('vpack_filter',
\def\luaul@@setcolor\xcolor@#1#2{}
\newcommand\luaul@setcolor[1]{%
\ifx\XC@getcolor\undefined
- \def\luaul@highlight@currentcolor{#1}
+ \def\luaul@highlight@currentcolor{#1}%
\else
\begingroup
\XC@getcolor{#1}\luaul@tmpcolor
diff --git a/macros/luatex/latex/lua-ul/lua-ul.pdf b/macros/luatex/latex/lua-ul/lua-ul.pdf
index 66d1f8551e..326d8a612c 100644
--- a/macros/luatex/latex/lua-ul/lua-ul.pdf
+++ b/macros/luatex/latex/lua-ul/lua-ul.pdf
Binary files differ