From 4cdf5027186b67ba5e05c5c7cc6bd7eaa7b1981f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 11 Jan 2006 23:57:44 +0000 Subject: trunk/Master/texmf-dist/source/latex/shorttoc git-svn-id: svn://tug.org/texlive/trunk@512 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/shorttoc/shorttoc.dtx | 235 +++++++++++++++++++++ .../texmf-dist/source/latex/shorttoc/shorttoc.ins | 42 ++++ 2 files changed, 277 insertions(+) create mode 100644 Master/texmf-dist/source/latex/shorttoc/shorttoc.dtx create mode 100644 Master/texmf-dist/source/latex/shorttoc/shorttoc.ins (limited to 'Master/texmf-dist/source/latex/shorttoc') diff --git a/Master/texmf-dist/source/latex/shorttoc/shorttoc.dtx b/Master/texmf-dist/source/latex/shorttoc/shorttoc.dtx new file mode 100644 index 00000000000..bd2cc78a6af --- /dev/null +++ b/Master/texmf-dist/source/latex/shorttoc/shorttoc.dtx @@ -0,0 +1,235 @@ +% \iffalse +%% Package `shorttoc' to use with LaTeX 2e +%% Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Jean-Pierre F. Drucbert, all rights reserved +%% +%% You may use and distribute this file freely, provided that +%% you don't pretend that you wrote it. +% +% It 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. +% +%\NeedsTeXFormat{LaTeX2e}[1996/06/01] +%\ProvidesPackage{shorttoc} +% [2002/08/20 v1.3 Short table of contents (JPFD)] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage[tight]{shorttoc} +\GetFileInfo{shorttoc.sty} +\def\filedate{2002/04/10} +\def\fileversion{v1.3} +\EnableCrossrefs +%\DisableCrossrefs % Say \DisableCrossrefs if index is ready +\RecordChanges % Gather update information +\CodelineIndex % Index code by line number +\title{The \pkg{shorttoc} package} +\author{Jean-Pierre F. Drucbert\\\texttt{drucbert@onecert.fr}}% +\date{\filedate} +\def\bs{\texttt{\char'134}} +\let\pkg\textsf +\begin{document} +\maketitle +\DocInput{shorttoc.dtx} +\end{document} +% +% \fi +% +% \CheckSum{86} +% +% \changes{v1.0}{21 Jul 98}{First officially released version.} +% \changes{v1.1}{03 Aug 99}{LPPL License.} +% \changes{v1.2}{20 Aug 99}{Added tight/loose options.} +% \changes{v1.3}{10 Apr 2002}{Added macro for external tocs.} +% +% \DoNotIndex{\@Mii,\@Miv,\@cons,\@currlist,\@dblarg,\@dbldeferlist} +% \DoNotIndex{\@dblfloat,\@dottedtocline,\@eha,\@Esphack,\@float} +% \DoNotIndex{\@floatpenalty,\@ifnextchar,\@ifundefined,\@latexerr} +% \DoNotIndex{\@mkboth,\@namedef,\@nameuse,\@parboxrestore,\@spaces} +% \DoNotIndex{\@starttoc,\@tempa,\@tempboxa,\@tempdima,\@warning} +% \DoNotIndex{\addcontentsline,\addtocounter,\advance,\arabic,\bfseries} +% \DoNotIndex{\bgroup,\box,\chapter,\columnwidth,\csname,\def,\dimen,\docdate} +% \DoNotIndex{\edef,\egroup,\else,\endcsname,\endinput,\expandafter,\fi} +% \DoNotIndex{\filedate,\fileversion,\global,\hbadness,\hbox,\hfil,\hrule} +% \DoNotIndex{\hsize,\ht,\if@twocolumn,\ifdim,\iffalse,\ifnum,\iftrue,\ifvbox} +% \DoNotIndex{\ifx,\ignorespaces,\intextsep,\kern,\let,\long,\moveleft,\newbox} +% \DoNotIndex{\newcommand,\newcounter,\newif,\newsavebox,\noexpand,\normalsize} +% \DoNotIndex{\numberline,\PackageError,\PackageWarning,\par,\parindent} +% \DoNotIndex{\penalty,\prevdepth,\protect,\refstepcounter,\relax} +% \DoNotIndex{\renewcommand,\rmfamily,\section,\setbox,\setcounter,\space} +% \DoNotIndex{\textheight,\the,\typeout,\unvbox,\uppercase,\vadjust,\value} +% \DoNotIndex{\vbox,\vrule,\vskip,\vspace,\wd,\z@} +% +% \shorttoc{Short Contents}{1} +% \tableofcontents +% \begin{abstract} +% This package\footnote{% +% \begin{tabular}[t]{l} +% Copyright \copyright\ 1997, 1998, 1999, 2000, 2001, 2002 by\\ +% Jean-Pierre F. Drucbert\vphantom{bp}\\ +% ONERA/Centre de Toulouse SRI\vphantom{bp}\\ +% Office National d'\'Etudes et de Recherches A\'erospatiales\vphantom{bp}\\ +% Centre de Toulouse\vphantom{bp}\\ +% Service R\'eseaux et Informatique\vphantom{bp}\\ +% \\ +% Complexe Scientifique de Rangueil\vphantom{bp}\\ +% 2, Avenue \'Edouard Belin\vphantom{bp}\\ +% BP 4025 F-31055 TOULOUSE CEDEX\vphantom{bp}\\ +% FRANCE\vphantom{bp}\\ +% \vphantom{bp}\\ +% Email: \texttt{drucbert@onecert.fr}\vphantom{bp}\\ +% \end{tabular}} +% allows you to create another table of contents, with a different +% depth. This could be useful in large documents where a detailed +% table of contents should be accompanied by a shorter one, giving +% only a general overview of the main topics in the document. +% You can also insert the table of contents of another +% document. +% \end{abstract} +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% \section{The \pkg{shorttoc} package} +% \DescribeMacro{\shorttableofcontents} +% This package defines the |\shorttableofcontents| macro, which +% is used as follows: +% \begin{quote}\ttfamily +% \bs shorttableofcontents\marg{title}\marg{depth} +% \end{quote} +% where \meta{title} will be the title of this table of contents and +% \meta{depth} its ``depth'', with the meaning of the \texttt{tocdepth} +% counter. +% +% \DescribeMacro{\shorttoc} +% As this macro has a too long name, |\shorttoc| is a synomym, with +% the same syntax. +% +% \DescribeMacro{\anothertableofcontents} +% This macro allows you to display the table of contents of +% an another document, or its list of figures or list of +% tables. Its use is: +% \begin{quote}\ttfamily +% \bs anothertableofcontents\oarg{suffix}\marg{document}\marg{title}\marg{depth} +% \end{quote} +% where \meta{suffix} is |.toc| by default (table of +% contents), \meta{document} is the base name of the other +% document whose table of contents (or its list of figures or +% list of tables, if you give another \meta{suffix}). +% \meta{title} and \meta{depth} have the same meaning as for +% |\shorttableofcontents|. +% +% \DescribeMacro{\anothertoc} +% As this macro has a too long name, |\anothertoc| is a synomym, with +% the same syntax. +% +% \subsection{Options} +% The available package options are \texttt{loose} (default) +% and \texttt{tight}. \texttt{tight} reduces the amount of +% vertical space between the lines of the short table of contents. +% +% \subsection{Important note} +% This package \emph{does not create} the |.toc| file; this +% file must be created by a classical |\tableofcontents| command, or by +% something similar. You must place the |\shorttableofcontents| +% (or |\shorttoc|) command \emph{before} the |\tableofcontents| +% (or equivalent) command. If you do not respect the right sequence, +% the short table of contents will be % empty (just its title). +% +% This restriction does not apply to |\anothertableofcontents| +% and |\anothertoc| macros, but, of course, the files |.toc| (or other) +% for the other document must be available. +% +% \StopEventually{\setcounter{IndexColumns}{2}\PrintIndex\PrintChanges} +% +% \clearpage +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macro}{\@startshorttoc} +% First, we declare the |\@startshorttoc| macro, like |\@starttoc|, +% but without creating the |.toc| file: +% \begin{macrocode} +\def\@startshorttoc#1{\bgroup + \makeatletter + \@input{\jobname.#1}% + \global\@nobreakfalse \egroup} +% \end{macrocode} +% \end{macro} +% The macro |\sht@startshorttoc| is similar, but has a second +% argument to speciffy another document. +% \begin{macrocode} +\def\sht@startshorttoc#1#2{\bgroup + \makeatletter + \@input{#2.#1}% + \global\@nobreakfalse \egroup} +% \end{macrocode} +% +% \begin{macro}{\if@tightshtoc} +% Then a flag for the tight/loose options: +% \begin{macrocode} +\newif\if@tightshtoc \@tightshtocfalse +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\shorttableofcontents} +% Then the user interface macro is copied from +% |\tableofcontents|, but with arguments and +% processing of the depth: +% \begin{macrocode} +\def\shorttableofcontents#1#2{\bgroup\c@tocdepth=#2\@restonecolfalse + \if@tightshtoc + \parsep\z@ + \fi + \if@twocolumn\@restonecoltrue\onecolumn\fi + \@ifundefined{chapter}% + {\section*{{#1} + \@mkboth{\uppercase{#1}}{\uppercase{#1}}}}% + {\chapter*{{#1} + \@mkboth{\uppercase{#1}}{\uppercase{#1}}}}% + \@startshorttoc{toc}\if@restonecol\twocolumn\fi\egroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\anothertableofcontents} +% This macro is analog, but using another input file and +% with arguments for suffix and name of the other document: +% \begin{macrocode} +\newcommand{\anothertableofcontents}[4][toc]{\bgroup\c@tocdepth=#4\@restonecolfalse + \if@tightshtoc + \parsep\z@ + \fi + \if@twocolumn\@restonecoltrue\onecolumn\fi + \@ifundefined{chapter}% + {\section*{{#3} + \@mkboth{\uppercase{#3}}{\uppercase{#3}}}}% + {\chapter*{{#3} + \@mkboth{\uppercase{#3}}{\uppercase{#3}}}}% + \sht@startshorttoc{#1}{#2}\if@restonecol\twocolumn\fi\egroup} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\shorttoc} +% Let us define shorters synonyms: +% \begin{macrocode} + \let\shorttoc\shorttableofcontents + \let\anothertoc\anothertableofcontents +% \end{macrocode} +% \end{macro} +% +% And declare the options: +% \begin{macrocode} + \DeclareOption{tight}{\@tightshtoctrue} + \DeclareOption{loose}{\@tightshtocfalse} + \ExecuteOptions{loose} + \ProcessOptions* +% \end{macrocode} +% +% \Finale +% \end{document} +\endinput diff --git a/Master/texmf-dist/source/latex/shorttoc/shorttoc.ins b/Master/texmf-dist/source/latex/shorttoc/shorttoc.ins new file mode 100644 index 00000000000..e1107652683 --- /dev/null +++ b/Master/texmf-dist/source/latex/shorttoc/shorttoc.ins @@ -0,0 +1,42 @@ +\def\filedate{1999/08/20} +\def\fileversion{v1.2} +\def\batchfile{shorttoc.ins} +\input docstrip.tex +\def\SimplePackage#1{\generateFile{#1.sty}{t}{\from{#1.dtx}{package}}} +\keepsilent +\preamble + +IMPORTANT NOTICE: +This file is a stripped version of `shorttoc.dtx', +copyright (c) 1997, 1998, 1999 by Jean-Pierre Drucbert (drucbert@onecert.fr) + +% ^^A Jean-Pierre F. Drucbert (JPFD) Email: drucbert@onecert.fr +% ^^A ONERA/Centre de Toulouse SRI Téléphone 05-62-25-25-15 +% ^^A Office National d'Études et de Recherches Aérospatiales +% ^^A Centre de Toulouse +% ^^A Service Réseaux et Informatique +% ^^A Complexe Scientifique de Rangueil +% ^^A 2, Avenue Édouard Belin BP 4025 F-31055 TOULOUSE CEDEX +% ^^A FRANCE +% ^^A +% ^^A Barbarus hic ego sum, qui non intellegor ulli. +% ^^A Publius Ovidius Naso + +You are not allowed to distribute this file. +For distribution of the original source see +the copyright notice in the source file. + +\endpreamble + +\SimplePackage{shorttoc} + +\Msg{*************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the file} +\Msg{* `shorttoc.sty' into a directory searched by TeX:} +\Msg{*} +\Msg{* To produce the documentation run `shorttoc.dtx' through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing} +\Msg{*************************************************************} + -- cgit v1.2.3