summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/count1to/count1to.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/count1to/count1to.sty')
-rw-r--r--Master/texmf-dist/tex/latex/count1to/count1to.sty102
1 files changed, 102 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/count1to/count1to.sty b/Master/texmf-dist/tex/latex/count1to/count1to.sty
new file mode 100644
index 00000000000..651c5e29f35
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/count1to/count1to.sty
@@ -0,0 +1,102 @@
+%%
+%% This is file `count1to.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% count1to.dtx (with options: `package')
+%%
+%% Copyright (c) 1994–2009 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 count1to.dtx and count1to.ins
+%% and the derived file count1to.sty.
+%%
+%% \iffalse meta-comment
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{count1to}
+ [2024-06-13 v2.11 Count1to9 Package (MS)]
+\newif\if@have@part
+\newif\if@have@chapter
+\newif\if@have@section
+\newif\if@have@subsection
+\newif\if@have@subsubsection
+\newif\if@have@paragraph
+\newif\if@have@subparagraph
+\newcommand*{\@countItoIX@ifs}{
+ \@ifundefined{c@part} {}{\@have@parttrue}
+ \@ifundefined{c@chapter} {}{\@have@chaptertrue}
+ \@ifundefined{c@section} {}{\@have@sectiontrue}
+ \@ifundefined{c@subsection} {}{\@have@subsectiontrue}
+ \@ifundefined{c@subsubsection} {}{\@have@subsubsectiontrue}
+ \@ifundefined{c@paragraph} {}{\@have@paragraphtrue}
+ \@ifundefined{c@subparagraph} {}{\@have@subparagraphtrue}
+ }
+\newcommand*{\@countItoIX@bugfix}{
+ \if@have@part
+ \@addtoreset{section} {part}
+ \@addtoreset{subsection} {part}
+ \@addtoreset{subsubsection}{part}
+ \@addtoreset{paragraph} {part}
+ \@addtoreset{subparagraph} {part}
+ \fi
+ \if@have@chapter
+ \@addtoreset{subsection} {chapter}
+ \@addtoreset{subsubsection}{chapter}
+ \@addtoreset{paragraph} {chapter}
+ \@addtoreset{subparagraph} {chapter}
+ \fi
+ \if@have@section
+ \@addtoreset{subsubsection}{section}
+ \@addtoreset{paragraph} {section}
+ \@addtoreset{subparagraph} {section}
+ \fi
+ \if@have@subsection
+ \@addtoreset{paragraph} {subsection}
+ \@addtoreset{subparagraph} {subsection}
+ \fi
+ \if@have@subsubsection
+ \@addtoreset{subparagraph} {subsubsection}
+ \fi
+ }
+\newcommand*{\@countItoIX@init}{%
+ \message{ABD: Count1to9 initializing macros}%
+ \@countItoIX@ifs\let\@countItoIX@ifs\undefined
+ \@countItoIX@bugfix\let\@countItoIX@bugfix\undefined
+ }
+\AddToHook{begindocument}[count1to-init]{\@countItoIX@init}
+\newcommand*{\@countItoIX@shipout}{
+ \global\advance \count1 by 1
+ \if@have@part \count2\value{part} \fi
+ \if@have@chapter \count3\value{chapter} \fi
+ \if@have@section \count4\value{section} \fi
+ \if@have@subsection \count5\value{subsection} \fi
+ \if@have@subsubsection \count6\value{subsubsection} \fi
+ \if@have@paragraph \count7\value{paragraph} \fi
+ \if@have@subparagraph \count8\value{subparagraph} \fi
+ \ifodd\count1\count9=1 \else\count9=0 \fi
+ }
+\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+\IfFormatAtLeastTF{2020/10/01}{
+\AddToHook{shipout/before}[count1to-shipout]{\@countItoIX@shipout}
+}{
+\RequirePackage{everyshi}
+\EveryShipount{\@countItoIX@shipout}
+}
+\endinput
+%%
+%% End of file `count1to.sty'.