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}
67 %%% Commands that define the article information
71 %% Mathematics Subject Classification
72 \def\MSC#1{\gdef\@MSC{#1}}
75 \def\keywords#1{\gdef\@keywords{#1}}
78 %% Year/Volume/Number/First Page/Last Page
85 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
90 \def\date#1{\LM@parsedate#1\LM@enddate}
91 \def\LM@parsedate#1/#2/#3\LM@enddate{%
92 \setcounter{LM@year}{#1}%
93 \setcounter{LM@month}{#2}%
94 \setcounter{LM@day}{#3}%
97 %% turn a number/counter into an italian month
98 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
99 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
100 dicembre\else\textbf{??}\fi}
101 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
103 \renewcommand{\maketitle}{%
105 \renewcommand\thefootnote{}%
107 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
109 \global\@topnum\z@ % Prevents figures from going at top of page.
111 \thispagestyle{empty}\@thanks
113 \setcounter{footnote}{0}%
114 \global\let\thanks\relax
115 \global\let\maketitle\relax
116 \global\let\@maketitle\relax
117 \global\let\@thanks\@empty
118 \global\let\@author\@empty
119 \global\let\@date\@empty
120 \global\let\@title\@empty
121 \global\let\title\relax
122 \global\let\author\relax
123 \global\let\date\relax
124 \global\let\and\relax
125 \global\let\MSC\relax
126 \global\let\@MSC\relax
127 \global\let\keywords\relax
128 \global\let\@keywords\relax
131 %% insert the article information in the top right corner
133 \noindent\footnotesize LE MATEMATICHE\\
134 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
137 %% Make the title page
141 %% Submission date (at the bottom)
143 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\\}%
145 \ifx\@MSC\empty\else\thanks{%
146 \textit{Subject Classification:} \@MSC
148 %% Keywords, if present
149 \ifx\@keywords\empty\else\thanks{%
150 \textit{Keywords:} \@keywords
154 \let \footnote \thanks
155 {\Large\bfseries \@title \par}%
158 \begin{tabular}[t]{c}%
165 \renewenvironment{abstract}{%
171 % In case the author forgets it:
172 \AtBeginDocument{\maketitle}