summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tugboat/ltubguid.ltx
blob: db9f183dac0613867d74e2c2e532593b437ba3a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
% $Id: ltubguid.ltx 274 2020-03-12 16:47:21Z karl $
% ltubguid.ltx - documentation for ltugboat classes.
% 
% Copyright 1994-2020 TeX Users Group.
% 
% This file is part of the tugboat package.
% 
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
% 
% The Current Maintainer of this work is the TeX Users Group
% (https://tug.org/TUGboat).
%
% The list of all files belonging to the distribution is
% given in the file `manifest.txt'. 
%
% The list of derived (unpacked) files belonging to the distribution 
% and covered by LPPL is defined by the unpacking scripts (with 
% extension .ins) which are part of the distribution.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  tubguide.bib -- the bibliography for this paper (apart from the
%  references to TUGboat itself)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{filecontents}{tubguide.bib}
% BibTeX bibliography file (generated by aux2bib)

@Misc{pkg:fancyvrb,
  author = {Timothy Van Zandt and others},
  title = {The {\textsf{fancyvrb}} package},
  howpublished = {\url{ctan.org/pkg/fancyvrb}},
}

@Misc{pkg:listings,
  author = {Carsten Heinz and others},
  title = {The {\textsf{listings}} package},
  howpublished = {\url{ctan.org/pkg/listings}},
}

@Misc{Arseneau:url:1996,
  author = {Donald Arseneau},
  title = {The {\textsf{url}} package},
  howpublished = {\url{ctan.org/pkg/url}},
}

@Misc{Rahtz:hyperref:1997,
  author = {Sebastian Rahtz and Heiko Oberdiek and others},
  title = {The {\textsf{hyperref}} package},
  howpublished = {\url{ctan.org/pkg/hyperref}},
}

@Book{Lamport:1994,
  author = {Leslie Lamport},
  title = {{\LaTeX}: A Document Preparation System},
  edition = {\nth{2}},
  year = {1994},
  publisher = {Addison-Wesley},
}

@Misc{Schoepf:verbatim:1996,
  author = {Rainer Sch{\umlaut{o}}pf},
  title = {The {\textsf{verbatim}} package},
  howpublished = {\url{ctan.org/pkg/verbatim}},
}

@Misc{Vieth:mflogo:1995,
  author = {Ulrik Vieth},
  title = {The {\textsf{mflogo}} package},
  howpublished = {\url{ctan.org/pkg/mflogo}},
}

@Article{Whitney:TB10-3-378,
  author = {Ron Whitney and Barbara Beeton},
  title = {{{{\TUB} authors' guide}}},
  journal = {{\TUB}},
  year = {1989},
  month = {November},
  volume = {10},
  number = {3},
  pages = {378--385},
  note = {\url{ctan.org/pkg/tugboat-plain}},
}

\end{filecontents}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% ctandir.sty -- an experimental style file to go with Donald
% Arseneau's url.sty. Not recommended these days, better to use
% https://ctan.org/pkg/..., but don't feel like rewriting.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{filecontents}{ctandir.sty}
%
% Experimental CTAN location information macros for use with Donald
% Arseneau's |url.sty|
%
% we need url.sty; we can rely on it to demand anything it needs of
% LaTeX. Not 
\IfFileExists{url.sty}%
  {\RequirePackage{url}}%
  {\PackageWarning{ctandir}{You should acquire a copy of url.sty}%
   \newcommand\urldef[3]{\def#1{\texttt{#3}}}%
   \let\url\texttt
  }
%
\newcommand\CTANdirectory[1]{\expandafter\urldef
  \csname CTAN@#1\endcsname\path}
\newcommand\CTANfile[1]{\expandafter\urldef
  \csname CTAN@#1\endcsname\path}
%
% Use the standard label-referencing mechanism to get the warning for
% an undefined label
\newcommand\CTANref[1]{\expandafter\@setref\csname CTAN@#1\endcsname
  \relax{#1}}
\end{filecontents}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\documentclass[final]{ltugboat}
\usepackage{microtype}
\usepackage{ctandir}
\IfFileExists{booktabs.sty}%
  {\usepackage{booktabs}}%
  {\let\midrule\hline}
%
\vbadness=10000   % imperfectly broken pages are ok
\overfullrule=4pt % want to see
%
% define CTAN addresses using the commands of the |ctandir| package
\CTANdirectory{packages}{macros/latex/required}
\CTANdirectory{tub-latex}{macros/latex/contrib/tugboat}
%
% ***** Commands provided by this paper *****
%
% Typeset the name of an environment, class, package, option, program
\providecommand\envname[1]{\textsf{#1}}
\providecommand\clsname[1]{\textsf{#1}}
\providecommand\pkgname[1]{\textsf{#1}}
\providecommand\optname[1]{\textsf{#1}}
\providecommand\progname[1]{\textsf{#1}}
%
% A list of options for a package/class
\newenvironment{optlist}{\begin{description}%
   \renewcommand\makelabel[1]{%
     \descriptionlabel{\mdseries\optname{##1}}}%
   \itemsep0.25\itemsep}%
  {\end{description}}
%
% A list of command names (using \mdwcmd, which as its name implies
% comes from the work of Mark Wooding)
\newenvironment{cmdlist}{\begin{description}%
   \renewcommand\makelabel[1]{%
     \descriptionlabel{\mdseries\mdwcmd##1}}%
   \itemsep0.25\itemsep}%
  {\end{description}}
%
\makeatletter
\providecommand{\mdwcmd}[1]{%
  \expandafter\texttt\expandafter{\string#1}%
  \mdwcmd@i}
\def\mdwcmd@i{\futurelet\@let@token\mdwcmd@ii}
\def\mdwcmd@ii{%
  \let\@tempa\relax%
  \ifx\@let@token\bgroup%
    \def\@tempa##1{\texttt{\char`\{}\textit{##1}\texttt{\char`\}}\mdwcmd@i}%
  \fi%
  \ifx\@let@token[%
    \def\@tempa[##1]{\texttt{[}\textit{##1}\texttt{]}\mdwcmd@i}%
  \fi%
  \@tempa%
}
\makeatother
%
% To use umlauts in a bibliography entry in BibTeX 0.99, we have to
% use a certain amount of subterfuge...
\let\umlaut\"
%
%%%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%%%
%
\title{The \LaTeXe\ \TUB{} macros}
\author{Robin Fairbairns \& TUGboat editors}
\EDITORnoaddress
\netaddress{tugboat@tug.org}
\personalURL{tug.org/TUGboat}
\maketitle

\section{Introduction}

This is the documentation for the \LaTeXe\ macros to be used by \TUB{}
authors.  The macros represent a development of the earlier
\clsname{ltugboat} and \clsname{ltugproc} styles that were written for
use with \LaTeX~2.09; major contributors have been Robin Fairbairns,
Sebastian Rahtz, Michel Goossens, Nico Poppelier and Johannes Braams.
Many others have been involved, including Barbara Beeton, Karl Berry,
Mimi Burbank, and the \LaTeX\ team.

\section{Availability}

The \TUB\ web pages are at:\\\centerline{\url{https://tug.org/TUGboat}}
They provide \textbf{an article template}, information for authors and
reviewers, and the complete run of all published \TUB\ issues, among
other things.

The macros are released for general use, and are distributed via \CTAN{}
(directory \CTANref{tub-latex}) in the usual \LaTeX{} way as files
\path|tugboat.dtx| and \path|tugboat.ins|.  When the\,\verb|.ins| file
is processed by \LaTeX{}, the files \path|ltugboat.cls| and
\path|ltugbib.bst| (for use with articles) and \path|ltugcomn.sty| (a
cooking pot of perhaps-useful macros, for documentation, etc.)\ are
produced.  (\path|ltugproc.cls| is also produced for compatibility, but
is no longer used for proceedings or anything else.)

The\,\verb|.dtx| file may itself be processed by \LaTeX{} to
produce a formatted (somewhat `literate') source listing for those 
interested in the implementation of the \TUB\ macros.

\section{The general structure of a paper}

The basic idea is to start your \LaTeX\ document with
\path|\documentclass{ltugboat}|, which defines the appearance of \TUB\
articles.  This uses the file \path|ltugboat.cls| as usual.

Each paper, therefore, is written as a document that may stand on its
own.  It starts with a \cs{documentclass} command, and its body is
enclosed in a \envname{document} environment.  There are some options to
the document class, described in the next section, but ordinarily the
author needn't bother with them.  The defaults are
designed for creating proof copies of papers.

The proof output differs from the final production output with respect
to page numbers and other material.  The changes required for final
production are the responsibility of the \TUB{} editors, and the author
need not be concerned with them.

\section{Class options: The \clsname{ltugboat} class}
\label{sec:boat-opts}

The \clsname{ltugboat} class accepts many of the options of the
\clsname{article} class (it suppresses the font-size selection
and one/two-side options).
\begin{optlist}
\item[draft] Set up for a draft copy of a paper (this is the default
  setting\Dash the author need not explicitly set it): page numbering
  starts at a high number, black marks for overfull boxes.
\item[extralabel] Use the extra label-distinguishing mark in the body
  of the reference; see section~\ref{sec:biblio}.
\item[final] Set up for the final copy of a paper: page numbering to
  come from elsewhere, no cropmarks.
\item[harvardcite] Specify Harvard-style citation (not 
  recommended in general; see section~\ref{sec:biblio}); see
  section~\ref{sec:biblio}.
\item[noextralabel] Don't use the extra label-distinguishing mark in
  the body of the reference; see section~\ref{sec:biblio}.
\item[nonumber] Sections are not numbered; section heading
  layout is to be as in the `plain' \pkgname{tugboat} styles.
\item[numbersec] Sections, subsections and subsubsections are to be
  numbered (this is the default setting\Dash the author need not
  explicitly set it).
\item[onecolumn] Typeset article in one column.
\item[preprint] Set up for a preprint.
\item[rawcite] Explicitly specify the standard \LaTeX\ citation method,
  which is the default; see section~\ref{sec:biblio}.
\item[runningfull] Information in both header and footer (default).
\item[runningminimal] Information in header only.
\item[runningoff] Information in neither header nor footer.
\end{optlist}

\noindent Again, normally there is no need to use any document options.
They are listed here for completeness.

\section{Command syntax}
\label{sec:syntax}

In general, we have sought simply to keep to the spirit of \LaTeX\ in
the commands provided by the \TUB\ class (\verb|ltugboat|).

In the few cases that it has proved possible to emulate (what seems to
a staid old \LaTeX{} programmer, such as the original author here) the gay
abandon of the syntax of the `plain' \pkgname{tugboat} styles
\cite{Whitney:TB10-3-378}, we have done so.  Nevertheless, on the whole,
the new \clsname{ltugboat} macros define \LaTeX{} commands and
environments, or modify the definitions of \LaTeX{} `standard'
commands.  Section~\ref{sec:equiv} lists equivalences between macros
defined by the `plain' package and those defined by the new package.

\section{Divisions of the paper}
\label{sec:divs-paper}

Papers in \TUB{} may be subdivided in the normal way of a \LaTeX{}
article (the classes are defined in terms of \LaTeX{}'s
\clsname{article} class).  Thus the author may use \cs{section},
\cs{subsection}, \dots, \cs{paragraph} commands (but \cs{part} and
\cs{subparagraph} from \clsname{article} are suppressed, and
\cs{chapter}, which doesn't even appear in the parent class, receives
the same treatment).

Authors may note that the style of ordinary issues of \TUB{} makes
no distinction between the titles of the divisions; the visual style
relies on the section numbers to indicate where the divisions lie in
the hierarchy.  If you use \cs{paragraph}, consider ending the paragraph
label with a period; sometimes it is helpful, sometimes not.

Reference may, however, be made to the `title' of divisions of the
paper, whether they are numbered or not.  The \cs{nameref} command
(which uses the technique developed for the \textsf{hyperref} package
\cite{Rahtz:hyperref:1997}) permits such references; for example, the
present section was introduced by:
\begin{verbatim}[\small]
  \section{Divisions of the paper}
  \label{sec:divs-paper}
\end{verbatim}
and the command \verb|\nameref{sec:divs-paper}| produces
`\nameref{sec:divs-paper}'.

\subsection{Abstracts}

The \clsname{ltugboat} class provides two environments for abstracts,
\envname{abstract} and \envname{longabstract}. The \envname{abstract}
environment simply typesets its body as an un-numbered section whose
title is `Abstract'. The \envname{longabstract} environment typesets its
body in small text, and separates the abstract from the rest of the
paper with a decorative line; this is rarely used.

\subsection{Appendices}

A paper may have appendices, which can be expressed in exactly the same
way as they would be in the \LaTeX{} article class (confusing as that
may be):

\begin{verbatim}[\small]
\appendix
\section{This is appendix A}
...
\section{This is appendix B}
\end{verbatim}
Which will produce `section' headings similar to:
\begin{quote}
\textbf{A\quad This is appendix A}
\end{quote}

\TUB{} articles may have a small extension to this format using an
\texttt{appendix} environment:

\begin{verbatim}[\small]
\begin{appendix}
\section{This is the first one}
...
\end{appendix}
\end{verbatim}
which will produce `section' headings similar to:
\begin{quote}
\textbf{Appendix A\quad This is the first one}
\end{quote}

In both cases, the subsections are numbered as normal (i.e., as
`A.\ensuremath{n}' in normal \TUB{} papers):

\section{Titles, addresses and so on}

The title and author(s) of a paper are quoted using commands that are
familiar (in syntax, at least) to most \LaTeX{} users; the \cs{title}
command is exactly that used in the standard \LaTeX{} classes.  There is
also \cs{shortTitle\char`{\meta{your-short-title}\char`}} to define the form
used in running heads or footers; similarly \cs{shortAuthor}.

The \cs{author} command is used once for each co-author of the paper,
and for each \cs{author} there should be a \cs{address} command that
gives a (postal) correspondence address. In addition (wherever
possible), \TUB{} likes to quote an email address for authors: for this,
the \cs{netaddress} command is used. Each author may also mention a web
page, using a \cs{personalURL} command, and an \acro{ORCID} (from
\url{orcid.org}), using \cs{ORCID}.

For example, the present paper has (approximately) this at its start:

\begin{verbatim}[\small]
\title{The \LaTeXe\ \TUB{} Macros}
\author{TUGboat editors}
\address{\TeX\ Users Group}
\netaddress{tugboat@tug.org}
\personalURL{https://tug.org/TUGboat}
\maketitle
\end{verbatim}

Lines in the title information can get quite long.
If the information being given is
to be typeset as ordinary text (as in the case of the \cs{address}
line above), it can be `wrapped' perfectly happily, as in normal text.
If one of the verbatim items (\cs{netaddress} or \cs{personalURL}
commands) is going to be too wide for the column, what is the author
to do?  (Abbreviating the text, as in the \cs{personalURL} above, is
\emph{not} usually an acceptable option!)  Unfortunately, the \verb|%|
sign is an entirely acceptable element of both email addresses and
\acro{URL}s, so that the normal `fall-back' isn't available.
Therefore, the classes typeset these electronic addresses in an
environment where some of the characters (notably `\verb|.|' and
`\verb|/|') are treated as word-divisions for the purposes of laying
out the line.

If the paper is the result of more than one author's labours, a sequence of
\cs{author}, \cs{address}, \cs{netaddress} and \cs{personalURL}
commands may be given, as in the following, which comes from a paper
given at \tug'95 (abbreviated):

\begin{verbatim}[\small]
\author{Michel Goossens}
\address{CN Division, CERN\\
  ...}
\netaddress{...}

\author{Sebastian Rahtz}
\address{Elsevier Science Ltd\\
  ...}
\netaddress{...}
...
\end{verbatim}

The class files will take care of arranging author names and addresses
between the \cs{maketitle} and (possibly) \cs{makesignature} commands.

\subsection{Compilation articles}

Compilation articles are written as a set of contributed parts under the
general editorship of the author(s) of the article. The author of the
article is presented (using \cs{author}, etc.)\ in the
usual way, and writes the introductory text. Each contributors' part
then follows. The contributor's name is quoted in the \cs{contributor}
command, which is an analogue of the \cs{author} command; contributors'
\cs{address}, \cs{netaddress} or \cs{personalURL}. The \cs{contributor}
command opens a group in which the contribution appears, and the
contributor's signature (produced with a \cs{makesignature} command)
closes the group. The general scheme looks like:
\begin{verbatim}[\small\makeescape\|\makebgroup\[\makeegroup\]]
\title{Example compilation article}
\author{Robin Fairbairns}
\address{University of Cambridge ...}
\netaddress{...}
 ... |textsl[introductory text] ...
\makesignature

\contributor{Betsy the Dog}
\address{Romsey Town, Cambridge}
 ... |textsl[Betsy's contribution] ...
...
\makesignature ...
\end{verbatim}

\section{Verbatim text}
\label{sec:verbatim}

For inline verbatim text, authors should ordinarily employ the
facilities of \LaTeX{} itself, that is, the \cs{verb} macro.  This macro, of
course, is highly restricted as to its usage\Dash primarily, it may
not appear in the argument of \emph{any} other macro, even
\cs{footnote}.

For displayed verbatim text, the classes add a small increment to
the functionality of \LaTeX{}'s \envname{verbatim} environment, by
introducing an optional argument.  The optional argument may contain
commands to be executed before starting the verbatim text; the set of
commands which have useful effect is strictly limited, but the
following are common:
\begin{itemize}
\item Font size selection commands: for example, all the display
  verbatim in the present paper starts with
  \verb|\begin{verbatim}[\small]|.

\item The command \cs{ruled}, which is available \emph{only} in
  \envname{verbatim}'s optional argument, and specifies that a
  column-wide rule should be drawn before and after the verbatim
  text. (This is not the recommended style in general, but it's
  available for when it helps.)

\item The command \cs{makevmeta}, also available only in
  \envname{verbatim}'s optional argument, and makes the construct
  \verb|!<...>| inside verbatim execute \verb|\meta{...}|. For example,
\begin{verbatim}[\small] 
\begin{verbatim}[\small\makevmeta]
The !<duration> is long ...
\end{verbatim}
produces:
\begin{verbatim}[\small\makevmeta]
The !<duration> is long ...
\end{verbatim}
  The \verb|!| character is made a general escape character by
  \cs{makevmeta}, but \verb|<>| are not made grouping characters.

\item More generally, one of the \cs{make*} commands,\footnote{\cs{makeescape},
  \cs{makebgroup}, \dots, \cs{makecomment}; used, for example, as
  \cs{makeescape}\cs{|}.} which change the category code of
  characters within the verbatim text.  This is (of course) a facility
  that should only be used with the utmost caution.

\end{itemize}
Two caveats about these optional arguments:
\begin{itemize}
\item The search for the optional argument can be confused by the
  appearance of a \verb|[| character as the first character of the displayed
  verbatim.  An author who wishes to start verbatim text with a
  \verb|[| character should provide an empty optional argument (i.e.,
  `\verb|[]|') to the \envname{verbatim} environment.
\item The \TUB\ facility is lost when any package is loaded that also
  defines the \verb|verbatim| environment, as discussed next.
\end{itemize}

Authors may wish to use a more featureful verbatim package, such as such
as \pkgname{verbatim}~\cite{Schoepf:verbatim:1996},
\pkgname{listings}~\cite{pkg:listings}, or
\pkgname{fancyvrb}~\cite{pkg:fancyvrb}. This is ok; it just means the
\TUB\ optional-argument feature is not available.

If you use the \pkgname{listings} package, please specify:
\begin{verbatim}[\small]
\lstset{columns=flexible, keepspaces=true,
        commentstyle=\slshape,
        basicstyle=\ttfamily\small}
\lstdefinestyle{inline}
        {basicstyle=\ttfamily\normalsize}
\end{verbatim}

Explanations:
\begin{itemize}
\item \texttt{columns=flexible}:
The other values for the \verb|columns| option don't work well in \TUB.

\item \texttt{keepspaces=true}:
However, having flexible columns makes spaces in the input not
necessarily correspond to spaces in the output. That's usually desired,
for alignment of the sources, hence \texttt{keepspaces}.

\item \texttt{commentstyle=\cs{slshape}}:
We prefer slanted to Computer Modern typewriter italic.
Using regular upright typewriter for comments is fine too.

\item \texttt{basicstyle=...}:
We usually prefer \cs{small} for displayed verbatim; when using
\texttt{listings}, it is necessary to reset inline verbatim to the
normal text size.

\end{itemize}

\section{Floating inserts}

The classes do not make any change to \LaTeX{}'s built-in provision
for floating inserts, so that authors may generate figures and tables
just as they would in any `normal' \LaTeX{} document.  Figure and
table captions, and labels referring to them, are also substantially
untouched.

However, since both classes typeset in two columns, authors must
distinguish between the \envname{figure} and \envname{table} environments
(which produce floats that are the same width as the column) and the
\envname{figure*} and \envname{table*} (which produce floats that are the same
width as the page).

%\begin{itemize}
%\item figures and tables as normal
%\item captions and labels work whatever (i.e., no restriction on
%  numbering)
%\item twocolumn setting implies distinction between \envname{figure} and
%  \envname{figure*} 
%\end{itemize}

\section{Special-purpose typesetting}

The classes define a rather large set of commands for special-purpose
typesetting.  Some of them are available for historical reasons only,
and many are only useful in somewhat restricted circumstances.  For
this reason, the present paper only outlines a representative, small
set of the macros.

\subsection{Acronyms and logos}

The classes provide macros that produce `correct' representations of a
large number of acronyms and logos; a small representative selection is
shown in figure~\ref{fig:acro-logo}.  The sample documents at
\url{tug.org/TUGboat/location.html} have a more complete list,
and of course the class sources are the ultimate reference.
\begin{figure}[htbp!]
  \begin{center}
    \begin{tabular}{@{}ll@{}}
      \small\textsl{\textsf{Macro}}&\small\textsl{\textsf{Output}}\\
      \midrule
      \verb|\ConTeXt|   & \ConTeXt \\
      \verb|\Cplusplus| & \Cplusplus \\
      \verb|\CTAN|   & \CTAN \\
      \verb|\eTex|   & \eTeX \\
      \verb|\FAQ|    & \FAQ \\
      \verb|\HTML|   & \HTML \\
      \verb|\ISBN|   & \ISBN \\
      \verb|\KOMAScript| & \KOMAScript \\
      \verb|\LaTeXe| & \LaTeXe \\
      \verb|\MacOSX| & \MacOSX \\
      \verb|\MathML| & \MathML \\
      \verb|\MF|     & \MF \\
      \verb|\OMEGA|  & \OMEGA \\
      \verb|\PDF|    & \PDF \\
      \verb|\SGML|   & \SGML \\
      \verb|\TUB|    & \TUB \\
      \verb|\TUG|    & \TUG \\
      \verb|\tug|    & \tug \\
      \verb|\XML|    & \XML \\
    \end{tabular}
  \end{center}
  \caption{A few of the provided acronyms and logos}
  \label{fig:acro-logo}
\end{figure}

Authors are especially urged to note the \cs{acro} command, which is
defined in the classes. The visual appearance of all-caps sequences
among normal text is rather unpleasing in Computer Modern,
unfortunately. Therefore, the \cs{acro} command typesets its argument
one point size smaller than the surrounding text: compare `\acro{DANTE}'
(\verb|\acro{DANTE}|) with `DANTE'\@. Many of the provided macros merely
generate calls to \cs{acro}; two examples, \cs{CTAN} and \cs{tug} of the
list in figure~\ref{fig:acro-logo} have already been used in the present
paper.

\subsection{Assorted other markup}

A small list of special typesetting commands follows: a large set of
such commands is defined in the classes, but the list covers most of
the `everyday' ones.
\begin{cmdlist}\raggedright
\item[\Dash] Typeset an em-dash, ignoring preceding and following space,
  surrounded by thin spaces, only breakable \emph{after} the dash; this
  is the preferred method of specifying a dash in running text.
\item[\cs{cmd}] Typeset a control sequence name:\\
  \verb|\cs{fred}| produces \cs{fred}.
\item[\env{environ}] Typeset the command to begin an environment:
  \verb|\env{fred}| produces \env{fred}.
\item[\meta{var}] Typeset meta-syntactic text:\\
  \verb|\meta{fred}| produces \meta{fred}.
\item[\tubbraced{text}] Typeset typewriter text in typewriter
  braces: \verb|\tubbraced{fred}| produces \tubbraced{fred}.
\item[\nth{n}] Typeset an ordinal number; \verb|\nth{1}| is
  set as \nth{1}, \verb|\nth{27}| is set as \nth{27}, and so on.
%\item[\sfrac{num}{denom}] Typeset a fraction to match running text;
%  for example \verb|\sfrac{3}{4}| is set as \sfrac{3}{4}\,.
\end{cmdlist}

For commands to typeset urls, see section~\ref{sec:urls}.

\section{Use of packages}

Being a \TeX\ journal, authors may use both standard and non-standard
external packages for their articles. The overriding criterion is that
articles need to be processable on the \TUB{} production computers
(running current \TeX\ Live). A sensible mechanism for submitting
personal packages is by use of the \envname{filecontents} environment.
It's also fine to submit manuscript source with additional packages in a
zip or other archive.

In general, packages currently on \CTAN, and known to work with
\emph{current} \LaTeX{} are likely to be fine. In particular,
the team is happy to accept papers using packages that are supported by
members of the \LaTeX\ team,\footnote{%
  Those in the \LaTeX{} base distribution, or one of those in the
  \CTANref{packages} sub-tree on \CTAN.} subject to the warning already
mentioned (section~\ref{sec:verbatim}): that use of the standard
\pkgname{verbatim} package eliminates the special \envname{verbatim}
facilities provided by the \TUB\ classes.

\tug{} has a policy that macro packages described in \TUB{} should be
available for readers to use. Since typing macros from printed sources
is a tedious undertaking, authors of publicly available packages are
urged to submit their macros to \CTAN{}. If a package is only available
under restricted terms, authors are requested to make this fact clear
when first submitting an article to the editor.

The \texttt{ltugboat} class loads the package \path|mflogo.sty|
\cite{Vieth:mflogo:1995} for typesetting the \MF\ logo. (If this package
is not present by some mischance, \texttt{ltugboat} will emulate its
important feature.)

An additional canonically-recommended package is \path|url.sty|
\cite{Arseneau:url:1996}, for typesetting filenames, email addresses,
urls, etc.; it is being used throughout the present paper (not least in
the bibliography), either on its own or via \texttt{hyperref}.

Although not necessarily recommended in all cases, many additional
packages are commonly used. To mention a few: \texttt{microtype} can
help reduce overfull boxes (and improve appearance); sometimes it may be
preferable to use the Latin Modern fonts via \texttt{lmodern};
\texttt{iftex} provides tests for the \TeX\ engine being run;
\texttt{texosquery} provides operating system information; and
\texttt{hyperref} supports live and internal hyperlinks, outlines, and
many other features.

\section{Typesetting urls}
\label{sec:urls}

As mentioned above, please load either \texttt{url} or (preferably)
\texttt{hyperref} so that reasonable line breaking of urls can happen.

Furthermore, for the printed (visible) \TUB\ page, nowadays we typically
omit a leading \texttt{http://} or \texttt{https://}. But for the link
to actually work in the output \PDF\ or \HTML, the protocol is required
(or it appears to be a local filesystem path). Therefore the
\texttt{ltugboat} class provides (as of version 2.23, released
March~2020) commands \cs{tbsurl} for \texttt{https} and \cs{tbhurl} for
\texttt{http}.\footnote{They are simple two-line wrapper around
\cs{hyper@linkurl}, and are due to Ulrike Fischer.
\url{https://github.com/latex3/hyperref/issues/125}\raggedright}

For example, \verb|\tbsurl{tug.org}| typesets the text
`\texttt{tug.org}' (with the usual url line breaks) as a link to
\url{https://tug.org}.

Similarly, \verb|\tbhurl{mirror.ctan.org}| typesets the text
`\texttt{mirror.ctan.org}' as a link to \url{http://mirror.ctan.org}.

\cs{tbsurl} and \cs{tbhurl} only add the protocol and make live links if
\texttt{hyperref} is loaded. Without \texttt{hyperref}, they are merely
synonyms for \cs{url}. This is ok, and we still request that the
protocol not be included; if live links are not being produced in the
output, the printed url without the protocol suffices. (When a user
copies/pastes url text into a browser, it will normally work.)

For \texttt{ftp}, \texttt{rsync}, and other protocols, it is best to
include them explicitly and use \cs{url}:\\ \verb|\url{ftp://tug.org}|,\\
\verb|\url{rsync://tug.org}|, etc.

\subsection{Url shortcuts}
\label{sec:urlshortcuts}

Another aspect of urls: the \tug\ web server supports a shortcut url
mechanism, \url{tug.org/l/}\meta{ident}, where \meta{ident} can be any
tag, similar to \url{tinyurl.com} and similar sites. The idea is that
\url{tug.org} shortcuts can be used in \TUB\ articles needing to link to
excessively long and/or unstable web resources; then we update the
shortcut if needed, and not worry that a commercial shortcut provider
will disappear.

The only way to create a \url{tug.org/l/} shortcut is by request, which
we are happy to receive.

\section{Bibliography}
\label{sec:biblio}

In short: our basic recommendation for handling bibliographies is to use
\BibTeX\ and the \pkgname{tugboat} bibliography style. No document
options are needed or recommended. All that is required in the article
source (as in the template available from \url{tug.org/TUGboat}) is the
following:

\begin{verbatim}[\small]
\bibliographystyle{tugboat}
\bibliography{yourbibfile}
\end{verbatim}

If you don't have \verb|tugboat.bst|, which was released in 2018, it's
fine to use \pkgname{plain} or \pkgname{abbrv}. If you do have it,
though, you may enjoy the following small but useful features:

\begin{itemize}
\item It is based on \pkgname{abbrvurl.bst} (see \url{ctan.org/pkg/urlbst}),

\item and thus supports \textsf{url} and \textsf{doi} fields, among others.
Please use \textsf{url} instead of putting urls in the
\textsf{note} field, where possible. Also, please don't bother to
include ``url access date'' information for \TUB; we find that extraneous.

\item The \textsf{url} field is ignored if either the \textsf{howpublished} or
\textsf{doi} field is present. In practice we observe that people put
the same information in all those fields, and we don't want to typeset
redundant information.

\item Has even more abbreviations than \textsf{abbrv}, such as
printing only two author names (plus ``et~al.'')\ if there are more than
four authors (thanks to Mico Loretan).

\item Defines an \textsf{@online} entry type as an alias for \textsf{@misc}.

\item For completeness only: \verb|tugboat.bst| provides editor-intended
fields \textsf{newpage} to force a page break after the current item,
\textsf{urlnewline} to force a line break before the \textsf{url} value,
and \textsf{journaltie} to output a tie instead of space after the
\textsf{journal} value. As editors, we've found that these presentation
tweaks can be desirable for the final typeset output. Authors need not
worry about them.

\end{itemize}

If you use \BibTeX, feel free to take advantage of the accumulated
bibliography of \TUB{} itself (\url{info/tugboat.bib} on \CTAN), and the
other compilations by Nelson Beebe in that same directory.

Bibliographies provide further problems because they're notoriously
difficult to typeset at the best of times.  \LaTeX{} sets \cs{sloppy}
when typesetting the bibliography, but this often leads to unpleasant
output in the narrow columns typical of \TUB{}.  The author can control
the typesetting using the command \cs{SetBibJustification}.  The classes
set \cs{sloppy}, by default (just like \LaTeX{}), but the author may
(for example) say:
\begin{verbatim}
  \SetBibJustification{\raggedright}
\end{verbatim}
as the present article does, to often achieve somewhat better results.

A last note for references: for \TUB\ issues, please use the format
\textsl{volno\,:\,issno}, e.g., ``\TUB\ 32:1'' for volume~32, number~1.

\section{Non-recommended bibliography facilities}

The preceding gives the bibliography recommendations for current \TUB\
articles. If, for whatever reason, you do not wish to follow those
recommendations, this section is about some of the myriad historical and
other possibilities.

Notwithstanding that general recommendation for the \pkgname{tugboat}
(falling back to \pkgname{plain}) \BibTeX\ style, \TUB's Harvard-style
citation support may be selected by specifying \optname{harvardcite} as
an option of the \cs{documentclass} command.\footnote{%
  The macros used derive rather directly from the `harvard' styles
  written by Glenn Paulley and later maintained by Peter Williams; the
  \BibTeX{} style derives from one developed by Patrick Daly.}
If your article demands Harvard-style citations, you may prefer to load
\pkgname{natbib} or similar instead of using \TUB's facilities; that's
fine.

This basic citation format is `author(s), year', but the macros are
capable of many variations. This in turn places somewhat of a load on
the author to use the correct citation macro. The macros available are
shown in figure~\ref{fig:citation-macros}; the figure assumes an entry
in the bibliography with authors Tom, Dick, and~Harry, and with a 1990
date.

\begin{figure}[htbp!]
  \begin{center}
    \leavevmode
    \begin{tabular}{@{}ll@{}}% @{ $\rightarrow$ } between columns removed
      \small\textsf{\textsl{Macro}} &\small\textsf{\textsl{Output}}\\
      \midrule
      \verb|\cite{key}|       & (Tom, Dick, and Harry, 1990)\\
      \verb|\citeA{key}|      & (Tom, Dick, and Harry)\\
      \verb|\citeNP{key}|     & Tom, Dick, and Harry, 1990\\
      \verb|\citeANP{key}|    & Tom, Dick, and Harry\\
      \verb|\citeN{key}|      & Tom, Dick, and Harry (1990)\\
      \verb|\shortcite{key}|  & (Tom et al., 1990)\\
                              & [also has \texttt{A} and \texttt{NP}
                                 variants]\\
      \verb|\citeyear{key}|   & (1990)\\
                              & [also has an \texttt{NP} variant]
    \end{tabular}
  \end{center}
  \caption{The range of citations in \optname{harvard} style}
  \label{fig:citation-macros}
\end{figure}

Note that, if Tom, Dick, and Harry are a prolific team, there can
easily be more than one reference to their work in one year.  In such
a case, the citations will be (Tom, Dick, and Harry, 1990a), (Tom,
Dick, and Harry, 1990b), and so on.  These extra `a', `b', etc., tags
may also appear in the references section of the paper, attached to
the year recorded for the reference: whether this indeed happens is
controlled by the \optname{extralabel} and \optname{noextralabel} class
options.  The default state (option \optname{extralabel}) attaches the
extra characters.

As for \BibLaTeX: we don't recommend it for \TUB. If you feel you must
use it, that is ok, but we may still change it to using the default
\LaTeX\ and \BibTeX\ facilities in processing for publication if the
output from \BibLaTeX\ is problematic, as we have often seen it to be.



\section{Equivalences between the `plain' and \LaTeX{} \TUB\ packages}
\label{sec:equiv}

A good proportion of the commands in the `plain' packages also appear
(with the same meaning) in the \LaTeX{} classes.
Figure~\ref{fig:plain-equiv} gives a brief summary of where the macros
differ significantly.

\begin{figure}[htbp]
  \begin{center}
    \leavevmode
    \begin{tabular}{@{}ll@{}}
      \small\textsf{Plain macro} & \small\textsf{\LaTeX{} macro} \\
      \midrule
      \cs{head} & \cs{section} \\
      \cs{subhead} & \cs{subsection} \\
      \cs{subsubhead} & \cs{subsubsection} \\
      \cs{list} & \envname{itemize}, \envname{enumerate}, etc., \\
                & environments \\
      \cs{verbatim} & \envname{verbatim} or \cs{verb} \\
      \cs{figure}   & \envname{figure} or \envname{figure*} environments \\
    \end{tabular}
  \end{center}
  \caption{Equivalences between \pkgname{plain} and \LaTeX{} \TUB\ macros}
  \label{fig:plain-equiv}
\end{figure}

\LaTeX{} itself makes comprehensive provision for lists; the \TUB{}
classes make no attempt to emulate the list facilities of the `plain'
macros.

The `plain' styles' provision for verbatim text is also somewhat
different from the \LaTeX{} approach; the \TUB{} classes offer a small
subset of the extra facilities that the `plain' styles provide; for more
elaborate facilities, the user is referred to the \pkgname{verbatim},
\pkgname{listings}, and \pkgname{fancyvrb} packages (see
section~\ref{sec:verbatim}).

Of course, the syntax of commands given to the \LaTeX{} classes is
different (as discussed in section~\ref{sec:syntax}); arguments are
(almost always) enclosed in braces instead of the various
forms provided by the `plain' macros.

\SetBibJustification{\raggedright}
\bibliographystyle{tugboat}
\bibliography{tubguide}

\advance\signaturewidth by 8pt
\makesignature

\end{document}