]> git.treefish.org Git - phys/proceedings_lattice13.git/blob - PoS.cls
Reinserted latest version of Ydalia's plots.
[phys/proceedings_lattice13.git] / PoS.cls
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %%%%%%%%%%%%%%%%%%%%%%%%% PoS.cls 1.2.1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %%
5 %% This file is Copyright PoS 2005:  it can be freely distributed  but
6 %% NOT modified preserving its name, even in similar forms.
7 %% 
8 %% PoS.cls is a LaTeX2e class file used to typeset manuscripts in PoS - 
9 %% Proceedings of Science style. It was written by P. Dall'Aglio as a 
10 %% modification of the class `JHEP3.cls'.
11 %% 
12 %% For bugs, comments, suggestions email to pos-eo@pos.sissa.it
13 %% 
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15 %% \CharacterTable
16 %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
17 %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
18 %%   Digits        \0\1\2\3\4\5\6\7\8\9
19 %%   Exclamation   \!     Double quote  \"     Hash (number) \#
20 %%   Dollar        \$     Percent       \%     Ampersand     \&
21 %%   Acute accent  \'     Left paren    \(     Right paren   \)
22 %%   Asterisk      \*     Plus          \+     Comma         \,
23 %%   Minus         \-     Point         \.     Solidus       \/
24 %%   Colon         \:     Semicolon     \;     Less than     \<
25 %%   Equals        \=     Greater than  \>     Question mark \?
26 %%   Commercial at \@     Left bracket  \[     Backslash     \\
27 %%   Right bracket \]     Circumflex    \^     Underscore    \_
28 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
29 %%   Right brace   \}     Tilde         \~}
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 %  ***:to do  **?:question  ...:to choose  XXX:to delete  ???:unknown %
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
34 \ProvidesClass{PoS} [2006/05/19 v1.2.1 LaTeX document class - P.D.]
35
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 \def\logo{\raisebox{-5mm}{\hbox{\noindent\includegraphics{PoSlogo}}}}
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%% NEW SWITCHES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 \newif\if@draft   \@draftfalse                  % DEFAULT IS NOT DRAFT
40 \newif\if@hyper   \@hypertrue                   % DEFAULT IS HYPER
41 \newif\if@proc    \@proctrue                    % DEFAULT IS PROC
42
43 \newif\if@author\@authorfalse                   %
44 \newif\if@abstract\@abstractfalse               % FOR FRONTMATTER DECLARATIONS
45 \newif\if@todotoc\@todotocfalse                 %
46 \newif\if@PoScopy\@PoScopyfalse                 %
47 \newif\if@conf\@conffalse                       %
48 \newif\if@shorttitle\@shorttitlefalse           %
49 \newif\if@PoSspecialurl\@PoSspecialurlfalse
50 \newif\if@PoScits\@PoScitsfalse                 %
51
52 \RequirePackage{ifpdf}
53 %copied from ifpdf.sty
54 %\newif\ifpdf
55 %\ifx\pdfoutput\undefined
56 %\else
57 %  \ifx\pdfoutput\relax
58 %  \else
59 %    \ifcase\pdfoutput
60 %    \else
61 %      \pdftrue
62 %    \fi
63 %  \fi
64 %\fi
65
66
67 \if@compatibility
68     \setlength\paperheight {297mm}%             % DEFAULT FOR LATEX209 IS a4
69     \setlength\paperwidth  {210mm}%
70 \else                                           % CHOSE PAPER:
71 \DeclareOption{a4paper}
72    {\setlength\paperheight {297mm}%
73     \setlength\paperwidth  {210mm}}
74 \DeclareOption{a5paper}{\@OImess{}}             % IGNORED a5
75 \DeclareOption{b5paper}{\@OImess{}}             % IGNORED b5
76 \DeclareOption{letterpaper}{\@OImess{. PoS pagesize is A4}}
77 \DeclareOption{legalpaper}{\@OImess{. PoS pagesize is A4}}
78 \DeclareOption{executivepaper}{\@OImess{. PoS pagesize is A4}}
79 \DeclareOption{landscape}{\@OImess{}}           % IGNORED landscape
80 \fi
81
82 \newcommand\@ptsize{1}                          % DEFAULT SIZE IS 11 PT
83
84 \DeclareOption{proceedings}{\@hypertrue\AtBeginDocument{\@todotocfalse}}
85
86 \DeclareOption{hyper}{\@hypertrue\@OImess{ is automatic in PoS}}        % HYPER IS 11 PT
87 \DeclareOption{nohyper}{\@hyperfalse\PoS@warnl{Option `hyper' should be used}}  % IGNORED nohyper
88 \DeclareOption{11pt}{\renewcommand\@ptsize{1}\@NFmess{11pt}}%ALWAYS 11PT
89 \DeclareOption{12pt}{\renewcommand\@ptsize{1}\@NFmess{11pt}}% ALWAYS 11PT
90 \DeclareOption{10pt}{\renewcommand\@ptsize{1}\@NFmess{11pt}}% ALWAYS 11PT
91
92 \DeclareOption{nocits}{\@OImess{ is default for PoS}
93                      \@PoScitsfalse}
94
95 \DeclareOption{cits}{\@PoScitstrue}
96 %%%% ??????????????
97 %come fare per disabilitare cite e forzare cits?
98 %%%%????????????????????
99
100 \if@compatibility\else
101 \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}\fi
102 \DeclareOption{twoside}{\@OImess{}}
103 \DeclareOption{notoc}{\AtBeginDocument{\@todotocfalse}
104                         \@OImess{ is automatic in PoS}}
105 \DeclareOption{toc}{\AtBeginDocument{\@todotoctrue}}
106
107 \DeclareOption{draft}{\setlength\overfullrule{5pt}% EXTENDED DRAFT
108         \newcount\hour\newcount\minute
109         \hour=\time \divide\hour by60 \minute=\time
110         {\multiply\hour by60 \global\advance\minute by-\hour}
111         \edef\militarytime{\number\hour:\ifnum\minute<10 0\fi\number\minute}
112         \let\old@eqnnum\@eqnnum
113         \def\@eqnnum{\old@eqnnum\rlap{\kern\marginparsep
114                                 \if@twocolumn\if@firstcolumn
115                                   \kern-2\marginparsep\kern-\columnwidth\
116                                   \llap\bgroup\else\bgroup\fi
117                                 \else
118                                 \if@twoside\ifodd\c@page
119                                   \kern-2\marginparsep\kern-\textwidth
120                                   \llap\bgroup\else\bgroup\fi
121                                 \else\bgroup\fi                         
122                                 \fi
123                                 \sf\scriptsize\@eqnlabel\egroup}%
124                                 \gdef\@eqnlabel{}}
125         \let\@eqnlabel\relax
126         \def\math@note#1{\gdef\@eqnlabel{LAB: #1}}
127         \def\norm@note#1#2{\special{}% SORRY AGAIN.
128                          \ifinner{\ifdim\baselineskip=\z@% IN ARRAY..
129                                         \baselineskip18\p@\fi%%
130                                 \ifhmode%   ATTENTION TO RESTRICTED VMODE!
131                                 \raisebox{.5\baselineskip}[\z@][\z@]{%
132                                         \rlap{\sf\scriptsize #2}}%
133                                 \else\vskip-\baselineskip%
134                                 \raisebox{-.6\baselineskip}[\z@][\z@]{%
135                                                 \rlap{\sf\scriptsize #2}}%
136                                 \fi}%
137                          \else\marginpar{\raggedright\if@twoside\ifodd\c@page%
138                                         \raggedleft\fi\fi\sf\scriptsize #1#2}%
139                          \fi}%
140         \AtBeginDocument{\newbox\drft@box\setbox\drft@box=\hbox{%
141                         \framebox[\textwidth]{\sf\small PoS 3.1 DRAFT 
142                         \ttfamily(\cur@opt)\hfill\sf\bfseries\jobname\sf, 
143                         \today, \militarytime}}}
144         \@drafttrue}
145
146 \DeclareOption{titlepage}{\@OImess{}}           % IGNORED
147 \if@compatibility\else
148 \DeclareOption{notitlepage}{\@OImess{}}         % IGNORED
149 \fi
150 \if@compatibility\else
151 \DeclareOption{onecolumn}{\@OImess{}}           % IGNORED
152 \fi
153 \DeclareOption{twocolumn}{\@OImess{}}           % IGNORED
154 \DeclareOption{leqno}{\@OImess{}}       %\input{leqno.clo}} IGNORED ...
155 \DeclareOption{fleqn}{\@OImess{}}       %\input{fleqn.clo}} IGNORED ...
156 \DeclareOption{openbib}{\@OImess{}}             % IGNORED
157
158
159 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% MESSAGES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160 \newcommand\PoS@mess[1]{\typeout{Class PoS Message: \protect#1.}}%
161 \newcommand\PoS@warn[1]{\ClassWarning{PoS}{#1}}
162 \newcommand\PoS@warnl[1]{\ClassWarningNoLine{PoS}{#1}}
163 \newcommand\PoS@igno[1]{\PoS@warn{IGNORED \protect#1}}
164 \newcommand\PoS@ignol[1]{\PoS@warnl{IGNORED \protect#1}}
165 \newcommand\@OImess[1]{\PoS@ignol{OPTION '\CurrentOption'#1}}
166 \newcommand\@NFmess[1]{\PoS@mess{Normalsize set to #1}}
167 \newcommand\@ENVwarn[1]{\PoS@warn{Please use \protect#1 in place 
168                                                 of LaTeX environment}}
169 %%%%%%%%%%%%%%%%%%%%%%%%%% PROCESS OPTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%
170 \ExecuteOptions{a4paper,oneside,proceedings} %WERE ALSO 10pt,onecolumn
171 \ProcessOptions
172
173 %%%%%%%%%%%%%%%%%%%%%%%%%% REQUIRED PACKAGES %%%%%%%%%%%%%%%%%%%%%%%%%%
174 \RequirePackage{color}
175 \RequirePackage{amssymb}
176 \RequirePackage[T1]{fontenc}
177 \RequirePackage{times}
178 \RequirePackage{mathptmx}
179 \ifpdf
180       \RequirePackage[pdftex]{graphicx}
181       \DeclareGraphicsExtensions{.pdf,.jpg,.jpeg}
182 \else
183       \RequirePackage{graphicx}
184       \DeclareGraphicsExtensions{.ps,.eps,.pstex}
185 \fi
186 %%%%%%%%%%%%%%%%%%%%%%%% TRICKS FOR DOTLESS J %%%%%%%%%%%%%%%%%%%%%%%%%
187 % \j and \jmath are missing in font Times. So I use the ones from
188 % Computer Modern. Works acceptably, but in sf
189 \DeclareSymbolFont{forjmath}{OT1}{cmr}{m}{sl}
190 \DeclareMathSymbol{\Jmath}{\mathord}{forjmath}{'021}
191 \def\jmath{\Jmath}
192 \DeclareFontFamily{OT1}{cmr}{}
193 \DeclareFontFamily{OT1}{cmss}{}
194 \def\j{\ifmmode\Jmath\else{\fontencoding{OT1}\fontfamily{cmr}\selectfont\char'021}\fi}
195 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% END DOTLESS J %%%%%%%%%%%%%%%%%%%%%%%%%%%%
196
197
198
199 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
200 %%%%%%%%%%%%%%%%%%%%%%%%%%%% START CODE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
201 \input{size1\@ptsize.clo}
202 \renewcommand{\baselinestretch}{1.1}\normalsize
203 \setlength\lineskip{1\p@}
204 \setlength\parindent{1.2\parindent}
205 \setlength\normallineskip{1\p@}
206 \setlength\parskip{0\p@ \@plus \p@}
207 \@lowpenalty   51
208 \@medpenalty  151
209 \@highpenalty 301
210 \widowpenalty 1000
211 \clubpenalty 1000
212
213 \setcounter{topnumber}{8}
214 \renewcommand\topfraction{.85} % default .7
215 \setcounter{bottomnumber}{5}
216 \renewcommand\bottomfraction{.6} %.2
217 \setcounter{totalnumber}{8}
218 \renewcommand\textfraction{.15}
219 \renewcommand\floatpagefraction{.8}
220 \setcounter{dbltopnumber}{3}
221 \renewcommand\dbltopfraction{.85}
222 \renewcommand\dblfloatpagefraction{.8}
223 \setlength{\floatsep}{12pt plus 2pt minus 4pt}
224 \setlength{\textfloatsep}{20pt plus 3pt minus 8pt}
225 \setlength{\intextsep}{12pt plus 2pt minus 4pt}
226
227 \textwidth  .72\paperwidth      % WIDTH OF TEXT, REMAINS .28% FOR MARGINS
228 %
229 \setlength\@tempdima{.76\paperheight}   % HEIGHT OF TEXT WITH FOOTNOTES
230 \divide\@tempdima\baselineskip          % EXCLUDING HEAD (AND FOOT)
231 \@tempcnta=\@tempdima                   % rounded to integer (#lines-1)
232 \setlength\textheight{\@tempcnta\baselineskip}
233 \addtolength\textheight{\topskip}
234
235 \voffset -1in
236 \topmargin   .06\paperheight    % FROM TOP OF PAGE TO TOP OF HEADING (0=1inch)
237 \headheight  .02\paperheight    % HEIGHT OF HEADING BOX.
238 \headsep     .03\paperheight    % VERT. SPACE BETWEEN HEAD AND TEXT.
239 \footskip    .04\paperheight    % FROM END OF TEX TO BASE OF FOOTER. (40pt)
240
241 \marginparsep 9\p@              % HOR. SPACE BETWEEN TEXT AND MARGINAL NOTE
242 \marginparpush 6\p@             % MIN. VERT. SPACE BETWEEN MARGINAL NOTES
243
244 \hoffset -1in                           % TO ADJUST WITH PAPER:
245
246         \oddsidemargin .14\paperwidth   % LEFT MARGIN FOR ODD PAGES (20)
247         \evensidemargin .14\paperwidth  % LEFT MARGIN FOR EVEN PAGES (20)
248         \marginparwidth .11\paperwidth  % TEXTWIDTH OF MARGINALNOTES
249
250 %%%%%%%%%%%%%%%%%%%%%%% HYPER (AND DRAFT) STUFF %%%%%%%%%%%%%%%%%%%%%%%
251 %\let\textref\@gobble
252 \ifpdf
253       \input pdfcolor.tex
254 \else
255 \fi
256
257 \bgroup\catcode`\#=12\gdef\hash{#}\egroup       % DEFINED \hash=#.
258 \def\H@tilde{\string~}
259 \newcommand{\href}[2]{\rule{0pt}{0pt}\bgroup\let~\H@tilde
260                       \if@hyper\ifpdf
261                                     \def\hash{}%
262                                     \pdfstartlink attr{/Border [0 0 0]}
263                                     user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
264                                         \pdfsetcolor{.9 .9 0 0}%
265                                 \else
266                                     \noexpand\special{html:<A href="#1">}%
267                                 \fi
268                       \fi
269                       {#2}\rule{0pt}{0pt}\egroup
270                       \if@hyper\ifpdf
271                                     \Black\pdfendlink
272                                \else
273                                     \special{html:</A>}%
274                                \fi
275                       \fi
276                       }
277 % \intPlink was added because in pdflatex you need two different commands
278 % for internal and external links. For latex they are the same.
279 \newcommand{\intPlink}[2]{\rule{0pt}{0pt}\bgroup\let~\H@tilde
280                         \if@hyper\ifpdf
281                                        \def\hash{}%
282                                        \pdfstartlink attr{/Border [0 0 0]}
283                                           goto name{#1}%
284                                        \pdfsetcolor{.9 .9 0 0}%
285                                   \else
286                                        \noexpand\special{html:<A href="#1">}%
287                                   \fi
288                         \fi
289                         {#2}\rule{0pt}{0pt}\egroup
290                         \if@hyper\ifpdf
291                                       \Black\pdfendlink
292                                  \else
293                                       \special{html:</A>}%
294                                  \fi
295                         \fi
296                         }
297
298
299 \newcommand{\name}[1]{\if@hyper\ifpdf
300                                     \pdfdest name{#1} fith%
301                                \else
302                                     \noexpand\special% NAME HAS NO TAGGED TEXT HERE.
303                                         {html:<A name="#1">}\special{html:</A>}%
304                                \fi
305                       \fi
306                       }
307
308 \newcommand{\base}[1]{\if@hyper\bgroup\let~\H@tilde
309                         \noexpand\special       % BASE HAS NO TAGGED TEXT.
310                         {html:<base href="#1">}\egroup\fi}
311 %------------------------------------------------------------------%
312 % SECTION TAGS and  THEIR REFERENCE IN TOC \d@t will be '.' for sections only
313 \if@hyper
314 \renewcommand{\@seccntformat}[1]{\name{sec\csname the#1\endcsname}%
315                                  \csname the#1\endcsname\d@t\hspace{1ex}}
316 \renewcommand{\numberline}[1]{\hb@xt@\@tempdima{\intPlink
317                               {\hash\hyp@typ#1}{#1}\d@t\hfil}}
318 \else
319 \renewcommand{\@seccntformat}[1]{\csname the#1\endcsname\d@t\hspace{1ex}}
320 \renewcommand{\numberline}[1]{\hb@xt@\@tempdima{#1\d@t\hfil}}
321 \fi
322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
323 \if@PoScits
324 % if you want citations ranges to collapse...
325 \newcount\@tempcntc
326 \def\@citex[#1]#2{%
327   \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}%
328   \@cite{\@for\@citeb:=#2\do%                                               for aech citation...
329          {\edef\@citeb{\expandafter\@firstofone\@citeb}%                    eat trailing space
330           \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi% write to aux
331           \@ifundefined{b@\@citeb}%                                         if label undefined..
332                        {\@citeo\@tempcntb\m@ne\@citea%                      ... then ...
333                         \def\@citea{,\penalty\@m\ }{\reset@font\bfseries ?}%
334                         \G@refundefinedtrue\@latex@warning%
335                         {Citation `\@citeb' on page \thepage \space undefined}}%
336                        {\setbox\z@\hbox{\global\@tempcntc0\csname %         ... else
337                                         b@\@citeb\endcsname}%
338                         \advance\@tempcntb\@ne%
339                         \ifnum\@tempcntb=\@tempcntc%
340                         \else\advance\@tempcntb\m@ne\@citeo%
341                              \@tempcnta\@tempcntc\@tempcntb\@tempcntc
342                         \fi%
343                         }%
344          }\@citeo}{#1}%
345          \if@draft\norm@note{CIT: }{#2}\fi                      % **DRAFT**
346     }% end definition of \@citex
347 %This really prints out the cit-numbers
348 \def\@citeo{\ifnum\@tempcnta>\@tempcntb%    
349             \else\@citea\def\@citea{,\penalty\@m\ }%
350                   \ifnum\@tempcnta=\@tempcntb%
351                   \intPlink{\hash bib\the\@tempcnta}{\the\@tempcnta}% if there is no range
352                   \else{\advance\@tempcnta\@ne%                 % if there is a range
353                        \ifnum\@tempcnta=\@tempcntb%
354                        \else\def\@citea{\,--\,}%
355                        \fi%
356                        \advance\@tempcnta\m@ne%
357                        \intPlink{\hash bib\the\@tempcnta}{\the\@tempcnta}\@citea%first
358                        \intPlink{\hash bib\the\@tempcntb}{\the\@tempcntb}}%last
359                   \fi%
360              \fi}
361 \else % ... or not to collapse
362 %------------------------------------------------------------------%
363 % CITATION TAGS ARE TOGETHER WITH BIB STUFF.
364 % CITATION HREF
365 \def\@citex[#1]#2{%                     % UNFORTUNATELY REDEFINED!!!!
366   \let\@citea\@empty
367   \@cite{\@for\@citeb:=#2\do
368     {\@citea\def\@citea{,\penalty\@m\ }%
369      \edef\@citeb{\expandafter\@firstofone\@citeb}%
370      \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
371      \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
372         \G@refundefinedtrue
373         \@latex@warning
374           {Citation `\@citeb' on page \thepage \space undefined}}%
375         {\edef\tmp@bn{\csname b@\@citeb\endcsname}%
376          \hbox{\intPlink{\hash bib\tmp@bn}{\tmp@bn}}}}}{#1}%            % **HYPER**
377          \if@draft\norm@note{CIT: }{#2}\fi                      % **DRAFT**
378          }
379 \fi
380 %-----------------------------------------------------------------%
381 % LABEL, REF AND PAGEREF, TEXTREF, ~ COMPATIBLE:
382 \let\old@label\label                                            % OLD LATEX COMMAND.
383 \def\label{\bgroup\catcode`\>=15\catcode`\"=15\catcode`\==15 \@@label}          
384 \newcommand{\@@label}[1]{\egroup\name{ref-#1}%          % LABEL IN HYPER TAG.
385                          \old@label{#1}%                % 
386                          \if@draft%                     % DRAFT:
387                          \ifmmode\math@note{#1}%
388                          \else\norm@note{}{LAB: #1}\fi%
389                          \fi%
390                          }
391 \if@hyper
392 \let\old@ref\ref \let\old@pageref\pageref               % OLD LATEX COMMANDS.
393 \renewcommand{\ref}[1]{\@ifundefined{r@#1}{}{\intPlink{\hash ref-#1}}%
394                        {\old@ref{#1}}} % LABEL INSIDE HREF.
395 \renewcommand{\pageref}[1]{\@ifundefined{r@#1}{}{%      % UNDEFINED => NO HREF
396               \edef\tmp@ref{\noexpand\@secondoftwo\csname r@#1\endcsname}%
397               \intPlink{\hash pag\tmp@ref}}{\old@pageref{#1}}}
398 \fi
399 \newcommand{\textref}[2]{\@ifundefined{r@#1}
400                         {%
401                         \protect\G@refundefinedtrue
402                         \nfss@text{\reset@font\bfseries ?#2?}%
403                         \@latex@warning{Reference `#1' on page \thepage \space
404                                              undefined}}
405                         {\vrule height \z@ width \z@\intPlink{\hash ref-#1}{#2}}}
406 %------------------------------------------------------------------%
407 %%%%%%%%%%%%%%%%%%%%%%%%%% END HYPER-STUFF %%%%%%%%%%%%%%%%%%%%%%%%%%%%
408
409 %%%%%%%%%%%%%%%%%%%%%%%%%%% PoS HEADINGS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
410 \def\ps@PoS{%                   
411     \def\@oddfoot{\ifnum\thepage=1%
412                 \PoScopyright@box\hfill% copyright only on front page
413                 \if@PoSspecialurl\PoSspecial@url\else\unhbox\PoSpaper@url\fi%possible url
414                 \else\reset@font\hfil\thepage\hfil\fi} % page numbers on other pages
415     \if@draft\edef\cur@opt{\@curroptions}\fi
416 %
417     \def\@oddhead{\name{pag\thepage}\ifnum\thepage=1%
418       {\smash{\makebox[0cm][l]{\logo}}\hfill}\else%
419       \smash{\if@draft\raise 2.5em\rlap{\copy\drft@box}\fi
420                      \vbox{\hsize=\textwidth\noindent
421                      \if@shorttitle\copy\PoSshorttitle@box\else{\small\it\@title}\fi\hfill
422                      \copy\@firstaubox\vskip.17em \hrule
423              }}\fi%
424                       }%
425     \let\@mkboth\@gobbletwo  %%%% 
426     \let\sectionmark\@gobble
427     \let\subsectionmark\@gobble
428     }
429 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% TITLE PAGE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
430 \def\maketitle{\PoS@ignol{\maketitle}}
431 \newcommand\auto@maketitle{\begingroup
432     \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 
433     \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% 
434     \long\def\@makefntext##1{\parindent 20.39995pt\noindent
435             \hb@xt@.05\textwidth{\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
436     \let\footnote\thanks%
437          \@maketitle                            % CALL ACTUAL FORMATTING
438          \@thanks                               % TITLE THANKS
439          \thispagestyle{PoS} 
440          \setcounter{page}{1}
441          \newpage                               % END OF PAGE
442   \endgroup
443   \setcounter{footnote}{0}%                     
444   \if@todotoc                                   % IF THERE IS A SECTION
445       \noindent\rule\textwidth{.1pt}            % THEN MAKE TOC...
446       \vskip 2em \@plus 3ex \@minus 3ex
447       \tableofcontents
448       \vskip 2em \@plus 3ex \@minus 3ex
449       \noindent\rule\textwidth{.1pt}
450       \vskip 2em \@plus 3ex \@minus 3ex
451   \fi
452   \global\let\thanks\@gobble
453   \global\let\@maketitle\relax                  %
454   \global\let\@thanks\@empty                    %
455   \global\let\@author\@empty                    % KILL ALL 
456   \global\let\@date\@empty                      %
457   \global\let\@abstract\@empty                  %
458   \global\let\title\relax                       %
459   \global\let\author\relax                      %
460   \global\let\date\relax                        %
461   \global\let\and\relax                         %
462   \global\let\email\@gobble
463   \global\let\PoScopydate\relax
464   \global\let\PoSspecialurl\relax
465 }
466 %%%%%%%%%%%%%%%%%%%%%%%%%% ACTUAL TITLEPAGE %%%%%%%%%%%%%%%%%%%%%%%%%%%
467 \newskip\titlesk@a              % Skips for titlepage
468 \newskip\titlesk@b              %
469 \newskip\titlesk@c              %
470 \titlesk@a= 2em   plus .4fill  minus 1em%       % Before title (proceedings)
471 \titlesk@b= 1.7em plus .1fill  minus 1em%       % Between title/rule & rule/auth
472 \titlesk@c= 1.5em plus .05fill minus 1em%       % Between auth/abs & abs/dedic
473
474 \def\@maketitle{%                               % PAGE IS FLUSHED LEFT
475   \begin{flushleft}%                            % PAY ATTENTION TO \par'S
476     \null
477     %
478     \vskip \titlesk@a              % vspace before title
479     %
480     {\LARGE \sffamily              % TITLE  
481       \bfseries                  
482       \@title\par}%                
483     %
484     \vskip \titlesk@b              % vspace between title and rule
485     %
486     \hrule height 1\p@%            % RULE  1pt.
487     %
488     \vskip \titlesk@b              % vspace between rule and authors
489     %
490     {\normalsize \bfseries \sffamily% AUTHOR(S)
491       \@author \par}                            
492     %
493     \vskip \titlesk@c              % vspace between authors and abstract
494     %
495     \centerline{\parbox{.9\textwidth}%  % ABSTARCT (narrower)
496       {\abstract@cs}}%
497     %
498     \dedic@ted                     % DEDICATION (if present) with its space
499     %
500     \@PACS                         % PACS (if present) with its space
501     %
502     \vskip \titlesk@c            
503     \vfill
504     \FullConference@box            % FULL CONFERENCE INFO
505   \end{flushleft}%
506 }
507 %%%%%%%%%%%%%%%%%%%%%%%%%%% STANDARD STUFF %%%%%%%%%%%%%%%%%%%%%%%%%%%%
508 \setcounter{secnumdepth}{3}
509 \newcounter {part}
510 \newcounter {section}
511 \newcounter {subsection}[section]
512 \newcounter {subsubsection}[subsection]
513 \newcounter {paragraph}[subsubsection]
514 \newcounter {subparagraph}[paragraph]
515 \renewcommand\thepart         {\@Roman\c@part}
516 \renewcommand\thesection      {\@arabic\c@section}
517 \renewcommand\thesubsection   {\thesection.\@arabic\c@subsection}
518 \renewcommand\thesubsubsection{\thesubsection.\@arabic\c@subsubsection}
519 \renewcommand\theparagraph    {\thesubsubsection.\@arabic\c@paragraph}
520 \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
521 %%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION FORMATS %%%%%%%%%%%%%%%%%%%%%%%%%%%
522 \def\ts@flag{\let\d@t.%                                 % Sections get ``.''
523              \immediate\write\@auxout                   % IF THERE IS A SECTION
524              {\string\global\string\@todotoctrue}}      % THEN SIGNAL IN AUX.
525
526 \newcommand\part{\par
527    \addvspace{4ex}%
528    \@afterindentfalse
529    \secdef\@part\@spart}
530
531 \def\@part[#1]#2{\ts@flag
532     \ifnum \c@secnumdepth >\m@ne
533       \refstepcounter{part}%                    % DAMN LATEX !!! BELOW,
534       \addcontentsline{toc}{part}{\string\intPlink      % UNFORTUNATELY, NO NUMBERLINE:
535                                   {\string\hash\space part\the\c@part}%
536                                   {\thepart}\hspace{1em}#1}%
537     \else
538       \addcontentsline{toc}{part}{#1}%
539     \fi
540     {\parindent \z@ \raggedright
541      \interlinepenalty \@M
542      \normalfont
543      \ifnum \c@secnumdepth >\m@ne
544        \name{part\the\c@part}\Large\bfseries \partname~\thepart
545        \par\nobreak
546      \fi
547      \huge \bfseries #2%
548      \markboth{}{}\par}%
549     \nobreak
550     \vskip 3ex
551     \@afterheading\let\d@t\relax}
552 \def\@spart#1{%
553     {\parindent \z@ \raggedright
554      \interlinepenalty \@M
555      \normalfont
556      \huge \bfseries #1\par}%
557      \nobreak
558      \vskip 3ex
559      \@afterheading}
560
561 \newcommand\secstyle{\bfseries\raggedright}
562
563 \newcommand\section{\@startsection{section}{1}{\z@}%
564                                    {3.5ex \@plus 1.3ex \@minus .7ex}%
565                                    {2.3ex \@plus.4ex \@minus .4ex}%
566                                    {\normalfont\large\secstyle}}
567 \newcommand\subsection{\@startsection{subsection}{2}{\z@}%
568                                    {2.3ex\@plus 1ex \@minus .5ex}%
569                                    {1.2ex \@plus .3ex \@minus .3ex}%
570                                    {\normalfont\normalsize\secstyle}}
571 \newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
572                                    {2.3ex\@plus 1ex \@minus .5ex}%
573                                    {1ex \@plus .2ex \@minus .2ex}%
574                                    {\normalfont\normalsize\secstyle}}
575 \newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
576                                    {1.75ex \@plus1ex \@minus.2ex}%
577                                    {-1em}%
578                                    {\normalfont\normalsize\bfseries}}
579 \newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
580                                    {1.75ex \@plus1ex \@minus .2ex}%
581                                    {-1em}%
582                                    {\normalfont\normalsize\bfseries}}
583
584 % ---- turnaround for sections with figures ------ %
585 \def\bef@sec{\iffigprocessing\PoS@warnl{Floating figure \the\ffigcount\space
586                                                 and startsection colliding}\fi
587              \iftabprocessing\PoS@warnl{Floating table \the\ftabcount\space
588                                                 and startsection colliding}\fi
589              \edef\bef@everypar{\the\everypar}} % HACK FOR FLOATS AND \everypar
590 \def\aft@sec{\let\d@t\relax                     % RESTORE: NO DOTTED SUBSECS..
591              \edef\tmp@everypar{\the\everypar}% % DELETED CLUBPENALTY, BELOW.
592              \everypar\expandafter{\bef@everypar{\tmp@everypar}}}% RESTORE.
593 \let\old@sec\section                            %
594 \let\old@ssec\subsection                        %
595 \let\old@sssec\subsubsection                    % OLD SECTIONING COMMANDS.
596 \let\old@par\paragraph                          %
597 \let\old@spar\subparagraph                      %
598 % ------- new forms ------- %
599 \renewcommand{\section}{\secdef\PoS@sec\PoS@secs}
600 \renewcommand{\subsection}{\secdef\PoS@ssec\PoS@ssecs}
601 \renewcommand{\subsubsection}{\secdef\PoS@sssec\PoS@sssecs}
602 \renewcommand{\paragraph}{\secdef\PoS@par\PoS@pars}
603 \renewcommand{\subparagraph}{\secdef\PoS@spar\PoS@spars}
604 % ---- unstarred forms ---- %
605 \def\PoS@sec[#1]#2{\ts@flag\bef@sec\old@sec[#1]{#2}\aft@sec}
606 \def\PoS@ssec[#1]#2{\bef@sec\old@ssec[#1]{#2}\aft@sec}
607 \def\PoS@sssec[#1]#2{\bef@sec\old@sssec[#1]{#2}\aft@sec}
608 \def\PoS@par[#1]#2{\bef@sec\old@par[#1]{#2}\aft@sec}
609 \def\PoS@spar[#1]#2{\bef@sec\old@spar[#1]{#2}\aft@sec}
610 % ----- starred forms ----- %
611 \def\PoS@secs#1{\bef@sec\old@sec*{#1}\aft@sec}
612 \def\PoS@ssecs#1{\bef@sec\old@ssec*{#1}\aft@sec}
613 \def\PoS@sssecs#1{\bef@sec\old@sssec*{#1}\aft@sec}
614 \def\PoS@pars#1{\bef@sec\old@par*{#1}\aft@sec}
615 \def\PoS@spars#1{\bef@sec\old@spar*{#1}\aft@sec}
616 % ----- end hack for sections with floats --------%
617
618 \setlength\leftmargini  {2.5em}
619 \leftmargin  \leftmargini
620 \setlength\leftmarginii  {2.2em}
621 \setlength\leftmarginiii {1.87em}
622 \setlength\leftmarginiv  {1.7em}
623 \setlength\leftmarginv  {1em}
624 \setlength\leftmarginvi {1em}
625 \setlength  \labelsep  {.5em}
626 \setlength  \labelwidth{\leftmargini}
627 \addtolength\labelwidth{-\labelsep}
628 \@beginparpenalty -\@lowpenalty
629 \@endparpenalty   -\@lowpenalty
630 \@itempenalty     -\@lowpenalty
631 \renewcommand\theenumi{\@arabic\c@enumi}
632 \renewcommand\theenumii{\@alph\c@enumii}
633 \renewcommand\theenumiii{\@roman\c@enumiii}
634 \renewcommand\theenumiv{\@Alph\c@enumiv}
635 \newcommand\labelenumi{\theenumi.}
636 \newcommand\labelenumii{(\theenumii)}
637 \newcommand\labelenumiii{\theenumiii.}
638 \newcommand\labelenumiv{\theenumiv.}
639 \renewcommand\p@enumii{\theenumi}
640 \renewcommand\p@enumiii{\theenumi(\theenumii)}
641 \renewcommand\p@enumiv{\p@enumiii\theenumiii}
642 \newcommand\labelitemi{$\m@th\bullet$}
643 \newcommand\labelitemii{\normalfont\bfseries --}
644 \newcommand\labelitemiii{$\m@th\ast$}
645 \newcommand\labelitemiv{$\m@th\cdot$}
646 \newenvironment{description}
647                {\list{}{\labelwidth\z@ \itemindent-\leftmargin
648                         \let\makelabel\descriptionlabel}}
649                {\endlist}
650 \newcommand*\descriptionlabel[1]{\hspace\labelsep
651                                 \normalfont\bfseries #1}
652 %%%%%%%%%%%%%%%%%%%%%%%%%% AUTHORS/ADDRESSES %%%%%%%%%%%%%%%%%%%%%%%%%%
653 % *** After proceedings, the authors go in a hbox. => \break does not work!!
654 % *** if no address nobody closes the box!
655 \newif\if@speaker\@speakerfalse
656 \newif\if@dblspeak\@dblspeakfalse
657 \newtoks\prev@t
658 \newtoks\cur@t
659 \newbox\@firstaubox
660 \newskip\addr@skip\addr@skip=.38em%\@plus.02fil\@minus.3ex
661 \newskip\auth@skip\auth@skip=.6em\@plus.03fil\@minus.2ex
662
663 \renewcommand\@author{\parskip\z@
664                       \def\\{\egroup                    % CLOSE & aftergroup!
665                         \par                            % FIRST TIME \\=>ADDR.
666                         \vskip\addr@skip                % GLUE UNDER AUTHOR
667                         \vbox\bgroup\hsize=.9\textwidth % 
668                         \small\it\raggedright           % STYLE FOR ADDRESSES
669                         \def\\{\par\leavevmode\ignorespaces}%\let\\\relax%
670                         \leavevmode\ignorespaces}%
671                         }
672 \renewcommand\author[1]{%
673                 \global\@authortrue                     %
674                 \prev@t=\expandafter{\@author}%         % TWO TOKEN LISTS.
675                 \cur@t={\vskip\auth@skip                % glue before auth.
676                         \vtop\bgroup #1\egroup          % ACTUAL AUTH.\\ADD.
677                         \par}%                          %
678                 \long\xdef\@author{\the\prev@t\the\cur@t}%STORE ALL IN \@AUTHOR
679                 }
680 %%%%%%%%%%%%%%%%%%%%%%%%%%%% SPEAKER %%%%%%%%%%%%%%%%%%%%%%%%%%%%
681 \newcommand\speaker[1]{\if@speaker\global\@dblspeaktrue\fi
682                         \global\@speakertrue
683                         \global\setbox\@firstaubox
684                         \hbox{{\let\thanks\@gobble
685                                 \let\footnote\@gobble\small 
686                                 \rm #1}}%
687                         #1\thanks{Speaker.}\
688                         }%
689 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% SHORT TITLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
690 \newbox\PoSshorttitle@box
691 \newcommand\ShortTitle[1]{\global\setbox\PoSshorttitle@box
692                           \hbox{\small\it #1}\global\@shorttitletrue}
693 %%%%%%%%%%%%%%%%%%%%%%%%%% Full Conference Info %%%%%%%%%%%%%%%%%%%%%%%
694 \gdef\FullConference@box{\relax}
695 \newcommand\FullConference[1]{\gdef\FullConference@box{
696                          \vbox{\small\raggedright
697                            \it #1}}\@conftrue}
698 %%%%%%%%%%%%%%%%%%%%%%%%%% COPYRIGHT DATE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
699 \newbox\PoScopy@date
700 \newcommand\PoScopydate[1]{\global\setbox\PoScopy@date
701                         \hbox{\scriptsize #1}\global\@PoScopytrue}
702 %%%%%%%%%%%%%%%%%%%%%%%%%%% ACKNOWELEDGMENTS %%%%%%%%%%%%%%%%%%%%%%%%%%
703 \newcommand\acknowledgments{\section*{\acknowlname}}
704 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EMAIL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
705 \newcommand\email[1]{{\tt\href{mailto:#1}{#1}}}
706 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DEDICATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
707 \gdef\dedic@ted{\relax}
708 \newcommand\dedicated[1]{\gdef\dedic@ted{\vskip .5\titlesk@c
709                               \vbox{\small\it\raggedleft #1}}}
710 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PACS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
711 \gdef\@PACS{\relax}
712 \newcommand\PACS[1]{\gdef\@PACS{\vskip.5\titlesk@c
713                                 \vbox{\small\tt\raggedleft PACS:\ #1}}} 
714 %%%%%%%%%%%%%%%%% SPECIAL URL overrides paper@url %%%%%%%%%%%%%%%%%%%%%
715 \gdef\PoSspecial@url{\relax}
716 \newcommand\PoSspecialurl[1]{\@PoSspecialurltrue\gdef\PoSspecial@url{%
717     \hbox{\tiny\tt #1}}}
718 %%%%%%%%%%%%%%%%%%%%%%%%%  URL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
719 \newbox\PoSpaper@url
720 \global\setbox\PoSpaper@url\hbox{\tiny\ttfamily 
721                 http://pos.sissa.it/}
722 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% COPYRIGHT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
723 \gdef\PoScopyright@box{\hbox{{\tiny $\copyright$ Copyright owned by
724 the author(s) under the terms of the Creative Commons
725 Attribution-NonCommercial-ShareAlike Licence.}}}
726 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ABSTRACT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
727 \newcommand{\abstract}[1]%              % ABSTR. IN NORMALSIZE
728         {\gdef\abstract@cs{             % cs FOR WHOLE ABSTRACT
729         {\small
730           \ignorespaces #1}}
731         \normalsize
732         \global\@abstracttrue}
733 %%%%%%%%%%%%%%%%%%%%%%%%%% OTHER ENVIRONMENTS %%%%%%%%%%%%%%%%%%%%%%%%%
734 \newenvironment{verse}
735                {\let\\\@centercr
736                 \list{}{\itemsep      \z@
737                         \itemindent   -1.5em%
738                         \listparindent\itemindent
739                         \rightmargin  \leftmargin
740                         \advance\leftmargin 1.5em}%
741                 \item\relax}
742                {\endlist}
743 \newenvironment{quotation}
744                {\list{}{\listparindent 1.5em%
745                         \itemindent    \listparindent
746                         \rightmargin   \leftmargin
747                         \parsep        \z@ \@plus\p@}%
748                 \item\relax}
749                {\endlist}
750 \newenvironment{quote}
751                {\list{}{\rightmargin\leftmargin}%
752                 \item\relax}
753                {\endlist}
754
755 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THEOREMS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
756 \def\@xthm#1#2{\@begintheorem{#2}                % theorems are numbered
757                 {\csname the#1\endcsname.}       % with a . after the number
758                 \ignorespaces}
759 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% APPENDIX %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
760 \newcommand\appendix{\par
761   \setcounter{section}{0}%
762   \setcounter{subsection}{0}%
763   \renewcommand\thesection{\@Alph\c@section}}
764 %%%%%%%%%%%%%%%%%%%%%%%%%%% SOME MORE LENGHTS %%%%%%%%%%%%%%%%%%%%%%%%%
765 \setlength\arraycolsep{2\p@}            % TO MATCH eqnarrays<->equations
766 \setlength\tabcolsep{6\p@}
767 \setlength\arrayrulewidth{.4\p@}
768 \setlength\doublerulesep{2\p@}
769 \setlength\tabbingsep{\labelsep}
770 \skip\@mpfootins = \skip\footins
771 \setlength\fboxsep{3\p@}
772 \setlength\fboxrule{.4\p@}
773 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% THE EQUATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%
774 \renewcommand\theequation{\ifnum\c@section=0\else\thesection.\fi
775                           \@arabic\c@equation}
776
777 %%%%%%%%%%%%%%%%%%%%%%%%%%%% FIGURES, TABLES %%%%%%%%%%%%%%%%%%%%%%%%%%
778 \newcounter{figure}
779 \renewcommand\thefigure{\@arabic\c@figure}
780 \def\fps@figure{Htbp}
781 \def\ftype@figure{1}
782 \def\ext@figure{lof}
783 \def\fnum@figure{\figurename~\thefigure}
784 \newenvironment{figure}
785                {\@float{figure}}
786                {\end@float}
787 \newenvironment{figure*}
788                {\@dblfloat{figure}}
789                {\end@dblfloat}
790 \newcounter{table}
791 \renewcommand\thetable{\@arabic\c@table}
792 \def\fps@table{tbp}
793 \def\ftype@table{2}
794 \def\ext@table{lot}
795 \def\fnum@table{\tablename~\thetable}
796 \newenvironment{table}
797                {\@float{table}}
798                {\end@float}
799 \newenvironment{table*}
800                {\@dblfloat{table}}
801                {\end@dblfloat}
802 %%-----------------------------------------------------------------%%
803 \newcommand{\FIGURE}[2][v]{\begin{floatingfigure}[#1]#2
804                                         \end{floatingfigure}}
805 \newcommand{\TABLE}[2][v]{\begin{floatingtable}[#1]{#2}
806                                         \end{floatingtable}}
807 \newcommand{\EPSFIGURE}[3][v]{\begin{floatingfigure}[#1]\epsfig{file=#2}
808                                         \caption{#3}\end{floatingfigure}}
809 \newcommand{\TABULAR}[4][v]{\begin{floatingtable}[#1]{\begin{tabular}{#2}
810                                         #3\end{tabular}}\caption{#4}
811                                         \end{floatingtable}}
812 %Check below, and put automatic width ***
813 \newcommand{\DOUBLEFIGURE}[5][ht]{\@dblfloat{figure}[#1]\centerline{%
814                 \parbox{.45\textwidth}{\centerline{\epsfig{file=#2}}}~~~~
815                 \parbox{.45\textwidth}{\centerline{\epsfig{file=#3}}}}
816                 \centerline{\parbox[t]{.45\textwidth}{\caption{#4}}~~~~
817                 \parbox[t]{.45\textwidth}{\caption{#5}}}\end@dblfloat}
818 \newcommand{\DOUBLETABLE}[5][ht]{\@dblfloat{table}[#1]\centerline{%
819                 \parbox{.45\textwidth}{\centerline{#2}}~~~~
820                 \parbox{.45\textwidth}{\centerline{#3}}}
821                 \centerline{\parbox[t]{.45\textwidth}{\caption{#4}}~~~~
822                 \parbox[t]{.45\textwidth}{\caption{#5}}}\end@dblfloat}
823 %%%%%%---------------- FROM FLOATFLT PACKAGE ------------------%%%%%%%%
824 %% Original file `floatflt.sty', modified by F.Nesti  to:
825 %% be inserted in PoS.cls;
826 %% correct float placement when shifting past pages;
827 %% correct incompatibility with \marginpar;
828 %% correct incompatibility with \@startsection;
829 %% correct persisting indentation in following pars;
830 %% let float also at beginning of pages; 
831 %% avoid the widht specification.
832 %% 
833 %% Original was 1994-1996 by Mats Dahlgren <matsd@physchem.kth.se>. 
834 %% 
835 %%%%%%%%\NeedsTeXFormat{LaTeX2e}[1994/06/01]            %LEFT THIS STUFF TO 
836 %%%%%%%%\ProvidesPackage{floatflt}[1996/02/27 v. 1.3]   %RECONVERT TO PACKAGE.
837 \newcounter{OptionTest}
838 \if@twoside
839  \setcounter{OptionTest}{0}
840 \else                                                   % POS: 2side=p/1side=r
841  \setcounter{OptionTest}{1}
842 \fi
843 %%%%%%%%\DeclareOption{rflt}{\setcounter{OptionTest}{1}}
844 %%%%%%%%\DeclareOption{lflt}{\setcounter{OptionTest}{2}} % CHOSEN.
845 %%%%%%%%\DeclareOption{vflt}{\setcounter{OptionTest}{0}}
846 %%%%%%%%\DeclareOption*{\OptionNotUsed}
847 %%%%%%%%\ProcessOptions
848 \newbox\@tmpbox
849 \newbox\figbox
850 \newbox\tabbox
851 \newbox\pagebox
852 \newcount\ffigcount
853 \newcount\ftabcount
854 \newcount\hangcount
855 \newcount\nosuccesstryfig
856 \newcount\nosuccesstrytab
857 \newdimen\figgutter   \figgutter=1truepc
858 \newdimen\tabgutter   \tabgutter=1truepc
859 \newdimen\fl@wd
860 \newdimen\fl@ht
861 %\newdimen\fl@gut
862 \newdimen\htdone      \htdone=\z@
863 \newdimen\pageht
864 \newdimen\startpageht
865 \newdimen\floatfltwidth
866 \newdimen\fltitemwidth
867 \newif\iftryingfig     \tryingfigfalse
868 \newif\iftryingtab     \tryingtabfalse
869 \newif\ifdoingfig      \doingfigfalse
870 \newif\ifdoingtab      \doingtabfalse
871 \newif\iffigprocessing \figprocessingfalse
872 \newif\iftabprocessing \tabprocessingfalse
873 \newif\ifpageafterfig  \pageafterfigfalse
874 \newif\ifpageaftertab  \pageaftertabfalse
875 \newif\ifoddpages
876 \newif\ifoutput
877 \newtoks\outputpretest
878 \def\@captype{}
879 %%---------------- ORRIBLE HACKS, SORRY -------------------------%%
880 \let\old@marginpar\marginpar                            % 
881 \renewcommand\marginpar[1]{{\outputpretest={\outputtrue}% REDEF \marginpar.
882                             \old@marginpar{#1}}}        %
883 \def\g@addto#1#2{{\toks@\expandafter{#1#2}%
884                   \xdef#1{\the\toks@}}}%
885 \def\postpone@captions{%                        %
886 %       \global\let\tmp@label\label             % REDEF \caption AND 
887         \global\let\tmp@caption\caption         % \label, LATER.
888         \global\let\later@capt\relax            % UN PO' PESANTI 
889         \gdef\later@label{}%                    % MA D'ALTRONDE...
890         \let\J@ref\ref\def\ref{\protect\J@ref}% % protect ref in captions.. 
891         \renewcommand\caption{\@ifnextchar[\J@@caption\J@caption}%
892         \newcommand\J@caption[1]{\gdef\later@capt{\tmp@caption{##1}}}% LOCAL!!
893         \newcommand\J@@caption[2][v]%
894                                 {\gdef\later@capt{\tmp@caption[##1]{##2}}}% LOCAL!!
895         \renewcommand\@@label[1]{\egroup\name{ref-##1}% % TAG WHERE CALLED, AT LEAST,
896                                \if@draft\norm@note{}{LAB: ##1}\fi% & DRAFTNOTE.
897                                \g@addto\later@label{\old@label{##1}}}%
898                         }
899 \AtEndDocument{\iftryingfig\PoS@warnl{Floating figure \the\ffigcount\space
900                                         remains undone}\fi
901                 \iftryingtab\PoS@warnl{Floating table \the\ftabcount\space
902                                         remains undone}\fi}
903 %%----------------- FIGURE ---------------------------------------%%
904 \newenvironment{floatingfigure}[1][v]%
905 {\@tfor \@tempa :=#1\do {\xdef\@fside{\@tempa}}%
906  \global\advance\ffigcount by 1%
907  \iffigprocessing {\count0=\ffigcount\advance\count0 by -1%
908                    \PoS@warnl{Floating figures \the\count0\space\space and
909                         \the\ffigcount\space colliding}}\fi
910  \iftabprocessing  \PoS@warnl{Floating table \the\ftabcount\space and 
911                         floating figure \the\ffigcount\space colliding}\fi
912  \postpone@captions
913  \global\setbox\@tmpbox=\hbox\bgroup% begin of figbox %HBOX FOR AUTO WIDTH!
914 }
915 {%
916 \egroup%                                % CALCULATE WIDTH (NO CAPTION FOR NOW)
917 \global\setlength{\floatfltwidth}{\the\wd\@tmpbox}%
918 \ifdim\floatfltwidth<.6\columnwidth%    % IF NOT TOO WIDE OK:
919  \global\setbox\figbox=\vbox{\hsize=\floatfltwidth
920                              \def\@captype{figure}%
921                              \noindent\unhbox\@tmpbox
922                              \later@capt\later@label}%
923  \global\figprocessingtrue
924  \global\everypar={\tryfig\oldeverypar}% must be set globally!
925  \figinsert\par
926 \else%                                  % ELSE NORMAL LATEX FIGURE, SIGH.
927  \if\@fside v \def\@fside{ht}\fi
928  \ifdim\floatfltwidth<\columnwidth
929     \def\@@tempa{\@float{figure}[}\let\@@tempb\end@float
930  \else
931     \def\@@tempa{\@dblfloat{figure}[}\let\@@tempb\end@dblfloat
932  \fi
933  \expandafter\@@tempa\@fside]\center\unhbox\@tmpbox\later@capt\later@label\@@tempb
934 \fi
935 }
936 %%------------ TABLE ----------------------------------------------%%
937 \newenvironment{floatingtable}[1][v]%
938 {\@tfor \@tempa :=#1\do {\global\edef\@tside{\@tempa}}%
939  \global\advance\ftabcount by 1%
940  \iftabprocessing {\count0=\ftabcount\advance\count0 by -1%
941                    \PoS@warnl{Floating tables \the\count0\space
942                         \space and \the\ftabcount \space colliding}}\fi
943  \iffigprocessing  \PoS@warnl{Floating figure \the\ffigcount\space and 
944                         floating table \the\ftabcount\space colliding}\fi
945  \postpone@captions
946  \global\setbox\@tmpbox=\hbox\bgroup% begin of tabbox, ACTUALLY AN HBOX.
947 }
948 {%
949 \egroup% end of \tabbox,                % ACTUALLY \@tmpbox
950 \global\setlength{\floatfltwidth}{\the\wd\@tmpbox}%
951 \ifdim\floatfltwidth<.6\columnwidth%    % IF NOT TOO WIDE OK:
952   \global\setbox\tabbox=\vbox{\hsize=\floatfltwidth
953                              \def\@captype{table}%
954                              \noindent\unhbox\@tmpbox
955                              \later@capt\later@label}%
956   \global\tabprocessingtrue
957   \global\everypar={\trytab\oldeverypar}%
958   \tabinsert\par%
959 \else%                                  % ELSE NORMAL LATEX TABLE.
960 %  \PoS@mess{Floating table \the\ftabcount\space is 
961 %                       wide becomes a LaTeX float}%
962   \ifdim\floatfltwidth<1.1\columnwidth
963     \if\@tside v \def\@tside{ht}\fi
964     \def\@@tempa{\@float{table}[}\let\@@tempb\end@float
965   \else
966     \if\@tside v \def\@tside{t}\fi
967     \def\@@tempa{\@dblfloat{table}[}\let\@@tempb\end@dblfloat
968   \fi
969   \expandafter\@@tempa\@tside]%         % ACTUALLY CALL THE LATEX FLOAT
970   \center\unhbox\@tmpbox\later@capt\later@label
971   \@@tempb
972 \fi%
973 }
974 %----------- prepare for tries ----------------------------%
975 \def\figinsert{%
976    \global\nosuccesstryfig=0%
977    \global\outputpretest={\do@test}%
978    \global\tryingfigtrue \global\doingfigfalse%
979    \global\pageafterfigfalse}%
980 \def\tabinsert{%
981    \global\nosuccesstrytab=0%
982    \global\outputpretest={\do@test}%
983    \global\tryingtabtrue \global\doingtabfalse%
984    \global\pageaftertabfalse}%
985 %----------- init -----------------------------------------%
986 \AtBeginDocument{%
987  \edef\oldoutput{\the\output}
988  \output={\the\outputpretest\ifoutput\oldoutput\fi}%
989  \outputpretest={\outputtrue}%
990  \edef\oldeverypar{\the\everypar}% PERCHE' NESSUNO LO RIMETTE PIU' A POSTO?***
991 }
992 %---- tests during \outputpretest -------------------------%
993 \def\do@test{%
994    \ifnum\outputpenalty=-10005
995 %       \output
996      \setbox\pagebox=\vbox{\unvbox255}%
997      \global\pageht=\ht\pagebox
998      \global\outputfalse
999      \unvbox\pagebox
1000      \dimen0=\pageht\advance\dimen0 by 2 \baselineskip
1001      \ifdim\dimen0>\vsize\global\pageht\z@\fi
1002    \else
1003      \global\outputtrue
1004      \ifnum\outputpenalty>-\@Mi                 %ie \marginpar's give penalty.
1005         \ifdoingtab\global\pageaftertabtrue\fi
1006         \ifdoingfig\global\pageafterfigtrue\fi
1007      \fi
1008    \fi}%
1009 %-------- check for side ----------------------------------%
1010 \def\chk@side#1{% DEFINED \fl@sid, BUT IF CHOSEN A DEFAULT, ELIMINATE ALL ***
1011         {\edef\fl@sid{#1}%
1012           \if\fl@sid r\global\oddpagestrue\fi
1013           \if\fl@sid l\global\oddpagesfalse\fi
1014           \if\fl@sid p%
1015               \ifodd\c@page\global\oddpagesfalse
1016                 \else\global\oddpagestrue\fi
1017           \fi
1018           \if\fl@sid v%
1019              \ifnum\theOptionTest=0%
1020                  \ifodd\c@page\global\oddpagesfalse
1021                    \else\global\oddpagestrue\fi
1022              \else
1023                   \ifodd\theOptionTest\global\oddpagestrue
1024                     \else\global\oddpagesfalse\fi
1025              \fi
1026           \fi
1027          }}%
1028 %-------- get point in page -------------------------------%
1029 \def\get@pageht{{\everypar={\relax}\setbox0=\lastbox
1030                 \parindent=\wd0 \parskip=\z@ \par
1031                 \penalty-10005 \leavevmode}}%
1032 %-------- try at everypar ---------------------------------%
1033 \def\tryfig{%
1034         \global\fl@ht\ht\figbox
1035         \global\fl@wd\wd\figbox
1036         \global\let\fl@gut\figgutter
1037       \iftryingfig
1038         \get@pageht
1039         \dimen0=\vsize
1040         \advance\dimen0 by -\pageht
1041         \advance\dimen0 by -2\baselineskip
1042         \ifdim\dimen0>\fl@ht
1043           \chk@side\@fside
1044           \dimen0=0.3\baselineskip
1045           \vrule depth \dimen0 width \z@%height 1.5\baselineskip
1046           \vadjust{\kern -\dimen0
1047           \vtop to \dimen0{%
1048              \baselineskip=\dimen0
1049              \vss \vbox to 1ex{%
1050              \ifoddpages
1051                \hb@xt@\hsize{\hss\copy\figbox}%
1052              \else% leftsetting
1053                \hb@xt@\hsize{\copy\figbox\hss}%
1054              \fi
1055              \vss}\null}}%
1056           \global\tryingfigfalse
1057           \global\doingfigtrue
1058           \global\startpageht=\pageht
1059           \global\htdone=\z@
1060           \dohang
1061           \ifnum\nosuccesstryfig>0%
1062            \PoS@mess{Flt. fig. \the\ffigcount\space set on page \the\count0, 
1063                         shifted \the\nosuccesstryfig\space par(s) forward}%
1064 %         \else
1065 %          \PoS@mess{Floating figure \the\ffigcount\space 
1066 %                       set on page \the\count0}%
1067           \fi
1068         \else
1069           \global\advance\nosuccesstryfig by 1
1070         \fi
1071       \else%                            % IF NOT TRYING
1072         \ifdoingfig
1073           \get@pageht
1074           \global\htdone=\pageht
1075           \global\advance\htdone by -\startpageht
1076           \ifpageafterfig
1077             \global\doingfigfalse% IN CASE A PAGEBREAK JUST BELOW?
1078           \else
1079             \dimen0=\fl@ht
1080             \advance\dimen0 by .85\baselineskip % .85 ENOUGH: WE ARE AT NEW PAR
1081 %           \typeout{FLOAT HT: \the\dimen0, HTDONE: \the\htdone}
1082             \ifdim\htdone<\dimen0%
1083                 \dohang
1084             \else
1085                 \global\doingfigfalse
1086             \fi
1087           \fi
1088           \ifdoingfig\else\global\figprocessingfalse\fi% IF NO MORE DOING.
1089         \else
1090           \global\outputpretest={\outputtrue}% NOT RESTORE EVPAR IF NOT DOING?
1091         \fi%                    % END IF DOING
1092       \fi%                      % END IF TRYING
1093 }
1094 \def\trytab{%
1095         \global\fl@ht\ht\tabbox
1096         \global\fl@wd\wd\tabbox
1097         \global\let\fl@gut\tabgutter
1098        \iftryingtab
1099         \get@pageht
1100        \dimen0=\vsize
1101        \advance\dimen0 by -\pageht
1102        \advance\dimen0 by -2\baselineskip
1103        \ifdim\dimen0>\fl@ht
1104          \chk@side\@tside
1105          \dimen0=0.3\baselineskip
1106          \vrule depth \dimen0 width \z@
1107          \vadjust{\kern -\dimen0
1108          \vtop to \dimen0{%
1109              \baselineskip=\dimen0
1110              \vss \vbox to 1ex{%
1111              \ifoddpages
1112                \hb@xt@\hsize{\hss\copy\tabbox}%
1113              \else% leftsetting
1114                \hb@xt@\hsize{\copy\tabbox\hss}%
1115              \fi
1116              \vss}\null}}%
1117        \global\tryingtabfalse
1118        \global\doingtabtrue
1119        \global\startpageht=\pageht
1120        \global\htdone=\z@
1121        \dohang
1122        \ifnum\nosuccesstrytab>0%
1123         \PoS@mess{Flt. tab. \the\ftabcount\space set on page \the\count0, 
1124                         shifted \the\nosuccesstrytab\space par(s) forward}%
1125        \fi
1126      \else
1127        \global\advance\nosuccesstrytab by 1
1128      \fi
1129      \else
1130      \ifdoingtab
1131        \get@pageht
1132     \global\htdone=\pageht
1133     \global\advance\htdone by -\startpageht
1134     \ifpageaftertab
1135       \global\doingtabfalse
1136     \else
1137       \dimen0=\fl@ht
1138       \advance\dimen0 by .85\baselineskip       % .85 ENOUGH: WE ARE AT NEW PAR
1139       \ifdim\htdone<\dimen0%
1140          \dohang
1141       \else
1142          \global\doingtabfalse
1143       \fi
1144     \fi
1145     \ifdoingtab\relax\else\global\tabprocessingfalse\fi
1146   \else
1147     \global\outputpretest={\outputtrue}%
1148   \fi
1149 \fi
1150 }
1151 %----- hanging lord -----------------------------%
1152 \def\dohang{%
1153    \dimen0=\fl@ht
1154    \advance\dimen0 by -\htdone
1155    \advance\dimen0 by 1.999\baselineskip        % (16/12/98) WAS 1.49 BUT
1156    \hangcount=\dimen0                           % TEX ROUNDS ON STRICT INTEGERS
1157    \divide\hangcount by \baselineskip           % IN THIS DIVISION!
1158      \dimen0=\fl@wd
1159      \advance\dimen0 by \fl@gut
1160      \ifoddpages
1161        \global\hangindent=-\dimen0% placing right
1162      \else 
1163        \global\hangindent=\dimen0% placing left
1164      \fi
1165    \global\hangafter=-\hangcount
1166 %   \fi
1167 }
1168 %----------------------- TWO NEWITEMS ---------------------%
1169 \newcommand{\fltitem}[2][\z@]{\setlength{\fltitemwidth}{\linewidth}%
1170   \addtolength{\fltitemwidth}{-\floatfltwidth}%
1171   \addtolength{\fltitemwidth}{-0.5em}%
1172   \item \parbox[t]{\fltitemwidth}{#2}\\[#1]}
1173 \newcommand{\fltditem}[3][\z@]{\setlength{\fltitemwidth}{\linewidth}%
1174   \addtolength{\fltitemwidth}{-\floatfltwidth}%
1175   \addtolength{\fltitemwidth}{-0.5em}%
1176   \item[#2] \parbox[t]{\fltitemwidth}{#3}\\[#1]}
1177 %%%%%%\endinput
1178 %% 
1179 %% End of ex-file `floatflt.sty'.
1180
1181 %%% this is a modification to the standard latex to make bottom
1182 %%% figures appear above the footnote
1183 % problema: se nella stessa pagina ci sono una figura piccola e una
1184 % [b] o [t] dopo di essa quella piccola viene a sinistra
1185 % ma questo succede anche senza questa patch!
1186 % e con o senza footnote.
1187
1188 \newbox\JCAP@outputbox
1189 \gdef \@makecol {%
1190    \ifvoid\footins
1191      \setbox\@outputbox \box\@cclv
1192    \else
1193      \setbox\@outputbox \vbox {%
1194        \boxmaxdepth \@maxdepth
1195        \@tempdima\dp\@cclv
1196         \unvbox \@outputbox
1197        \unvbox \@cclv
1198        \vskip-\@tempdima
1199      }%
1200      \setbox\JCAP@outputbox \vbox {%
1201        \vskip \skip\footins
1202        \color@begingroup
1203          \normalcolor
1204          \footnoterule
1205          \unvbox \footins
1206        \color@endgroup
1207        }%
1208    \fi
1209    \xdef\@freelist{\@freelist\@midlist}%
1210    \global \let \@midlist \@empty
1211    \@combinefloats
1212    \ifvbox\@kludgeins
1213      \@makespecialcolbox
1214    \else
1215      \setbox\@outputbox \vbox to\@colht {%
1216        \@texttop
1217        \dimen@ \dp\@outputbox
1218        \unvbox \@outputbox
1219        \vskip -\dimen@
1220        \unvbox\JCAP@outputbox
1221        \@textbottom
1222        }%
1223    \fi
1224    \global \maxdepth \@maxdepth
1225 }
1226 %%% end of the patch
1227
1228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CAPTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1229 \newlength\abovecaptionskip
1230 \newlength\belowcaptionskip
1231 \setlength\abovecaptionskip{8\p@ plus 1pt minus 2pt}
1232 \setlength\belowcaptionskip{0\p@}
1233 \long\def\@makecaption#1#2{%
1234   \if@hyper{\edef\@pippo{the\@captype}
1235             \name{\@captype\expandafter\csname\@pippo\endcsname}}\fi%
1236   \vskip\abovecaptionskip
1237  {\let\label\@gobble%                           % FN 10.2.97 REMOVED LATEX BUG:
1238   \let\index\@gobble%                           % LARGE CAPTIONS PROCESS LABEL
1239   \let\glossary\@gobble%                        % TWO TIMES.
1240   \sbox\@tempboxa{\small {\bfseries #1:} #2}%   % 
1241   \global\dimen0\wd\@tempboxa}%                 %
1242   \ifdim \dimen0 >\hsize
1243     \small {\bfseries #1:} #2\par
1244   \else
1245     \global\@minipagefalse \sbox\@tempboxa{\small {\bfseries #1:} #2}%
1246     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
1247   \fi
1248   \vskip\belowcaptionskip}
1249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FONTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1250 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
1251 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
1252 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
1253 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
1254 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
1255 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
1256 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
1257 \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
1258 \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
1259 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TOC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1260 \newcommand\tocsecs{}
1261 \newcommand\@pnumwidth{1.55em}
1262 \newcommand\@tocrmarg{2.55em}
1263 \newcommand\@dotsep{4.5}
1264 \setcounter{tocdepth}{3}
1265 \newcommand\tableofcontents{%
1266 \if@todotoc
1267     \section*{\contentsname\label{-TOC-}}
1268     \@starttoc{toc}%
1269     \gdef\tableofcontents{\PoS@igno{\tableofcontents\space already done}}
1270 \else
1271 \PoS@ignol{\tableofcontents. Use option [toc]}
1272 \fi}
1273 \newcommand*\l@part[2]{\def\hyp@typ{part}%      
1274   \ifnum \c@tocdepth >-2\relax
1275     \addpenalty\@secpenalty
1276     \addvspace{2.25em \@plus\p@}%
1277     \begingroup
1278       \setlength\@tempdima{3em}%
1279       \parindent \z@ \rightskip \@pnumwidth
1280       \parfillskip -\@pnumwidth
1281       {\leavevmode
1282        \large \bfseries \tocsecs#1\hfil \hb@xt@\@pnumwidth{\hss
1283                 \intPlink{\hash pag#2}{#2}}}\par
1284        \nobreak
1285        \if@compatibility
1286          \global\@nobreaktrue
1287          \everypar{\global\@nobreakfalse\everypar{}}%
1288       \fi
1289     \endgroup
1290   \fi}
1291 \newcommand*\l@section[2]{\def\hyp@typ{sec}%
1292   \ifnum \c@tocdepth >\z@
1293     \addpenalty\@secpenalty
1294     \addvspace{1.0em \@plus\p@}%
1295     \setlength\@tempdima{1.8em}%        %WIDTH OF SECT. N.
1296     \begingroup
1297       \let\d@t.%
1298       \parindent \z@ \rightskip \@pnumwidth
1299       \parfillskip -\@pnumwidth
1300       \leavevmode \bfseries
1301       \advance\leftskip\@tempdima
1302       \hskip -\leftskip
1303         \tocsecs#1\nobreak\hfil %HREF HERE WOULD GET ALSO THE TITLE(...)
1304         \nobreak\hb@xt@\@pnumwidth{\hss \intPlink{\hash pag#2}{#2}}\par
1305     \endgroup
1306   \fi}
1307
1308 \newcommand*\l@subsection{\def\hyp@typ{sec}\@tocline{2}{1.8em}{2.3em}}
1309 \newcommand*\l@subsubsection{\def\hyp@typ{sec}\@tocline{3}{4.1em}{3.1em}}
1310 \newcommand*\l@paragraph{\def\hyp@typ{sec}\@tocline{4}{7.2em}{4.3em}}
1311 \newcommand*\l@subparagraph{\def\hyp@typ{sec}\@tocline{5}{10.5em}{5em}}
1312
1313 \if@hyper
1314   \let\old@dtl\@dottedtocline
1315   \def\@dottedtocline#1#2#3#4#5{\old@dtl{#1}{#2}{#3}{#4}{%
1316                                                 \intPlink{\hash pag#5}{#5}}}
1317 \fi
1318
1319 \def\@tocline#1#2#3#4#5{%
1320   \ifnum #1>\c@tocdepth \else
1321     \vskip \z@ \@plus.2\p@
1322     {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
1323      \parindent #2\relax\@afterindenttrue
1324      \interlinepenalty\@M
1325      \leavevmode
1326      \@tempdima #3\relax
1327      \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
1328      {#4}\nobreak
1329      \hfill
1330      \nobreak
1331      \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor \intPlink{\hash pag#5}{#5}}%
1332      \par}%
1333   \fi}
1334
1335
1336 %%%%%%%%%%%%%%%%%%%%%% LIST OF FIGURES AND TABLES %%%%%%%%%%%%%%%%%%%%%
1337 \if@draft                       % ONLY IF DRAFT! ... 
1338  \newcommand\listoffigures{%
1339      \section*{\listfigurename
1340        \@mkboth{\MakeUppercase\listfigurename}%
1341                {\MakeUppercase\listfigurename}}%
1342      \@starttoc{lof}%
1343      }
1344  \newcommand*\l@figure{\def\hyp@typ{figure}\@dottedtocline{1}{1.5em}{2.3em}}
1345  \newcommand\listoftables{%
1346      \section*{\listtablename
1347        \@mkboth{%
1348            \MakeUppercase\listtablename}{\MakeUppercase\listtablename}}%
1349      \@starttoc{lot}%
1350      }
1351  \newcommand*\l@table{\def\hyp@typ{table}\@dottedtocline{1}{1.5em}{2.3em}}
1352 \else
1353  \newcommand\listoffigures{\PoS@ignol{List of figures (draft mode only)}}
1354  \newcommand\listoftables{\PoS@ignol{List of tables (draft mode only)}}
1355 \fi
1356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY %%%%%%%%%%%%%%%%%%%%%%%%%%%%***
1357 \newdimen\bibindent
1358 \setlength\bibindent{1.5em}
1359 \newenvironment{thebibliography}[1]%    %UNFORTUNATELY MODIFIED..
1360      {\bgroup\raggedright\small\section*{\refname
1361         \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}}%
1362       \list{\name{bib\@arabic\c@enumiv}% HOPE!
1363             \@biblabel{\@arabic\c@enumiv}}%
1364            {\settowidth\labelwidth{\@biblabel{#1}}%
1365             \leftmargin\labelwidth
1366             \advance\leftmargin\labelsep
1367             \@openbib@code
1368             \usecounter{enumiv}%
1369             \let\p@enumiv\@empty
1370             \renewcommand\theenumiv{\@arabic\c@enumiv}}%
1371       \sloppy\clubpenalty4000\widowpenalty4000%
1372       \sfcode`\.\@m}
1373      {\def\@noitemerr
1374        {\@latex@warning{Empty `thebibliography' environment}}%
1375       \endlist\egroup}
1376 \newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
1377 \if@draft
1378  \let\old@bbt\@bibitem\let\old@lbbt\@lbibitem% LOOK THE DISASTER HERE BELOW.
1379  \def\@lbibitem[#1]#2{\old@lbbt[#1]{#2}\reversemarginpar{\sf\bfseries\small#2}}
1380  \def\@bibitem#1{\old@bbt{#1}\reversemarginpar{\sf\bfseries\small#1}}
1381 \fi
1382 \let\@openbib@code\@empty
1383
1384 \newcommand{\pos}[1]{\href{http://pos.sissa.it/cgi-bin/reader/contribution.cgi?id=#1}{\tt #1}}
1385 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FOOTNOTES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1386 \skip\footins = 1\bigskipamount plus 2pt minus 4pt
1387
1388 \addtolength{\footnotesep}{1pt}
1389 \renewcommand\footnoterule{%    % NO HYPER...
1390   \kern-3\p@
1391   \hrule\@width.4\columnwidth
1392   \kern2.6\p@}
1393 \newcommand\@makefntext[1]{%
1394     \parindent 20.39995pt%
1395 %\setlength\parindent{20pt} 
1396    \noindent
1397     \hb@xt@\parindent{\hss\@makefnmark}#1}
1398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% NAMES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1399 \newcommand\contentsname{Contents}
1400 \if@draft\newcommand\listfigurename{List of figures}
1401          \newcommand\listtablename{List of tables}\fi
1402 \newcommand\refname{References}
1403 \newcommand\indexname{Index}
1404 \newcommand\figurename{Figure}
1405 \newcommand\tablename{Table}
1406 \newcommand\partname{Part}
1407 \newcommand\appendixname{Appendix}
1408 \newcommand\abstractname{Abstract:}
1409 \newcommand\acknowlname{Acknowledgments}
1410
1411 \newcommand\today{}
1412 \edef\today{\ifcase\month\or
1413   January\or February\or March\or April\or May\or June\or
1414   July\or August\or September\or October\or November\or December\fi
1415   \space\number\day, \number\year}
1416
1417 \setlength\columnsep{20\p@}
1418 \setlength\columnseprule{0\p@}
1419 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFAULTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1420 \pagestyle{PoS}
1421 \pagenumbering{arabic}
1422 \@addtoreset{equation}{section}
1423                 \let\pagestyle\@gobble
1424                 \let\thispagestyle\@gobble
1425                 \let\pagenumbering\@gobble
1426 \onecolumn
1427                                                 
1428 % FOR REQUESTED FRONTMATTER ...
1429 \AtBeginDocument{\bgroup%               SOME NICE (LOCAL) MESSAGES... 
1430         \def\@APPwarn#1{\PoS@warnl{\protect#1 should appear 
1431                                         before \protect\begin{document}}}%
1432         \def\@APPerr#1{\ClassError{PoS}{\protect#1 should appear 
1433                                         before \protect\begin{document}}}%
1434         \if@author\else\@APPerr{Some \protect\author{...}}\fi
1435         \if@abstract\else\@APPerr{\abstract{...}}\fi
1436         \if@conf\else\@APPerr{\FullConference{...}}\fi
1437         \if@shorttitle\else\@APPerr{\ShortTitle{...}}\fi
1438         \egroup
1439         \auto@maketitle
1440         \if@speaker\else\PoS@warnl{One \protect\speaker{...}
1441                         must be specified among authors}\fi
1442                         \if@dblspeak\PoS@warnl{A single \protect\speaker{...}
1443                         should appear in proceedings}\fi
1444 }
1445 \endinput
1446 %% 
1447 %% End of file `PoS.cls'.