% \iffalse 
%<*internal>
\iffalse
%</internal>
%<*readme>
______________
The ICSV class
v0.2

This is an ad-hoc class for typesetting articles for the ICSV conference, 
based on the previously hacked together active-conf by the same author.

Hopefully it's useful to someone. Contact me for refinements or if things 
don't work.

______________
Will Robertson
wspr 81 [at] gmail [dot] com

Copyright 2006
Distributed under the LaTeX Project Public License
%</readme>
%<*internalbatchfile>
\fi
\begingroup
%</internalbatchfile>
%<*batchfile>
\input docstrip.tex
\keepsilent
\preamble
  ______________________________
  Copyright 2006  Will Robertson

  License information appended.

\endpreamble
\postamble

Copyright 2006 by Will Robertson <wspr81@gmail.com>

Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
this license is at: http://www.latex-project.org/lppl.txt

This work is "maintained" (as per LPPL maintenance status) 
by Will Robertson.

This work consists of the file  icsv.dtx
          and the derived files icsv.cls and icsv.ins
          and the documentation icsv.pdf.

\endpostamble
\askforoverwritefalse
\generate{\file{\jobname.cls}{\from{\jobname.dtx}{classfile}}}
%</batchfile>
%<batchfile>\endbatchfile
%<*internalbatchfile>
\generate{\file{\jobname.ins}{\from{\jobname.dtx}{batchfile}}}
\nopreamble\nopostamble
\generate{\file{README.txt}{\from{\jobname.dtx}{readme}}}
\generate{\file{\jobname-dtx.sty}{\from{\jobname.dtx}{dtx-style}}}
\endgroup
%</internalbatchfile>
%
%<*driver>
\ProvidesFile{icsv.dtx}
%</driver>
%<classfile>\ProvidesClass{icsv}
%<*classfile>
  [2006/07/25 v0.2 Class file for ICSV]
%</classfile>
%
%<*driver>
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
%\OnlyDescription
\usepackage{\jobname-dtx}
\begin{document}
  \GetFileInfo{icsv.dtx}
  \DocInput{\jobname.dtx}
\end{document}
%</driver>
%
% \fi
%
% \CheckSum{622}
% \errorcontextlines=20
%
% \DoNotIndex{\@tempa,\@tempb,\@temptokena}
% \DoNotIndex{\begin,\begingroup,\bgroup}
% \DoNotIndex{\def}
% \DoNotIndex{\edef,\egroup,\end,\endgroup,\else,\expandafter}
% \DoNotIndex{\fi}
% \DoNotIndex{\if,\ifnum,\let}
% \DoNotIndex{\relax,\RequirePackage}
% \DoNotIndex{\the,\then}
%
% \makeatletter
%
% \title{The \pkg{icsv} class}
% \author{Will Robertson}
% \date{\filedate \qquad \fileversion}
%
% \maketitle
%
% \begin{abstract}\noindent
% This document describes the \LaTeX\ class \pkg{icsv}, an unofficial
% template for typesetting papers for the International Congress on Sound and Vibration.
% \end{abstract}
%
% \tableofcontents
%
% \section{About this document}
%
% This document contains the usage and implementation of the \pkg{icsv} class. 
% Users will almost certainly be interested in the former. This \textsc{pdf} contains
% hyperlinks within it to aid navigation (these are typeset in {\color{red}red}), and 
% hyperlinks to internet sites to help find further information (these are typeset in 
% {\color{blue}blue}).
%
% The source of this document, \texttt{icsv.dtx}, when run through \LaTeX, 
% will produce both the PDF documentation (the file you are currently reading) 
% \emph{and} the class file used to typeset your articles.
%
% \section{Description and usage}
% This section describes how to use the class.
% Please refer to the example document for context.
%
% There \emph{must} be an image called \texttt{icsv-logo} in the current
% directory to display the logo for the conference. This graphic should
% be supplied by the conference organisers.
%
% \subsection{Document preamble}
% \DescribeMacro{\documentclass}
% Use this class with standard \LaTeX\ parlance: |\documentclass{icsv}|.
%
% The document will be set up to use A4 paper with 38\,mm margins top and bottom, 32\,mm margins left and right. 
% The body text font is 12\,pt Times.
% \note{That is, the nominal text font size is 12\,pt, and the distance between baselines
%       is unchanged; if space allows, better results will be achieved with \cmd\linespread\ of 1.05 or so.}
% The sans serif font is Helvetica\relax
% \footnote{Scaled to match Times' x-height 
%   (\ie, the lowercase letters are the same height in both alphabets)} 
% and the fixed width font (or typewriter font) is `TXTT'.
%
% The following packages are loaded either to change the formatting for this conference or for the convenience of the user: 
%  \pkg[http://tug.ctan.org/tex-archive/macros/latex/required/amslatex/math/]{amsmath}, 
%  \pkg[http://tug.ctan.org/tex-archive/macros/latex/required/amslatex/math/]{amssymb}, 
%  \pkg[http://www.ctan.org/tex-archive/macros/latex/required/tools/]{array}, 
%  \pkg[http://tug.ctan.org/tex-archive/macros/latex/required/tools/]{bm}, 
%  \pkg[http://www.ctan.org/tex-archive/macros/latex/contrib/caption/]{caption},
%  \pkg[http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/]{fancyhdr},
%  \pkg[http://tug.ctan.org/tex-archive/macros/latex/required/graphics/]{graphicx},
%  \pkg[http://www.ctan.org/tex-archive/macros/latex/contrib/hyperref/]{hyperref}.\relax
% \footnote{Look for file \texttt{amsldoc.pdf} for \pkg{amsmath} \& \pkg{amssymb}
%   documentation; file \texttt{grfguide.pdf} for \pkg{graphicx} documentation; file \texttt{manual.pdf} in the \texttt{doc/} subdirectory for \pkg{hyperref} documentation.} 
% Of the above, a recent version of the \pkg{caption} package is required.
% Other packages are required for the class but they aren't of particular interest 
% for the purposes of the author; refer to the Implementation (\secref{packages}) 
% for more information. Extra packages may also be loaded if desired, provided that 
% they do not change the layout or text fonts used in the document.
%
% \subsection{Frontmatter metadata}
% \DescribeMacro{\title}
% \DescribeMacro{\author}
% \DescribeMacro{\email}
% \DescribeMacro{\address}
% This class provides added procedures to typeset extra information in the frontmatter 
% of the article. This information must be specified before \cmd\maketitle. \cmd\title\
% remains the same, but \cmd\author\ is changed and \cmd\email, and \cmd\address\
% are all completely new. 
%
% \DescribeMacro{\maketitle}
% Once the metadata has been specified, the \cmd\maketitle\ command is used
% to create the title block containing this information. To be illustrative, 
% an example best demonstrates the use of the new frontmatter commands. 
% See \figref{fm} for a typical input. 
%
% \begin{figure}
% \begin{verbatim}
% \author{A.\,B.~C------} \email{abc@university}
% \author{D.\,E.~F------}
% \address{University \\ City, State \\ Country}
% \end{verbatim}
% \caption{Example of the frontmatter in the \pkg{icsv} class.}
% \label{fig:fm}
% \end{figure}
%
% \begin{figure}
% \begin{verbatim}
% \showaffiliations
%
% \author[1]{A.\,B.~C------} \email{abc@university}
% \author[1,2]{D.\,E.~F------}
% \author[2]{G.\,H.~I------} \email{ghi@company}
%
% \address{University \\ City, State \\ Country}
% \address{Company \\ City, State \\ Country}
% \end{verbatim}
% \caption{More complicated frontmatter example.}
% \label{fig:fm2}
% \end{figure}
%
% \DescribeMacro{\showaffiliations}
% If the command \cmd\showaffiliations\ is placed before the author declarations,
% each author will reference the address to which they are associated.
% An argument to \cmd\author\ must now be used to specify which addresses
% are referenced as affiliations; for example |\author[1,3]{A.\,N.~Author}| designates
% an affiliation for this author with the first and third addresses.
% An example of this form is shown in \figref{fm2}.
%
% This functionality is slightly fragile and will hopefully receive improvement in the future.
% Let me know if you have troubles.
%
% \DescribeMacro{\pdfkeywords}
% Finally, optional, comma-separated keywords may be added to the paper with
% the command in the margin:
% \begin{verbatim}
%   \pdfkeywords{Active noise control, Virtual microphones}
% \end{verbatim}
%
% \subsection{Floats: figures and tables}
% \DescribeEnv{figure}
% \DescribeEnv{table}
% Small enhancement has been made to using figures and 
% tables. Both are automatically centred on the page, so no explicit commands for doing so are 
% required. Secondly, the default float placement parameter is \texttt{[htbp]},\relax
%\footnote{That is, floats will be placed at the position of their definition 
%   if possible; otherwise they will be placed at the top or bottom of a 
%   subsequent text page or on a page consisting of only floats in the last resort.} 
% so the optional argument generally won't be required. See a \LaTeX\ manual for more info.
%
% 
%
%
% \StopEventually{}
%
% \clearpage
% \section{Implementation}
%
% This section contains the commented source code of this package. It is not
% intended to be useful or interesting to the majority of users of the class.
%
% This class was hastily converted from the pkg{active-conf} class, written
% by the author for another conference. Don't expect brilliance within!
%
% \iffalse
%<*classfile>
% \fi
%
% \subsection{Class and package loading}\label{sec:packages}
% Base everything off the eponymous \pkg{article} class. Set up the fonts\relax
% \footnote{Note that we need to call \cmd\normalfont\ after selecting the new fonts
%   and before selecting the new encoding in order to ensure that \texttt{T1} `CM' 
%   fonts aren't loaded, which can cause an error in some distributions.}, 
% and load a bunch of packages first to set up the document properties and second 
% for the convenience of the user.
%    \begin{macrocode}
\LoadClass[12pt,twoside]{article}
\RequirePackage[a4paper,vmargin=38mm,hmargin=32mm,ignoreall]{geometry}
\RequirePackage{amsmath,amssymb,array,bm,calc,fancyhdr,fixltx2e,fix-cm,graphicx,hyperref,ifthen}
\RequirePackage{caption}[2006/01/12]
\hypersetup{
  colorlinks,
  linkcolor=black,
  anchorcolor=black,
  citecolor=black,
  filecolor=black,
  menucolor=black,
  pagecolor=black,
  urlcolor=black,
  pdfstartview=FitH,
  pdfpagelayout=SinglePage
  }
%    \end{macrocode}
% \paragraph{Fonts}
% Note that I \emph{have not} taken the liberty of using the Times maths fonts\footnote{Either via the \pkg{mathptm} or \pkg{mathptmx} packages.} as well, since Computer Modern maths does the job quite nicely (and moreover, contains bold Greek symbols~--~how can there be no bold maths in the Times maths fonts?).
%    \begin{macrocode}
\renewcommand\rmdefault{ptm}
\renewcommand\ttdefault{txtt}
\RequirePackage[scaled=0.87]{helvet}
\normalfont
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
%    \end{macrocode}
% Finally, get rid of extra space after punctuation (it's old-fashioned) and increase the leading between the lines; we need this due to such long lines with so many characters in each. We also want no page numbers, since numbers will be added after all the papers are collated into the proceedings.
%    \begin{macrocode}
\frenchspacing
\setlength\parindent{1.5em}
%    \end{macrocode}
% \subsection{Formatting specification}
% Use the \pkg{caption} package to format captions, and the \pkg{fancyhdr} package for running headers.
%    \begin{macrocode}
\captionsetup{labelsep=endash,font={small,it}}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[CE]{\footnotesize \pdf@authors}
\fancyhead[CO]{\footnotesize ICSV13, July 2--6, Vienna, Austria} 
%    \end{macrocode}
% \begin{macro}{\section}\begin{macro}{\subsection}
% \begin{macro}{\subsubsection}\begin{macro}{\paragraph}
% \begin{macro}{\subparagraph}
% Nobody ever uses \cmd\subparagraph, so let's remove it. 
%    \begin{macrocode}
\setcounter{secnumdepth}{0}
\renewcommand\section{\@startsection{section}{1}{\z@}%
                                   {-1.6\baselineskip}%
                                   {0.8\baselineskip}%
                                   {\centering\bfseries\MakeUppercase}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-0.8\baselineskip}%
                                     {0.8\baselineskip}%
                                     {\bfseries}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                    {-0.8\baselineskip}%
                                    {0.8\baselineskip}%
                                    {\bfseries\itshape}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {0.8\baselineskip}%
                                    {-0.8\baselineskip}%
                                    {\bfseries}}
\let\subparagraph\undefined
%    \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
%
% \begin{environment}{abstract}
% The most important part is removing the indent that exists in \pkg{article}!
%    \begin{macrocode}
\renewenvironment{abstract}
  {\vspace{\baselineskip}\fontsize{11}{11}\selectfont
   {\fontsize{13}{13}\bfseries\noindent Abstract\par}
   \noindent\ignorespaces}
  {\par}
%    \end{macrocode}
% \end{environment}
%
% \begin{environment}{itemize}
% \begin{environment}{enumerate}
% Decrease the amount of vertical space between items in the \env{itemize} and \env{enumerate} environments. Renew the \LaTeX-defined ones in order to adjust all necessary bits and pieces.
%    \begin{macrocode}
\def\list@spacing{%
  \parsep    4pt
  \itemsep   0pt
  \topsep    6pt
  \partopsep 0pt}
\def\enumerate{% 
  \ifnum \@enumdepth > \thr@@\@toodeep\else 
    \advance\@enumdepth\@ne 
    \edef\@enumctr{enum\romannumeral\the\@enumdepth}% 
      \expandafter 
      \list 
        \csname label\@enumctr\endcsname 
        {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}%
         \list@spacing}% 
  \fi} 
\let\endenumerate\endlist  
\def\itemize{% 
  \ifnum \@itemdepth > \thr@@\@toodeep\else 
    \advance\@itemdepth\@ne 
    \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% 
    \expandafter 
    \list 
      \csname\@itemitem\endcsname 
      {\def\makelabel##1{\hss\llap{##1}}%
       \list@spacing}% 
  \fi} 
\let\enditemize\endlist
%    \end{macrocode}
% \end{environment}
% \end{environment}
%
% \begin{environment}{itemise}
% Provide an environment with the correct spelling of `itemize'.
%    \begin{macrocode}
\let\itemise\itemize     
\let\enditemise\enditemize   
%    \end{macrocode}
% \end{environment}
%
% \begin{macro}{\descriptionlabel}
% Change the description label to italics instead of bold.
%    \begin{macrocode}
\renewcommand*\descriptionlabel[1]{\hspace\labelsep
                                \normalfont\bfseries #1}
%    \end{macrocode}
% \end{macro}
%
% \paragraph{Figures and tables}
%
% \begin{macro}{\fps@figure}
% \begin{macro}{\fps@table}
% Make the default float placement \texttt{[htbp]}; users will always do it themselves anyway\dots
%    \begin{macrocode}
\def\fps@figure{htbp}
\def\fps@table{htbp}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
% \begin{environment}{figure}
% \begin{environment}{table}
% Add \cmd\centering\ to the \env{figure} and \env{table} environments.
% This requires a trick: \cmd{\fps@...} must be expanded, so we can't just
% pass through |#1|. Instead, put everything, expanding all except the 
% \cmd\@float\ command, in a temporary macro, and then use that to produce the float.
%    \begin{macrocode}
\renewenvironment{figure}[1][\fps@figure]
                 {\edef\@tempa{\noexpand\@float{figure}[#1]}
                  \@tempa\centering}
                 {\end@float}
\renewenvironment{table}[1][\fps@table]
                 {\edef\@tempa{\noexpand\@float{table}[#1]}
                  \@tempa\centering}
                 {\end@float}
%    \end{macrocode}
% \end{environment}\end{environment}
% With the \pkg{array} package, add more height to the table rows so that horizontal
% rules don't look ugly. But only if the \pkg{booktabs} package isn't loaded, since it
% performs similar operations itself.
%    \begin{macrocode}
\AtBeginDocument{%
  \@ifpackageloaded{booktabs}{}{\setlength\extrarowheight{2pt}}}
%    \end{macrocode}
%    \begin{macrocode}
% Better float parameters: (from the TeX FAQ)
\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
%    \end{macrocode}
%
% \subsection{Frontmatter}
% \begin{macro}{\maketitle}
% This is changed somewhat from the default classes.
% No proper documentation at the moment, I'm afraid.
%    \begin{macrocode}
\renewcommand\maketitle{%
  \thispagestyle{empty}\noindent
  \begin{minipage}{\textwidth}
    \renewcommand\footnoterule{\vspace{-1ex}}%
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \global\@topnum\z@   % Prevents figures from going at top of page.
    \begin{center}
      \vspace{-3cm}
      \includegraphics[height=4cm]{icsv-logo}%
    \end{center}
    \vspace{1sp}%
    \begin{center}
      \bfseries\fontsize{15}{17}\selectfont\MakeUppercase{\@title}%
    \end{center}
    \vspace{-2.5ex}%
    \def\@makefnmark{\smash{\textsuperscript{\@thefnmark}}}%
    {\parindent\z@
     \leftskip\@flushglue
     \rightskip\@flushglue
     \parfillskip\z@
     \address@list\par}
     \def\thempfootnote{\@fnsymbol\c@mpfootnote}
    \after@maketitle
  \end{minipage}
  \hypersetup{pdfauthor={\pdf@authors},pdftitle={\@title}}%
  \vspace{2ex}\par}
\let\after@maketitle\@empty
%    \end{macrocode}
% \end{macro}
%
%  \begin{macro}{\pdfkeywords}
% A hook directly into \pkg{hyperref}.
%    \begin{macrocode}
\newcommand\pdfkeywords[1]{\hypersetup{pdfkeywords={#1}}}
%    \end{macrocode}
%  \end{macro}
%
% 
%
% \begin{macro}{\author@init}
% \begin{macro}{\author@list}
% \begin{macro}{\author}
% \cmd{\author@init} is the top-level macro that creates a `fresh' definition of \cmd\author\ and initialises the \cmd{\author@list} macro. \cmd\author\ simply populates \cmd{\author@list} with a list of authors, separated by the macro \cmd{\author@sep}. The definition is set up to redefine itself the first time it is called so that \cmd{\author@sep} is only inserted \emph{after} this first time.
%
% \cmd{\author@list} is used as the first line in every address block, so once \cmd\address\ is called, \cmd{\author@init} is called again for the next list of authors that happen to work at a different address.
%    \begin{macrocode}
\def\author@init{%
  \def\@@author##1{%
    \g@addto@macro\author@list{##1}%
    \def\@@author####1{\g@addto@macro\author@list{\author@sep ####1}}}%
  \let\author@list\@empty}
\author@init
\renewcommand\author[2][\c@affiliation]{%
  \ifx\pdf@authors\@empty\else
    \g@addto@macro\pdf@authors{, }%
  \fi
  \g@addto@macro\pdf@authors{#2}%
  \g@addto@macro\author@list{\mbox\bgroup}%
  \@@author{#2}%
  \if@showaff
    \@for\@@index :=#1\do{%
      \expandafter\g@addto@macro
      \expandafter\author@list
      \expandafter{%
      \expandafter\place@affiliation
      \expandafter{%
                   \@@index}}%
    }
  \fi
  \g@addto@macro\author@list{\egroup}}
\newcommand\place@affiliation[1]{\kern1pt\textsuperscript{#1}}
\let\pdf@authors\@empty
%    \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
% \begin{macro}{\email}
% This macro is intended to be used immediately after an \cmd\author\ declaration, and it simply appends a footnote to the current author detailing their email address. Because we aren't evaluating these things until the end, we regrettably need to spend some effect to replicate the effect that \cmd\footnotemark\ has on \cs{c@footnote}. This could almost certainly be more elegant.
%    \begin{macrocode}
\def\email#1{%
  \g@addto@macro\author@list{\kern1pt\footnotemark}%
  \g@addto@macro\after@maketitle{%
    \stepcounter{footnote}%
    \footnotetext[\the\c@footnote]{\centering\url{#1}}}}
\g@addto@macro\after@maketitle{\setcounter{footnote}{0}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\address@list}
% This is the macro used to hold all of the address blocks. Some of its contents is \emph{unexpanded} until \cmd\maketitle, notably the width of the minipages used to typeset the blocks.
%    \begin{macrocode}
\let\address@list\@empty
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\@@authorhook}
% \begin{macro}{\@@addresshook}
% And these are the macros used to format the text in the address blocks. They're enclosed in a group so don't worry about having to confine state. Unfortunately, it's \emph{not} set up to take an argument, state-changing arguments must be used (\eg, \cmd\sffamily, \cmd\itshape, \cmd\small).
%    \begin{macrocode}
\providecommand\@@authorhook{}
\providecommand\@@addresshook{\vspace{1ex}\fontsize{11}{13}\selectfont}
%    \end{macrocode}
% \end{macro} \end{macro}
% \begin{macro}{\address}
% This macro is used after any number of \cmd\author\ declarations. It takes the list of authors and typesets them in a box above the specified address. Everything is measured and later put into boxes of equal width so that spacing with several address blocks looks okay.
%
% The trick is to use one of \TeX's vertical boxes, and populate it with restricted-mode horizontal boxes---this makes the \cmd\vbox\ behave ``as expected'' and stretch to exactly the width it requires to typeset everything. The downside to this method is that restricted-mode \cmd\hbox's are required. What does this mean? `Normal' things like paragraph breaks and literal newlines aren't allowed, since we're typesetting in one long horizontal box.
%
% Obviously, people will want to write multi-line addresses, so we can get around the horiz.\ box problem by defining \cmd{\\} to end the current \cmd\hbox\ and start another. The following verbatim sketches the idea\dots
% \begin{verbatim}
% \address{abc \\ def \\ ghi} => \vbox{ ... \hbox{abc \\ def \\ ghi} }
%                          \\ => }\hbox{
%    \hbox{abc \\ def \\ ghi} => \hbox{abc }\hbox{ def }\hbox{ ghi}
% \end{verbatim}
% This leaves out the details, like absorbing the leading space we don't want, and re-applying the address-block formatting hook.
% Finally, at the end of the address, we need to initialise the various author macros so that a fresh lot of authors can be defined for their own subsequent address block.
%    \begin{macrocode}
\def\address#1{%
  \begingroup
    \let\footnotemark\relax
    \def\\{\egroup\hbox\bgroup\@@addresshook\ignorespaces}
    \sbox\tempbox{%
      \vbox{%
        \hbox{\strut\@@authorhook\author@list}
        \hbox{\@@addresshook #1}}}
    \settowidth\templength{\usebox\tempbox}
    \ifthenelse{\lengthtest{\templength>0.49\linewidth}}{\global\boxwidth\linewidth}{%
      \ifthenelse{\lengthtest{\templength>\boxwidth}}{\global\boxwidth\templength}{}}%
    \expandafter\make@address@box\expandafter{\author@list}{#1}
  \endgroup
  \author@init}
\newlength\boxwidth
\newlength\templength
\newbox\tempbox
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\make@address@box}
% This macro is broken out for easy of supplying an expanded \cmd{\author@list} to the middle of a \cmd{\g@addto@macro} declaration. Note well that \cmd\boxwidth\ isn't evaluated until \cmd{\address@list} is expanded in \cmd\maketitle.
%    \begin{macrocode}
\newcommand\make@address@box[2]{%
  \g@addto@macro\address@list{%
    \begin{minipage}[t]{\boxwidth+10pt}%
      \centering
      \def\@tempa{#1}%
      \ifx\@tempa\@empty
      \else
        \vspace*{\medskipamount}%
        {\@@authorhook#1\par\vspace{3pt}}
      \fi
      {\linespread{0.9}%
       \@@addresshook
       \if@showaff
         \makebox[0pt][r]{\textsuperscript{\number\c@affiliation}}%
       \fi
       \ignorespaces#2\par}
    \end{minipage}%
    \stepcounter{affiliation}%
    \hskip\@flushglue}}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\newcounter{affiliation}
\stepcounter{affiliation}
\g@addto@macro\after@maketitle{\setcounter{affiliation}{1}}
\newif\if@showaff   
\newcommand\showaffiliations{\@showafftrue} 
%    \end{macrocode}
%
% Don't look at the following definition! Yuck!
%    \begin{macrocode}
\def\author@sep{,~\,}
%    \end{macrocode}
%
% The following is taken from my very own \pkg{fontspec} package, and is
% used to change \cmd\mathrm\ to Times Roman without destroying those aspects
% of default Computer Modern maths that assume that \cmd\rmdefault\ is \texttt{cmr}.
%    \begin{macrocode}
\let\zf@font@warning\@font@warning
\let\@font@warning\@font@info
\DeclareSymbolFont{legacymaths}{OT1}{cmr}{m}{n}
\SetSymbolFont{legacymaths}{bold}{OT1}{cmr}{bx}{n}
\DeclareMathAccent{\acute}   {\mathalpha}{legacymaths}{19}
\DeclareMathAccent{\grave}   {\mathalpha}{legacymaths}{18}
\DeclareMathAccent{\ddot}    {\mathalpha}{legacymaths}{127}
\DeclareMathAccent{\tilde}   {\mathalpha}{legacymaths}{126}
\DeclareMathAccent{\bar}     {\mathalpha}{legacymaths}{22}
\DeclareMathAccent{\breve}   {\mathalpha}{legacymaths}{21}
\DeclareMathAccent{\check}   {\mathalpha}{legacymaths}{20}
\DeclareMathAccent{\hat}     {\mathalpha}{legacymaths}{94}
\DeclareMathAccent{\dot}     {\mathalpha}{legacymaths}{95}  
\DeclareMathAccent{\mathring}{\mathalpha}{legacymaths}{23}
\DeclareMathSymbol{!}{\mathclose}{legacymaths}{33}
\DeclareMathSymbol{:}{\mathrel}  {legacymaths}{58}
\DeclareMathSymbol{;}{\mathpunct}{legacymaths}{59}
\DeclareMathSymbol{?}{\mathclose}{legacymaths}{63}
\DeclareMathSymbol{0}{\mathalpha}{legacymaths}{`0}
\DeclareMathSymbol{1}{\mathalpha}{legacymaths}{`1}
\DeclareMathSymbol{2}{\mathalpha}{legacymaths}{`2}
\DeclareMathSymbol{3}{\mathalpha}{legacymaths}{`3}
\DeclareMathSymbol{4}{\mathalpha}{legacymaths}{`4}
\DeclareMathSymbol{5}{\mathalpha}{legacymaths}{`5}
\DeclareMathSymbol{6}{\mathalpha}{legacymaths}{`6}
\DeclareMathSymbol{7}{\mathalpha}{legacymaths}{`7}
\DeclareMathSymbol{8}{\mathalpha}{legacymaths}{`8}
\DeclareMathSymbol{9}{\mathalpha}{legacymaths}{`9}
\DeclareMathSymbol{\Gamma}{\mathalpha}{legacymaths}{0}
\DeclareMathSymbol{\Delta}{\mathalpha}{legacymaths}{1}
\DeclareMathSymbol{\Theta}{\mathalpha}{legacymaths}{2}
\DeclareMathSymbol{\Lambda}{\mathalpha}{legacymaths}{3}
\DeclareMathSymbol{\Xi}{\mathalpha}{legacymaths}{4}
\DeclareMathSymbol{\Pi}{\mathalpha}{legacymaths}{5}
\DeclareMathSymbol{\Sigma}{\mathalpha}{legacymaths}{6}
\DeclareMathSymbol{\Upsilon}{\mathalpha}{legacymaths}{7}
\DeclareMathSymbol{\Phi}{\mathalpha}{legacymaths}{8}
\DeclareMathSymbol{\Psi}{\mathalpha}{legacymaths}{9}
\DeclareMathSymbol{\Omega}{\mathalpha}{legacymaths}{10}
\DeclareMathSymbol{+}{\mathbin}{legacymaths}{43}
\DeclareMathSymbol{=}{\mathrel}{legacymaths}{61}
\DeclareMathDelimiter{(}{\mathopen} {legacymaths}{40}{largesymbols}{0}
\DeclareMathDelimiter{)}{\mathclose}{legacymaths}{41}{largesymbols}{1}
\DeclareMathDelimiter{[}{\mathopen} {legacymaths}{91}{largesymbols}{2}
\DeclareMathDelimiter{]}{\mathclose}{legacymaths}{93}{largesymbols}{3}
\DeclareMathDelimiter{/}{\mathord}{legacymaths}{47}{largesymbols}{14}
\DeclareMathSymbol{\mathdollar}{\mathord}{legacymaths}{36}
\DeclareSymbolFont{operators}\encodingdefault\rmdefault\mddefault\updefault
\SetSymbolFont{operators}{normal}\encodingdefault\rmdefault\mddefault\updefault
\SetMathAlphabet\mathrm{normal}\encodingdefault\rmdefault\mddefault\updefault
\SetMathAlphabet\mathit{normal}\encodingdefault\rmdefault\mddefault\itdefault
\SetMathAlphabet\mathbf{normal}\encodingdefault\rmdefault\bfdefault\updefault
\SetMathAlphabet\mathsf{normal}\encodingdefault\sfdefault\mddefault\updefault
\SetMathAlphabet\mathtt{normal}\encodingdefault\ttdefault\mddefault\updefault
\SetSymbolFont{operators}{bold}\encodingdefault\rmdefault\bfdefault\updefault
\SetMathAlphabet\mathrm{bold}\encodingdefault\rmdefault\bfdefault\updefault
\SetMathAlphabet\mathit{bold}\encodingdefault\rmdefault\bfdefault\itdefault
\SetMathAlphabet\mathsf{bold}\encodingdefault\sfdefault\bfdefault\updefault
\SetMathAlphabet\mathtt{bold}\encodingdefault\ttdefault\bfdefault\updefault
\let\font@warning\zf@font@warning
%    \end{macrocode}
% The end! Thanks for coming.
%\iffalse
%</classfile>
%\fi
%
% \clearpage
% \begingroup
% \renewenvironment{theglossary}
%   {\small\list{}{}
%      \item\relax
%      \glossary@prologue\GlossaryParms 
%      \let\item\@idxitem \ignorespaces 
%      \def\pfill{\hspace*{\fill}}}
%   {\endlist}
% \PrintChanges
% \endgroup
%
% \setcounter{IndexColumns}{2}
% \PrintIndex
%
% \Finale
%
%\iffalse
%
%
%<*dtx-style>
%    \begin{macrocode}
\ProvidesPackage{icsv-dtx}

% Better float parameters: (from the TeX FAQ)
\renewcommand{\topfraction}{.85}
\renewcommand{\bottomfraction}{.7}
\renewcommand{\textfraction}{.15}
\renewcommand{\floatpagefraction}{.66}
\renewcommand{\dbltopfraction}{.66}
\renewcommand{\dblfloatpagefraction}{.66}
\setcounter{topnumber}{9}
\setcounter{bottomnumber}{9}
\setcounter{totalnumber}{20}
\setcounter{dbltopnumber}{9}
% Section heading customisation:
\renewcommand\section{\@startsection {section}{1}{\z@}%
                                   {-3ex \@plus -1ex \@minus -.2ex}%
                                   {2ex \@plus 0.2ex}%
                                   {\centering\normalsize\scshape}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-2.5ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus 0.2ex}%
                                     {\centering\normalsize\itshape}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                     {-2ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus 0.2ex}%
                                     {\centering\normalfont\normalsize}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {3.25ex \@plus1ex \@minus.2ex}%
                                    {-1em}%
                                    {\normalfont\normalsize\itshape}}
\let\subparagraph\undefined
\def\@maketitle{%
  \newpage
  {\centering
   {\large\@title\par}\vskip1em
   \textsc\@author\par\vskip1em
   \@date\par}\vskip2em}
% Abstract customisation:
\renewenvironment{abstract}{%
  \begin{trivlist}\item[]
    \setlength\leftskip{0.15\textwidth}
    \setlength\rightskip{0.15\textwidth}
    \small\textit{Abstract}\quad}{\end{trivlist}}                                      
% TOC customisation: Make it two-column to save space;
%   Remove leaders in the TOC, replace with \quad.
\setcounter{tocdepth}{2}
\renewcommand\tableofcontents{%
  \section*{\contentsname}
  \begin{trivlist}\item[]
    \begin{multicols}{2}
      \setlength\parskip{0pt}
      \small
      \@starttoc{toc}%
    \end{multicols}
  \end{trivlist}}
\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{1.5em}%
    \begingroup
      \raggedright
      \parindent \z@ 
      \rightskip \z@
      \parfillskip \@flushglue
      \leavevmode
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\quad\nobreak#2\hfil\par
    \endgroup
  \fi}
\def\@dottedtocline#1#2#3#4#5{% 
  \ifnum #1>\c@tocdepth \else 
    {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip \@flushglue
     \parindent #2\relax\@afterindenttrue 
     \interlinepenalty\@M 
     \leavevmode 
     \raggedright
     \@tempdima #3\relax 
     \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip 
     {#4}\quad\nobreak#5\hfil\par}% 
  \fi}
  
% Better footnotes:
\let\old@makefntext\@makefntext
\renewcommand\@makefntext[1]{%
  \vspace{2pt}%
  \setlength\parindent{-1.8em}%
  \setlength\leftskip{1.8em}%
  \makebox[1.8em][l]{\normalfont\small\@thefnmark.}#1}

\setcounter{IndexColumns}{2}
\renewenvironment{theglossary}
  {\small\list{}{}
     \item\relax
     \glossary@prologue\GlossaryParms 
     \let\item\@idxitem \ignorespaces 
     \def\pfill{\hspace*{\fill}}}
  {\endlist}

\usepackage{amstext,array,booktabs,calc,color,fancyvrb,graphicx,hyperref,ifthen,longtable,refstyle,varioref}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[sc,osf]{mathpazo}

\linespread{1.069}      % A bit more space between lines
\frenchspacing         % Remove ugly extra space after punctuation
  
\hypersetup{colorlinks, breaklinks, linktocpage,
  linkcolor=red, citecolor=red, filecolor=blue, urlcolor=blue}

\newcommand*\setexsize[1]{\let\examplesize#1}
\newcommand*\setverbwidth[1]{\def\auxwidth{#1}}

\newcommand*\name[1]{{#1}}
\newcommand*\pkg[2][]{\relax
  \edef\@tempa{#1}\relax
  \ifx\@tempa\@empty
    \textsf{\mbox{#2}}\else
    \href{#1}{\textsf{\mbox{#2}}}\fi}
\newcommand*\env[1]{\textsf{#1}}

\newcommand*\note[1]{\unskip\footnote{#1}}

\let\latin\textit
\def\eg{\latin{e.g.}}
\def\Eg{\latin{E.g.}}
\def\ie{\latin{i.e.}}
\def\etc{\@ifnextchar.{\latin{etc}}{\latin{etc.}\@}}

\def\TeX{\smash{T\kern-.15em\lower.5ex\hbox{E}\kern-.07em X}\spacefactor1000\relax}

%    \end{macrocode}
%</dtx-style>
%
%\fi
%
% \typeout{************************************************}
% \typeout{*}
% \typeout{* To finish the installation, move the following}
% \typeout{* file into a directory searched by TeX:}
% \typeout{*}
% \typeout{* \space\space\space icsv.cls}
% \typeout{*}
% \typeout{************************************************}
%
\endinput
  