diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-15 22:21:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-15 22:21:52 +0000 |
commit | 9ab6cd6e1acc331b86f1a497026cb07261634c08 (patch) | |
tree | df3242d0b78852b1353f7c0b6cca1da033f70dd0 /Master/texmf-dist/source | |
parent | 20ced458fcbc8d680977df7fa7b2291c93698eb7 (diff) |
tugboat (15nov20)
git-svn-id: svn://tug.org/texlive/trunk@56942 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/tugboat/tugboat.dtx | 173 |
1 files changed, 122 insertions, 51 deletions
diff --git a/Master/texmf-dist/source/latex/tugboat/tugboat.dtx b/Master/texmf-dist/source/latex/tugboat/tugboat.dtx index 6ed75cece11..12e7dc63977 100644 --- a/Master/texmf-dist/source/latex/tugboat/tugboat.dtx +++ b/Master/texmf-dist/source/latex/tugboat/tugboat.dtx @@ -1,5 +1,5 @@ % \iffalse (this is a meta-comment (so they say)) -% $Id: tugboat.dtx 274 2020-03-12 16:47:21Z karl $ +% $Id: tugboat.dtx 314 2020-11-15 02:06:03Z karl $ % tugboat.dtx - main source for LaTeX TUGboat classes. % % Copyright 1994-2020 TeX Users Group. @@ -28,7 +28,7 @@ %<ltugboatsty>\ProvidesPackage{ltugboat} %<ltugprocsty>\ProvidesPackage{ltugproc} %<ltugcomn> \ProvidesPackage{ltugcomn} - [2020-03-12 v2.23 + [2020-11-14 v2.24 %<ltugboatcls> TUGboat journal class% %<ltugproccls> TUG conference proceedings class% %<ltugboatsty|ltugprocsty> TUG compatibility package% @@ -152,6 +152,7 @@ % |\JoT|& The Joy of \TeX\\ % |\LaTeX|&\\ % |\LyX|&\\ +% |\macOS|& mac OS\\ % |\MacOSX|& Mac OS X\\ % |\MathML|&\\ % |\Mc|& M with raised c\\ @@ -338,8 +339,6 @@ % |draft| vs.\ |preprint| vs.\ |final|. % % \begin{macrocode} -\newif\ifpreprint -\def\preprint{\preprinttrue} \DeclareOption{draft}{% \AtEndOfClass{% \setcounter{page}{901}% @@ -358,10 +357,16 @@ \PrelimDrafttrue }% } + +\newif\ifpreprint +\def\preprint{\preprinttrue} \DeclareOption{preprint}{% \preprinttrue } + +\newif\iftubfinaloption % [final] \DeclareOption{final}{% + \tubfinaloptiontrue \AtEndOfClass{% \let\thepage=\tuborigthepage \NoBlackBoxes @@ -372,7 +377,7 @@ % registration marks, etc. \ifnum\value{page}>900 \PrelimDrafttrue \else \PrelimDraftfalse \fi \@tubrunningfull - }% + }% } % \end{macrocode} % @@ -471,6 +476,17 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\ifsecondcolstart} +% Occasionally, we need to start an article in the second column of a +% page, due to splicing with a previous article. Let's try declaring that. +% Then, before |\maketitle|, we'll force the move to the second column. +% +% \begin{macrocode} +\newif\iftubsecondcolstart +\DeclareOption{secondcolstart}{\tubsecondcolstarttrue} +% \end{macrocode} +% \end{macro} +% % Any other options, we pass on to |article.cls| before we load it: % % \begin{macrocode} @@ -785,12 +801,14 @@ \def\MkIV{Mk\acro{IV}} \let\TB@@mp\mp \DeclareRobustCommand{\mp}{\ifmmode\TB@@mp\else MetaPost\fi} +\def\mtex{T\kern-.1667em\lower.424ex\hbox{\^E}\kern-.125emX\@} % % In order that the \cs{OMEGA} command will switch to using the TS1 % variant of the capital Omega character if \texttt{textcomp.sty} is % loaded, we define it in terms of the \cs{textohm} command. Note % that this requires us to interpose a level of indirection, rather % than to use \cs{let}\dots +% Revised definition of \cs{NTS} based on that used by Phil Taylor. % % \begin{macrocode} \DeclareRobustCommand{\NTG}{\acro{NTG}} @@ -803,9 +821,8 @@ \DeclareRobustCommand{\OOXML}{\acro{OOXML}} \DeclareRobustCommand{\OTF}{\acro{OTF}} \DeclareRobustCommand{\OTP}{\OMEGA\acro{TP}} -\def\mtex{T\kern-.1667em\lower.424ex\hbox{\^E}\kern-.125emX\@} +\DeclareRobustCommand{\OpTeX}{Op\kern-.05em\TeX} % \end{macrocode} -% Revised definition of \cs{NTS} based on that used by Phil Taylor. % \begin{macrocode} \def\Pas{Pascal} \def\pcMF{\leavevmode\raise.5ex\hbox{p\kern-.3\p@ c}MF\@} @@ -854,8 +871,7 @@ \def\TikZ{Ti{\em k}Z} \def\ttn{\textsl{TTN}\@} \def\TTN{\textsl{\TeX{} and TUG News}} -\let\texttub\textsl % redefined in other situations -\def\TUB{\texttub{TUGboat}} +\def\TUB{\texttub{TUGboat}}\def\texttub{\textsl} % redefined in some situations \def\TUG{\TeX\ \UG} \def\tug{\acro{TUG}} \def\UG{Users Group} @@ -881,7 +897,7 @@ % \begin{macrocode} \def\tubreflect#1{% \@ifundefined{reflectbox}{% - \TBerror{A graphics package must be loaded for \string\XeTeX}% + \TBError{A graphics package must be loaded for \string\XeTeX}% }{% \ifdim \fontdimen1\font>0pt \raise 1.75ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em @@ -1051,9 +1067,10 @@ \advance\minutes by-\time \global\multiply\minutes by-1 } \SetTime -\def\now{\number\hours:\ifnum\minutes<10 0\fi\number\minutes} +\def\now{\ifnum\hours<10 0\fi\number\hours:% + \ifnum\minutes<10 0\fi\number\minutes} \def\Now{\today\ \now} -\newif\ifPrelimDraft +\newif\ifPrelimDraft % [draft] or [preprint] or pageno>900 \def\midrtitle{} % center of running heads \def\rtitlenexttopage{\ifPrelimDraft \textsl{\small draft: \Now}\fi} % \end{macrocode} @@ -1196,6 +1213,7 @@ \ifx\hyper@normalise\undefined \def\tbsurl{\url}% no hyperref, so just \url is fine. \def\tbhurl{\url}% + \ifx\url\undefined \let\url\texttt \fi % er, make sure \url is defined \else % This hyperref hook-in is due to Ulrike Fischer. % \url{https://github.com/latex3/hyperref/issues/125}. @@ -1209,11 +1227,15 @@ % Make \! work in text mode. \DeclareRobustCommand{\!}{\ifmmode\mskip-\thinmuskip \else\kern-0.16667em \fi} % -% Half a thinspace. +% Half a thinspace, positive and negative. \DeclareRobustCommand{\tubthinnerspace} {\ifmmode\mskip.5\thinmuskip \else\kern0.08333em \fi} \DeclareRobustCommand{\tubthinnerspaceneg} {\ifmmode\mskip-.5\thinmuskip \else\kern-0.08333em \fi} +% +% Half a smallskip. +\DeclareRobustCommand{\tubsmallerskip} + {\vskip 1.5pt plus .75pt minus .75pt\relax} % % \end{macrocode} % @@ -1293,7 +1315,7 @@ \therevauth\therevtitle\therevpubinfo\endgraf}% \vskip\medskipamount } -\def\booktitle#1{{\slshape#1\/}} +\def\booktitle#1{{\slshape\frenchspacing#1\/}} % \end{macrocode} % % \subsection{Dates, volume and issue numbers, etc.} @@ -1313,38 +1335,35 @@ % % For production, these are set in a separate file, % |tugboat.dates|, which is issue-specific. -% -% \begin{description} -% \item[\emph{Comment:}] I would like to make the code read a file -% |tugboat.dates| in the current directory or its parent. -% This is easy except under `odd' operating systems ({\small VMS} is -% an example that springs to mind, {\small RISC}os may be even -% worse) whose syntax is out of the ordinary. -% \end{description} -% +% % \begin{macrocode} -\newcount\issueseqno \issueseqno=-1 +\newcount\issueseqno \issueseqno=-1 \def\v@lx{\gdef\volx{Volume~\volno~(\volyr), No.~\issno}} \def\volyr{} \def\volno{} -\def\vol #1,#2.{\gdef\volno{#1\unskip}% - \gdef\issno{\ignorespaces#2\unskip}% +\def\vol#1, #2.{% + \gdef\volno{#1}% + \gdef\issno{#2}% \setbox\TestBox=\hbox{\volyr}% \ifdim \wd\TestBox > .2em \v@lx \fi } -\def\issyear #1.{\gdef\issdt{#1}\gdef\volyr{#1}% +\def\issyear#1.{% + \gdef\issdt{#1}\gdef\volyr{#1}% \gdef\bigissdt{#1}% \setbox\TestBox=\hbox{\volno}% \ifdim \wd\TestBox > .2em \v@lx \fi } -\def\issdate #1#2 #3.{\gdef\issdt{#1#2 #3}\gdef\volyr{#3}% +\def\issdate#1#2 #3.{% + \gdef\issdt{#1#2 #3}\gdef\volyr{#3}% \gdef\bigissdt{#1{\smc\uppercase{#2}} #3}% \setbox\TestBox=\hbox{\volno}% \ifdim \wd\TestBox > .2em \v@lx \fi } +% The \vol command must be invoked precisely like this, including spaces. +% Since we are the only ones who write it, we can be strict. \vol 0, 0. \issdate Thermidor, 9999. % \end{macrocode} % -% (The curious should know that \emph{Thermidor} was one of the French -% revolutionary month names\dots) +% (The curious may like to know that \emph{Thermidor} was one of the French +% revolutionary month names.) % % For \LaTeX{} use, define a version of the issue declaration that can % take or leave the old plain syntax @@ -1507,10 +1526,10 @@ \ifx\tubomithyphenations\@thisisundefined \hyphenation{Del-a-ware Dijk-stra Duane Eijk-hout Flor-i-da Free-BSD Ghost-script Ghost-view - Hara-lam-bous Jac-kow-ski Karls-ruhe + Hara-lam-bous Jac-kow-ski Ja-pa-nese Karls-ruhe Mac-OS Ma-la-ya-lam Math-Sci-Net Net-BSD Open-BSD Open-Office - Pfa-Edit Post-Script Rich-ard Skoup South-all + Pak-i-stan Pfa-Edit Post-Script Rich-ard Skoup South-all Vieth VM-ware Win-Edt acro-nym acro-nyms analy-sis ap-pen-di-ces ap-pen-dix asyn-chro-nous bib-lio-graph-i-cal bit-map bit-mapped bit-maps buf-fer buf-fers bool-ean @@ -1569,6 +1588,11 @@ \parsep=3\p@\@plus\p@\@minus\p@ \itemsep=\parsep % +% The width of one column plus gutter (=243pt) is useful sometimes. +\newdimen\tubcolwidthandgutter + \tubcolwidthandgutter=\columnwidth + \advance\tubcolwidthandgutter by \columnsep +% % Ordinarily we typeset in two columns, but the onecolumn option % goes to one. In which case we want to center the text block on an % 8.5in width, given the default 72.27pt offset with margins of zero. @@ -2105,11 +2129,17 @@ % author or other title. In this case, the command flushes out the % latest \cs{sectitle} (or whatever) but does nothing else. % -% Provide machinery to skip extra space, even one or more full columns, +% Provide machinery (|\PreTitleDrop| to skip extra space, even one or +% more full columns, % above the top of an article to leave space to paste up a previous % article that has finished on the same page. This is a fall back to % accommodate the fact that multiple articles cannot yet be run together % easily with \LaTeXe. +% +% In addition, if the |secondcolstart| option was specified, do +% |\null\newpage| to move over. This is separate from |\PreTitleDrop|, +% for no particular reason. +% % \begin{macrocode} \newif\if@articletitle \def\maketitle{\@ifstar @@ -2126,6 +2156,7 @@ \vbox to \PreTitleDrop{} \global\PreTitleDrop=\z@ \fi + \iftubsecondcolstart \null\newpage\fi \begingroup \setcounter{footnote}{0} \global\@topnum\z@ % disallow floats above the title @@ -2428,31 +2459,32 @@ % \textsc{numbersec} is in effect. % % \begin{macrocode} +\def\tubsechook{} \if@numbersec \def\section{\TB@startsection{{section}% 1% \z@ {-8\p@ \@plus-2\p@ \@minus-2\p@}% {4\p@}% - {\normalsize\bf\raggedright\hyphenpenalty=\@M}}} + {\normalsize\bf\raggedright\hyphenpenalty\@M\tubsechook}}} \def\subsection{\TB@startsection{{subsection}% 2% \z@ {-8\p@ \@plus-2\p@ \@minus-2\p@}% {4\p@}% - {\normalsize\bf\raggedright\hyphenpenalty=\@M}}} + {\normalsize\bf\raggedright\hyphenpenalty\@M\tubsechook}}} \def\subsubsection{\TB@startsection{{subsubsection}% 3% \z@ {-8\p@ \@plus-2\p@ \@minus-2\p@}% {4\p@}% - {\normalsize\bf\raggedright\hyphenpenalty=\@M}}} + {\normalsize\bf\raggedright\hyphenpenalty\@M\tubsechook}}} \def\paragraph{\TB@startsection{{paragraph}% 4% \z@ {4\p@ \@plus1\p@ \@minus1\p@}% {-1em}% - {\normalsize\bf}}} + {\normalsize\bf\tubsechook}}} % \end{macrocode} % % Now the version if class option \textsc{nonumber} is in effect, @@ -2467,27 +2499,27 @@ \z@ {-8\p@ \@plus-2\p@ \@minus-2\p@}% {4\p@}% - {\normalsize\bf\raggedright\hyphenpenalty=\@M}}} + {\normalsize\bf\raggedright\hyphenpenalty\@M\tubsechook}}} \def\subsection{\TB@nolimelabel \TB@startsection{{subsection}% 2% \z@ {-8\p@ \@plus-2\p@ \@minus-2\p@}% {-0.5em\@plus-\fontdimen3\font}% - {\normalsize\bf\raggedright\hyphenpenalty=\@M}}} + {\normalsize\bf\raggedright\hyphenpenalty\@M\tubsechook}}} \def\subsubsection{\TB@nolimelabel \TB@startsection{{subsubsection}% 3% \parindent {-8\p@ \@plus-2\p@ \@minus-2\p@}% {-0.5em\@plus-\fontdimen3\font}% - {\normalsize\bf\raggedright\hyphenpenalty=\@M}}} + {\normalsize\bf\raggedright\hyphenpenalty\@M\tubsechook}}} \fi % \end{macrocode} % % \cs{TB@startsection} used to warn about \verb"*" versions of sectioning % commands when numbering wasn't in effect. But that eventually seemed -% a useless complaint, since it can be usefule to switch back and forth between +% a useless complaint, since it can be useful to switch back and forth between % numbered and unnumbered can be useful during article development. % So now \cs{TB@startsection} is just a synonym for \cs{@startsection}. % @@ -2722,7 +2754,7 @@ % \end{macro} % % One-line captions are normally centered, but sometimes we want to set -% them flush-left for consistency with other nearby figures. +% them flush-left for consistency with other nearby figures. % \begin{macro}{\tubcaptionleftglue} % \begin{macrocode} \let\tubcaptionleftglue=\hfil @@ -2745,7 +2777,7 @@ \fi \noindent \tubmakecaptionbox{#1}{#2}\par}% \else - % fits on one line; use the hbox, centered. Do not reset its glue. + % fits on one line; use the hbox, usually centered. Do not reset its glue. \global\@minipagefalse \hb@xt@\hsize{\tubcaptionleftglue\box\@tempboxa\hfil}% \fi @@ -3261,7 +3293,7 @@ \def\botregister{\tbotregister} % \end{macrocode} % -% \subsection{Running heads} +% \subsection{Running headers and footers} % % \begin{macrocode} \def\rtitlex{\def\texttub##1{{\normalsize\textrm{##1}}}\TUB, \volx} @@ -3297,21 +3329,23 @@ \def\@oddfoot{% make line break commands produce a normal space \def\\{\unskip\ \ignorespaces}% \let\newline=\\% - \frenchspacing - \hfil\rhTitle} - \def\@evenfoot{\frenchspacing \let\thanks\@gobble \tubrunningauthor\hfil} + \tubtypesetdoi + \frenchspacing\hfil\rhTitle} + \def\@evenfoot{% + \let\thanks\@gobble + \tubtypesetdoi + \frenchspacing\tubrunningauthor\hfil} } % empty footer. \def\@tubrunningminimal{% - \def\@oddfoot{\hfil}% - \def\@evenfoot{\hfil}% + \def\@oddfoot{\tubtypesetdoi\hfil}% + \def\@evenfoot{\tubtypesetdoi\hfil}% } % empty footer and header. \def\@tubrunningoff{% - \def\@oddfoot{\hfil}% - \def\@evenfoot{\hfil}% + \@tubrunningminimal \def\@oddhead{\hfil}% \def\@evenhead{\hfil}% } @@ -3320,6 +3354,43 @@ \pagestyle{headings} % \end{macrocode} % +% Typeset the doi. The format we decided on looks like: +% \texttt{https://doi.org/10.47397/tb/41-3/tb129mansour-nonlatin} +% where the last element is (usually) the |\jobname|. +% +% We put this below the footline. The footer definitions above specify +% that it is always called, even if the regular footer is empty. +% +% If the article started in the second column (option [secondcolstart]), +% have to manually move the doi over. +% +% We do not check for validity of |\volno|, etc. For testing, etc., +% seems simpler to just typeset what we've got. +% +% But don't do any of this yet. Maybe for 42:1. +% +% \begin{macrocode} +% +\def\tubdoiprefix{10.47397/tb} % the number crossref assigned us +% +\def\notyettubtypesetdoi{\iftubfinaloption % do this if [final], even if pageno>900 + \vbox to 0pt{% don't impact normal layout + \edef\thedoi{\ifnum\value{page}>900 xnot\fi % but make url invalid if >900 + doi.org/\tubdoiprefix/\volno-\issno/\jobname}% + \scriptsize + \vskip\baselineskip + \iftubsecondcolstart \moveright \tubcolwidthandgutter \fi + \rlap{\expandafter\tbsurl\expandafter{\thedoi}}% + \vss + }% + \global\let\tubtypesetdoi\@empty % only do it once, no matter what. +\fi} +% +\def\tubtypesetdoi{} +% +% \end{macrocode} +% +% % \subsection{Output routine} % Modified to alter |\brokenpenalty| across columns % |