summaryrefslogtreecommitdiff
path: root/macros/texsis/styles/thesis.txs
blob: 603187b44e021fc501d8c4a75037a2eb0dab8950 (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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
% file: thesis.txs  (TeXsis version 2.17)
% $Revision: 1.4 $  :  $Date: 1996/12/18 02:00:18 $  :  $Author: myers $
%======================================================================*
% \thesis       Thesis format, including title page, table
%               of contents, binding margins, etc. 
%
% The original version of \thesis was based on the Yale Graduate
% school standards, but of course every place is different.
% Therefore we have here \YaleThesis and \UTthesis as two variations.
% You can start with either one and modify it to suit your needs, or
% start from scratch and create your own.
%
% If you write a \thesis macro for your institution and want to share
% it with others, please e-mail it to texsis@lifshitz.ph.utexas.edu
% and we will put it on the ftp server.
%


\ATunlock               % make sure @ is a letter here

%======================================================================*
% \UTthesis  complies with the UT Graduate School requirements for
% a thesis, including putting the page number up in the text on the
% first page of a chapter.  To do this we create a new insert, called
% \folioins, and redefine part of Plain TeX's \output routines
% to include this insert.  Then we also put a \mark on the page 
% to suppress the page numbering in the headline.  I know it's
% complicated, but it does what UT wants.               -EAM

\newinsert\folioins                     % insert for page numbers
\skip\folioins=1cm                      % size of page number insert
\count\folioins=1000                    % magnification factor (1 to 1)
\dimen\folioins=8in                     % maximum insert per page


\def\UTthesis{%
   \emsg{[Thesis format for University of Texas at Austin, 1989]}%
   \texsis                              % initialize TeXsis basics
   \hoffset=0.55in                      % for binding margin 1.5in
   \hsize=5.65in                        % gives 1.25in right margin
   \voffset=0.55in                      % makes 1.5in top margin
   \vsize=8.2in                         % makes 1.25in bottom margin
   \headlineoffset=-1.5pt               % move page numbers DOWN from normal 
   \RunningHeadsfalse                   % UT does not want running heads
%
   \ContentsSwitchtrue                  % be sure to make a Table of Contents
   \def\Tbf{\sixteenpoint\bf}%          % Chapter Titles in 16pt bold
   \def\tbf{\twelvepoint\bf}%           % Section titles in 12pt bold
   \twelvepoint                         % 12pt type for the text
   \doublespaced                        % double spacing
   \autoparens                          % auto-sizing of parens ON
   \quoteon                             % auto quote matching   ON
%     
   \def\titlepage{%                     % \book title page
      \begingroup                       % any changes local
       \pageno=-1                       % start on page i
       \let\endmode=\relax              % \endmode will end a field
       \def\FootText{\relax}}%          %  no number on title page
   \def\endtitlepage{%                  % end title page for \book
       \endmode                         % end any open field
       \vfil\eject                      % end title page
      \endgroup                         % close group from \titlepage
      \pageno=1}%                       % reset page number to 1
%     
   \def\abstract{%                      % no "ABSTRACT" title
      \bigskip\bigskip\medskip          % skip down some
      \bgroup\doublespaced\narrower\narrower
   }

% -- \chapter puts the page number in a \folioins insert

\def\afterchapter{\SpecialPage}

\def\SpecialPage{\ifnum\pageno>0
    \@Mark{\ChapterTitle}% mark on the page inhibits page # headline
    \insert\folioins{\insertfolio}\fi}  % insert below text

% to get the page number up in the text area on the first page
% of refereces do \SpecialPage\ListReferences


\def\@insertfolio{\line{\hfill-- \folio\ --\hfill}%
      \gdef\insertfolio{\relax}}  % THERE CAN BE ONLY ONE!

\def\insertfolio{\@insertfolio}         % turn it ON for starters

% -- only display page number in headline if positive, footline if negative

\def\PageNumber{\ifnum\pageno<0\else \folio \fi}

\def\FootLine{\ifnum\pageno<0 \line{\hss -- \folio\ -- \hss}\fi}
\footline={\FootLine}                         %

% -- re-define \pagecontents from plain to get \folioins if not void

\def\pagecontents{%
  \ifvoid\topins\else\unvbox\topins\fi
  \dimen@=\dp\@cclv \unvbox\@cclv % open up \box255
  \ifvoid\footins\else % footnote info is present
    \vskip\skip\footins
    \footnoterule
    \unvbox\footins\fi
  \ifvoid\folioins\else % page number insert is present
    \vskip\skip\folioins
    \unvbox\folioins\fi
  \gdef\insertfolio{\@insertfolio} % re-enable for next page
  \ifr@ggedbottom \kern-\dimen@ \vfil \fi}

% -- Note: to get the page number raised into the text area for the
%    front pages (roman numeral / negative numbers) you
%    will have to say \FrontPages to change the page layout.
%    Remember, front pages are actually printed AFTER the document.

\def\FrontPages{\headline={}%                   % no headlines
    \advance\vsize by -\skip\folioins
    \advance\vsize by -10pt
    \footline={\line{\hss -- \folio\ -- \hss}}} % page number at bottom

}% end of \UTthesis
     

%--------------------------------------------------*
% \YaleThesis defines a format acceptable for the Yale Graduate School
% (at the time I wrote my thesis, in 1984, so be careful!  -EAM). 
     
\def\YaleThesis{% document layout for a Thesis or Dissertation
   \emsg{[Thesis format for Yale Graduate School, 1984]}%
   \texsis                              % initialize TeXsis basics
   \ContentsSwitchtrue                  % contents page ON
   \refswitchtrue                       % save references
   \auxswitchtrue                       % .AUX file for forward references
   \hsize=6.0in                         % gives 1in right margin
   \hoffset=0.5in                       % for binding margin 1.5in
   \voffset=0.25in                      % move text down a bit
   \headlineoffset=0.20in               % move headline up (Yale Grad school)
   \RunningHeadstrue                    % running headlines
   \def\titlepage{%                     % \thesis title page
      \bgroup                           % open \titlepage group
      \pageno=-1                        % start on page i
      \let\endmode=\relax               % \endmode will end a field
      \def\FootText{\relax}}%           %  no number on title page
   \def\endtitlepage{%                  % \thesis end title page
      \endmode                          % end any open field
      \vfil\eject                       % end title page
      \egroup%                          % close \titlepage group
      \pageno=1}%                       % reset page number
   \def\abstract{%                      % \thesis abstract
      \endmode                          % end previous field
      \bigskip\bigskip\medskip          % skip down some
      \bgroup                           % abstract has same spacing
         \let\endmode=\endabstract      % to end \abstract
         \narrower\narrower}%           %
   \def\endabstract{%                   % \thesis end abstract
      \medskip\egroup\bigskip}%         %
   \def\FootText{--\ \tenrm\folio\ --}% % for 1st page of chapter
   \def\Tbf{\sixteenpoint\bf}%          % Chapter Titles in 16pt bold
   \def\tbf{\twelvepoint\bf}%           % Section titles in 12pt bold
   \elevenpoint                         % 11pt type for most of doc
   \doublespaced                        % double spacing
   \autoparens                          % auto-sizing of parens
   \quoteon                             % auto quote matching
   \def\FrontPages{\relax}%             % no such thing at Yale
   }                                    %
     
\ATlock                                 % @ goes back to \other

\let\thesis=\YaleThesis

%>>> EOF thesis.txs <<<