1 % \iffalse meta-comment
3 % Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
29 % Filename: ltnews.cls
30 % Author: Alan Jeffrey et al
33 % This is the LaTeX2e document class for the `LaTeX News' information
34 % sheet which comes with every LaTeX release. It may be useful for
35 % newsletters, or as an example of how simple newsletters can be set
36 % with LaTeX. The changes log is at the end of the file.
38 % Copyright 1994 1995 1996 1997 1999 2000 2001 2002 2003 2004
39 % Alan Jeffrey and the LaTeX3 project.
41 % This is a LaTeX2e document class.
43 \NeedsTeXFormat{LaTeX2e
}
45 \ProvidesClass{ltnews
}[2015/
02/
15 v1.04 Standard LaTeX class
]
47 % The configuration file, used for passing options.
49 \InputIfFileExists{ltnews.cfg
}{%
50 \ClassInfo{ltnews
}{Using local configuration file
}%
52 \ClassInfo{ltnews
}{No local configuration file
}%
55 % The lw35fonts option uses the fonts:
57 % Adobe Palatino (main text)
58 % Adobe Helvetica Bold (headings)
59 % Courier (program listings)
60 % Mathptm math italic (2e logo)
61 % Mathptm symbol font (AMS logo)
63 % The type1fonts option uses the fonts:
65 % Adobe Utopia (main text)
66 % URW Grotesk-T Bold (headings)
67 % Lucida Sans typewriter (program listings)
68 % Mathptm math italic (2e logo)
69 % Mathptm symbol font (AMS logo)
71 % The Adobe Palatino fonts:
73 \DeclareFontFamily{OT1
}{ppl
}{}
74 \DeclareFontShape{OT1
}{ppl
}{m
}{n
}{<-> pplr7t
}{}
75 \DeclareFontShape{OT1
}{ppl
}{bx
}{n
}{<-> pplb7t
}{}
76 \DeclareFontShape{OT1
}{ppl
}{m
}{sc
}{<-> pplrc7t
}{}
77 \DeclareFontShape{OT1
}{ppl
}{m
}{it
}{<-> pplri7t
}{}
78 \DeclareFontShape{OT1
}{ppl
}{m
}{sl
}{<-> pplro7t
}{}
80 \DeclareFontFamily{T1}{ppl
}{}
81 \DeclareFontShape{T1}{ppl
}{m
}{n
}{<-> pplr8t
}{}
82 \DeclareFontShape{T1}{ppl
}{bx
}{n
}{<-> pplb8t
}{}
83 \DeclareFontShape{T1}{ppl
}{m
}{sc
}{<-> pplrc8t
}{}
84 \DeclareFontShape{T1}{ppl
}{m
}{it
}{<-> pplri8t
}{}
85 \DeclareFontShape{T1}{ppl
}{m
}{sl
}{<-> pplro8t
}{}
87 % The Adobe Helvetica fonts:
89 \DeclareFontFamily{OT1
}{phv
}{}
90 \DeclareFontShape{OT1
}{phv
}{m
}{n
}{<-> s*
[0.86] phvr7t
}{}
91 \DeclareFontShape{OT1
}{phv
}{b
}{n
}{<-> phvb7t
}{}
93 \DeclareFontFamily{T1}{phv
}{}
94 \DeclareFontShape{T1}{phv
}{m
}{n
}{<-> s*
[0.86] phvr8t
}{}
95 \DeclareFontShape{T1}{phv
}{b
}{n
}{<-> phvb8t
}{}
97 % The Adobe Courier fonts:
99 \DeclareFontFamily{OT1
}{pcr
}{\hyphenchar\font=-
1}
100 \DeclareFontShape{OT1
}{pcr
}{m
}{n
}{<-> s*
[0.89] pcrr7t
}{}
102 \DeclareFontFamily{T1}{pcr
}{\hyphenchar\font=-
1}
103 \DeclareFontShape{T1}{pcr
}{m
}{n
}{<-> s*
[0.89] pcrr8t
}{}
107 \DeclareFontFamily{OT1
}{put
}{}
108 \DeclareFontShape{OT1
}{put
}{m
}{n
}{<-> putr7t
}{}
109 \DeclareFontShape{OT1
}{put
}{m
}{sc
}{<-> putrc7t
}{}
110 \DeclareFontShape{OT1
}{put
}{m
}{it
}{<-> putri7t
}{}
112 % The URW Grotesk fonts:
114 \DeclareFontFamily{OT1
}{ugq
}{}
115 \DeclareFontShape{OT1
}{ugq
}{b
}{n
}{<-> ugqb7t
}{}
117 % The Lucida Sans Typewriter fonts:
119 \DeclareFontFamily{OT1
}{hlct
}{\hyphenchar\font=-
1}
120 \DeclareFontShape{OT1
}{hlct
}{m
}{n
}{<-> hlct7t
}{}
122 % The mathptm math italic:
124 \DeclareFontFamily{OML
}{ptmcm
}{\skewchar\font=
127}
125 \DeclareFontShape{OML
}{ptmcm
}{m
}{it
}{<-> zptmcmrm
}{}
127 % The mathptm symbol font:
129 \DeclareFontFamily{OMS
}{pzccm
}{}
130 \DeclareFontShape{OMS
}{pzccm
}{m
}{n
}{<-> zpzccmry
}{}
132 % The TeX logo for use with Palatino.
134 \def\pplTeX{T
\kern-
.15em
\lower.4ex
\hbox{E
}\kern-
.1emX\@
}
136 % The LaTeX logo for use with Palatino.
138 \DeclareRobustCommand{\pplLaTeX}{L
\kern-
.3em
141 \csname S@
\f@size
\endcsname
143 \math@fontsfalse
\selectfont
150 % The TeX logo for use with Utopia.
152 \def\putTeX{T
\kern-
.1667em
\lower.4ex
\hbox{E
}\kern-
.075emX\@
}
154 % The LaTeX logo for use with Utopia.
156 \DeclareRobustCommand{\putLaTeX}{L
\kern-
.2em
159 \csname S@
\f@size
\endcsname
161 \math@fontsfalse
\selectfont
168 % The TeX logo for use with Helvetica.
170 \def\phvTeX{T
\kern-
.1em
\lower.4ex
\hbox{E
}\kern-
.05emX\@
}
172 % The LaTeX logo for use with Helvetica.
174 \DeclareRobustCommand{\phvLaTeX}{L
\kern-
.3em
175 {\calculate@math@sizes
178 \csname S@
\f@size
\endcsname
180 \math@fontsfalse
\selectfont
187 % The TeX logo for use with Grotesk.
189 \def\ugqTeX{T
\kern-
.1em
\lower.4ex
\hbox{E
}\kern-
.05emX\@
}
191 % The LaTeX logo for use with Grotesk.
193 \DeclareRobustCommand{\ugqLaTeX}{L
\kern-
.15em
194 {\calculate@math@sizes
197 \csname S@
\f@size
\endcsname
199 \math@fontsfalse
\selectfont
206 % The TeX logo for use with CMSS.
208 \def\cmssTeX{T
\kern-
.2em
\lower.4ex
\hbox{E
}\kern-
.05emX\@
}
210 % The LaTeX logo for use with CMSS.
212 \DeclareRobustCommand{\cmssLaTeX}{L
\kern-
.22em
215 \csname S@
\f@size
\endcsname
217 \math@fontsfalse
\selectfont
226 \DeclareRobustCommand\eTeX{\ensuremath{\varepsilon}-
\kern-
.125em
\TeX}
228 % Switch off some of the article options.
230 \DeclareOption{a4paper}{\OptionNotUsed}
231 \DeclareOption{a5paper
}{\OptionNotUsed}
232 \DeclareOption{b5paper
}{\OptionNotUsed}
233 \DeclareOption{letterpaper
}{\OptionNotUsed}
234 \DeclareOption{legalpaper
}{\OptionNotUsed}
235 \DeclareOption{executivepaper
}{\OptionNotUsed}
236 \DeclareOption{landscape
}{\OptionNotUsed}
237 \DeclareOption{twoside
}{\OptionNotUsed}
238 \DeclareOption{titlepage
}{\OptionNotUsed}
239 \DeclareOption{onecolumn
}{\OptionNotUsed}
243 \newcommand{\@titlefont
}{\normalfont\Huge}
244 \newcommand{\@indiciafont
}{\normalfont\footnotesize}
245 \newcommand{\@headingfont
}{%
246 \large\sffamily\slshape
247 \let\LaTeX\cmssLaTeX\let\TeX\cmssTeX
249 \newcommand{\@subheadingfont
}{%
250 \normalsize\sffamily\slshape
251 \let\LaTeX\cmssLaTeX\let\TeX\cmssTeX
254 % The LW 35 fonts option
256 %% The size of the haeding font was reduced (from 14pt) here to
257 %% try and ensure that the pagination does not change whilst the
258 %% line count remains the same.
259 \DeclareOption{lw35fonts
}{%
260 \renewcommand{\rmdefault}{ppl
}%
261 \renewcommand{\ttdefault}{pcr
}%
262 \renewcommand{\sfdefault}{phv
}%
263 \renewcommand{\@titlefont
}{%
264 \fontsize{50}{60}\fontfamily{phv
}\fontseries{b
}\selectfont
265 \let\LaTeX\phvLaTeX\let\TeX\phvTeX
267 \renewcommand{\@indiciafont
}{%
268 \fontsize{8}{10}\fontfamily{ppl
}\fontshape{it
}\selectfont
270 \renewcommand{\@headingfont
}{%
271 \fontsize{12}{13.5}\fontfamily{phv
}\fontseries{b
}\selectfont
272 \let\LaTeX\phvLaTeX\let\TeX\phvTeX
274 \renewcommand{\@subheadingfont
}{%
275 \fontsize{10}{12}\fontfamily{phv
}\fontseries{b
}\selectfont
276 \let\LaTeX\phvLaTeX\let\TeX\phvTeX
278 \DeclareSymbolFont{letters
}{OML
}{ptmcm
}{m
}{it
}%
279 \DeclareSymbolFont{symbols
}{OMS
}{pzccm
}{m
}{n
}%
282 \AtEndOfClass{\addtolength\textheight\baselineskip}%
285 % The type 1 fonts option
287 \DeclareOption{type1fonts
}{%
288 \renewcommand{\rmdefault}{put
}%
289 \renewcommand{\ttdefault}{hlct
}%
290 \renewcommand{\sfdefault}{ugq
}%
291 \renewcommand{\@titlefont
}{%
292 \fontsize{50}{60}\fontfamily{ugq
}\fontseries{b
}\selectfont
293 \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
295 \renewcommand{\@indiciafont
}{%
296 \fontsize{8}{10}\fontfamily{put
}\fontshape{it
}\selectfont
298 \renewcommand{\@headingfont
}{%
299 \fontsize{12}{14}\fontfamily{ugq
}\fontseries{b
}\selectfont
300 \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
302 \renewcommand{\@subheadingfont
}{%
303 \fontsize{10}{12}\fontfamily{ugq
}\fontseries{b
}\selectfont
304 \let\LaTeX\ugqLaTeX\let\TeX\ugqTeX
306 \renewcommand{\verbatim@font
}{%
307 \fontsize{9}{12}\fontfamily{hlct
}\selectfont
309 \DeclareSymbolFont{letters
}{OML
}{ptmcm
}{m
}{it
}%
310 \DeclareSymbolFont{symbols
}{OMS
}{pzccm
}{m
}{n
}%
315 % The default action for any option is to pass it to the article
318 \DeclareOption*
{\PassOptionsToClass{\CurrentOption}{article
}}
320 % Execute the options.
324 % Load the article class.
326 \LoadClass[twocolumn,oneside
]{article
}
329 % The package url.sty takes care of breaking url's that are too long
330 % to fit in a two-column design
331 % but it might not be available on all installations.
332 % Therefore we need to check if the file url.sty can be found.
334 % Also, it uses a verbatim input mode so Chris does not use it for
335 % urls as he wants to control layout and use macros within it. Also
336 % he usuually wants to hand-craft the line-breaks in such text.
338 \IfFileExists{url.sty
}{%
340 \newcommand\email{\begingroup \Url}}{%
341 \newcommand*
{\url}[1]{\texttt{#
#1}}
342 \newcommand*
{\email}[1]{\texttt{#
#1}}
345 % The package html.sty defines a number of things needed for the LaTeX
346 % to HTML conversion; noticeable the latexonly and htmlonly
348 % Again, let's check if it exists and if not provide necessary stubs
350 \IfFileExists{html.sty
}{%
351 \RequirePackage{html
}}{%
352 % When it couldn't be found, provide some necessary stuff...
353 \newenvironment{latexonly
}{}{}
354 \newcommand{\latex}[1]{#
#1}
356 % Code for excludecomment from html.sty
357 % by Robin Fairbairns, 22 September 1997
359 \newcommand\@gobbleenv
{\let\reserved@a\@currenvir\@gobble@nv
}
360 \long\def\@gobble@nv#
#1\end#
#2{%
361 \def\reserved@b
{#
#2}%
362 \ifx\reserved@a
\reserved@b
363 \edef\reserved@a
{\noexpand\end{\reserved@a
}}%
364 \expandafter\reserved@a
366 \expandafter\@gobble@nv
369 \newcommand{\excludecomment}[1]{%
370 \csname newenvironment
\endcsname{#
#1}{\@gobbleenv
}{}}
371 \excludecomment{htmlonly
}
375 % If pdf is being produced add some info to the pdf file and use hyperref.
376 % But move this after other packages are, possibly, loaded.
377 \ifx\pdfoutput\@undefined
\else
378 \ifx\pdfoutput\relax\else
379 \ifcase\pdfoutput\else
382 /Author (The LaTeX Project)
384 \IfFileExists{hyperref.sty
}{%
385 \RequirePackage[hidelinks
]{hyperref
}}{}
389 % This should be further enhanced so that links other than those
390 % naively generated by \url can be produced in the pdf file.
392 %% Please DO NOT load any packages after this point.
399 \setlength{\parindent}{1em
}
401 \setlength{\rightskip}{0pt plus
\textwidth}
402 \setlength{\@rightskip
}{\rightskip}
403 \setlength{\parfillskip}{0pt plus
2\textwidth}
404 \setlength{\columnsep}{2em
}
406 % The text size, which tries to work with both A4 and letter paper
409 \setlength{\textheight}{230mm
}
410 \setlength{\topmargin}{-
10mm
}
412 \setlength{\textwidth}{180mm
}
413 \setlength{\oddsidemargin}{-
10mm
}
415 % \maketitle parameters.
417 \newcommand{\publicationmonth}{\renewcommand{\@month
}}
418 \newcommand{\@month
}{\ClassError{ltnews
}
419 {No
\protect\publicationmonth~given
}\@eha
}
421 \newcommand{\publicationyear}{\renewcommand{\@year
}}
422 \newcommand{\@year
}{\ClassError{ltnews
}
423 {No
\protect\publicationyear~given
}\@eha
}
425 \newcommand{\publicationissue}{\renewcommand{\@issue
}}
426 \newcommand{\@issue
}{\ClassError{ltnews
}
427 {No
\protect\publicationissue~given
}\@eha
}
428 \newcommand{\issuename}{Issue
}
430 \newcommand{\indicia}{\renewcommand{\@indicia
}}
431 \newcommand{\@indicia
}{%
432 \LaTeXNews, and the
\LaTeX{} software,
433 are brought to you by the
\LaTeX3 Project Team;
434 Copyright \@year, all rights reserved.
439 % The \maketitle for the LaTeX News.
441 \renewcommand{\maketitle}{%
443 \parbox[t
][7\baselineskip]{\textwidth}{%
444 \@titlefont\@title\\
[\medskipamount]
445 \normalfont\normalsize\issuename~\@issue, \@month~\@year
448 \thispagestyle{titlepage
}
451 \newcommand{\ps@titlepage
}{%
452 \renewcommand{\@oddhead
}{\hfill}%
453 \renewcommand{\@evenhead
}{\hfill}%
454 \renewcommand{\@oddfoot
}{\@indiciafont\@indicia
\hfill}%
455 \renewcommand{\@evenfoot
}{\@indiciafont\@indicia
\hfill}%
458 % When PostScript fonts are use we want the first section heading
459 % to come out a little bit higher on the page.
461 \newcommand{\raisefirstsection}{%
463 \vspace*
{-
30pt
} % typesetting with lw35fonts
464 \setlength{\topskip}{18pt
}
469 % Sectioning commands.
471 \renewcommand{\section}{%
473 {section
}{1}{\z@
}{-
1.5ex \@plus -
1ex \@minus -
.2ex
}%
474 {1ex \@plus
.2ex
}{\@headingfont
}%
477 \renewcommand{\subsection}{%
479 {subsection
}{1}{\z@
}{-
1.5ex \@plus -
1ex \@minus -
.2ex
}%
480 {1sp
}{\@subheadingfont
}%
483 \renewcommand{\subsubsection}{%
485 {subsection
}{1}{\z@
}{-
1.5ex \@plus -
1ex \@minus -
.2ex
}%
486 {1sp
}{\normalsize\bfseries}%
489 % No section numbers.
491 \setcounter{secnumdepth
}{0}
493 % Set lists tighter, but brought in by 1em (otherwise the first line
494 % always looks very wide). Should this be done with \rightskip?
495 % It actually does nothing since after this \rightskip is set to
496 % \@rightskip: I think \rightmargin was intended but should we change
498 % FMi 1999/12/11: in fact it needs to go as it would affect the
499 % paragraph before the list making it flush right and indented while
500 % the rest of the document is set ragged.
502 \renewcommand{\@listI
}{%
503 \setlength{\leftmargin}{\leftmargini}%
504 \setlength{\topsep}{\medskipamount}%
505 \setlength{\itemsep}{0pt
}%
506 \setlength{\listparindent}{1em
}%
507 % \setlength{\rightskip}{1em}%
511 % set defaults so that trivlist eg verbatim use tighter spacing
513 \setlength\topsep{4pt plus
1pt minus
2pt
}
515 % But have a list type with no indentation on either side:
517 \renewenvironment{description
}
518 {\list{}{\labelwidth\z@
521 \itemindent-
\leftmargin
522 \let\makelabel\descriptionlabel}}
525 \newenvironment{citations
}{%
527 \renewcommand{\makelabel}[1]{\itshape{#
#1},
}%
535 \newcommand{\NFSS}{NFSS
}
536 \newcommand{\LaTeXNews}{\LaTeX~News
}
537 \newcommand{\AW}{Addison Wesley
}
538 \newcommand{\SLiTeX}{\textsc{Sli
}\TeX}
539 \newcommand{\AmS}{$$
{\protect\the\textfont2 A
}\kern-
.1667em
\lower
540 .5ex
\hbox{\protect\the\textfont2 M
}\kern
541 -
.125em
{\protect\the\textfont2 S
}}
542 \newcommand{\AmSLaTeX}{\mbox{\AmS-
\LaTeX}}
543 \newcommand{\ctan}{\textsc{CTAN
}}
544 \newcommand{\PSNFSS}{\textsc{PSNFSS
}}
545 \newcommand{\babel}{\textsf{babel
}}
549 \newcommand{\ctanhttp}{http://mirror.ctan.org/
}
553 \newcommand\cs[1]{\texttt{\textbackslash#1}}
555 % Some logical markup:
557 \newcommand*
\class[1]{\texttt{#1}}
558 \newcommand*
\package[1]{\textsf{#1}}
559 \let \pkg \package % backward compatibility
560 \newcommand*
\file[1]{\texttt{#1}}
563 % Hacking to make <...> produce italics in verbatim. NB: this can be
564 % done more cleanly using the verbatim package. But the ltnews class
565 % has to run on any LaTeX installation, even those without the
568 % Here we extend the font-setting command to include making <> active
569 % (ie adjusting the input encoding).
570 \renewcommand \verbatim@font
{%
571 \normalfont \ttfamily
576 % Make active <...> produce italics surrounded by angle brackets
577 % (used in verbatim and \verb);
578 % << produces a less-than, and >> produces a greater-than.
583 \gdef<
{\@ifnextchar<\@lt\@meta
}
584 \gdef>
{\@ifnextchar>\@gt\@gtr@err
}
585 \gdef\@meta
#1>
{{\reset@font
\normalsize\itshape#1\/
}}
590 \ClassError{ltxguide
}{%
593 In this
document class,
\protect<...
\protect>
594 is used to indicate a parameter.
\MessageBreak
595 I've just found a
\protect> on its own.
596 Perhaps you meant to type
\protect>
\protect>?
599 \def\verbatim@nolig@list
{\do\`
\do\,
\do\'
\do\-
}
607 % 20 May 1994, v0.01: Created file.
609 % 21 May 1994, v0.02: Made <...> produce italics inside verbatim.
610 % Added the indicia, \publicationyear, \publicationmonth and
611 % \publicationissue. Added the citations environment. Switched off
612 % some of the article class options.
614 % 21 May 1994, v0.03: Fixed a bug with ragged right. Fixed a bug
615 % which was causing underfull hbox messages.
617 % 27 May 1994, v0.04: Added SliTeX logo, and proper AMS LaTeX logo.
618 % Added angle brackets to <...>.
620 % 31 May 1994, v0.05: Added downloaded PS fonts options. Removed
621 % angle brackets from <...> since these were the last remaining
622 % bitmaps! Added variants of the LaTeX logo. Added the ltnews.cfg
623 % file. Added the lw35fonts option.
625 % 27 Jul 1994, v0.06: Corrected a typo `\PassOptionToClass' should
626 % have been `\PassOptionsToClass'. Manas Mandal pointed that one
629 % 29 Nov 1994, v0.07: Made <...> only active in verbatim.
631 % 09 Dec 1995, v0.08: Upper case for Project Team.
633 % 20 Dec 1995, v0.09: Tidied up the list stuff.
635 % 03 Jun 1996, v0.10: Changed fonts for lw35 option, for logical and
638 % 06 Jun 1996, v0.11: Corrected grammar in footer.
640 % 10 June 1996 v0.12: Add extra line in lw35fonts option,
641 % so 04 and 05 do not run over the page.
642 % Make font scaling messages go to log only.
644 % 22 Nov 1997, v0.13: Added new form of description.
645 % Found all sorts of strange things involving \rightskip
647 % 23 Feb 1999, v0.14: Added some logos etc.
649 % 02 Jul 1999, v0.15: Added some logical markup
651 % 03 Jul 1999, v0.16: Amended \pkg and added \email
653 % 21 Dec 1999, v0.17: Added PDF info, load package url.sty
655 % 23 Dec 1999, v0.18: Don't depend on url.sty being present
657 % 21 Jul 2000, v0.19: Extra short-cuts, added to doc re v0.17;
660 % 31 Aug 2000, v0.20: Fixed typo in URL (JLB)
662 % 06 Jun 2001, v0.21: Corrected undocumented stubs for html.sty
664 % 12 Jul 2001, v0.22: Added eTeX logo (from ltugboat.cls)
666 % 26 Feb 2004, v1.00: If pdf is being produced, use hyperref.
667 % But move this after other packages are, possibly, loaded.
669 % 28 Feb 2004 v1.01 Heading font in lw35, size change.
671 % 21 Oct 2004 v1.02 Improve check for PDF generation (taken from ifpdf.sty)
673 % 01 May 2014 v1.03 hidelinks option for hyperref
677 % Switching between logos like this is a mess.
679 % The last column should be set flush bottom.