Fork me on GitHub

source: svn/trunk/paper/abstract.sty@ 156

Last change on this file since 156 was 123, checked in by Xavier Rouby, 16 years ago

one column abstract may require this

File size: 4.7 KB
Line 
1%%
2%% This is file `abstract.sty',
3%% generated with the docstrip utility.
4%%
5%% The original source files were:
6%%
7%% abstract.dtx (with options: `usc')
8%%
9%% -----------------------------------------------------------------
10%% Author: Peter Wilson (CUA) now at peter.r.wilson@boeing.com until June 2004
11%% (or at: pandgwilson at earthlink dot net)
12%% Copyright 2000 --- 2004 Peter R. Wilson
13%%
14%% This work may be distributed and/or modified under the
15%% conditions of the LaTeX Project Public License, either
16%% version 1.3 of this license or (at your option) any
17%% later version.
18%% The latest version of the license is in
19%% http://www.latex-project.org/lppl.txt
20%% and version 1.3 or later is part of all distributions of
21%% LaTeX version 2003/06/01 or later.
22%%
23%% This work has the LPPL maintenance status "author-maintained".
24%%
25%% This work consists of the files listed in the README file.
26%% -----------------------------------------------------------------
27%%
28\NeedsTeXFormat{LaTeX2e}
29\ProvidesPackage{abstract}[2001/02/11 v1.1 configurable abstracts]
30
31\newif\if@bsonecol
32 \@bsonecoltrue
33\newif\ifadd@bstotoc
34 \add@bstotocfalse
35\newif\ifnumber@bs
36 \number@bsfalse
37\newif\if@bsrunin
38 \@bsruninfalse
39
40\DeclareOption{original}{\@bsonecolfalse}
41\DeclareOption{addtotoc}{\add@bstotoctrue}
42\DeclareOption{number}{\number@bstrue}
43\DeclareOption{runin}{\@bsrunintrue}
44\ProcessOptions\relax
45\if@bsrunin\number@bsfalse\fi
46
47\newcommand{\abstractnamefont}{\normalfont\small\bfseries}
48\newcommand{\abstracttextfont}{\normalfont\small}
49
50\newcommand{\absnamepos}{center}
51\newlength{\abstitleskip} \setlength{\abstitleskip}{-0.5em}
52\newlength{\absleftindent}
53\newlength{\absrightindent}
54\newlength{\absparindent}
55\newlength{\absparsep}
56
57\newcommand{\abslabeldelim}[1]{\def\@bslabeldelim{#1}}
58\abslabeldelim{}
59\newcommand{\@bsrunintitle}{%
60 \hspace*{\abstitleskip}{\abstractnamefont\abstractname\@bslabeldelim}}
61
62\if@titlepage
63 \setlength{\absleftindent}{\z@}
64 \renewcommand{\abstractnamefont}{\normalfont\bfseries}
65 \renewcommand{\abstracttextfont}{\normalfont}
66 \setlength{\abstitleskip}{0em}
67\else
68 \if@twocolumn
69 \if@bsonecol
70 \setlength{\absleftindent}{\leftmargin}
71 \else
72 \setlength{\absleftindent}{\z@}
73 \renewcommand{\abstractnamefont}{\normalfont\Large\bfseries}
74 \renewcommand{\abstracttextfont}{\normalfont}
75 \renewcommand{\absnamepos}{flushleft}
76 \setlength{\abstitleskip}{0em}
77 \fi
78 \else
79 \setlength{\absleftindent}{\leftmargin}
80 \fi
81\fi
82\setlength{\absrightindent}{\absleftindent}
83\AtBeginDocument{\setlength{\absparindent}{\parindent}
84 \setlength{\absparsep}{\parskip}}
85
86\newenvironment{@bstr@ctlist}{%
87 \list{}{%
88 %%\topsep \z@
89 \partopsep \z@
90 \listparindent \absparindent
91 \itemindent \listparindent
92 \leftmargin \absleftindent
93 \rightmargin \absrightindent
94 \parsep \absparsep}%
95 \item\relax}
96 {\endlist}
97
98\newcommand{\put@bsintoc}{%
99 \ifadd@bstotoc
100 \ifnumber@bs\else
101 \@ifundefined{chapter}{\addcontentsline{toc}{section}{\abstractname}}{%
102 \addcontentsline{toc}{chapter}{\abstractname}}
103 \fi
104 \fi}
105
106\newcommand{\num@bs}{%
107 \@ifundefined{chapter}{\section{\abstractname}}{%
108 \chapter{\abstractname}}
109}
110
111\if@titlepage
112 \renewenvironment{abstract}{%
113 \titlepage
114 \null\vfil
115 \@beginparpenalty\@lowpenalty
116 \if@bsrunin\else
117 \ifnumber@bs \num@bs \else
118 \begin{\absnamepos}%
119 \abstractnamefont \abstractname
120 \@endparpenalty\@M
121 \end\absnamepos%
122 \vspace{\abstitleskip}%
123 \fi
124 \fi
125 \put@bsintoc%
126 \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
127 {\par\end{@bstr@ctlist}\vfil\null\endtitlepage}
128\else
129 \renewenvironment{abstract}{%
130 \if@bsrunin\else
131 \ifnumber@bs \num@bs \else
132 \begin{\absnamepos}\abstractnamefont\abstractname\end\absnamepos%
133 \vspace{\abstitleskip}%
134 \fi
135 \fi
136 \put@bsintoc%
137 \begin{@bstr@ctlist}\if@bsrunin\@bsrunintitle\fi\abstracttextfont}%
138 {\par\end{@bstr@ctlist}}
139\fi
140
141\newenvironment{onecolabstract}{%
142 \begin{@twocolumnfalse}\begin{abstract}}{%
143 \end{abstract}\end{@twocolumnfalse}}
144
145\providecommand{\appendiargdef}[2]{\begingroup
146 \toks@\expandafter{#1{##1}#2}%
147 \edef\@bsx{\endgroup \def\noexpand#1####1{\the\toks@}}%
148 \@bsx}
149
150\appendiargdef{\thanks}{%
151 \protected@xdef\@bs@thanks{\@bs@thanks
152 \protect\footnotetext[\the\c@footnote]{#1}}%
153}
154\let\@bs@thanks\@empty
155
156\newcommand{\saythanks}{\begingroup
157 \renewcommand{\thefootnote}{\fnsymbol{footnote}}\@bs@thanks
158 \endgroup\global\let\@bs@thanks\@empty}
159
160\endinput
161%%
162%% End of file `abstract.sty'.
Note: See TracBrowser for help on using the repository browser.