1 %%%% Class file for Le Matematiche
2 %%% Author: Giuseppe Bilotta
3 %%% Email (work): bilotta@dmi.unict.it
4 %%% Email (home): giuseppe.bilotta@gmail.com
6 \NeedsTeXFormat{LaTeX2e}
7 \ProvidesClass{lematema}[2007/02/08 v0.1
8 Class for articles in ``Le Matematiche'']
11 \DeclareOption{english}{\PassOptionsToPackage{\CurrentOption}{babel}}
12 \DeclareOption{french}{\PassOptionsToPackage{\CurrentOption}{babel}}
13 \DeclareOption{italian}{\PassOptionsToPackage{\CurrentOption}{babel}}
16 \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{article}}
17 \DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}}
21 %%% Class based on the standard article class
22 \LoadClass[10pt,twoside]{article}
23 %%% Font: times (and math stuff)
25 %%% Package `babel' for language management
26 \RequirePackage[italian]{babel}
27 %%% Package `url' for urls and emails
29 %% Define an \email{...} command
30 \DeclareUrlCommand\email{\urlstyle{tt}}
32 %%% AMS math environments and symbols
33 \RequirePackage{amsmath}
34 \RequirePackage{amssymb}
35 \RequirePackage{amsthm}
38 \RequirePackage[square,numbers,sort&compress,sectionbib]{natbib}
39 \bibliographystyle{plain}
40 \def\bibhere{\bibliography{\jobname}}
41 \addto\captionsitalian{%
42 \def\refname{Bibliografia}%
43 \def\bibname{Bibliografia}%
45 \addto\captionsenglish{%
46 \def\refname{References}%
47 \def\bibname{References}%
49 \addto\captionsfrench{%
50 \def\refname{Bibliographie}%
51 \def\bibname{Bibliographie}%
57 \centering{\MakeUppercase{\refname}}%
60 \setlength{\bibsep}{3pt}
62 % %\magnification\magstephalf
63 %%% Page geometry, using the `geometry' package
64 \RequirePackage[paperwidth=17cm,%
70 %height=18.5cm,% overspecification, comment out
73 bottom=2.5cm]{geometry}
75 %%% Our default head/foot style
77 \renewcommand{\ps@plain}{%
78 \renewcommand{\@oddhead}{\hfill{\footnotesize\@htitle}\hfill\thepage}%
79 \renewcommand{\@evenhead}{\thepage\hfill{\footnotesize\@hauthor}\hfill}%
80 \renewcommand{\@oddfoot}{}%
81 \renewcommand{\@evenfoot}{}%
85 \def\@htitle{\textbf{(no title)}}
86 \def\@hauthor{\textbf{(no author)}}
89 \renewcommand\footnoterule{%
90 \hrule\@width.4\columnwidth
94 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
95 \renewcommand\section{\@startsection {section}{1}{\z@}%
96 {-24pt \@plus -6pt \@minus -3pt}%
98 {\normalfont\bfseries}}
100 %%% Theorem environments
101 \addto\captionsitalian{%
102 \def\theoremname{Teorema}%
103 \def\corollaryname{Corollario}%
104 \def\lemmaname{Lemma}%
105 \def\propositionname{Proposizione}%
106 \def\definitionname{Definizione}%
107 \def\examplename{Esempio}%
108 \def\remarkname{Osservazione}%
111 \addto\captionsenglish{%
112 \def\theoremname{Theorem}%
113 \def\corollaryname{Corollary}%
114 \def\lemmaname{Lemma}%
115 \def\propositionname{Proposition}%
116 \def\definitionname{Definition}%
117 \def\examplename{Example}%
118 \def\remarkname{Remark}%
121 \addto\captionsfrench{%
122 \def\theoremname{Th\'eor\`eme}%
123 \def\corollaryname{Corollaire}%
124 \def\lemmaname{Lemma}%
125 \def\propositionname{Proposition}%
126 \def\definitionname{D\'efinition}%
127 \def\examplename{Exemple}%
128 \def\remarkname{Remarque}%
133 \newtheorem{thm}{\theoremname}[section]
134 \newtheorem{cor}{\corollaryname}[section]
135 \newtheorem{lemma}{\lemmaname}[section]
136 \newtheorem{prop}{\propositionname}[section]
138 \theoremstyle{definition}
139 \newtheorem{dfn}{\definitionname}[section]
140 \newtheorem{exa}{\examplename}[section]
141 \newtheorem{rem}{\remarkname}[section]
142 \newtheorem{note}{\notename}[section]
144 %%% Commands that define the article information
145 \let\originaltitlecmd\title
146 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
147 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
148 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
151 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
154 \expandafter\@authortoks\expandafter{\the\@authortoks{} - #1}%
159 \authormark{\the\@authortoks}%
160 \def\@author{\the\@authortoks}%
164 \newif\if@authortoks\@authortoksfalse
168 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
169 \expandafter\the\expandafter\@addresstoks\expandafter\par
171 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
174 \newtoks\@addresstoks
175 \def\@address{\par\bigskip\begin{flushright}%
179 \AtEndDocument{\@address}
181 %% Mathematics Subject Classification
182 \def\MSC#1{\gdef\@MSC{#1}}
185 \def\keywords#1{\gdef\@keywords{#1}}
188 %% Year/Volume/Number/First Page/Last Page
195 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
196 %% as submission date
198 \newcounter{LM@month}
200 \def\date#1{\LM@parsedate#1\LM@enddate}
201 \def\LM@parsedate#1/#2/#3\LM@enddate{%
202 \setcounter{LM@year}{#1}%
203 \setcounter{LM@month}{#2}%
204 \setcounter{LM@day}{#3}%
207 %% turn a number/counter into an italian month
208 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
209 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
210 dicembre\else\textbf{??}\fi}
211 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
213 \renewcommand{\maketitle}{%
215 \renewcommand\thefootnote{}%
217 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
219 \global\@topnum\z@ % Prevents figures from going at top of page.
221 \thispagestyle{empty}\@thanks
223 \setcounter{footnote}{0}%
224 \global\let\thanks\relax
225 \global\let\maketitle\relax
226 \global\let\@maketitle\relax
227 \global\let\@thanks\@empty
228 \global\let\@author\@empty
229 \global\let\@date\@empty
230 \global\let\@title\@empty
231 \global\let\title\relax
232 \global\let\author\relax
233 \global\let\date\relax
234 \global\let\and\relax
235 \global\let\MSC\relax
236 \global\let\@MSC\relax
237 \global\let\keywords\relax
238 \global\let\@keywords\relax
239 \global\let\titlenote\relax
240 \global\let\@titlenote\relax
243 %% insert the article information in the top right corner
245 \noindent\footnotesize LE MATEMATICHE\\
246 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
249 %% Make the title page
253 %% Submission date (at the bottom)
255 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\\}%
257 \ifx\@MSC\empty\else\thanks{%
258 \textit{Subject Classification:} \@MSC
260 %% Keywords, if present
261 \ifx\@keywords\empty\else\thanks{%
262 \textit{Keywords:} \@keywords
266 \let \footnote \thanks
267 {\def\\{\protect\linebreak}%
268 \Large\bfseries \MakeUppercase{\@title}
269 %% Title note, if present
274 \begin{tabular}[t]{c}%
275 \MakeUppercase{\@author}
281 \renewenvironment{abstract}{%
287 % In case the author forgets it:
288 \AtBeginDocument{\maketitle}
290 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
291 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
292 \c@page=\LM@FirstPg\relax
295 \protected@write\@auxout{}%
296 {\string\xdef\string\LM@LastPg{\thepage}}%