Typo
[latex2e.git] / latex2e-20150101 / doc / ltnews.tex
blobeb19be7fb97d59096ed439377ddb990336ae2b1a
1 % \iffalse meta-comment
3 % Copyright 2006, 2009, 2011, 2014 Heiko Oberdiek
4 % Copyright 2014 The LaTeX3 Project
5 %
6 % This file is part of the LaTeX base system.
7 % -------------------------------------------
9 % It may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either version 1.3c
11 % of this license or (at your option) any later version.
12 % The latest version of this license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3c or later is part of all distributions of LaTeX
15 % version 2005/12/01 or later.
17 % This file has the LPPL maintenance status "maintained".
19 % 2006/06/02 v1.0: First version.
20 % 2009/09/25 v1.1: \usepackage disabled.
21 % 2011/07/01 v1.2: Fixes.
22 % 2014/02/30 v1.3:
23 % * Update for LaTeX 2014/05/01.
24 % * Fix for anchor positions of issue titles.
25 % 2014/05/15 v1.4:
26 % * Updates for ltnews21.tex.
27 % 2014/11/14 v1.4a:
28 % * LaTeX Project version
29 % 2015/02/16 v1.4b:
30 % * Fix TOC issue
31 % \fi
33 \NeedsTeXFormat{LaTeX2e}
34 \ProvidesFile{ltnews.tex}%
35 [2015/02/16 v1.4b Master file for ltnews*.tex (LaTeX Project)]
36 \providecommand*{\lastissue}{22}
37 \InputIfFileExists{ltnews-lastissue.cfg}{}{}
39 \RequirePackage{ifpdf}
40 \ifpdf
41 % overwrite nasty stuff of ltnews.cfg
42 % (use of hyperref for this would also support other drivers)
43 \pdfinfo{%
44 /Title(LaTeX News)%
45 /Subject(Issues 1--\lastissue)%
46 /Author(The LaTeX Project)%
47 /Creator(LaTeX)%
49 \newtoks\pdfinfo
50 \else
51 \AtBeginDocument{%
52 \hypersetup{%
53 pdftitle={LaTeX News},%
54 pdfsubject={Issues 1\textendash\lastissue},%
55 pdfauthor={The LaTeX Project},%
56 pdfcreator={LaTeX}%
59 \fi
61 \RequirePackage{lmodern}
62 \RequirePackage[T1]{fontenc}
63 \RequirePackage{hologo}
65 \documentclass{ltnews}
67 \expandafter
68 \DeclareRobustCommand\expandafter*\expandafter\small\expandafter{\small}
70 \RequirePackage{hyperref}
71 \hypersetup{colorlinks}
72 \RequirePackage{bookmark}
74 \makeatletter
76 \newcounter{issue}
77 \renewcommand*{\theissue}{%
78 \ifnum\value{issue}<10 0\fi
79 \number\value{issue}%
82 \newcommand*{\MonthJanuary}{01}
83 \newcommand*{\MonthFebruary}{02}
84 \newcommand*{\MonthMarch}{03}
85 \newcommand*{\MonthApril}{04}
86 \newcommand*{\MonthMay}{05}
87 \newcommand*{\MonthJune}{06}
88 \newcommand*{\MonthJuly}{07}
89 \newcommand*{\MonthAugust}{08}
90 \newcommand*{\MonthSeptember}{09}
91 \newcommand*{\MonthOctober}{10}
92 \newcommand*{\MonthNovember}{11}
93 \newcommand*{\MonthDecember}{12}
94 \newcommand*{\printissue}{%
95 Issue %
96 \texorpdfstring{\number\value{issue}}{\theissue}, %
97 \texorpdfstring{\@month\space\@year}{\@year/\@nameuse{Month\@month}}%
99 \let\l@part\l@section
100 \let\l@section\l@subsection
101 \let\l@subsection\l@subsubsection
102 \let\l@subsubsection\l@paragraph
103 \let\l@paragraph\l@subparagraph
105 \newcommand*{\makefirsttitle}{%
106 \twocolumn[{%
107 \parbox[t][4\baselineskip]{\textwidth}{%
108 \@titlefont\@title, Issues 1--\lastissue
113 % table of contents with underlined links
114 \iffalse % disable if option colorlinks is used
115 \@ifpackagelater{hyperref}{2006/06/01}{%
116 \newcommand*{\saved@tableofcontents}{}%
117 \let\saved@tableofcontents\tableofcontents
118 \renewcommand*{\tableofcontents}{%
119 \begingroup
120 \hypersetup{pdfborderstyle={/S/U/W 1}}%
121 \saved@tableofcontents
122 \endgroup
126 \makeatother
128 \begin{document}
130 %%% Title and Table of Contents
132 \makefirsttitle
133 \pdfbookmark[0]{\contentsname}{toc}
134 \tableofcontents
135 \clearpage
137 %%% Issues
139 \begingroup
140 \makeatletter
141 \renewcommand*{\usepackage}[2][]{%
142 \begingroup
143 \def\x{#1|#2}%
144 \def\y{T1|fontenc}%
145 \ifx\x\y
146 \else
147 \def\y{|lmodern,url}%
148 \ifx\x\y
149 \else
150 \def\y{|lmodern,url,hologo}%
151 \ifx\x\y
152 \else
153 \@latex@error{ltnews.tex: \string\usepackage[#1]{#2} found}\@ehc
157 \endgroup
159 \renewcommand*{\documentclass}[2][]{%
160 \setcounter{footnote}{0}%
161 \gobbleopt
163 \newcommand*{\gobbleopt}[1][]{}%
164 \let\org@twocolumn\twocolumn
165 \renewenvironment{document}{%
166 \clearpage
167 \ifnum\@issue=20 %
168 \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
169 \addtocontents{toc}{%
170 \protect\makeatletter
172 \addtocontents{toc}{%
173 \let\protect\saved@l@paragraph\protect\l@paragraph
175 \addtocontents{toc}{%
176 \let\protect\l@paragraph\protect\l@subsection
179 \ifnum\@issue=\lastissue\space
180 \addtocontents{toc}{%
181 \let\protect\l@paragraph\protect\saved@l@paragraph
183 \def\toclevel@subsection{1}%
184 \def\toclevel@subsubsection{2}%
185 \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
186 \renewcommand*{\tableofcontents}{%
187 \section*{\contentsname}%
188 \@starttoc{toc\lastissue}%
190 \let\saved@addtocontents\addtocontents
191 \renewcommand*{\addtocontents}[2]{%
192 \saved@addtocontents{##1}{##2}%
193 \def\temp@toc{toc}%
194 \def\temp@param{##1}%
195 \ifx\temp@toc\temp@param
196 \saved@addtocontents{toc\lastissue}{##2}%
199 \let\l@subsubsection\l@subsection
200 \let\l@subsection\l@section
201 \let\l@section\l@part
202 \let\l@part\@gobbletwo
204 \def\twocolumn[{%
205 \let\twocolumn\org@twocolumn
206 \org@twocolumn[%
207 {% because of optional argument of \twocolumn
208 \pdfbookmark[0]{\printissue}{issue\theissue}%
210 \begingroup
211 \let\WriteBookmarks\relax
212 \@firstofone{% inside opt. arg. of \twocolumn: protect "]"
213 \renewcommand*{\Hy@writebookmark}[5]{}%
215 \phantomsection
216 \addcontentsline{toc}{part}{\printissue}%
217 \endgroup
220 \clearpage
222 \makeatother
223 \loop
224 \ifnum\value{issue}<\lastissue
225 \stepcounter{issue}%
226 \input{ltnews\theissue}%
227 \repeat
228 \stepcounter{issue}%
229 \makeatletter
230 \IfFileExists{ltnews\theissue}{%
231 \@latex@error{\jobname.tex is out of date,\MessageBreak
232 there is `ltnews\theissue.tex'%
233 }\@ehc
234 }{}%
235 \makeatother
236 \endgroup
238 \end{document}