summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ametsoc/ametsoc.sty
blob: 4e7291df6dbaf89881cc0753eabcc516c931a142 (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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
\ProvidesPackage{ametsoc}
% AMS Latex Style File Version 3.0
% 
% LaTeX style file for American Meteorological Society publications
% (not including BAMS).
%
%************************************************************************
%********************** DO NOT MODIFY THIS FILE!!! **********************
%************************************************************************
%* ANY CHANGES MADE WILL BE LOST UPON UPLOADING YOUR MANUSCRIPT.        *
%* THIS STYLE FILE IS KEPT ON THE UPLOAD SYSTEM AND IS USED TO          *
%* CREATE YOUR MANUSCRIPT.  ANY STYLE FILE YOU UPLOAD WILL NOT BE USED  *
%************************************************************************
%
% Developed by Brian Papa - American Meteorological Society
%
% Based on the initial style file from Lakshmanan, 
% National Severe Storms Laboratory with modifications to follow 
% all AMS formatting style.
%
% Questions/feedback should be addressed to latex@ametsoc.org
%
% 12/29/06
% Added top documentation block and adjusted indentation for
% subsubsections and subsubsubsections (paragraph) to 4mm to follow
% AMS style. Set version number to 1.0 for initial release in Jan
% 2007.
%
% April 2007
% -Switched from the epsfig to the graphicx package
% -Switched from obsolete times package to mathptmx package for times
% fonts in text and math.
% -Added amsmath, fonts, symbols, and boldface packages
% -Rewrote code for appendices to allow for unlimited appendices using
% a single appendix command with an optional 1 letter argument.
% -Redid the page layout using the geometry package
% -Removed extraneous blank spaces to avoid unpredictable formatting
%
% July 2007
% -Set Reference and Abstract headings to all caps.
% -Added use of the setspace package
% -Updated to new doublespacing method
%
% August 2007
% -Updated amspaper.tex with new instructions, added references template information.
%
% 9/12/2007
% -Removed use of \doublespace and replaced with baselinstretch and removed setspace package
% so captions and text would be double spaced
% -Added dvips option to geometry to guarantee page layout info is passed to the dvi file
%
% August 12, 2008 -- Sarah Cooley, AMS
% - Shortened endfloat commands 
% - Moved \setcounter command here from .tex
% - Removed legacy appendix code for app's A-E
%	- Made captions in list of figures/tables double spaced, cap's under figs/tables single sp.
%	- Removed dotted line from list of figures/tables
%
% August, 2008 -- Brian Papa, AMS
% - Cretaed separate style file for single space double column draft for author use
% - Added doublespacing boolean 
% - Created header for first page to indicate use of Official AMS LaTeX template
% - Corrected usepackage commands to Requirepackage
%
\RequirePackage{graphicx}
%
% Seup the page layout using the geometry package
\RequirePackage[dvips,letterpaper,textwidth=16.5cm,textheight=22.9cm]{geometry}
%
% ametsoc.bst is built on top of natbib
\RequirePackage{natbib}

% Use times font in URLs
\RequirePackage{url}

% Define a light gray color for use in the title page header
\RequirePackage{color}
\definecolor{lightgray}{gray}{0.75}
\RequirePackage{fancyhdr}

% Provide the amsmath, fonts, symbol, and boldface math packages for use
\RequirePackage{amsmath,amsfonts,amssymb,bm}

%Use the indent first package to ensure the first paragraph after each
%section is indented.
\RequirePackage{indentfirst}

%If then options
\RequirePackage{ifthen} 
\newboolean{dc}
\setboolean{dc}{false}

%Ensure both text and captions are double spaced following AMS requirements
\ifthenelse{\boolean{dc}}
{}
{\renewcommand{\baselinestretch}{2.0}}

\renewcommand{\labelenumi}{\roman{enumi}.}
% All the figures and tables should be at the end on their own pages
\RequirePackage[nomarkers, tablesfirst]{endfloat}%
\AtBeginDelayedFloats{\clearpage}
%\renewcommand{\processdelayedfloats}{{%  Change of the original endfloat
%   \let\figure\@bfig
%   \let\table\@btab
%   \processdelayedfloats@hook
%   \if@tablesfirst \processtables\processfigures
%   \else \processfigures\processtables \fi
%   \processotherdelayedfloats}}
%Page numbers.
\pagestyle{plain}

\setcounter{secnumdepth}{4}
% Article's default is to provide arabic numerals for everything.
% Change the formatting of section and lower to follow AMS style.
\renewcommand{\@seccntformat}[1]{{\csname the#1\endcsname}.~~}%1

%section definitions
\renewcommand{\section}{%
\renewcommand{\@seccntformat}[1]{{\csname the##1\endcsname}.~~}%1
\@startsection
{section}%
{1}% 1 is the level for subsection
{0mm}% NO indent, starts immediately
{-\baselineskip}% skips 1 baseline after end of previous subsection
{0.5\baselineskip}% half baseline and the first paragraph starts
{\Large\bf}%the style, Large and boldface
}
\renewcommand{\thesection}{\arabic{section}} % numbers

% subsection definitions
\renewcommand{\subsection}{%
\renewcommand{\@seccntformat}[1]{{\csname the##1\endcsname}.~~}%1
\@startsection
{subsection}%
{2}% 2 is the level for subsection
{0mm}% NO indent, starts immediately
{-\baselineskip}% skips 1 baseline after end of previous subsection
{0.5\baselineskip}% half baseline and the first paragraph starts
{\normalfont\normalsize\itshape}%the style, all italics
}
\renewcommand{\thesubsection}{\alph{subsection}} % letters

% subsubsection definitions
\renewcommand{\subsubsection}{%
\renewcommand{\@seccntformat}[1]{{\csname the##1\endcsname})~~}%1
\@startsection
{subsubsection}%
{3}% 3 is the level for subsubsection
{5mm}% Indent subsubsections
{-\baselineskip}% skips 1 baseline after end of previous subsubsection
{0.5\baselineskip}% half baseline and the first paragraph starts
{\normalfont\normalsize\sc}%
}
\renewcommand{\thesubsubsection}{\arabic{subsubsection}}

% paragraph (subsubsubsection) definitions
\renewcommand{\paragraph}{%
\renewcommand{\@seccntformat}[1]{({\csname the##1\endcsname})~~}%1
\@startsection
{paragraph}%
{4}% 4 is the level for subsubsubsection (paragraph)
{5mm}% indent paragraph/subsubsubsections the same as subsubsections
{-\baselineskip}% skips 1 baseline after end of previous subsubsection
{0.5\baselineskip}% half baseline and the first paragraph starts
{\normalfont\normalsize\itshape}%
}
\renewcommand{\theparagraph}{\roman{paragraph}}

% Acknowledgments is defined as an unnumbered section.
\newenvironment{acknowledgment}
{\subsubsection*{\textit{Acknowledgments.}}}
{}

\renewenvironment{appendix}[1][1]%
{\ifthenelse{\equal{#1}{1}}%
{\renewcommand\theequation{A\arabic{equation}}%
\setcounter{equation}{0}% reset counter
\setcounter{subsection}{0}% reset counter
\begin{center}%
\section*{\textnormal{APPENDIX}}%
\end{center}}%
{\renewcommand\theequation{{#1}\arabic{equation}}%
\setcounter{equation}{0}% reset counter
\setcounter{subsection}{0}% reset counter
\begin{center}%
\section*{\textnormal{APPENDIX {#1}}}%
\end{center}}}%

%
% Remove colon in \caption, AMS style is to have a period after the
% figure number
\long\def\@makecaption#1#2{%
% Create the proper style for the figure and table captions.
\renewcommand{\figurename}{\textsc{Fig.}}
\renewcommand{\tablename}{\textsc{Table}}
\renewcommand{\thefigure}{\arabic{figure}.}
\renewcommand{\thetable}{\arabic{table}.}
\vskip\abovecaptionskip
\sbox\@tempboxa{#1~~#2}%
\ifdim \wd\@tempboxa >\hsize
#1~~#2\par%
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
%
\renewcommand{\abstractname}{\uppercase{Abstract}}%
%
\renewenvironment{abstract}{
\normalfont% Used under normal template conditions
\begin{center}%
{\abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}
}

% Define the amstitle
\newcommand{\amstitle}{
   \date{}% No date
   \maketitle%Make the title
   \thispagestyle{fancy}% title page doesn't have page number
   \lhead{\textcolor{lightgray}{\footnotesize{Generated using version 3.0 of the official AMS \LaTeX\ template}}}
   \newpage%Title page is separate from rest of article
   \pagenumbering{arabic}%Start pagination from this point
   \newpage%Title page is separate from rest of article
}
%
%Citations should be of the form ``author year''  not ``author, year''
\bibpunct{(}{)}{;}{a}{}{,}
%
% Adjust the spacing for two column papers
\ifthenelse{\boolean{dc}}
{\setlength{\columnsep}{.25in}}
{}
% Center the References section title
\renewcommand{\refname}{\begin{center}\uppercase{References}\end{center}}

%Change the way the list of figures and tables operates
\renewcommand\listoffigures{
    \section*{\listfigurename}%
    \renewcommand{\baselinestretch}{2.0}
    \small\normalsize
    \@starttoc{lof}%
}
%
\renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\renewcommand{\@dotsep}{1000}

\renewcommand\listoftables{
    \section*{\listtablename}%
    \renewcommand{\baselinestretch}{2.0}
    \small\normalsize
    \@starttoc{lot} \renewcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\renewcommand{\@dotsep}{1000}
}