diff options
author | Karl Berry <karl@freefriends.org> | 2024-06-14 21:41:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-06-14 21:41:25 +0000 |
commit | 9595127cb8c18f411e8e696009e35704d8b67df2 (patch) | |
tree | d6fae5c81ff0280cd68b0d2d31e96566101af4a4 /Master/texmf-dist/tex | |
parent | 7c6daf8381f92e1cb7cb876f2252496bf7298f10 (diff) |
multitoc (14jun24)
git-svn-id: svn://tug.org/texlive/trunk@71520 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/multitoc/multitoc.sty | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/multitoc/multitoc.sty b/Master/texmf-dist/tex/latex/multitoc/multitoc.sty new file mode 100644 index 00000000000..4978376998a --- /dev/null +++ b/Master/texmf-dist/tex/latex/multitoc/multitoc.sty @@ -0,0 +1,76 @@ +%% +%% This is file `multitoc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% multitoc.dtx (with options: `package') +%% Copyright (C) 1998–1999 Martin Schröder, 2024 Marei Peischl (peiTeX) <marei@peitex.de> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is +%% Marei Peischl <marei@peitex.de>. +%% +%% This work consists of the files multitoc.dtx and multitoc.ins +%% and the derived file multitoc.sty. +%% +%% \iffalse meta-comment +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}[2015-09-18] +\ProvidesPackage{multitoc} + [2024/06/13 v2.02 MultiToc Package] +\RequirePackage{multicol} +\RequirePackage{ifthen} +\newcommand{\multicolumntoc}{2} +\newcommand{\multicolumnlot}{2} +\newcommand{\multicolumnlof}{2} +\newboolean{@multitoc@toc} +\newboolean{@multitoc@lot} +\newboolean{@multitoc@lof} +\DeclareOption{toc}{\setboolean{@multitoc@toc}{true}} +\DeclareOption{lot}{\setboolean{@multitoc@lot}{true}} +\DeclareOption{lof}{\setboolean{@multitoc@lof}{true}} +\ProcessOptions\relax +\let\@multitoc@starttoc\@starttoc +\ExplSyntaxOn +\renewcommand*{\@starttoc}[1]{% +\clist_if_in:nnTF {toc,lof,lot} {#1} { +\ifthenelse{\boolean{@multitoc@#1}}{ +\begin{multicols}{\use:c{multicolumn#1}}% +\@multitoc@starttoc{#1}% +\end{multicols} +}{ +\@multitoc@starttoc{#1} +} +}{ +\@multitoc@starttoc{#1} +} +} +\ExplSyntaxOff +\newcommand*{\protected@write@immediate}[3]{% + \begingroup + \let\thepage\relax + #2% + \let\protect\string + \edef\reserved@a{\immediate\write#1{#3}}% + \reserved@a + \endgroup + \if@nobreak\ifvmode\nobreak\fi\fi + } +\newcommand*{\immediateaddtocontents}[2]{% + \protected@write@immediate\@auxout + {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}% + {\string\@writefile{#1}{#2}}} +\endinput +%% +%% End of file `multitoc.sty'. |