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}
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,%
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 % TODO these will be redefined in the article itself
86 \def\@htitle{some title}
87 \def\@hauthor{some author}
90 \renewcommand\footnoterule{%
91 \hrule\@width.4\columnwidth
95 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
96 \renewcommand\section{\@startsection {section}{1}{\z@}%
97 {-24pt \@plus -6pt \@minus -3pt}%
99 {\normalfont\bfseries}}
101 %%% Theorem environments
102 \addto\captionsitalian{%
103 \def\theoremname{Teorema}%
104 \def\corollaryname{Corollario}%
105 \def\lemmaname{Lemma}%
106 \def\propositionname{Proposizione}%
107 \def\definitionname{Definizione}%
108 \def\examplename{Esempio}%
109 \def\remarkname{Osservazione}%
112 \addto\captionsenglish{%
113 \def\theoremname{Theorem}%
114 \def\corollaryname{Corollary}%
115 \def\lemmaname{Lemma}%
116 \def\propositionname{Proposition}%
117 \def\definitionname{Definition}%
118 \def\examplename{Example}%
119 \def\remarkname{Remark}%
122 \addto\captionsfrench{%
123 \def\theoremname{Th\'eor\`eme}%
124 \def\corollaryname{Corollaire}%
125 \def\lemmaname{Lemma}%
126 \def\propositionname{Proposition}%
127 \def\definitionname{D\'efinition}%
128 \def\examplename{Exemple}%
129 \def\remarkname{Remarque}%
134 \newtheorem{thm}{\theoremname}[section]
135 \newtheorem{cor}{\corollaryname}[section]
136 \newtheorem{lemma}{\lemmaname}[section]
137 \newtheorem{prop}{\propositionname}[section]
139 \theoremstyle{definition}
140 \newtheorem{dfn}{\definitionname}[section]
141 \newtheorem{exa}{\examplename}[section]
142 \newtheorem{rem}{\remarkname}[section]
143 \newtheorem{note}{\notename}[section]
145 %%% Commands that define the article information
146 \let\originaltitlecmd\title
147 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
148 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
149 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
154 %% Mathematics Subject Classification
155 \def\MSC#1{\gdef\@MSC{#1}}
158 \def\keywords#1{\gdef\@keywords{#1}}
161 %% Year/Volume/Number/First Page/Last Page
168 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
169 %% as submission date
171 \newcounter{LM@month}
173 \def\date#1{\LM@parsedate#1\LM@enddate}
174 \def\LM@parsedate#1/#2/#3\LM@enddate{%
175 \setcounter{LM@year}{#1}%
176 \setcounter{LM@month}{#2}%
177 \setcounter{LM@day}{#3}%
180 %% turn a number/counter into an italian month
181 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
182 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
183 dicembre\else\textbf{??}\fi}
184 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
186 \renewcommand{\maketitle}{%
188 \renewcommand\thefootnote{}%
190 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
192 \global\@topnum\z@ % Prevents figures from going at top of page.
194 \thispagestyle{empty}\@thanks
196 \setcounter{footnote}{0}%
197 \global\let\thanks\relax
198 \global\let\maketitle\relax
199 \global\let\@maketitle\relax
200 \global\let\@thanks\@empty
201 \global\let\@author\@empty
202 \global\let\@date\@empty
203 \global\let\@title\@empty
204 \global\let\title\relax
205 \global\let\author\relax
206 \global\let\date\relax
207 \global\let\and\relax
208 \global\let\MSC\relax
209 \global\let\@MSC\relax
210 \global\let\keywords\relax
211 \global\let\@keywords\relax
212 \global\let\titlenote\relax
213 \global\let\@titlenote\relax
216 %% insert the article information in the top right corner
218 \noindent\footnotesize LE MATEMATICHE\\
219 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
222 %% Make the title page
226 %% Submission date (at the bottom)
228 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\\}%
230 \ifx\@MSC\empty\else\thanks{%
231 \textit{Subject Classification:} \@MSC
233 %% Keywords, if present
234 \ifx\@keywords\empty\else\thanks{%
235 \textit{Keywords:} \@keywords
239 \let \footnote \thanks
240 {\def\\{\protect\linebreak}%
241 \Large\bfseries \MakeUppercase{\@title}
242 %% Title note, if present
247 \begin{tabular}[t]{c}%
254 \renewenvironment{abstract}{%
260 % In case the author forgets it:
261 \AtBeginDocument{\maketitle}