From b49826a5e3952462b18630e221170e3237b0dc75 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 20 May 2022 21:38:58 +0000 Subject: tugboat (20may22) git-svn-id: svn://tug.org/texlive/trunk@63347 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/latex/tugboat/tugboat.dtx | 87 ++++++++++++++++++---- 1 file changed, 73 insertions(+), 14 deletions(-) (limited to 'Master/texmf-dist/source/latex/tugboat') diff --git a/Master/texmf-dist/source/latex/tugboat/tugboat.dtx b/Master/texmf-dist/source/latex/tugboat/tugboat.dtx index a37201087ce..ffb09d15f36 100644 --- a/Master/texmf-dist/source/latex/tugboat/tugboat.dtx +++ b/Master/texmf-dist/source/latex/tugboat/tugboat.dtx @@ -1,8 +1,8 @@ % \iffalse (this is a meta-comment (so they say)) -% $Id: tugboat.dtx 392 2021-10-12 21:31:32Z karl $ +% $Id: tugboat.dtx 424 2022-05-19 22:45:08Z karl $ % tugboat.dtx - main source for LaTeX TUGboat classes. % -% Copyright 1994-2021 TeX Users Group. +% Copyright 1994-2022 TeX Users Group. % % This file is part of the tugboat package. % @@ -28,7 +28,7 @@ %\ProvidesPackage{ltugboat} %\ProvidesPackage{ltugproc} % \ProvidesPackage{ltugcomn} - [2021-10-12 v2.26 + [2022-05-19 v2.27 % TUGboat journal class% % TUG conference proceedings class% % TUG compatibility package% @@ -347,7 +347,9 @@ % \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. +% Similarly, disable \acro and more if we have \texttt{hyperref}, +% so section titles using them don't cause useless warnings. +% % \begin{macrocode} \AtBeginDocument{% \ifx\undefined\texorpdfstring @@ -357,6 +359,7 @@ \ifx\undefined\pdfstringdefDisableCommands\else \pdfstringdefDisableCommands{% \let\acro\relax + \let\origDash=\Dash \def\Dash{\texorpdfstring{\origDash}{--}}% % lots more could be added. }% \fi @@ -706,8 +709,19 @@ \def\DVItoVDU{DVIto\kern-.12em VDU} \def\ECMA{\acro{ECMA}} \def\EPS{\acro{EPS}} -% no line break at this hyphen please -\DeclareRobustCommand{\eTeX}{\ensuremath{\varepsilon}\mbox{-}\kern-.125em\TeX} +% no line break at this hyphen please, and try to get a bold \varepsilon. +\def\TUBdefaulteTeX{\ensuremath{\varepsilon}\mbox{-}\kern-.125em\TeX}% +\DeclareRobustCommand{\eTeX}{% + \ifx\f@series\bfseries@rm + \ifx\boldsymbol\undefined % \boldsymbol is from amsmath; also support bm? + \TUBdefaulteTeX + \else + \ensuremath{\boldsymbol{\varepsilon}}\mbox{-}\kern-.125em\TeX + \fi + \else + \TUBdefaulteTeX + \fi +} \DeclareRobustCommand{\ExTeX}{% \ensuremath{\textstyle\varepsilon_{\kern-0.15em\cal{X}}}\kern-.2em\TeX} \def\FAQ{\acro{FAQ}} @@ -729,7 +743,7 @@ \def\JTeX{\leavevmode\hbox{\lower.5ex\hbox{J}\kern-.18em\TeX}} \def\JoT{\textsl{The Joy of \TeX}} \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em% - M\kern.05em A\kern.1em-\kern.1em Script}} + M\kern.05em A\kern.1em\hyph\kern.1em Script}} \def\LAMSTeX{L\raise.42ex\hbox{\kern-.3em $\m@th$\fontsize\sf@size\z@\selectfont $\m@th\mathcal{A}$}% @@ -937,7 +951,24 @@ \def\newline{\hskip\z@\@plus\pagewd\break} % \end{macrocode} % -% Hyphen control: first, we save the hyphenpenalties in +% \begin{macro}{\tubsentencespace} +% +% Occasionally, notably after citations that need to come after a +% sentence-ending period, we want to tell \TeX\ that it's still at the +% end of a sentence. As in: +% |... whatever. \cite{foo}\tubsentencespace| +% This happens when, e.g., the reference applies to more than the final +% sentence. Also can be needed when \cs{@} cannot be used because the +% sentence-ending punctuation itself occurs inside a control sequence +% that prevents it. +% +% \begin{macrocode} +\def\tubsentencespace{\spacefactor=3000{}\space\ignorespaces} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\allowhyphens} +% Hyphen control: first, we save (via \cs{edef}) the hyphenpenalties in % \cs{allowhyphens}. This allows us to permit hyphens temporarily in % things like \cs{netaddress}es, which typically occur when % \cs{raggedright} is set, but which need to be allowed to break at @@ -948,6 +979,7 @@ \noexpand\exhyphenpenalty\the\exhyphenpenalty\relax} \def\nohyphens{\hyphenpenalty\@M\exhyphenpenalty\@M} % \end{macrocode} +% \end{macro} % % \subsection{Utility registers and definitions} % @@ -1118,6 +1150,14 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\tubjustifiedpar} +% Undo the \cs{raggedright} (or other such) settings, restoring normality. +% \begin{macrocode} +\def\tubjustifiedpar{\rightskip=0pt \parfillskip=0pt plus1fil + \allowhyphens \normalspaces} +% \end{macrocode} +% \end{macro} +% % \subsection{Assorted user-level markup} % % \LaTeXe{} defines a robust \cs{,}, but that we provide a new definition @@ -1218,8 +1258,8 @@ % 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. +% protocol (\verb|\tbsurl{http://}|) generates an invalid link. That's ok +% because the link wouldn't work anyway. \ExplSyntaxOn \def\tbsurl@#1 % https { @@ -1228,7 +1268,6 @@ \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} @@ -1238,6 +1277,11 @@ } \ExplSyntaxOff % +% Now let's use those macros for putting a url into a simple +% ragged-right footnote. +\def\tbsurlfootnote#1{\footnote{\raggedright\tbsurl{#1}}} +\def\tbhurlfootnote#1{\footnote{\raggedright\tbhurl{#1}}} +% % Make \! work in text mode. \DeclareRobustCommand{\!}{\ifmmode\mskip-\thinmuskip \else\kern-0.16667em \fi} % @@ -2748,9 +2792,24 @@ % Getting named references is then just like getting page references in % the \LaTeX\ kernel (see |ltxref.dtx|). % +% The above was written by RobinF decades ago; the macros in \TUB\ were +% never changed. Meanwhile, the \cs{nameref} in \texttt{hyperref} has +% changed many times, and we want to use its version if available. So we +% provide our \cs{nameref} \cs{AtBeginDocument}, so as not to overwrite +% any previous version. Until May 2022, \texttt{hyperref} silently +% overwrote an existing definition, that is, \TUB's. But now it is no +% longer silent. +% +% It seems that all the internal definitions above do not cause +% problems, so just let them alone. +% % \begin{macrocode} -\DeclareRobustCommand{\nameref}[1]{\expandafter\@setref - \csname r@nr@#1\endcsname\@secondoftwo{#1}} +\AtBeginDocument{% + \providecommand\nameref[1]{% + \expandafter\@setref + \csname r@nr@#1\endcsname\@secondoftwo{#1}% + }% +} % \end{macrocode} % % \subsection{Float captions} @@ -3504,7 +3563,7 @@ % % \end{macrocode} % -% \subsection{Miscellaneous definitions} +% \subsection{Editor's notes and other footnotes} % % \cs{EdNote} allows the editor to enter notes in the text of a paper. % If the command is given something that appears like an optional -- cgit v1.2.3