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
12 % * \noauthor : suppress the need for an author
14 \NeedsTeXFormat{LaTeX2e}
15 \ProvidesClass{lematema}[2008/07/02 v1.2
16 Class for articles in ``Le Matematiche'']
21 \DeclareOption{english}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
22 \DeclareOption{french}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
23 \DeclareOption{italian}{\PassOptionsToPackage{\CurrentOption}{babel}\@langseltrue}
26 \DeclareOption{draft}{\PassOptionsToClass{\CurrentOption}{article}}
27 \DeclareOption{final}{\PassOptionsToClass{\CurrentOption}{article}}
32 \ClassWarning{lematema}{No language specified, defaulting to english}
33 \PassOptionsToPackage{english}{babel}
36 %%% Class based on the standard article class
37 \LoadClass[11pt,twoside]{article}
38 %%% Font: times (and math stuff)
40 %%% Package `babel' for language management
41 \RequirePackage{babel}
42 %%% Package `url' for urls
44 %%% Define an \email{...} command, but let's not use the url package for this
45 \newcommand{\email}[1]{{e-mail: \upshape\ttfamily#1}}
47 %%% AMS math environments and symbols
48 \RequirePackage{amsmath}
49 \RequirePackage{amssymb}
50 \RequirePackage{amsthm}
53 \RequirePackage[square,numbers,sort&compress,sectionbib]{natbib}
54 \bibliographystyle{lematema}
55 \def\bibhere{\bibliography{\jobname}}
56 \addto\captionsitalian{%
57 \def\refname{Bibliografia}%
58 \def\bibname{Bibliografia}%
60 \addto\captionsenglish{%
61 \def\refname{References}%
62 \def\bibname{References}%
64 \addto\captionsfrench{%
65 \def\refname{Bibliographie}%
66 \def\bibname{Bibliographie}%
68 % from the needspace package
69 \newcommand{\needspace}[1]{\begingroup\setlength{\dimen@}{#1}%
70 \vskip\z@\@plus\dimen@ \penalty -100\vskip\z@\@plus -\dimen@
71 \vskip\dimen@ \penalty 9999\vskip -\dimen@\endgroup}
77 \centering{\MakeUppercase{\refname}}%
81 \setlength{\bibsep}{3pt}
83 % %\magnification\magstephalf
84 %%% Page geometry, using the `geometry' package
85 \RequirePackage[paperwidth=17cm,%
91 %height=18.5cm,% overspecification, comment out
94 bottom=2.5cm]{geometry}
96 %%% Our default head/foot style
98 \renewcommand{\ps@plain}{%
99 \renewcommand{\@oddhead}{\hfill{\footnotesize\@htitle}\hfill\thepage}%
100 \renewcommand{\@evenhead}{\thepage\hfill{\footnotesize\@hauthor}\hfill}%
101 \renewcommand{\@oddfoot}{}%
102 \renewcommand{\@evenfoot}{}%
106 \def\@htitle{\textbf{(no title)}}
107 \def\@hauthor{\textbf{(no author)}}
110 \renewcommand\footnoterule{%
111 \hrule\@width.4\columnwidth
115 \def\@seccntformat#1{\csname the#1\endcsname.\quad}
116 \renewcommand\section{\@startsection {section}{1}{\z@}%
117 {-24pt \@plus -6pt \@minus -3pt}%
119 {\normalfont\bfseries}}
121 %%% Theorem environments
122 \addto\captionsitalian{%
123 \def\theoremname{Teorema}%
124 \def\corollaryname{Corollario}%
125 \def\lemmaname{Lemma}%
126 \def\propositionname{Proposizione}%
127 \def\definitionname{Definizione}%
128 \def\examplename{Esempio}%
129 \def\remarkname{Osservazione}%
132 \addto\captionsenglish{%
133 \def\theoremname{Theorem}%
134 \def\corollaryname{Corollary}%
135 \def\lemmaname{Lemma}%
136 \def\propositionname{Proposition}%
137 \def\definitionname{Definition}%
138 \def\examplename{Example}%
139 \def\remarkname{Remark}%
142 \addto\captionsfrench{%
143 \def\theoremname{Th\'eor\`eme}%
144 \def\corollaryname{Corollaire}%
145 \def\lemmaname{Lemma}%
146 \def\propositionname{Proposition}%
147 \def\definitionname{D\'efinition}%
148 \def\examplename{Exemple}%
149 \def\remarkname{Remarque}%
154 \newtheorem{thm}{\theoremname}[section]
155 \newtheorem{cor}[thm]{\corollaryname}
156 \newtheorem{lemma}[thm]{\lemmaname}
157 \newtheorem{prop}[thm]{\propositionname}
159 \theoremstyle{definition}
160 \newtheorem{dfn}[thm]{\definitionname}
161 \newtheorem{exa}[thm]{\examplename}
162 \newtheorem{rem}[thm]{\remarkname}
163 \newtheorem{note}[thm]{\notename}
165 %%% Commands that define the article information
166 \let\originaltitlecmd\title
167 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
168 \def\subtitle#1{\def\sub@title{#1}}
170 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
171 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
174 \def\makeshortauthor#1#2 #3\relax{
176 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\space - \MakeUppercase{#1}. \MakeUppercase{#3}}%
178 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\MakeUppercase{#1}. \MakeUppercase{#3}}%
179 \@shortauthortokstrue
181 \def\@shortauthor{\the\@shortauthortoks}%
183 \newtoks\@shortauthortoks
185 \newif\if@shortauthortoks\@shortauthortoksfalse
187 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
190 \expandafter\@authortoks\expandafter{\the\@authortoks\space - \MakeUppercase{#1}}%
192 \expandafter\@authortoks\expandafter{\the\@authortoks\MakeUppercase{#1}}%
195 \makeshortauthor#1\relax%
196 \authormark{\the\@authortoks}%
197 \def\@author{\the\@authortoks}%
202 \newif\if@authortoks\@authortoksfalse
205 \def\authorline@hyphen{ - }
206 \let\authorline@sep\authorline@hyphen
209 \expandafter\@authortoks\expandafter{\the\@authortoks\protect\authorline@sep}%
210 \@shortauthortoksfalse
211 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\protect\authorline@sep}%
214 \def\shortauthormark{\authormark{\the\@shortauthortoks}}
216 \newif\if@author\@authortrue
217 \def\noauthor{\@authorfalse\gdef\@hauthor{\@htitle}}
220 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
221 \expandafter\the\expandafter\@addresstoks\expandafter\par
223 \expandafter\filbreak
224 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
227 \newtoks\@addresstoks
228 \def\@address{\par\bigskip\begin{flushright}%
232 \AtEndDocument{\@address}
234 %% Mathematics Subject Classification
235 \def\MSC#1{\gdef\@MSC{#1}}
238 \def\keywords#1{\gdef\@keywords{#1}}
241 %% Year/Volume/Number/First Page/Last Page
248 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
249 %% as submission date
251 \newcounter{LM@month}
253 \def\date#1{\LM@parsedate#1\LM@enddate}
254 \def\LM@parsedate#1/#2/#3\LM@enddate{%
255 \setcounter{LM@year}{#1}%
256 \setcounter{LM@month}{#2}%
257 \setcounter{LM@day}{#3}%
260 %% turn a number/counter into an italian month
261 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
262 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
263 dicembre\else\textbf{??}\fi}
264 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
266 \renewcommand{\maketitle}{%
268 \renewcommand\thefootnote{}%
270 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
272 \global\@topnum\z@ % Prevents figures from going at top of page.
274 \thispagestyle{empty}\@thanks
276 \setcounter{footnote}{0}%
277 \global\let\thanks\relax
278 \global\let\maketitle\relax
279 \global\let\@maketitle\relax
280 \global\let\@thanks\@empty
281 \global\let\@author\@empty
282 \global\let\@shortauthor\@empty
283 \global\let\@date\@empty
284 \global\let\@title\@empty
285 \global\let\sub@title\@empty
286 \global\let\title\relax
287 \global\let\subtitle\relax
288 \global\let\author\relax
289 \global\let\date\relax
290 \global\let\and\relax
291 \global\let\MSC\relax
292 \global\let\@MSC\relax
293 \global\let\keywords\relax
294 \global\let\@keywords\relax
295 \global\let\titlenote\relax
296 \global\let\@titlenote\relax
299 %% insert the article information in the top right corner
301 \noindent\footnotesize LE MATEMATICHE\\
302 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
305 \newif\ifsubmissiondate
308 \newif\ifshortauthors\shortauthorsfalse
309 %% Make the title page
313 %% Submission date (at the bottom)
316 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\smallskip}%
319 \ifx\@MSC\empty\else\thanks{%
320 \textit{AMS 2000 Subject Classification:} \@MSC
322 %% Keywords, if present
323 \ifx\@keywords\empty\else\thanks{%
324 \textit{Keywords:} \@keywords
328 \let \footnote \thanks
329 {\def\\{\protect\linebreak}%
330 \fontsize{12}{15}\selectfont\bfseries \MakeUppercase{\@title}
331 \ifx\sub@title\empty\else\vskip5pt\fontsize{10}{14}\selectfont\bfseries \MakeUppercase{\sub@title}\fi
332 %% Title note, if present
337 {\fontsize{11.5}{14}\selectfont
338 \begin{tabular}[t]{c}%
339 \let\authorline@sep\tabularnewline
340 \ifshortauthors\@shortauthor\else\@author\fi
348 \renewenvironment{abstract}{%
354 % In case the author forgets it:
355 \AtBeginDocument{\maketitle}
357 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
358 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
359 \c@page=\LM@FirstPg\relax
362 \protected@write\@auxout{}%
363 {\string\xdef\string\LM@LastPg{\thepage}}%