summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/shorttoc/shorttoc.sty
blob: 44957372369392fa7accfeff5a72ec0e9457a3e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%%
%% This is file `shorttoc.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% shorttoc.dtx  (with options: `package')
%% 
%% IMPORTANT NOTICE:
%% This file is a stripped version of `shorttoc.dtx',
%% copyright (c) 1997, 1998, 1999 by Jean-Pierre Drucbert (drucbert@onecert.fr)
%% 
%% 
%% You are not allowed to distribute this file.
%% For distribution of the original source see
%% the copyright notice in the source file.
%% 
%% 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.
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\ProvidesPackage{shorttoc}
         [2002/08/20 v1.3 Short table of contents (JPFD)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@startshorttoc#1{\bgroup
  \makeatletter
  \@input{\jobname.#1}%
  \global\@nobreakfalse \egroup}
\def\sht@startshorttoc#1#2{\bgroup
  \makeatletter
  \@input{#2.#1}%
  \global\@nobreakfalse \egroup}
\newif\if@tightshtoc \@tightshtocfalse
\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}
\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}
     \let\shorttoc\shorttableofcontents
     \let\anothertoc\anothertableofcontents
     \DeclareOption{tight}{\@tightshtoctrue}
     \DeclareOption{loose}{\@tightshtocfalse}
     \ExecuteOptions{loose}
     \ProcessOptions*
\endinput
%%
%% End of file `shorttoc.sty'.