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 %%% Package `babel' for language management
24 \RequirePackage[italian]{babel}
25 %%% Package `url' for urls and emails
27 %% Define an \email{...} command
28 \DeclareUrlCommand\email{\urlstyle{tt}}
30 %%% AMS math environments and symbols
31 \RequirePackage{amsmath}
32 \RequirePackage{amssymb}
34 % %\magnification\magstephalf
35 %%% Page geometry, using the `geometry' package
36 \RequirePackage[paperwidth=17cm,%
45 bottom=2.5cm]{geometry}
47 %%% Our default head/foot style
49 \renewcommand{\ps@plain}{%
50 \renewcommand{\@oddhead}{\hfill\@htitle\hfill\thepage}%
51 \renewcommand{\@evenhead}{\thepage\hfill\@hauthor\hfill}%
52 \renewcommand{\@oddfoot}{}%
53 \renewcommand{\@evenfoot}{}%
57 % TODO these will be redefined in the article itself
58 \def\@htitle{some title}
59 \def\@hauthor{some author}
62 \renewcommand\footnoterule{%
63 \hrule\@width.4\columnwidth
67 \def\thesection{\arabic{section}.}
68 \renewcommand\section{\@startsection {section}{1}{\z@}%
69 {-24pt \@plus -6pt \@minus -3pt}%
71 {\normalfont\bfseries}}
78 %%% Commands that define the article information
82 %% Mathematics Subject Classification
83 \def\MSC#1{\gdef\@MSC{#1}}
86 \def\keywords#1{\gdef\@keywords{#1}}
89 %% Year/Volume/Number/First Page/Last Page
96 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
101 \def\date#1{\LM@parsedate#1\LM@enddate}
102 \def\LM@parsedate#1/#2/#3\LM@enddate{%
103 \setcounter{LM@year}{#1}%
104 \setcounter{LM@month}{#2}%
105 \setcounter{LM@day}{#3}%
108 %% turn a number/counter into an italian month
109 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
110 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
111 dicembre\else\textbf{??}\fi}
112 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
114 \renewcommand{\maketitle}{%
116 \renewcommand\thefootnote{}%
118 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
120 \global\@topnum\z@ % Prevents figures from going at top of page.
122 \thispagestyle{empty}\@thanks
124 \setcounter{footnote}{0}%
125 \global\let\thanks\relax
126 \global\let\maketitle\relax
127 \global\let\@maketitle\relax
128 \global\let\@thanks\@empty
129 \global\let\@author\@empty
130 \global\let\@date\@empty
131 \global\let\@title\@empty
132 \global\let\title\relax
133 \global\let\author\relax
134 \global\let\date\relax
135 \global\let\and\relax
136 \global\let\MSC\relax
137 \global\let\@MSC\relax
138 \global\let\keywords\relax
139 \global\let\@keywords\relax
142 %% insert the article information in the top right corner
144 \noindent\footnotesize LE MATEMATICHE\\
145 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
148 %% Make the title page
152 %% Submission date (at the bottom)
154 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\\}%
156 \ifx\@MSC\empty\else\thanks{%
157 \textit{Subject Classification:} \@MSC
159 %% Keywords, if present
160 \ifx\@keywords\empty\else\thanks{%
161 \textit{Keywords:} \@keywords
165 \let \footnote \thanks
166 {\Large\bfseries \@title \par}%
169 \begin{tabular}[t]{c}%
176 \renewenvironment{abstract}{%
182 % In case the author forgets it:
183 \AtBeginDocument{\maketitle}