summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/secdot
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/secdot
Initial commit
Diffstat (limited to 'macros/latex/contrib/secdot')
-rw-r--r--macros/latex/contrib/secdot/secdot.ltx79
-rw-r--r--macros/latex/contrib/secdot/secdot.pdfbin0 -> 254804 bytes
-rw-r--r--macros/latex/contrib/secdot/secdot.sty69
3 files changed, 148 insertions, 0 deletions
diff --git a/macros/latex/contrib/secdot/secdot.ltx b/macros/latex/contrib/secdot/secdot.ltx
new file mode 100644
index 0000000000..f7e77c62aa
--- /dev/null
+++ b/macros/latex/contrib/secdot/secdot.ltx
@@ -0,0 +1,79 @@
+\documentclass[pagesize=auto, fontsize=12pt, DIV=10, parskip=half]{scrartcl}
+
+\usepackage{fixltx2e}
+\usepackage{etex}
+\usepackage{lmodern}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage[svgnames]{xcolor}
+\usepackage{listings}
+\usepackage{microtype}
+\usepackage{hyperref}
+
+\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
+\newcommand*{\pkg}[1]{\textsf{#1}}
+\newcommand*{\cls}[1]{\textsf{#1}}
+\newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
+\makeatletter
+\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
+\makeatother
+\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
+\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
+
+\addtokomafont{title}{\rmfamily}
+
+\lstset{%
+ language=[LaTeX]TeX,%
+ columns=flexible,%
+ upquote=true,%
+ numbers=left,%
+ basicstyle=\ttfamily,%
+ keywordstyle=\color{Navy},%
+ commentstyle=\color{DimGray},%
+ stringstyle=\color{SeaGreen},%
+ numberstyle=\scriptsize\color{SlateGray},%
+ escapechar=\$%
+}
+
+\title{The \pkg{secdot} package\thanks{This manual corresponds to \pkg{secdot.sty}~v2.0, dated~July 2000.}}
+\subtitle{Define section numbers with dots}
+\author{%
+ Robin Fairbairns\thanks{\mail{rf10@cl.cam.ac.uk}}%
+ \and Steve Grathwohl\thanks{Duke University}%
+}
+\date{July 2000}
+
+
+\begin{document}
+
+\maketitle
+
+the package as loaded causes section numbers to be output with a dot
+after them.
+
+the command \cmd{\sectiondot}\marg{level} will make `\meta{level}' sections also be
+output with a dot after them -- an example of use would be:
+%
+\begin{lstlisting}
+\sectiondot{subsection}
+\end{lstlisting}
+
+the command \cmd{\sectionpunct}\marg{level}\marg{punctuation} gives finer
+control. examples of use would be
+%
+\begin{lstlisting}
+\sectionpunct{section}{. } % \sectiondot places a \quad after the
+ % dot, which may look excessive
+\sectionpunct{section}{\quad} % restores default latex behaviour
+\end{lstlisting}
+
+other eccentricities of numbering could be coded by those with
+stronger stomachs, by defining the appropriate
+%
+\begin{lstlisting}
+\csname @seccntfmt@$\meta{level}$\endcsname
+\end{lstlisting}
+%
+which macro will take one argument, when invoked: the `\meta{level}' name
+
+\end{document}
diff --git a/macros/latex/contrib/secdot/secdot.pdf b/macros/latex/contrib/secdot/secdot.pdf
new file mode 100644
index 0000000000..dc13c60771
--- /dev/null
+++ b/macros/latex/contrib/secdot/secdot.pdf
Binary files differ
diff --git a/macros/latex/contrib/secdot/secdot.sty b/macros/latex/contrib/secdot/secdot.sty
new file mode 100644
index 0000000000..a24ad83dcc
--- /dev/null
+++ b/macros/latex/contrib/secdot/secdot.sty
@@ -0,0 +1,69 @@
+% Define section numbers with dots
+%
+% Author: Robin Fairbairns (rf10@cl.cam.ac.uk)
+% first version, June 2000
+%
+% version 2, July 2000, with a contribution from
+% Steve Grathwohl of Duke University
+%
+% This program may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.1
+% 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.1 or later is part of all distributions of LaTeX
+% version 1999/06/01 or later.
+%
+% This program consists of the file secdot.sty
+% documentation (such as it is) may be found after \endinput herein
+
+\NeedsTeXFormat{LaTeX2e}% Seems to work with any version
+\ProvidesPackage{secdot}[2000/06/20 v1.0 section numbers with dots]
+
+% command to declare a particular section level to have a dot after
+% its number
+\newcommand\sectiondot[1]{%
+ \expandafter\def\csname @seccntfmt@#1\endcsname##1{%
+ \csname the##1\endcsname.\quad
+ }
+}
+
+% do this by default for \section numbering
+\sectiondot{section}
+
+% generalised version: define that #2 comes after section level #1
+\newcommand\sectionpunct[2]{%
+ \expandafter\def\csname @seccntfmt@#1\endcsname##1{%
+ \csname the##1\endcsname#2%
+ }%
+}
+
+% the guts of the package: insert the dots where needed ...
+\renewcommand\@seccntformat[1]{\@ifundefined{@seccntfmt@#1}%
+ {\csname the#1\endcsname\quad}% original default style
+ {\csname @seccntfmt@#1\endcsname{#1}}%
+}
+\endinput
+
+secdot.sty: section numbers with dots
+=====================================
+
+the package as loaded causes section numbers to be output with a dot
+after them.
+
+the command \sectiondot{<level>} will make `level' sections also be
+output with a dot after them -- an example of use would be:
+ \sectiondot{subsection}
+
+the command \sectionpunct{<level>}{<punctuation>} gives finer
+control. examples of use would be
+ \sectionpunct{section}{. } % \sectiondot places a \quad after the
+ % dot, which may look excessive
+ \sectionpunct{section}{\quad} % restores default latex behaviour
+
+other eccentricities of numbering could be coded by those with
+stronger stomachs, by defining the appropriate
+
+ \csname @seccntfmt@<level>\endcsname
+
+which macro will take one argument, when invoked: the `level' name