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/11/21 v0.7
8 Class for articles in ``Le Matematiche'']
13 \DeclareOption{english}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
14 \DeclareOption{french}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
15 \DeclareOption{italian}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
18 \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{article}}
19 \DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}}
24 \ClassWarning{lematema}{No language specified, defaulting to english}
25 \PassOptionsToPackage{english}{babel}
28 %%% Class based on the standard article class
29 \LoadClass[11pt,twoside]{article}
30 %%% Font: times (and math stuff)
32 %%% Package `babel' for language management
33 \RequirePackage{babel}
34 %%% Package `url' for urls
36 %%% Define an \email{...} command, but let's not use the url package for this
37 \newcommand{\email}[1]{{e-mail: \upshape\ttfamily#1}}
39 %%% AMS math environments and symbols
40 \RequirePackage{amsmath}
41 \RequirePackage{amssymb}
42 \RequirePackage{amsthm}
45 \RequirePackage[square,numbers,sort&compress,sectionbib]{natbib}
46 \bibliographystyle{lematema}
47 \def\bibhere{\bibliography{\jobname}}
48 \addto\captionsitalian{%
49 \def\refname{Bibliografia}%
50 \def\bibname{Bibliografia}%
52 \addto\captionsenglish{%
53 \def\refname{References}%
54 \def\bibname{References}%
56 \addto\captionsfrench{%
57 \def\refname{Bibliographie}%
58 \def\bibname{Bibliographie}%
64 \centering{\MakeUppercase{\refname}}%
67 \setlength{\bibsep}{3pt}
69 % %\magnification\magstephalf
70 %%% Page geometry, using the `geometry' package
71 \RequirePackage[paperwidth=17cm,%
77 %height=18.5cm,% overspecification, comment out
80 bottom=2.5cm]{geometry}
82 %%% Our default head/foot style
84 \renewcommand{\ps@plain}{%
85 \renewcommand{\@oddhead}{\hfill{\footnotesize\@htitle}\hfill\thepage}%
86 \renewcommand{\@evenhead}{\thepage\hfill{\footnotesize\@hauthor}\hfill}%
87 \renewcommand{\@oddfoot}{}%
88 \renewcommand{\@evenfoot}{}%
92 \def\@htitle{\textbf{(no title)}}
93 \def\@hauthor{\textbf{(no author)}}
96 \renewcommand\footnoterule{%
97 \hrule\@width.4\columnwidth
101 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
102 \renewcommand\section{\@startsection {section}{1}{\z@}%
103 {-24pt \@plus -6pt \@minus -3pt}%
105 {\normalfont\bfseries}}
107 %%% Theorem environments
108 \addto\captionsitalian{%
109 \def\theoremname{Teorema}%
110 \def\corollaryname{Corollario}%
111 \def\lemmaname{Lemma}%
112 \def\propositionname{Proposizione}%
113 \def\definitionname{Definizione}%
114 \def\examplename{Esempio}%
115 \def\remarkname{Osservazione}%
118 \addto\captionsenglish{%
119 \def\theoremname{Theorem}%
120 \def\corollaryname{Corollary}%
121 \def\lemmaname{Lemma}%
122 \def\propositionname{Proposition}%
123 \def\definitionname{Definition}%
124 \def\examplename{Example}%
125 \def\remarkname{Remark}%
128 \addto\captionsfrench{%
129 \def\theoremname{Th\'eor\`eme}%
130 \def\corollaryname{Corollaire}%
131 \def\lemmaname{Lemma}%
132 \def\propositionname{Proposition}%
133 \def\definitionname{D\'efinition}%
134 \def\examplename{Exemple}%
135 \def\remarkname{Remarque}%
140 \newtheorem{thm}{\theoremname}[section]
141 \newtheorem{cor}[thm]{\corollaryname}
142 \newtheorem{lemma}[thm]{\lemmaname}
143 \newtheorem{prop}[thm]{\propositionname}
145 \theoremstyle{definition}
146 \newtheorem{dfn}[thm]{\definitionname}
147 \newtheorem{exa}[thm]{\examplename}
148 \newtheorem{rem}[thm]{\remarkname}
149 \newtheorem{note}[thm]{\notename}
151 %%% Commands that define the article information
152 \let\originaltitlecmd\title
153 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
154 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
155 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
158 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
161 \expandafter\@authortoks\expandafter{\the\@authortoks{} - #1}%
166 \authormark{\the\@authortoks}%
167 \def\@author{\the\@authortoks}%
171 \newif\if@authortoks\@authortoksfalse
175 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
176 \expandafter\the\expandafter\@addresstoks\expandafter\par
178 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
181 \newtoks\@addresstoks
182 \def\@address{\par\bigskip\begin{flushright}%
186 \AtEndDocument{\@address}
188 %% Mathematics Subject Classification
189 \def\MSC#1{\gdef\@MSC{#1}}
192 \def\keywords#1{\gdef\@keywords{#1}}
195 %% Year/Volume/Number/First Page/Last Page
202 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
203 %% as submission date
205 \newcounter{LM@month}
207 \def\date#1{\LM@parsedate#1\LM@enddate}
208 \def\LM@parsedate#1/#2/#3\LM@enddate{%
209 \setcounter{LM@year}{#1}%
210 \setcounter{LM@month}{#2}%
211 \setcounter{LM@day}{#3}%
214 %% turn a number/counter into an italian month
215 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
216 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
217 dicembre\else\textbf{??}\fi}
218 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
220 \renewcommand{\maketitle}{%
222 \renewcommand\thefootnote{}%
224 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
226 \global\@topnum\z@ % Prevents figures from going at top of page.
228 \thispagestyle{empty}\@thanks
230 \setcounter{footnote}{0}%
231 \global\let\thanks\relax
232 \global\let\maketitle\relax
233 \global\let\@maketitle\relax
234 \global\let\@thanks\@empty
235 \global\let\@author\@empty
236 \global\let\@date\@empty
237 \global\let\@title\@empty
238 \global\let\title\relax
239 \global\let\author\relax
240 \global\let\date\relax
241 \global\let\and\relax
242 \global\let\MSC\relax
243 \global\let\@MSC\relax
244 \global\let\keywords\relax
245 \global\let\@keywords\relax
246 \global\let\titlenote\relax
247 \global\let\@titlenote\relax
250 %% insert the article information in the top right corner
252 \noindent\footnotesize LE MATEMATICHE\\
253 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
256 \newif\ifsubmissiondate
259 %% Make the title page
263 %% Submission date (at the bottom)
266 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\smallskip}%
269 \ifx\@MSC\empty\else\thanks{%
270 \textit{AMS 2000 Subject Classification:} \@MSC
272 %% Keywords, if present
273 \ifx\@keywords\empty\else\thanks{%
274 \textit{Keywords:} \@keywords
278 \let \footnote \thanks
279 {\def\\{\protect\linebreak}%
280 \fontsize{12}{15}\selectfont\bfseries \MakeUppercase{\@title}
281 %% Title note, if present
285 {\fontsize{11.5}{14}\selectfont
286 \begin{tabular}[t]{c}%
287 \MakeUppercase{\@author}
294 \renewenvironment{abstract}{%
300 % In case the author forgets it:
301 \AtBeginDocument{\maketitle}
303 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
304 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
305 \c@page=\LM@FirstPg\relax
308 \protected@write\@auxout{}%
309 {\string\xdef\string\LM@LastPg{\thepage}}%