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/01/01 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}
37 % %\magnification\magstephalf
38 %%% Page geometry, using the `geometry' package
39 \RequirePackage[paperwidth=17cm,%
48 bottom=2.5cm]{geometry}
50 %%% Our default head/foot style
52 \renewcommand{\ps@plain}{%
53 \renewcommand{\@oddhead}{\hfill\@htitle\hfill\thepage}%
54 \renewcommand{\@evenhead}{\thepage\hfill\@hauthor\hfill}%
55 \renewcommand{\@oddfoot}{}%
56 \renewcommand{\@evenfoot}{}%
60 % TODO these will be redefined in the article itself
61 \def\@htitle{some title}
62 \def\@hauthor{some author}
65 \renewcommand\footnoterule{%
66 \hrule\@width.4\columnwidth
70 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
71 \renewcommand\section{\@startsection {section}{1}{\z@}%
72 {-24pt \@plus -6pt \@minus -3pt}%
74 {\normalfont\bfseries}}
76 %%% Theorem environments
77 \addto\captionsitalian{%
78 \def\theoremname{Teorema}%
79 \def\corollaryname{Corollario}%
80 \def\lemmaname{Lemma}%
81 \def\propositionname{Proposizione}%
82 \def\definitionname{Definizione}%
83 \def\examplename{Esempio}%
84 \def\remarkname{Osservazione}%
87 \addto\captionsenglish{%
88 \def\theoremname{Theorem}%
89 \def\corollaryname{Corollary}%
90 \def\lemmaname{Lemma}%
91 \def\propositionname{Proposition}%
92 \def\definitionname{Definition}%
93 \def\examplename{Example}%
94 \def\remarkname{Remark}%
97 \addto\captionsfrench{%
98 \def\theoremname{Th\'eor\`eme}%
99 \def\corollaryname{Corollaire}%
100 \def\lemmaname{Lemma}%
101 \def\propositionname{Proposition}%
102 \def\definitionname{D\'efinition}%
103 \def\examplename{Exemple}%
104 \def\remarkname{Remarque}%
109 \newtheorem{thm}{\theoremname}[section]
110 \newtheorem{cor}{\corollaryname}[section]
111 \newtheorem{lemma}{\lemmaname}[section]
112 \newtheorem{prop}{\propositionname}[section]
114 \theoremstyle{definition}
115 \newtheorem{dfn}{\definitionname}[section]
116 \newtheorem{exa}{\examplename}[section]
117 \newtheorem{rem}{\remarkname}[section]
118 \newtheorem{note}{\notename}[section]
124 %%% Commands that define the article information
126 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
130 %% Mathematics Subject Classification
131 \def\MSC#1{\gdef\@MSC{#1}}
134 \def\keywords#1{\gdef\@keywords{#1}}
137 %% Year/Volume/Number/First Page/Last Page
144 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
145 %% as submission date
147 \newcounter{LM@month}
149 \def\date#1{\LM@parsedate#1\LM@enddate}
150 \def\LM@parsedate#1/#2/#3\LM@enddate{%
151 \setcounter{LM@year}{#1}%
152 \setcounter{LM@month}{#2}%
153 \setcounter{LM@day}{#3}%
156 %% turn a number/counter into an italian month
157 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
158 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
159 dicembre\else\textbf{??}\fi}
160 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
162 \renewcommand{\maketitle}{%
164 \renewcommand\thefootnote{}%
166 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
168 \global\@topnum\z@ % Prevents figures from going at top of page.
170 \thispagestyle{empty}\@thanks
172 \setcounter{footnote}{0}%
173 \global\let\thanks\relax
174 \global\let\maketitle\relax
175 \global\let\@maketitle\relax
176 \global\let\@thanks\@empty
177 \global\let\@author\@empty
178 \global\let\@date\@empty
179 \global\let\@title\@empty
180 \global\let\title\relax
181 \global\let\author\relax
182 \global\let\date\relax
183 \global\let\and\relax
184 \global\let\MSC\relax
185 \global\let\@MSC\relax
186 \global\let\keywords\relax
187 \global\let\@keywords\relax
188 \global\let\titlenote\relax
189 \global\let\@titlenote\relax
192 %% insert the article information in the top right corner
194 \noindent\footnotesize LE MATEMATICHE\\
195 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
198 %% Make the title page
202 %% Submission date (at the bottom)
204 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\\}%
206 \ifx\@MSC\empty\else\thanks{%
207 \textit{Subject Classification:} \@MSC
209 %% Keywords, if present
210 \ifx\@keywords\empty\else\thanks{%
211 \textit{Keywords:} \@keywords
215 \let \footnote \thanks
216 {\Large\bfseries \@title
217 %% Title note, if present
222 \begin{tabular}[t]{c}%
229 \renewenvironment{abstract}{%
235 % In case the author forgets it:
236 \AtBeginDocument{\maketitle}