1 %%%% Class file for Le Matematiche
2 %%% Author: Giuseppe Bilotta
3 %%% Email (work): bilotta@dmi.unict.it
4 %%% Email (home): giuseppe.bilotta@gmail.com
8 % * \authorline : put the following authors on another line
9 % * \submissiondatefalse : hide the submission date on the first article page
10 % * \shortauthorstrue : shorten the author names under the title
11 % * \shortauthormark : shorten the author names in the headings
13 \NeedsTeXFormat{LaTeX2e}
14 \ProvidesClass{lematema}[2008/03/07 v0.9
15 Class for articles in ``Le Matematiche'']
20 \DeclareOption{english}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
21 \DeclareOption{french}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
22 \DeclareOption{italian}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
25 \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{article}}
26 \DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}}
31 \ClassWarning{lematema}{No language specified, defaulting to english}
32 \PassOptionsToPackage{english}{babel}
35 %%% Class based on the standard article class
36 \LoadClass[11pt,twoside]{article}
37 %%% Font: times (and math stuff)
39 %%% Package `babel' for language management
40 \RequirePackage{babel}
41 %%% Package `url' for urls
43 %%% Define an \email{...} command, but let's not use the url package for this
44 \newcommand{\email}[1]{{e-mail: \upshape\ttfamily#1}}
46 %%% AMS math environments and symbols
47 \RequirePackage{amsmath}
48 \RequirePackage{amssymb}
49 \RequirePackage{amsthm}
52 \RequirePackage[square,numbers,sort&compress,sectionbib]{natbib}
53 \bibliographystyle{lematema}
54 \def\bibhere{\bibliography{\jobname}}
55 \addto\captionsitalian{%
56 \def\refname{Bibliografia}%
57 \def\bibname{Bibliografia}%
59 \addto\captionsenglish{%
60 \def\refname{References}%
61 \def\bibname{References}%
63 \addto\captionsfrench{%
64 \def\refname{Bibliographie}%
65 \def\bibname{Bibliographie}%
67 % from the needspace package
68 \newcommand{\needspace}[1]{\begingroup\setlength{\dimen@}{#1}%
69 \vskip\z@\@plus\dimen@ \penalty -100\vskip\z@\@plus -\dimen@
70 \vskip\dimen@ \penalty 9999\vskip -\dimen@\endgroup}
76 \centering{\MakeUppercase{\refname}}%
80 \setlength{\bibsep}{3pt}
82 % %\magnification\magstephalf
83 %%% Page geometry, using the `geometry' package
84 \RequirePackage[paperwidth=17cm,%
90 %height=18.5cm,% overspecification, comment out
93 bottom=2.5cm]{geometry}
95 %%% Our default head/foot style
97 \renewcommand{\ps@plain}{%
98 \renewcommand{\@oddhead}{\hfill{\footnotesize\@htitle}\hfill\thepage}%
99 \renewcommand{\@evenhead}{\thepage\hfill{\footnotesize\@hauthor}\hfill}%
100 \renewcommand{\@oddfoot}{}%
101 \renewcommand{\@evenfoot}{}%
105 \def\@htitle{\textbf{(no title)}}
106 \def\@hauthor{\textbf{(no author)}}
109 \renewcommand\footnoterule{%
110 \hrule\@width.4\columnwidth
114 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
115 \renewcommand\section{\@startsection {section}{1}{\z@}%
116 {-24pt \@plus -6pt \@minus -3pt}%
118 {\normalfont\bfseries}}
120 %%% Theorem environments
121 \addto\captionsitalian{%
122 \def\theoremname{Teorema}%
123 \def\corollaryname{Corollario}%
124 \def\lemmaname{Lemma}%
125 \def\propositionname{Proposizione}%
126 \def\definitionname{Definizione}%
127 \def\examplename{Esempio}%
128 \def\remarkname{Osservazione}%
131 \addto\captionsenglish{%
132 \def\theoremname{Theorem}%
133 \def\corollaryname{Corollary}%
134 \def\lemmaname{Lemma}%
135 \def\propositionname{Proposition}%
136 \def\definitionname{Definition}%
137 \def\examplename{Example}%
138 \def\remarkname{Remark}%
141 \addto\captionsfrench{%
142 \def\theoremname{Th\'eor\`eme}%
143 \def\corollaryname{Corollaire}%
144 \def\lemmaname{Lemma}%
145 \def\propositionname{Proposition}%
146 \def\definitionname{D\'efinition}%
147 \def\examplename{Exemple}%
148 \def\remarkname{Remarque}%
153 \newtheorem{thm}{\theoremname}[section]
154 \newtheorem{cor}[thm]{\corollaryname}
155 \newtheorem{lemma}[thm]{\lemmaname}
156 \newtheorem{prop}[thm]{\propositionname}
158 \theoremstyle{definition}
159 \newtheorem{dfn}[thm]{\definitionname}
160 \newtheorem{exa}[thm]{\examplename}
161 \newtheorem{rem}[thm]{\remarkname}
162 \newtheorem{note}[thm]{\notename}
164 %%% Commands that define the article information
165 \let\originaltitlecmd\title
166 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
167 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
168 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
171 \def\makeshortauthor#1#2 #3\relax{
173 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\space - \MakeUppercase{#1}. \MakeUppercase{#3}}%
175 \@shortauthortoks{\MakeUppercase{#1}. \MakeUppercase{#3}}%
176 \@shortauthortokstrue
178 \def\@shortauthor{\the\@shortauthortoks}%
180 \newtoks\@shortauthortoks
181 \newif\if@shortauthortoks\@shortauthortoksfalse
183 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
186 \expandafter\@authortoks\expandafter{\the\@authortoks\space - \MakeUppercase{#1}}%
188 \expandafter\@authortoks\expandafter{\the\@authortoks\MakeUppercase{#1}}%
191 \makeshortauthor#1\relax%
192 \authormark{\the\@authortoks}%
193 \def\@author{\the\@authortoks}%
198 \newif\if@authortoks\@authortoksfalse
201 \def\authorline@hyphen{ - }
202 \let\authorline@sep\authorline@hyphen
205 \expandafter\@authortoks\expandafter{\the\@authortoks\protect\authorline@sep}%
208 \def\shortauthormark{\authormark{\the\@shortauthortoks}}
211 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
212 \expandafter\the\expandafter\@addresstoks\expandafter\par
214 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
217 \newtoks\@addresstoks
218 \def\@address{\par\bigskip\begin{flushright}%
222 \AtEndDocument{\@address}
224 %% Mathematics Subject Classification
225 \def\MSC#1{\gdef\@MSC{#1}}
228 \def\keywords#1{\gdef\@keywords{#1}}
231 %% Year/Volume/Number/First Page/Last Page
238 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
239 %% as submission date
241 \newcounter{LM@month}
243 \def\date#1{\LM@parsedate#1\LM@enddate}
244 \def\LM@parsedate#1/#2/#3\LM@enddate{%
245 \setcounter{LM@year}{#1}%
246 \setcounter{LM@month}{#2}%
247 \setcounter{LM@day}{#3}%
250 %% turn a number/counter into an italian month
251 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
252 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
253 dicembre\else\textbf{??}\fi}
254 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
256 \renewcommand{\maketitle}{%
258 \renewcommand\thefootnote{}%
260 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
262 \global\@topnum\z@ % Prevents figures from going at top of page.
264 \thispagestyle{empty}\@thanks
266 \setcounter{footnote}{0}%
267 \global\let\thanks\relax
268 \global\let\maketitle\relax
269 \global\let\@maketitle\relax
270 \global\let\@thanks\@empty
271 \global\let\@author\@empty
272 \global\let\@shortauthor\@empty
273 \global\let\@date\@empty
274 \global\let\@title\@empty
275 \global\let\title\relax
276 \global\let\author\relax
277 \global\let\date\relax
278 \global\let\and\relax
279 \global\let\MSC\relax
280 \global\let\@MSC\relax
281 \global\let\keywords\relax
282 \global\let\@keywords\relax
283 \global\let\titlenote\relax
284 \global\let\@titlenote\relax
287 %% insert the article information in the top right corner
289 \noindent\footnotesize LE MATEMATICHE\\
290 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
293 \newif\ifsubmissiondate
296 \newif\ifshortauthors\shortauthorsfalse
297 %% Make the title page
301 %% Submission date (at the bottom)
304 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\smallskip}%
307 \ifx\@MSC\empty\else\thanks{%
308 \textit{AMS 2000 Subject Classification:} \@MSC
310 %% Keywords, if present
311 \ifx\@keywords\empty\else\thanks{%
312 \textit{Keywords:} \@keywords
316 \let \footnote \thanks
317 {\def\\{\protect\linebreak}%
318 \fontsize{12}{15}\selectfont\bfseries \MakeUppercase{\@title}
319 %% Title note, if present
323 {\fontsize{11.5}{14}\selectfont
324 \begin{tabular}[t]{c}%
325 \let\authorline@sep\tabularnewline
326 \ifshortauthors\@shortauthor\else\@author\fi
333 \renewenvironment{abstract}{%
339 % In case the author forgets it:
340 \AtBeginDocument{\maketitle}
342 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
343 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
344 \c@page=\LM@FirstPg\relax
347 \protected@write\@auxout{}%
348 {\string\xdef\string\LM@LastPg{\thepage}}%