summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tugboat/tugboat.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/tugboat/tugboat.dtx')
-rw-r--r--macros/latex/contrib/tugboat/tugboat.dtx71
1 files changed, 56 insertions, 15 deletions
diff --git a/macros/latex/contrib/tugboat/tugboat.dtx b/macros/latex/contrib/tugboat/tugboat.dtx
index 6b627b723e..a37201087c 100644
--- a/macros/latex/contrib/tugboat/tugboat.dtx
+++ b/macros/latex/contrib/tugboat/tugboat.dtx
@@ -1,5 +1,5 @@
% \iffalse (this is a meta-comment (so they say))
-% $Id: tugboat.dtx 376 2021-06-27 16:27:44Z karl $
+% $Id: tugboat.dtx 392 2021-10-12 21:31:32Z karl $
% tugboat.dtx - main source for LaTeX TUGboat classes.
%
% Copyright 1994-2021 TeX Users Group.
@@ -28,7 +28,7 @@
%<ltugboatsty>\ProvidesPackage{ltugboat}
%<ltugprocsty>\ProvidesPackage{ltugproc}
%<ltugcomn> \ProvidesPackage{ltugcomn}
- [2021-06-27 v2.25
+ [2021-10-12 v2.26
%<ltugboatcls> TUGboat journal class%
%<ltugproccls> TUG conference proceedings class%
%<ltugboatsty|ltugprocsty> TUG compatibility package%
@@ -346,11 +346,20 @@
% We want to use \texttt{hyperref}'s \cs{texorpdfstring}, e.g., in the
% \texttt{draft} option above. If \texttt{hyperref} is not loaded,
% define our own trivial fallback to expand to the \TeX\ (first) argument.
+%
+% Similarly, disable \acro if we have hyperref, commonly used in sections.
% \begin{macrocode}
\AtBeginDocument{%
\ifx\undefined\texorpdfstring
\DeclareRobustCommand{\texorpdfstring}[2]{#1}%
\fi
+ %
+ \ifx\undefined\pdfstringdefDisableCommands\else
+ \pdfstringdefDisableCommands{%
+ \let\acro\relax
+ % lots more could be added.
+ }%
+ \fi
}
% \end{macrocode}
%
@@ -706,6 +715,7 @@
\def\Ghostscript{Ghost\-script}
\def\GNU{\acro{GNU}}
\def\GUI{\acro{GUI}}
+\DeclareRobustCommand{\HarfBuzz}{Harf\discretionary{-}{}{\kern.077em}Buzz}
\def\Hawaii{Hawai`i}
\def\HTML{\acro{HTML}}
\def\HTTP{\acro{HTTP}}
@@ -896,7 +906,7 @@
\ifdim \fontdimen1\font>0pt
% XeTeX logo needs tinkering when slanted/italic font.
\def\XekernbeforeE{-.11em}%
- \def\XekernafterE{-.11em}%
+ \def\XekernafterE{-.16em}%
\dp1=-.17ex
\fi
\lower\dp0\hbox{\raise\dp1\hbox{\kern\XekernbeforeE\tubreflect{E}}}%
@@ -1198,13 +1208,36 @@
\else
% This hyperref hook-in is due to Ulrike Fischer.
% \url{https://github.com/latex3/hyperref/issues/125}.
+ % \tb[sh]url@ are defined next.
\DeclareRobustCommand*{\tbsurl}{\hyper@normalise\tbsurl@}%
- \def\tbsurl@#1{\hyper@linkurl{\Hurl{#1}}{https://#1}}%
\DeclareRobustCommand*{\tbhurl}{\hyper@normalise\tbhurl@}
- \def\tbhurl@#1{\hyper@linkurl{\Hurl{#1}}{http://#1}}%
\fi
}
%
+% Outside \AtBeginDocument, back at the top level of the dtx,
+% turn on expl syntax for the main definitions of \tb[sh]url. We want
+% to auto-remove an explicit protocol in case it
+% was given. Only the correct protocol is removed, the incorrect
+% protocol (\tbsurl{http://}) generates an invalid link. That's ok
+% because the link wouldn't be correct anyway.
+\ExplSyntaxOn
+\def\tbsurl@#1 % https
+ {
+ \str_set:Nn\l_tmpa_str{#1}
+ \str_remove_once:Nn\l_tmpa_str{https://}
+ \expandafter\hyper@linkurl\expandafter{\expandafter\Hurl\expandafter
+ {\l_tmpa_str}}{https://\l_tmpa_str}
+ }
+
+\def\tbhurl@#1 % http
+ {
+ \str_set:Nn\l_tmpa_str{#1}
+ \str_remove_once:Nn\l_tmpa_str{http://}
+ \expandafter\hyper@linkurl\expandafter{\expandafter\Hurl\expandafter
+ {\l_tmpa_str}}{http://\l_tmpa_str}
+ }
+\ExplSyntaxOff
+%
% Make \! work in text mode.
\DeclareRobustCommand{\!}{\ifmmode\mskip-\thinmuskip \else\kern-0.16667em \fi}
%
@@ -1837,7 +1870,7 @@
\def\|{\unskip\hfil\break}%
\def\\{\endgraf}%
\def\phone{\rm Phone: }%
- \def\tubmultipleaffilauthor{\\\hspace*{1em}}%
+ \def\tubmultipleaffilauthor{\unskip,\\\hspace*{1em}}%
\rm\@signature}%
}%
\ifnum\authornumber<0 \endgroup\fi
@@ -1847,14 +1880,16 @@
%
% The idea here is that if multiple authors share affiliation
% information, we need only typeset the affiliation once. We separate by
-% commas for the \cs{maketitle}, and put on separate lines in the
-% \cs{makesignature}. Similarly, within \cs{netaddress},
-% |!tubmultipleaffilnet| separates with a space before and after the
-% comma, while . (All this per bb.) See |tb122childs-trotter.ltx| for an
-% example.
+% commas for the \cs{maketitle}, and put on separate lines, also with commas,
+% in the \cs{makesignature}.
+%
+% Similarly, within \cs{netaddress}, |!tubmultipleaffilnet| separates
+% with a space before and after the
+% comma. (All this per bb.) See |tb122childs-trotter.ltx|,
+% |tb131sojka-czech.ltx| for examples.
%
% \begin{macrocode}
-\def\tubmultipleaffilauthor{\unskip, \ignorespaces}%
+\def\tubmultipleaffilauthor{\unskip,\ \ignorespaces}%
\def\tubmultipleaffilnet{\unskip\textrm{\,,\ \ignorespaces}}
% \end{macrocode}
%
@@ -2772,11 +2807,15 @@
% \end{macrocode}
%
% Also use \cs{tubcaptionfonts} for the caption
-% labels, and put the label itself (e.g., ``Figure 1'') in bold.
+% labels, and put the label (e.g., ``Figure 1'') in bold.
+% If the \texttt{listings} package is being used, bold for its
+% label too; this \cs{def} is too early, but maybe listings will
+% play nice later.
%
% \begin{macrocode}
\def\fnum@figure{{\tubcaptionfonts \bf \figurename\nobreakspace\thefigure}}
\def\fnum@table{{\tubcaptionfonts \bf \tablename\nobreakspace\thetable}}
+\def\lstlistingnamestyle{\bfseries}
% \end{macrocode}
%
% Let's reduce the default space above captions a bit, and give it some
@@ -3009,7 +3048,7 @@
%
% Finally, if |microtype| is loaded, we want it to be deactivated in
% verbatim blocks. It often manipulates a leading |\| rather too much,
-% and messes with the visible fixed-width alignment.
+% thus messing with the visible fixed-width alignment.
% \begin{macrocode}
\AtBeginDocument{%
\@ifpackageloaded{microtype}
@@ -3356,6 +3395,7 @@
% \begin{macrocode}
%
\def\tubdoiprefix{10.47397/tb} % the number crossref assigned us
+\def\tubabovedoi{} % fudge spacing or whatever.
%
\def\tubtypesetdoi{\iftubomitdoioption\else % if not explicit omission ...
\iftubfinaloption % do this if [final], even if pageno>900
@@ -3364,6 +3404,7 @@
doi.org/\tubdoiprefix/\volno-\issno/\jobname}%
\scriptsize
\vskip\baselineskip
+ \tubabovedoi
\iftubsecondcolstart \moveright \tubcolwidthandgutter \fi
\rlap{\expandafter\tbsurl\expandafter{\thedoi}}%
\vss
@@ -3556,7 +3597,7 @@
% \subsection{Initialization}
%
% If we're going to use Harvard-style bibliographies, we set up the
-% bibliography style: the user doesn't get any choice.
+% bibliography style: the user doesn't get any choice. (Not recommended.)
%
% \begin{macrocode}
\if@Harvardcite