[latex3-commits] [git/LaTeX3-latex3-latex3] master: Add a combined l3news file (a000371e0)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Nov 14 17:33:40 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/a000371e06fd59ef8805b2dc01776fa16ebcb550

>---------------------------------------------------------------

commit a000371e06fd59ef8805b2dc01776fa16ebcb550
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Nov 14 16:33:40 2019 +0000

    Add a combined l3news file
    
    This is heavily based on ltnews.tex, originally
    by Heiko Oberidek.


>---------------------------------------------------------------

a000371e06fd59ef8805b2dc01776fa16ebcb550
 l3kernel/l3news.tex | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 157 insertions(+)

diff --git a/l3kernel/l3news.tex b/l3kernel/l3news.tex
new file mode 100644
index 000000000..c3cabcd7b
--- /dev/null
+++ b/l3kernel/l3news.tex
@@ -0,0 +1,157 @@
+% Copyright 2019 The LaTeX3 Project
+
+\providecommand*{\lastissue}{11}
+
+\documentclass{ltnews}
+
+\AtBeginDocument{%
+  \renewcommand{\LaTeXNews}{\LaTeX3~News}%
+  \RaggedRight
+  \setlength\parindent{1em}%
+}
+\usepackage{catchfile}
+\usepackage{csquotes}
+\usepackage{enumitem}
+\usepackage{fancyvrb}
+\usepackage{hologo}
+\usepackage{metalogo}
+\usepackage{multicol}
+\usepackage{ragged2e}
+\usepackage{siunitx}
+\usepackage{tikz}
+\usepackage{underscore}
+\usepackage{xparse}
+\usepackage{hyperref}
+\hypersetup{colorlinks}
+\usepackage{bookmark}
+
+\makeatletter
+\newcounter{issue}
+\renewcommand*{\theissue}{%
+  \ifnum\value{issue}<10 0\fi
+  \number\value{issue}%
+}
+\newcommand*{\MonthJanuary}{01}
+\newcommand*{\MonthFebruary}{02}
+\newcommand*{\MonthMarch}{03}
+\newcommand*{\MonthApril}{04}
+\newcommand*{\MonthMay}{05}
+\newcommand*{\MonthJune}{06}
+\newcommand*{\MonthJuly}{07}
+\newcommand*{\MonthAugust}{08}
+\newcommand*{\MonthSeptember}{09}
+\newcommand*{\MonthOctober}{10}
+\newcommand*{\MonthNovember}{11}
+\newcommand*{\MonthDecember}{12}
+\newcommand*{\printissue}{%
+  Issue %
+  \texorpdfstring{\number\value{issue}}{\theissue}, %
+  \texorpdfstring{\@month\space\@year}{\@year/\@nameuse{Month\@month}}%
+}
+\let\l at part\l at section
+\let\l at section\l at subsection
+\let\l at subsection\l at subsubsection
+\let\l at subsubsection\l at paragraph
+\let\l at paragraph\l at subparagraph
+\newcommand*{\makefirsttitle}{%
+  \twocolumn[{%
+    \parbox[t][4\baselineskip]{\textwidth}{%
+      \@titlefont\@title, Issues 1--\lastissue
+    }%
+  }]%
+}
+\makeatother
+
+\begin{document}
+
+%%% Title and Table of Contents
+
+\makefirsttitle
+\pdfbookmark[0]{\contentsname}{toc}
+\tableofcontents
+\clearpage
+
+\begingroup
+  \renewcommand*{\AtBeginDocument}[1]{#1}%
+  \renewcommand*{\PassOptionsToPackage}[2]{}%
+  \renewcommand*{\usepackage}[2][]{}%
+  \renewcommand*{\RequirePackage}[2][]{}%
+  \renewcommand*{\documentclass}[2][]{%
+    \setcounter{footnote}{0}%
+    \gobbleopt
+  }%
+  \newcommand*{\gobbleopt}[1][]{}%
+  \makeatletter
+  \let\org at twocolumn\twocolumn
+  \renewenvironment{document}{%
+    \clearpage
+    \ifnum\@issue=20 %
+      \addtocontents{toc}{\protect\setcounter{tocdepth}{5}}%
+      \addtocontents{toc}{%
+        \protect\makeatletter
+       }%
+       \addtocontents{toc}{%
+         \let\protect\saved at l@paragraph\protect\l at paragraph
+       }%
+       \addtocontents{toc}{%
+         \let\protect\l at paragraph\protect\l at subsection
+       }%
+    \fi
+    \ifnum\@issue=\lastissue\space
+      \addtocontents{toc}{%
+        \let\protect\l at paragraph\protect\saved at l@paragraph
+      }%
+      \def\toclevel at subsection{1}%
+      \def\toclevel at subsubsection{2}%
+      \addtocontents{toc}{\protect\setcounter{tocdepth}{4}}%
+      \renewcommand*{\tableofcontents}{%
+        \section*{\contentsname}%
+        \@starttoc{toc\lastissue}%
+      }%
+      \let\saved at addtocontents\addtocontents
+      \renewcommand*{\addtocontents}[2]{%
+        \saved at addtocontents{##1}{##2}%
+        \def\temp at toc{toc}%
+        \def\temp at param{##1}%
+        \ifx\temp at toc\temp at param
+          \saved at addtocontents{toc\lastissue}{##2}%
+        \fi
+      }%
+      \let\l at subsubsection\l at subsection
+      \let\l at subsection\l at section
+      \let\l at section\l at part
+      \let\l at part\@gobbletwo
+    \fi
+    \def\twocolumn[{%
+      \let\twocolumn\org at twocolumn
+      \org at twocolumn[%
+      {% because of optional argument of \twocolumn
+        \pdfbookmark[0]{\printissue}{issue\theissue}%
+      }%
+      \begingroup
+        \let\WriteBookmarks\relax
+        \@firstofone{% inside opt. arg. of \twocolumn: protect "]"
+          \renewcommand*{\Hy at writebookmark}[5]{}%
+        }%
+        \phantomsection
+        \addcontentsline{toc}{part}{\printissue}%
+      \endgroup
+    }%
+  }{%
+    \clearpage
+  }%
+  \makeatother
+  \loop
+  \ifnum\value{issue}<\lastissue
+    \stepcounter{issue}%
+    \input{l3news\theissue}%
+  \repeat
+  \stepcounter{issue}%
+  \IfFileExists{l3news\theissue}{%
+    \@latex at error{\jobname.tex is out of date,\MessageBreak
+      there is `l3news\theissue.tex'%
+    }\@ehc
+  }{}%
+\endgroup
+
+\end{document}





More information about the latex3-commits mailing list