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
128 %% Mathematics Subject Classification
129 \def\MSC#1{\gdef\@MSC{#1}}
132 \def\keywords#1{\gdef\@keywords{#1}}
135 %% Year/Volume/Number/First Page/Last Page
142 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
143 %% as submission date
145 \newcounter{LM@month}
147 \def\date#1{\LM@parsedate#1\LM@enddate}
148 \def\LM@parsedate#1/#2/#3\LM@enddate{%
149 \setcounter{LM@year}{#1}%
150 \setcounter{LM@month}{#2}%
151 \setcounter{LM@day}{#3}%
154 %% turn a number/counter into an italian month
155 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
156 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
157 dicembre\else\textbf{??}\fi}
158 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
160 \renewcommand{\maketitle}{%
162 \renewcommand\thefootnote{}%
164 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
166 \global\@topnum\z@ % Prevents figures from going at top of page.
168 \thispagestyle{empty}\@thanks
170 \setcounter{footnote}{0}%
171 \global\let\thanks\relax
172 \global\let\maketitle\relax
173 \global\let\@maketitle\relax
174 \global\let\@thanks\@empty
175 \global\let\@author\@empty
176 \global\let\@date\@empty
177 \global\let\@title\@empty
178 \global\let\title\relax
179 \global\let\author\relax
180 \global\let\date\relax
181 \global\let\and\relax
182 \global\let\MSC\relax
183 \global\let\@MSC\relax
184 \global\let\keywords\relax
185 \global\let\@keywords\relax
188 %% insert the article information in the top right corner
190 \noindent\footnotesize LE MATEMATICHE\\
191 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
194 %% Make the title page
198 %% Submission date (at the bottom)
200 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\\}%
202 \ifx\@MSC\empty\else\thanks{%
203 \textit{Subject Classification:} \@MSC
205 %% Keywords, if present
206 \ifx\@keywords\empty\else\thanks{%
207 \textit{Keywords:} \@keywords
211 \let \footnote \thanks
212 {\Large\bfseries \@title \par}%
215 \begin{tabular}[t]{c}%
222 \renewenvironment{abstract}{%
228 % In case the author forgets it:
229 \AtBeginDocument{\maketitle}