Update following CTAN rearrangements
[latex2e.git] / latex2e-20151001 / doc / ltnews.tex
blob3051fc65500737e3b696a10649a486a28a4e5149
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}{23}
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
127 % -- provide command introduced in new release
128 % so this typesets with an old format
129 \DeclareTextCommandDefault\textcommabelow[1]
130 {\hmode@bgroup\ooalign{\null#1\crcr\hidewidth\raise-.31ex
131 \hbox{\check@mathfonts\fontsize\ssf@size\z@
132 \math@fontsfalse\selectfont,}\hidewidth}\egroup}
134 \makeatother
136 \begin{document}
138 %%% Title and Table of Contents
140 \makefirsttitle
141 \pdfbookmark[0]{\contentsname}{toc}
142 \tableofcontents
143 \clearpage
145 %%% Issues
147 \begingroup
148 \makeatletter
149 \renewcommand*{\usepackage}[2][]{%
150 \begingroup
151 \def\x{#1|#2}%
152 \def\y{T1|fontenc}%
153 \ifx\x\y
154 \else
155 \def\y{|lmodern,url}%
156 \ifx\x\y
157 \else
158 \def\y{|lmodern,url,hologo}%
159 \ifx\x\y
160 \else
161 \@latex@error{ltnews.tex: \string\usepackage[#1]{#2} found}\@ehc
165 \endgroup
167 \renewcommand*{\documentclass}[2][]{%
168 \setcounter{footnote}{0}%
169 \gobbleopt
171 \newcommand*{\gobbleopt}[1][]{}%
172 \let\org@twocolumn\twocolumn
173 \renewenvironment{document}{%
174 \clearpage
175 \ifnum\@issue=20 %
176 \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
177 \addtocontents{toc}{%
178 \protect\makeatletter
180 \addtocontents{toc}{%
181 \let\protect\saved@l@paragraph\protect\l@paragraph
183 \addtocontents{toc}{%
184 \let\protect\l@paragraph\protect\l@subsection
187 \ifnum\@issue=\lastissue\space
188 \addtocontents{toc}{%
189 \let\protect\l@paragraph\protect\saved@l@paragraph
191 \def\toclevel@subsection{1}%
192 \def\toclevel@subsubsection{2}%
193 \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
194 \renewcommand*{\tableofcontents}{%
195 \section*{\contentsname}%
196 \@starttoc{toc\lastissue}%
198 \let\saved@addtocontents\addtocontents
199 \renewcommand*{\addtocontents}[2]{%
200 \saved@addtocontents{##1}{##2}%
201 \def\temp@toc{toc}%
202 \def\temp@param{##1}%
203 \ifx\temp@toc\temp@param
204 \saved@addtocontents{toc\lastissue}{##2}%
207 \let\l@subsubsection\l@subsection
208 \let\l@subsection\l@section
209 \let\l@section\l@part
210 \let\l@part\@gobbletwo
212 \def\twocolumn[{%
213 \let\twocolumn\org@twocolumn
214 \org@twocolumn[%
215 {% because of optional argument of \twocolumn
216 \pdfbookmark[0]{\printissue}{issue\theissue}%
218 \begingroup
219 \let\WriteBookmarks\relax
220 \@firstofone{% inside opt. arg. of \twocolumn: protect "]"
221 \renewcommand*{\Hy@writebookmark}[5]{}%
223 \phantomsection
224 \addcontentsline{toc}{part}{\printissue}%
225 \endgroup
228 \clearpage
230 \makeatother
231 \loop
232 \ifnum\value{issue}<\lastissue
233 \stepcounter{issue}%
234 \input{ltnews\theissue}%
235 \repeat
236 \stepcounter{issue}%
237 \makeatletter
238 \IfFileExists{ltnews\theissue}{%
239 \@latex@error{\jobname.tex is out of date,\MessageBreak
240 there is `ltnews\theissue.tex'%
241 }\@ehc
242 }{}%
243 \makeatother
244 \endgroup
246 \end{document}