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}[2009/03/22 v1.3
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}%
131 \def\questionname{Domanda}%
132 \def\problemname{Problema}%
134 \addto\captionsenglish{%
135 \def\theoremname{Theorem}%
136 \def\corollaryname{Corollary}%
137 \def\lemmaname{Lemma}%
138 \def\propositionname{Proposition}%
139 \def\definitionname{Definition}%
140 \def\examplename{Example}%
141 \def\remarkname{Remark}%
143 \def\questionname{Question}%
144 \def\problemname{Problem}%
146 \addto\captionsfrench{%
147 \def\theoremname{Th\'eor\`eme}%
148 \def\corollaryname{Corollaire}%
149 \def\lemmaname{Lemma}%
150 \def\propositionname{Proposition}%
151 \def\definitionname{D\'efinition}%
152 \def\examplename{Exemple}%
153 \def\remarkname{Remarque}%
155 \def\questionname{Question}%
156 \def\problemname{Probl\'eme}%
160 \newtheorem{thm}{\theoremname}[section]
161 \newtheorem{cor}[thm]{\corollaryname}
162 \newtheorem{lemma}[thm]{\lemmaname}
163 \newtheorem{prop}[thm]{\propositionname}
165 \theoremstyle{definition}
166 \newtheorem{dfn}[thm]{\definitionname}
167 \newtheorem{exa}[thm]{\examplename}
168 \newtheorem{rem}[thm]{\remarkname}
169 \newtheorem{note}[thm]{\notename}
170 \newtheorem{que}[thm]{\questionname}
171 \newtheorem{prob}[thm]{\problemname}
173 %%% Commands that define the article information
174 \let\originaltitlecmd\title
175 \def\title#1{\originaltitlecmd{#1}\titlemark{#1}}
176 \def\subtitle#1{\def\sub@title{#1}}
178 \def\titlemark#1{\gdef\@htitle{\MakeUppercase{#1}}}
179 \def\titlenote#1{\expandafter\@titlenote\expandafter{\the\@titlenote\thanks{#1}}}
182 \def\makeshortauthor#1#2 #3\relax{
184 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\space - \MakeUppercase{#1}. \MakeUppercase{#3}}%
186 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\MakeUppercase{#1}. \MakeUppercase{#3}}%
187 \@shortauthortokstrue
189 \def\@shortauthor{\the\@shortauthortoks}%
191 \newtoks\@shortauthortoks
193 \newif\if@shortauthortoks\@shortauthortoksfalse
195 \def\authormark#1{\gdef\@hauthor{\MakeUppercase{#1}}}
198 \expandafter\@authortoks\expandafter{\the\@authortoks\space - \MakeUppercase{#1}}%
200 \expandafter\@authortoks\expandafter{\the\@authortoks\MakeUppercase{#1}}%
203 \makeshortauthor#1\relax%
204 \authormark{\the\@authortoks}%
205 \def\@author{\the\@authortoks}%
210 \newif\if@authortoks\@authortoksfalse
213 \def\authorline@hyphen{ - }
214 \let\authorline@sep\authorline@hyphen
217 \expandafter\@authortoks\expandafter{\the\@authortoks\protect\authorline@sep}%
218 \@shortauthortoksfalse
219 \expandafter\@shortauthortoks\expandafter{\the\@shortauthortoks\protect\authorline@sep}%
222 \def\shortauthormark{\authormark{\the\@shortauthortoks}}
224 \newif\if@author\@authortrue
225 \def\noauthor{\@authorfalse\gdef\@hauthor{\@htitle}}
228 \expandafter\expandafter\expandafter\@addresstoks\expandafter\expandafter\expandafter{%
229 \expandafter\the\expandafter\@addresstoks\expandafter\par
231 \expandafter\filbreak
232 \expandafter\MakeUppercase\expandafter{\the\@lastauthor}\\
235 \newtoks\@addresstoks
236 \def\@address{\par\bigskip\begin{flushright}%
240 \AtEndDocument{\@address}
242 %% Mathematics Subject Classification
243 \def\MSC#1{\gdef\@MSC{#1}}
246 \def\keywords#1{\gdef\@keywords{#1}}
249 %% Year/Volume/Number/First Page/Last Page
256 %% Redefine \date to parse a string yyyy/mm/dd, which will be used
257 %% as submission date
259 \newcounter{LM@month}
261 \def\date#1{\LM@parsedate#1\LM@enddate}
262 \def\LM@parsedate#1/#2/#3\LM@enddate{%
263 \setcounter{LM@year}{#1}%
264 \setcounter{LM@month}{#2}%
265 \setcounter{LM@day}{#3}%
268 %% turn a number/counter into an italian month
269 \def\@itmonth#1{\ifcase#1\or gennaio\or febbraio\or marzo\or aprile\or
270 maggio\or giugno\or luglio\or agosto\or settembre\or ottobre\or novembre\or
271 dicembre\else\textbf{??}\fi}
272 \def\itmonth#1{\expandafter\@itmonth\csname c@#1\endcsname}
274 \renewcommand{\maketitle}{%
276 \renewcommand\thefootnote{}%
278 \long\def\@makefntext##1{\parindent 1em\noindent##1}%
280 \global\@topnum\z@ % Prevents figures from going at top of page.
282 \thispagestyle{empty}\@thanks
284 \setcounter{footnote}{0}%
285 \global\let\thanks\relax
286 \global\let\maketitle\relax
287 \global\let\@maketitle\relax
288 \global\let\@thanks\@empty
289 \global\let\@author\@empty
290 \global\let\@shortauthor\@empty
291 \global\let\@date\@empty
292 \global\let\@title\@empty
293 \global\let\sub@title\@empty
294 \global\let\title\relax
295 \global\let\subtitle\relax
296 \global\let\author\relax
297 \global\let\date\relax
298 \global\let\and\relax
299 \global\let\MSC\relax
300 \global\let\@MSC\relax
301 \global\let\keywords\relax
302 \global\let\@keywords\relax
303 \global\let\titlenote\relax
304 \global\let\@titlenote\relax
307 %% insert the article information in the top right corner
309 \noindent\footnotesize LE MATEMATICHE\\
310 Vol.~\LM@Vol~(\LM@Year)~--~Fasc.~\LM@Num,~pp.~\LM@FirstPg--\LM@LastPg
313 \newif\ifsubmissiondate
316 \newif\ifshortauthors\shortauthorsfalse
317 %% Make the title page
321 %% Submission date (at the bottom)
324 \hskip0.8cm Entrato in redazione \arabic{LM@day} \itmonth{LM@month} \arabic{LM@year}\smallskip}%
327 \ifx\@MSC\empty\else\thanks{%
328 \textit{AMS 2000 Subject Classification:} \@MSC
330 %% Keywords, if present
331 \ifx\@keywords\empty\else\thanks{%
332 \textit{Keywords:} \@keywords
336 \let \footnote \thanks
337 {\def\\{\protect\linebreak}%
338 \fontsize{12}{15}\selectfont\bfseries \MakeUppercase{\@title}
339 \ifx\sub@title\empty\else\vskip5pt\fontsize{10}{14}\selectfont\bfseries \MakeUppercase{\sub@title}\fi
340 %% Title note, if present
345 {\fontsize{11.5}{14}\selectfont
346 \begin{tabular}[t]{c}%
347 \let\authorline@sep\tabularnewline
348 \ifshortauthors\@shortauthor\else\@author\fi
356 \renewenvironment{abstract}{%
362 % In case the author forgets it:
363 \AtBeginDocument{\maketitle}
365 \expandafter\IfFileExists\expandafter{\jobname.pub}{%
366 \InputIfFileExists{\jobname.pub}{\typeout{Volume data loaded}}\relax%
367 \c@page=\LM@FirstPg\relax
370 \protected@write\@auxout{}%
371 {\string\xdef\string\LM@LastPg{\thepage}}%