| 1 |
% Copyright 2019-2021 The LaTeX Project |
| 2 |
|
| 3 |
\providecommand*{\lastissue}{12} |
| 4 |
|
| 5 |
\documentclass{ltnews} |
| 6 |
|
| 7 |
\AtBeginDocument{% |
| 8 |
\renewcommand{\LaTeXNews}{\LaTeX3~News}% |
| 9 |
\RaggedRight |
| 10 |
\setlength\parindent{1em}% |
| 11 |
} |
| 12 |
\usepackage{catchfile} |
| 13 |
\usepackage{csquotes} |
| 14 |
\usepackage{enumitem} |
| 15 |
\usepackage{fancyvrb} |
| 16 |
\usepackage{hologo} |
| 17 |
\usepackage{metalogo} |
| 18 |
\usepackage{multicol} |
| 19 |
\usepackage{ragged2e} |
| 20 |
\usepackage{siunitx} |
| 21 |
\usepackage{tikz} |
| 22 |
\usepackage{underscore} |
| 23 |
\usepackage{xparse} |
| 24 |
\usepackage{hyperref} |
| 25 |
\hypersetup{colorlinks} |
| 26 |
\usepackage{bookmark} |
| 27 |
|
| 28 |
\MakeOuterQuote{"} |
| 29 |
|
| 30 |
\pdfstringdefDisableCommands |
| 31 |
{% |
| 32 |
\RenewExpandableDocumentCommand \cs { O{} m } |
| 33 |
{\textbackslash#2}% |
| 34 |
} |
| 35 |
|
| 36 |
\makeatletter |
| 37 |
\newcounter{issue} |
| 38 |
\renewcommand*{\theissue}{% |
| 39 |
\ifnum\value{issue}<10 0\fi |
| 40 |
\number\value{issue}% |
| 41 |
} |
| 42 |
\newcommand*{\MonthJanuary}{01} |
| 43 |
\newcommand*{\MonthFebruary}{02} |
| 44 |
\newcommand*{\MonthMarch}{03} |
| 45 |
\newcommand*{\MonthApril}{04} |
| 46 |
\newcommand*{\MonthMay}{05} |
| 47 |
\newcommand*{\MonthJune}{06} |
| 48 |
\newcommand*{\MonthJuly}{07} |
| 49 |
\newcommand*{\MonthAugust}{08} |
| 50 |
\newcommand*{\MonthSeptember}{09} |
| 51 |
\newcommand*{\MonthOctober}{10} |
| 52 |
\newcommand*{\MonthNovember}{11} |
| 53 |
\newcommand*{\MonthDecember}{12} |
| 54 |
\newcommand*{\printissue}{% |
| 55 |
Issue % |
| 56 |
\texorpdfstring{\number\value{issue}}{\theissue}, % |
| 57 |
\texorpdfstring{\@month\space\@year}{\@year/\@nameuse{Month\@month}}% |
| 58 |
} |
| 59 |
\let\l@part\l@section |
| 60 |
\let\l@section\l@subsection |
| 61 |
\let\l@subsection\l@subsubsection |
| 62 |
\let\l@subsubsection\l@paragraph |
| 63 |
\let\l@paragraph\l@subparagraph |
| 64 |
\newcommand*{\makefirsttitle}{% |
| 65 |
\twocolumn[{% |
| 66 |
\parbox[t][4\baselineskip]{\textwidth}{% |
| 67 |
\@titlefont\@title, Issues 1--\lastissue |
| 68 |
}% |
| 69 |
}]% |
| 70 |
} |
| 71 |
|
| 72 |
% show the page number on first page of issues: |
| 73 |
|
| 74 |
\renewcommand{\ps@titlepage}{% |
| 75 |
\renewcommand{\@oddhead}{\hfill}% |
| 76 |
\renewcommand{\@evenhead}{\hfill}% |
| 77 |
\renewcommand{\@oddfoot}{\@indiciafont\@indicia\hfill --\thepage}% |
| 78 |
\renewcommand{\@evenfoot}{\@indiciafont\@indicia\hfill --\thepage}% |
| 79 |
} |
| 80 |
|
| 81 |
% only needed if the old ltnews class is used |
| 82 |
\renewcommand{\@oddfoot}{\@indiciafont\mbox{}\hfill --\thepage}% |
| 83 |
\renewcommand{\@evenfoot}{\@indiciafont\mbox{}\hfill --\thepage}% |
| 84 |
|
| 85 |
|
| 86 |
\makeatother |
| 87 |
|
| 88 |
\begin{document} |
| 89 |
|
| 90 |
%%% Title and Table of Contents |
| 91 |
|
| 92 |
\makefirsttitle |
| 93 |
\pdfbookmark[0]{\contentsname}{toc} |
| 94 |
\tableofcontents |
| 95 |
\clearpage |
| 96 |
|
| 97 |
\begingroup |
| 98 |
\renewcommand*{\AtBeginDocument}[1]{#1}% |
| 99 |
\renewcommand*{\PassOptionsToPackage}[2]{}% |
| 100 |
\renewcommand*{\usepackage}[2][]{}% |
| 101 |
\renewcommand*{\RequirePackage}[2][]{}% |
| 102 |
\renewcommand*{\documentclass}[2][]{% |
| 103 |
\setcounter{footnote}{0}% |
| 104 |
\gobbleopt |
| 105 |
}% |
| 106 |
\newcommand*{\gobbleopt}[1][]{}% |
| 107 |
\makeatletter |
| 108 |
\let\org@twocolumn\twocolumn |
| 109 |
\renewenvironment{document}{% |
| 110 |
\clearpage |
| 111 |
\ifnum\@issue=20 % |
| 112 |
\addtocontents{toc}{\protect\setcounter{tocdepth}{5}}% |
| 113 |
\addtocontents{toc}{% |
| 114 |
\protect\makeatletter |
| 115 |
}% |
| 116 |
\addtocontents{toc}{% |
| 117 |
\let\protect\saved@l@paragraph\protect\l@paragraph |
| 118 |
}% |
| 119 |
\addtocontents{toc}{% |
| 120 |
\let\protect\l@paragraph\protect\l@subsection |
| 121 |
}% |
| 122 |
\fi |
| 123 |
\ifnum\@issue>9\space % we may have issue tocs ... |
| 124 |
\addtocontents{toc}{% |
| 125 |
\let\protect\l@paragraph\protect\saved@l@paragraph |
| 126 |
}% |
| 127 |
\def\toclevel@subsection{1}% |
| 128 |
\def\toclevel@subsubsection{2}% |
| 129 |
\addtocontents{toc}{\protect\setcounter{tocdepth}{4}}% |
| 130 |
\renewcommand*{\tableofcontents}{% |
| 131 |
\section*{\contentsname}% |
| 132 |
\@starttoc{toc\theissue}% |
| 133 |
}% |
| 134 |
\let\saved@addtocontents\addtocontents |
| 135 |
\renewcommand*{\addtocontents}[2]{% |
| 136 |
\saved@addtocontents{##1}{##2}% |
| 137 |
\def\temp@toc{toc}% |
| 138 |
\def\temp@param{##1}% |
| 139 |
\ifx\temp@toc\temp@param |
| 140 |
\saved@addtocontents{toc\theissue}{##2}% |
| 141 |
\fi |
| 142 |
}% |
| 143 |
\let\l@subsubsection\l@subsection |
| 144 |
\let\l@subsection\l@section |
| 145 |
\let\l@section\l@part |
| 146 |
\let\l@part\@gobbletwo |
| 147 |
\fi |
| 148 |
\def\twocolumn[{% |
| 149 |
\let\twocolumn\org@twocolumn |
| 150 |
\org@twocolumn[% |
| 151 |
{% because of optional argument of \twocolumn |
| 152 |
\pdfbookmark[0]{\printissue}{issue\theissue}% |
| 153 |
}% |
| 154 |
\begingroup |
| 155 |
\let\WriteBookmarks\relax |
| 156 |
\@firstofone{% inside opt. arg. of \twocolumn: protect "]" |
| 157 |
\renewcommand*{\Hy@writebookmark}[5]{}% |
| 158 |
}% |
| 159 |
\phantomsection |
| 160 |
\addcontentsline{toc}{part}{\printissue}% |
| 161 |
\endgroup |
| 162 |
}% |
| 163 |
}{% |
| 164 |
\clearpage |
| 165 |
}% |
| 166 |
\def\MakeOuterQuote#1{% |
| 167 |
\if\noexpand"\noexpand#1% |
| 168 |
\else |
| 169 |
\@latex@error{Unexpected \string\MakeOuterQuote |
| 170 |
{\detokenize{#1}}\MessageBreak% |
| 171 |
Check if output is valid in `l3news\theissue.tex'}% |
| 172 |
\fi} |
| 173 |
\makeatother |
| 174 |
\loop |
| 175 |
\ifnum\value{issue}<\lastissue |
| 176 |
\stepcounter{issue}% |
| 177 |
\input{l3news\theissue}% |
| 178 |
\repeat |
| 179 |
\stepcounter{issue}% |
| 180 |
\IfFileExists{l3news\theissue}{% |
| 181 |
\@latex@error{\jobname.tex is out of date,\MessageBreak |
| 182 |
there is `l3news\theissue.tex'% |
| 183 |
}\@ehc |
| 184 |
}{}% |
| 185 |
\endgroup |
| 186 |
|
| 187 |
\end{document} |