guess we don't want the build dir
[latex2e.git] / trunk / doc / ltnews.tex
blobd5b0e015763808594e2267bb6965fa77a14c3a5d
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}{27}
37 \InputIfFileExists{ltnews-lastissue.cfg}{}{}
40 \ifx\pdfoutput\undefined
41 \let\pdfoutput\outputmode
42 \protected\def\pdfinfo{\pdfextension info }
43 \fi
45 \RequirePackage{ifpdf}
46 \ifpdf
47 % overwrite nasty stuff of ltnews.cfg
48 % (use of hyperref for this would also support other drivers)
49 \pdfinfo{%
50 /Title(LaTeX News)%
51 /Subject(Issues 1--\lastissue)%
52 /Author(The LaTeX Project)%
53 /Creator(LaTeX)%
55 \newtoks\pdfinfo
56 \else
57 \AtBeginDocument{%
58 \hypersetup{%
59 pdftitle={LaTeX News},%
60 pdfsubject={Issues 1\textendash\lastissue},%
61 pdfauthor={The LaTeX Project},%
62 pdfcreator={LaTeX}%
65 \fi
67 \RequirePackage{lmodern}
68 \RequirePackage[T1]{fontenc}
69 \RequirePackage{hologo}
71 \documentclass{ltnews}
73 \expandafter
74 \DeclareRobustCommand\expandafter*\expandafter\small\expandafter{\small}
76 \RequirePackage{hyperref}
77 \hypersetup{colorlinks}
78 \RequirePackage{bookmark}
80 \makeatletter
82 \newcounter{issue}
83 \renewcommand*{\theissue}{%
84 \ifnum\value{issue}<10 0\fi
85 \number\value{issue}%
88 \newcommand*{\MonthJanuary}{01}
89 \newcommand*{\MonthFebruary}{02}
90 \newcommand*{\MonthMarch}{03}
91 \newcommand*{\MonthApril}{04}
92 \newcommand*{\MonthMay}{05}
93 \newcommand*{\MonthJune}{06}
94 \newcommand*{\MonthJuly}{07}
95 \newcommand*{\MonthAugust}{08}
96 \newcommand*{\MonthSeptember}{09}
97 \newcommand*{\MonthOctober}{10}
98 \newcommand*{\MonthNovember}{11}
99 \newcommand*{\MonthDecember}{12}
100 \newcommand*{\printissue}{%
101 Issue %
102 \texorpdfstring{\number\value{issue}}{\theissue}, %
103 \texorpdfstring{\@month\space\@year}{\@year/\@nameuse{Month\@month}}%
105 \let\l@part\l@section
106 \let\l@section\l@subsection
107 \let\l@subsection\l@subsubsection
108 \let\l@subsubsection\l@paragraph
109 \let\l@paragraph\l@subparagraph
111 \newcommand*{\makefirsttitle}{%
112 \twocolumn[{%
113 \parbox[t][4\baselineskip]{\textwidth}{%
114 \@titlefont\@title, Issues 1--\lastissue
119 % table of contents with underlined links
120 \iffalse % disable if option colorlinks is used
121 \@ifpackagelater{hyperref}{2006/06/01}{%
122 \newcommand*{\saved@tableofcontents}{}%
123 \let\saved@tableofcontents\tableofcontents
124 \renewcommand*{\tableofcontents}{%
125 \begingroup
126 \hypersetup{pdfborderstyle={/S/U/W 1}}%
127 \saved@tableofcontents
128 \endgroup
133 % -- provide command introduced in new release
134 % so this typesets with an old format
135 \DeclareTextCommandDefault\textcommabelow[1]
136 {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
137 \hbox{\check@mathfonts\fontsize\ssf@size\z@
138 \math@fontsfalse\selectfont,}\hidewidth}\egroup}
139 \DeclareTextCommandDefault\textcommaabove[1]{%
140 \hmode@bgroup
141 \ooalign{%
142 \hidewidth
143 \raise.7ex\hbox{%
144 \check@mathfonts\fontsize\ssf@size\z@\math@fontsfalse\selectfont`%
146 \hidewidth\crcr
147 \null#1\crcr
149 \egroup
152 \makeatother
154 \begin{document}
156 %%% Title and Table of Contents
158 \makefirsttitle
159 \pdfbookmark[0]{\contentsname}{toc}
160 \tableofcontents
161 \clearpage
163 %%% Issues
165 \begingroup
166 \makeatletter
167 \renewcommand*{\usepackage}[2][]{%
168 \begingroup
169 \def\x{#1|#2}%
170 \def\y{T1|fontenc}%
171 \ifx\x\y
172 \else
173 \def\y{|lmodern,url}%
174 \ifx\x\y
175 \else
176 \def\y{|lmodern,url,hologo}%
177 \ifx\x\y
178 \else
179 \@latex@error{ltnews.tex: \string\usepackage[#1]{#2} found}\@ehc
183 \endgroup
185 \renewcommand*{\documentclass}[2][]{%
186 \setcounter{footnote}{0}%
187 \gobbleopt
189 \newcommand*{\gobbleopt}[1][]{}%
190 \let\org@twocolumn\twocolumn
191 \renewenvironment{document}{%
192 \clearpage
193 \ifnum\@issue=20 %
194 \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
195 \addtocontents{toc}{%
196 \protect\makeatletter
198 \addtocontents{toc}{%
199 \let\protect\saved@l@paragraph\protect\l@paragraph
201 \addtocontents{toc}{%
202 \let\protect\l@paragraph\protect\l@subsection
205 \ifnum\@issue=\lastissue\space
206 \addtocontents{toc}{%
207 \let\protect\l@paragraph\protect\saved@l@paragraph
209 \def\toclevel@subsection{1}%
210 \def\toclevel@subsubsection{2}%
211 \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
212 \renewcommand*{\tableofcontents}{%
213 \section*{\contentsname}%
214 \@starttoc{toc\lastissue}%
216 \let\saved@addtocontents\addtocontents
217 \renewcommand*{\addtocontents}[2]{%
218 \saved@addtocontents{##1}{##2}%
219 \def\temp@toc{toc}%
220 \def\temp@param{##1}%
221 \ifx\temp@toc\temp@param
222 \saved@addtocontents{toc\lastissue}{##2}%
225 \let\l@subsubsection\l@subsection
226 \let\l@subsection\l@section
227 \let\l@section\l@part
228 \let\l@part\@gobbletwo
230 \def\twocolumn[{%
231 \let\twocolumn\org@twocolumn
232 \org@twocolumn[%
233 {% because of optional argument of \twocolumn
234 \pdfbookmark[0]{\printissue}{issue\theissue}%
236 \begingroup
237 \let\WriteBookmarks\relax
238 \@firstofone{% inside opt. arg. of \twocolumn: protect "]"
239 \renewcommand*{\Hy@writebookmark}[5]{}%
241 \phantomsection
242 \addcontentsline{toc}{part}{\printissue}%
243 \endgroup
246 \clearpage
248 \makeatother
249 \loop
250 \ifnum\value{issue}<\lastissue
251 \stepcounter{issue}%
252 \input{ltnews\theissue}%
253 \repeat
254 \stepcounter{issue}%
255 \makeatletter
256 \IfFileExists{ltnews\theissue}{%
257 \@latex@error{\jobname.tex is out of date,\MessageBreak
258 there is `ltnews\theissue.tex'%
259 }\@ehc
260 }{}%
261 \makeatother
262 \endgroup
264 \end{document}