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}[2008/03/04 v0.8
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}}%
68 \setlength{\bibsep}{3pt}
70 % %\magnification\magstephalf
71 %%% Page geometry, using the `geometry' package
72 \RequirePackage[paperwidth=17cm,%
78 %height=18.5cm,% overspecification, comment out
81 bottom=2.5cm]{geometry}
83 %%% Our default head/foot style
85 \renewcommand{\ps@plain}{%
86 \renewcommand{\@oddhead}{\hfill{\footnotesize\@htitle}\hfill\thepage}%
87 \renewcommand{\@evenhead}{\thepage\hfill{\footnotesize\@hauthor}\hfill}%
88 \renewcommand{\@oddfoot}{}%
89 \renewcommand{\@evenfoot}{}%
93 \def\@htitle{\textbf{(no title)}}
94 \def\@hauthor{\textbf{(no author)}}
97 \renewcommand\footnoterule{%
98 \hrule\@width.4\columnwidth
102 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
103 \renewcommand\section{\@startsection {section}{1}{\z@}%
104 {-24pt \@plus -6pt \@minus -3pt}%
106 {\normalfont\bfseries}}
108 %%% Theorem environments
109 \addto\captionsitalian{%
110 \def\theoremname{Teorema}%
111 \def\corollaryname{Corollario}%
112 \def\lemmaname{Lemma}%
113 \def\propositionname{Proposizione}%
114 \def\definitionname{Definizione}%
115 \def\examplename{Esempio}%
116 \def\remarkname{Osservazione}%
119 \addto\captionsenglish{%
120 \def\theoremname{Theorem}%
121 \def\corollaryname{Corollary}%
122 \def\lemmaname{Lemma}%
123 \def\propositionname{Proposition}%
124 \def\definitionname{Definition}%
125 \def\examplename{Example}%
126 \def\remarkname{Remark}%
129 \addto\captionsfrench{%
130 \def\theoremname{Th\'eor\`eme}%
131 \def\corollaryname{Corollaire}%
132 \def\lemmaname{Lemma}%
133 \def\propositionname{Proposition}%
134 \def\definitionname{D\'efinition}%
135 \def\examplename{Exemple}%
136 \def\remarkname{Remarque}%
141 \newtheorem{thm}{\theoremname}[section]
142 \newtheorem{cor}[thm]{\corollaryname}
143 \newtheorem{lemma}[thm]{\lemmaname}
144 \newtheorem{prop}[thm]{\propositionname}
146 \theoremstyle{definition}
147 \newtheorem{dfn}[thm]{\definitionname}
148 \newtheorem{exa}[thm]{\examplename}
149 \newtheorem{rem}[thm]{\remarkname}
150 \newtheorem{note}[thm]{\notename}
152 %%% Commands that define the article information
153 \let\originaltitlecmd\title
154 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
155 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
156 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
159 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
162 \expandafter\@authortoks\expandafter{\the\@authortoks{} - #1}%
167 \authormark{\the\@authortoks}%
168 \def\@author{\the\@authortoks}%
172 \newif\if@authortoks\@authortoksfalse
176 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
177 \expandafter\the\expandafter\@addresstoks\expandafter\par
179 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
182 \newtoks\@addresstoks
183 \def\@address{\par\bigskip\begin{flushright}%
187 \AtEndDocument{\@address}
189 %% Mathematics Subject Classification
190 \def\MSC#1{\gdef\@MSC{#1}}
193 \def\keywords#1{\gdef\@keywords{#1}}
196 %% Year/Volume/Number/First Page/Last Page
203 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
204 %% as submission date
206 \newcounter{LM@month}
208 \def\date#1{\LM@parsedate#1\LM@enddate}
209 \def\LM@parsedate#1/#2/#3\LM@enddate{%
210 \setcounter{LM@year}{#1}%
211 \setcounter{LM@month}{#2}%
212 \setcounter{LM@day}{#3}%
215 %% turn a number/counter into an italian month
216 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
217 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
218 dicembre\else\textbf{??}\fi}
219 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
221 \renewcommand{\maketitle}{%
223 \renewcommand\thefootnote{}%
225 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
227 \global\@topnum\z@ % Prevents figures from going at top of page.
229 \thispagestyle{empty}\@thanks
231 \setcounter{footnote}{0}%
232 \global\let\thanks\relax
233 \global\let\maketitle\relax
234 \global\let\@maketitle\relax
235 \global\let\@thanks\@empty
236 \global\let\@author\@empty
237 \global\let\@date\@empty
238 \global\let\@title\@empty
239 \global\let\title\relax
240 \global\let\author\relax
241 \global\let\date\relax
242 \global\let\and\relax
243 \global\let\MSC\relax
244 \global\let\@MSC\relax
245 \global\let\keywords\relax
246 \global\let\@keywords\relax
247 \global\let\titlenote\relax
248 \global\let\@titlenote\relax
251 %% insert the article information in the top right corner
253 \noindent\footnotesize LE MATEMATICHE\\
254 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
257 \newif\ifsubmissiondate
260 %% Make the title page
264 %% Submission date (at the bottom)
267 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\smallskip}%
270 \ifx\@MSC\empty\else\thanks{%
271 \textit{AMS 2000 Subject Classification:} \@MSC
273 %% Keywords, if present
274 \ifx\@keywords\empty\else\thanks{%
275 \textit{Keywords:} \@keywords
279 \let \footnote \thanks
280 {\def\\{\protect\linebreak}%
281 \fontsize{12}{15}\selectfont\bfseries \MakeUppercase{\@title}
282 %% Title note, if present
286 {\fontsize{11.5}{14}\selectfont
287 \begin{tabular}[t]{c}%
288 \MakeUppercase{\@author}
295 \renewenvironment{abstract}{%
301 % In case the author forgets it:
302 \AtBeginDocument{\maketitle}
304 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
305 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
306 \c@page=\LM@FirstPg\relax
309 \protected@write\@auxout{}%
310 {\string\xdef\string\LM@LastPg{\thepage}}%