summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/combine/combinet.sty
blob: a08eeeca46e33d8747704464aa842f1f941cb82a (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
%%
%% This is file `combinet.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% combine.dtx  (with options: `pck')
%% 
%%  Copyright 2000 Peter R. Wilson
%% 
%%  This program is provided under the terms of the
%%  LaTeX Project Public License distributed from CTAN
%%  archives in directory macros/latex/base/lppl.txt.
%% 
%% Author: Peter Wilson (CUA)
%%         now at: peter.r.wilson@boeing.com
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{combinet}[2001/09/05 v0.2 document titles in ToC]
\@ifclassloaded{combine}{}{%
  \PackageError{combinet}{The `combine' class is expected}{\@ehc}%
}

\newif\ifc@lnomtitle
  \c@lnomtitlefalse
\newif\ifc@lnomauthor
  \c@lnomauthorfalse
\newif\ifc@lnothanks
  \c@lnothanksfalse
\newif\ifc@lpubopt
  \c@lpuboptfalse
\newif\ifc@lpubtop
  \c@lpubtopfalse
\newif\ifc@lpubs
  \c@lpubsfalse

\DeclareOption{nomtitle}{\c@lnomtitletrue}
\DeclareOption{nomauthor}{\c@lnomauthortrue}
\DeclareOption{nothanks}{\c@lnothankstrue}
\DeclareOption{pub}{\c@lpubopttrue\c@lpubtopfalse\c@lpubstrue}
\DeclareOption{pubtop}{\c@lpubtoptrue\c@lpuboptfalse\c@lpubstrue}
\ProcessOptions\relax

\ifc@lpubs
  \renewcommand{\published}[2][\@empty]{%
    \c@lpubtrue
    \ifx #1\@empty
      \gdef\c@lpubtoc{#2}
    \else
      \gdef\c@lpubtoc{#1}
    \fi
    \gdef\c@lpubbody{#2}
  }
\fi

\appendiargdef{\title}{%
  \begingroup
    \renewcommand{\thanks}[1]{}
    \protected@xdef\c@l@title{#1}
  \endgroup
}
\appendiargdef{\author}{%
  \begingroup
    \renewcommand{\thanks}[1]{}
    \renewcommand{\and}{\unskip, }
    \protected@xdef\c@l@author{#1}
  \endgroup
}

\def\c@lbmaketitle{\par
  \begingroup
    \let\newpage\relax
    \let\@maketitle\c@lb@maketitle
    \ifc@lpub
      \ifc@lpubtop
        \ifc@lnopubindoc\else
          {\parindent\z@ \pubfont \c@lpubbody\par\nobreak}
        \fi
      \fi
    \fi
    \c@lmtitle        %% typeset the title block
  \endgroup
  \setcounter{footnote}{0}
  \begingroup
    \let\thanks\@empty
    \ifc@ltoctitle\else
      \ifc@lnomtitle\else
        \ifx\@title\@empty\else
          \ifc@lnothanks
            \c@laaddtocontents{toc}%
              {\protect\contentsline{coltoctitle}%
              {\protect\numberline{}\c@l@title}{\thecolpage}}
          \else
            \c@laaddtocontents{toc}%
              {\protect\contentsline{coltoctitle}%
              {\protect\numberline{}\@title}{\thecolpage}}
          \fi
        \fi
      \fi
    \fi
    \ifc@ltocauthor\else
      \ifc@lnomauthor\else
        \ifx\@author\@empty\else
          \ifc@lnothanks
            \c@laaddcontentsline{toc}%
              {coltocauthor}{\protect\numberline{}\c@l@author}
          \else
            \c@laaddcontentsline{toc}%
              {coltocauthor}{\protect\numberline{}\@author}
          \fi
        \fi
      \fi
    \fi
  \endgroup
  \ifc@lpub
    \ifc@lpubopt
      \ifc@lnopubindoc\else
        {\parindent\z@ \pubfont \c@lpubbody\par\nobreak}
      \fi
    \fi
    \ifc@lpubs
      \ifc@lnopubintoc\else
        \c@laaddcontentsline{toc}{published}{\protect\numberline{}\c@lpubtoc}
      \fi
    \fi
  \fi
  \c@lmtitlempty
}

\endinput
%%
%% End of file `combinet.sty'.