somewhat better fitting
[notebooks.git] / ametsoc.sty
blobde4655968a7785578fbeee830d1afba710407e9a
1 \ProvidesPackage{ametsoc}
3 % hacked Jan Mandel Oct 2006
5 %LaTeX and BibTeX style files for American Meteorological Society publications.
6 %These are not authorized or approved by the AMS in any way. Use at your own
7 %risk!
8 % (c) Lakshman, National Severe Storms Laboratory
9 % http://www.cimms.ou.edu/~lakshman/ametsoc/
10 % $Id: ametsoc.sty,v 1.1 2017/04/24 20:36:46 jmandel Exp $
12 % ametsoc.bst is built on top of natbib
13 \RequirePackage{natbib}
15 %use Postscript times if available ... it's better looking than computer roman
16 \usepackage{times}
18 % Check if user has defined the final option or the conf option
19 \RequirePackage{ifthen}
20 \newboolean{final}
21 \DeclareOption{final}{\setboolean{final}{true}}
23 \newboolean{conf}
24 \DeclareOption{conf}{\setboolean{conf}{true}}
26 \ProcessOptions
28 % Set up the environment for conference papers
29 \ifthenelse{\boolean{conf}}%
30 {\renewcommand\familydefault{\sfdefault}%Helvetica
31 \setlength{\oddsidemargin}{-0.25in}%wider page
32 \setlength{\textwidth}{7in}%more text
33 \usepackage{fix2col}%makes things look better
37 % If we are final, then all the figures and tables should be at the
38 % end ...
39 \ifthenelse{\boolean{final}}
40 %{\usepackage[tablesfirst]{endfloat}%
41 {\usepackage{endfloat}% put the tables last, not first
42 \renewcommand{\processdelayedfloats}{{% Change of the original endfloat
43 %\def\baselinestretch{1}\normalsize %<-- do not override setspace ...
44 \let\figure\@bfig
45 \let\table\@btab
46 \processdelayedfloats@hook
47 \if@tablesfirst \processtables\processfigures
48 \else \processfigures\processtables \fi
49 \processotherdelayedfloats}}
53 % Make it do double-spacing for manuscript when you send it out.
54 % User will have used \usepackage[final]{ametsoc} to get double-spaced text.
55 \ifthenelse{\boolean{final}}
56 {\usepackage{setspace} \doublespacing \setstretch{2.0}}
59 %AMS requires page numbers.
60 \pagestyle{plain}
62 \renewcommand\thefootnote{\@fnsymbol\c@footnote} % use * for footnote
64 % Article's default is to provide arabic numerals for everything.
65 % Change the formatting of section and lower to be the way AMS wants them.
66 % --> \makeatletter is not needed because this is a package file.
67 \renewcommand{\@seccntformat}[1]{\bf{\csname the#1\endcsname}.~~}%1. in bold
70 % subsection ...
71 \renewcommand{\section}{\@startsection
72 {section}%
73 {1}% 2 is the level for section
74 {0mm}% NO indent, starts immediately
75 {-\baselineskip}% skips 1 baseline after end of previous subsection
76 {0.5\baselineskip}% half baseline and the first paragraph starts
77 {\bf\uppercase}%the style, all italics
80 % subsection ...
81 \renewcommand{\subsection}{\@startsection
82 {subsection}%
83 {2}% 2 is the level for subsection
84 {0mm}% NO indent, starts immediately
85 {-\baselineskip}% skips 1 baseline after end of previous subsection
86 {0.5\baselineskip}% half baseline and the first paragraph starts
87 %{\normalfont\normalsize\itshape}%the style, all italics
88 {\bfseries\slshape}
90 \renewcommand{\thesubsection}{\thesection.\arabic{subsection}} % letters
92 % subsubsection ...
93 \renewcommand{\subsubsection}{\@startsection
94 {subsubsection}%
95 {3} % 3 is the level for subsubsection
96 {0mm}% NO indent, starts immediately
97 {-\baselineskip}% skips 1 baseline after end of previous subsubsection
98 {-2mm}% text starts on the same line
99 {\normalfont\normalsize\itshape}%the style, all italics
101 % roman numbers; because this is run-in, we need a couple of spaces too.
102 \renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}}
105 % Acknowlegments is not a section, but is formatted with run-in headings
106 \newenvironment{acknowledgement}
107 {\subsubsection*{\textbf{\emph{Acknowledgement}}}}
110 \if@titlepage
111 \renewenvironment{abstract}{%
112 \titlepage
113 \null\vfil
114 \@beginparpenalty\@lowpenalty
115 \begin{center}%
116 \bfseries \abstractname
117 \@endparpenalty\@M
118 \end{center}}%
119 {\par\vfil\null\endtitlepage}
120 \else
121 \renewenvironment{abstract}{%
122 \if@twocolumn
123 \section*{\abstractname}%
124 \else
125 % \small
126 \begin{center}%
127 {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
128 \end{center}%
129 \quotation
130 \fi}
131 {\if@twocolumn\else\endquotation\fi}
134 % No date on conference papers
135 \ifthenelse{\boolean{conf}}
136 {\date{}}
139 % Define the amstitle depending on whether we are final or not
140 \newcommand{\amstitle}{
141 %\date{}% title page on final should be dated
142 \maketitle%make the title
143 \thispagestyle{empty}%title page doesn't have page number ...
144 \newpage%title page is separate from rest of article
145 \pagenumbering{arabic}%start numbering from this point ...
146 \newpage%The AMS wants title page separate from article
147 }%For final manuscript
149 \ifthenelse{\boolean{final}}
151 {\renewcommand{\amstitle}{\maketitle}} %no need for separate pages on non-final
153 %% citations should be of the form ``author year'' not ``author, year''
154 \bibpunct{(}{)}{;}{a}{}{,}