1 %%%% Class file for Le Matematiche
2 %%% Author: Giuseppe Bilotta
3 %%% Email (work): bilotta@dmi.unict.it
4 %%% Email (home): giuseppe.bilotta@gmail.com
8 % * \authorline : put the following authors on another line
9 % * \submissiondatefalse : hide the submission date on the first article page
10 % * \shortauthorstrue : shorten the author names under the title
11 % * \shortauthormark : shorten the author names in the headings
12 % * \noauthor : suppress the need for an author
14 \NeedsTeXFormat{LaTeX2e}
15 \ProvidesClass{lematema}[2008/03/10 v1.0
16 Class for articles in ``Le Matematiche'']
21 \DeclareOption{english}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
22 \DeclareOption{french}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
23 \DeclareOption{italian}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
26 \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{article}}
27 \DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}}
32 \ClassWarning{lematema}{No language specified, defaulting to english}
33 \PassOptionsToPackage{english}{babel}
36 %%% Class based on the standard article class
37 \LoadClass[11pt,twoside]{article}
38 %%% Font: times (and math stuff)
40 %%% Package `babel' for language management
41 \RequirePackage{babel}
42 %%% Package `url' for urls
44 %%% Define an \email{...} command, but let's not use the url package for this
45 \newcommand{\email}[1]{{e-mail: \upshape\ttfamily#1}}
47 %%% AMS math environments and symbols
48 \RequirePackage{amsmath}
49 \RequirePackage{amssymb}
50 \RequirePackage{amsthm}
53 \RequirePackage[square,numbers,sort&compress,sectionbib]{natbib}
54 \bibliographystyle{lematema}
55 \def\bibhere{\bibliography{\jobname}}
56 \addto\captionsitalian{%
57 \def\refname{Bibliografia}%
58 \def\bibname{Bibliografia}%
60 \addto\captionsenglish{%
61 \def\refname{References}%
62 \def\bibname{References}%
64 \addto\captionsfrench{%
65 \def\refname{Bibliographie}%
66 \def\bibname{Bibliographie}%
68 % from the needspace package
69 \newcommand{\needspace}[1]{\begingroup\setlength{\dimen@}{#1}%
70 \vskip\z@\@plus\dimen@ \penalty -100\vskip\z@\@plus -\dimen@
71 \vskip\dimen@ \penalty 9999\vskip -\dimen@\endgroup}
77 \centering{\MakeUppercase{\refname}}%
81 \setlength{\bibsep}{3pt}
83 % %\magnification\magstephalf
84 %%% Page geometry, using the `geometry' package
85 \RequirePackage[paperwidth=17cm,%
91 %height=18.5cm,% overspecification, comment out
94 bottom=2.5cm]{geometry}
96 %%% Our default head/foot style
98 \renewcommand{\ps@plain}{%
99 \renewcommand{\@oddhead}{\hfill{\footnotesize\@htitle}\hfill\thepage}%
100 \renewcommand{\@evenhead}{\thepage\hfill{\footnotesize\@hauthor}\hfill}%
101 \renewcommand{\@oddfoot}{}%
102 \renewcommand{\@evenfoot}{}%
106 \def\@htitle{\textbf{(no title)}}
107 \def\@hauthor{\textbf{(no author)}}
110 \renewcommand\footnoterule{%
111 \hrule\@width.4\columnwidth
115 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
116 \renewcommand\section{\@startsection {section}{1}{\z@}%
117 {-24pt \@plus -6pt \@minus -3pt}%
119 {\normalfont\bfseries}}
121 %%% Theorem environments
122 \addto\captionsitalian{%
123 \def\theoremname{Teorema}%
124 \def\corollaryname{Corollario}%
125 \def\lemmaname{Lemma}%
126 \def\propositionname{Proposizione}%
127 \def\definitionname{Definizione}%
128 \def\examplename{Esempio}%
129 \def\remarkname{Osservazione}%
132 \addto\captionsenglish{%
133 \def\theoremname{Theorem}%
134 \def\corollaryname{Corollary}%
135 \def\lemmaname{Lemma}%
136 \def\propositionname{Proposition}%
137 \def\definitionname{Definition}%
138 \def\examplename{Example}%
139 \def\remarkname{Remark}%
142 \addto\captionsfrench{%
143 \def\theoremname{Th\'eor\`eme}%
144 \def\corollaryname{Corollaire}%
145 \def\lemmaname{Lemma}%
146 \def\propositionname{Proposition}%
147 \def\definitionname{D\'efinition}%
148 \def\examplename{Exemple}%
149 \def\remarkname{Remarque}%
154 \newtheorem{thm}{\theoremname}[section]
155 \newtheorem{cor}[thm]{\corollaryname}
156 \newtheorem{lemma}[thm]{\lemmaname}
157 \newtheorem{prop}[thm]{\propositionname}
159 \theoremstyle{definition}
160 \newtheorem{dfn}[thm]{\definitionname}
161 \newtheorem{exa}[thm]{\examplename}
162 \newtheorem{rem}[thm]{\remarkname}
163 \newtheorem{note}[thm]{\notename}
165 %%% Commands that define the article information
166 \let\originaltitlecmd\title
167 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
168 \def\subtitle#1{\def\sub@title{#1}}
170 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
171 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
174 \def\makeshortauthor#1#2 #3\relax{
176 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\space - \MakeUppercase{#1}. \MakeUppercase{#3}}%
178 \@shortauthortoks{\MakeUppercase{#1}. \MakeUppercase{#3}}%
179 \@shortauthortokstrue
181 \def\@shortauthor{\the\@shortauthortoks}%
183 \newtoks\@shortauthortoks
184 \newif\if@shortauthortoks\@shortauthortoksfalse
186 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
189 \expandafter\@authortoks\expandafter{\the\@authortoks\space - \MakeUppercase{#1}}%
191 \expandafter\@authortoks\expandafter{\the\@authortoks\MakeUppercase{#1}}%
194 \makeshortauthor#1\relax%
195 \authormark{\the\@authortoks}%
196 \def\@author{\the\@authortoks}%
201 \newif\if@authortoks\@authortoksfalse
204 \def\authorline@hyphen{ - }
205 \let\authorline@sep\authorline@hyphen
208 \expandafter\@authortoks\expandafter{\the\@authortoks\protect\authorline@sep}%
211 \def\shortauthormark{\authormark{\the\@shortauthortoks}}
213 \newif\if@author\@authortrue
214 \def\noauthor{\@authorfalse\gdef\@hauthor{\@htitle}}
217 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
218 \expandafter\the\expandafter\@addresstoks\expandafter\par
220 \expandafter\filbreak
221 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
224 \newtoks\@addresstoks
225 \def\@address{\par\bigskip\begin{flushright}%
229 \AtEndDocument{\@address}
231 %% Mathematics Subject Classification
232 \def\MSC#1{\gdef\@MSC{#1}}
235 \def\keywords#1{\gdef\@keywords{#1}}
238 %% Year/Volume/Number/First Page/Last Page
245 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
246 %% as submission date
248 \newcounter{LM@month}
250 \def\date#1{\LM@parsedate#1\LM@enddate}
251 \def\LM@parsedate#1/#2/#3\LM@enddate{%
252 \setcounter{LM@year}{#1}%
253 \setcounter{LM@month}{#2}%
254 \setcounter{LM@day}{#3}%
257 %% turn a number/counter into an italian month
258 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
259 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
260 dicembre\else\textbf{??}\fi}
261 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
263 \renewcommand{\maketitle}{%
265 \renewcommand\thefootnote{}%
267 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
269 \global\@topnum\z@ % Prevents figures from going at top of page.
271 \thispagestyle{empty}\@thanks
273 \setcounter{footnote}{0}%
274 \global\let\thanks\relax
275 \global\let\maketitle\relax
276 \global\let\@maketitle\relax
277 \global\let\@thanks\@empty
278 \global\let\@author\@empty
279 \global\let\@shortauthor\@empty
280 \global\let\@date\@empty
281 \global\let\@title\@empty
282 \global\let\sub@title\@empty
283 \global\let\title\relax
284 \global\let\subtitle\relax
285 \global\let\author\relax
286 \global\let\date\relax
287 \global\let\and\relax
288 \global\let\MSC\relax
289 \global\let\@MSC\relax
290 \global\let\keywords\relax
291 \global\let\@keywords\relax
292 \global\let\titlenote\relax
293 \global\let\@titlenote\relax
296 %% insert the article information in the top right corner
298 \noindent\footnotesize LE MATEMATICHE\\
299 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
302 \newif\ifsubmissiondate
305 \newif\ifshortauthors\shortauthorsfalse
306 %% Make the title page
310 %% Submission date (at the bottom)
313 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\smallskip}%
316 \ifx\@MSC\empty\else\thanks{%
317 \textit{AMS 2000 Subject Classification:} \@MSC
319 %% Keywords, if present
320 \ifx\@keywords\empty\else\thanks{%
321 \textit{Keywords:} \@keywords
325 \let \footnote \thanks
326 {\def\\{\protect\linebreak}%
327 \fontsize{12}{15}\selectfont\bfseries \MakeUppercase{\@title}
328 \ifx\sub@title\empty\else\vskip5pt\fontsize{10}{14}\selectfont\bfseries \MakeUppercase{\sub@title}\fi
329 %% Title note, if present
334 {\fontsize{11.5}{14}\selectfont
335 \begin{tabular}[t]{c}%
336 \let\authorline@sep\tabularnewline
337 \ifshortauthors\@shortauthor\else\@author\fi
345 \renewenvironment{abstract}{%
351 % In case the author forgets it:
352 \AtBeginDocument{\maketitle}
354 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
355 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
356 \c@page=\LM@FirstPg\relax
359 \protected@write\@auxout{}%
360 {\string\xdef\string\LM@LastPg{\thepage}}%