initial setup of thesis repository
[cluster_expansion_thesis.git] / Stylefiles / epigraph.sty
blob9fd1a57f3268e6ee8cd5beaea4ba2a7ca87c70f1
1 %%
2 %% This is file `epigraph.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% epigraph.dtx (with options: `usc')
8 %%
9 %% Author: Peter Wilson (CUA and NIST)
10 %% now at: peter.r.wilson@boeing.com
11 %%
12 %% Copyright 1998 Peter R. Wilson
13 %%
14 %% This program is provided under the terms of the
15 %% LaTeX Project Public License distributed from CTAN
16 %% archives in directory macros/latex/base/lppl.txt.
17 %%
18 \NeedsTeXFormat{LaTeX2e}
19 \ProvidesPackage{epigraph}[1998/11/29 v1.1 typesetting epigraphs]
20 \newlength{\beforeepigraphskip}
21 \setlength{\beforeepigraphskip}{.1\baselineskip}
22 \newlength{\afterepigraphskip}
23 \setlength{\afterepigraphskip}{.3\baselineskip}
24 \newlength{\epigraphwidth}
25 \setlength{\epigraphwidth}{.6\textwidth}
26 \newlength{\epigraphrule}
27 \setlength{\epigraphrule}{.4\p@}
28 \newcommand{\epigraphsize}{\small}
29 \newcommand{\epigraphflush}{flushright}
30 \newcommand{\textflush}{flushleft}
31 \newcommand{\sourceflush}{flushright}
32 %\newcommand{\@epirule}{\rule[.5ex]{\epigraphwidth}{\epigraphrule}}
33 \newcommand{\@epirule}{\vspace{.5\baselineskip}}
34 \newcommand{\@epitext}[1]{%
35 \begin{minipage}{\epigraphwidth}\begin{\textflush} \textit{#1}\\
36 \ifdim\epigraphrule>\z@ \@epirule \else \vspace*{1ex} \fi
37 \end{\textflush}\end{minipage}}
38 \newcommand{\@episource}[1]{%
39 \begin{minipage}{\epigraphwidth}\begin{\sourceflush} #1\end{\sourceflush}
40 \end{minipage}}
41 \newcommand{\epigraph}[2]{\vspace{\beforeepigraphskip}
42 {\epigraphsize\begin{\epigraphflush}\begin{minipage}{\epigraphwidth}
43 \@epitext{#1}\\ \@episource{#2}
44 \end{minipage}\end{\epigraphflush}
45 \vspace{\afterepigraphskip}}}
46 \newcommand{\qitem}[2]{{\raggedright\item \begin{minipage}{\epigraphwidth}
47 \@epitext{#1}\\ \@episource{#2}
48 \end{minipage}}}
49 \newcommand{\qitemlabel}[1]{\hfill}
50 \newenvironment{epigraphs}{%
51 \vspace{\beforeepigraphskip}\begin{\epigraphflush}
52 \epigraphsize
53 \begin{minipage}{\epigraphwidth}
54 \list{}%
55 {\itemindent\z@ \labelwidth\z@ \labelsep\z@
56 \leftmargin\z@ \rightmargin\z@
57 \let\makelabel\qitemlabel}}%
58 {\endlist\end{minipage}\end{\epigraphflush}
59 \vspace{\afterepigraphskip}}
60 \newif\if@epirhs \@epirhstrue
61 \newif\if@epicenter \@epicentertrue
62 \newcommand{\@epipos}{
63 \long\def\@ept{flushleft}
64 \ifx\epigraphflush\@ept
65 \@epirhsfalse \@epicenterfalse
66 \else
67 \long\def\@ept{center}
68 \ifx\epigraphflush\@ept
69 \@epirhsfalse \@epicentertrue
70 \else
71 \@epirhstrue \@epicenterfalse
72 \fi
73 \fi}
74 \newcommand{\epigraphhead}[2][95]{%
75 \def\@epitemp{\begin{minipage}{\epigraphwidth}#2\end{minipage}}
76 \def\ps@epigraph{\let\@mkboth\@gobbletwo
77 \@epipos
78 \if@epirhs
79 \def\@oddhead{\hfil\begin{picture}(0,0)
80 \put(0,-#1){\makebox(0,0)[r]{\@epitemp}}
81 \end{picture}}
82 \else
83 \if@epicenter
84 \def\@oddhead{\hfil\begin{picture}(0,0)
85 \put(0,-#1){\makebox(0,0)[b]{\@epitemp}}
86 \end{picture}\hfil}
87 \else
88 \def\@oddhead{\begin{picture}(0,0)
89 \put(0,-#1){\makebox(0,0)[l]{\@epitemp}}
90 \end{picture}\hfil}
91 \fi
92 \fi
93 \let\@evenhead\@oddhead
94 \def\@oddfoot{\reset@font\hfil\thepage\hfil}
95 \let\@evenfoot\@oddfoot}
96 \thispagestyle{epigraph}}
97 \endinput
99 %% End of file `epigraph.sty'.