[Tugindia] generic paper class

Radhakrishnan CV cvr at river-valley.org
Mon Feb 2 04:57:14 CET 2004


>>>>> "Ajay" == Ajay Shah <ajayshah at mayin.org> writes:

    Ajay> On Sun, Feb 01, 2004 at 01:17:52PM +0530, Badri T Natarajan
    Ajay> wrote:

[...]

    Natarajan> My second question is: how do you handle a second
    Natarajan> author and institution while making the title? I have
    Natarajan> tried \and with limited success.

    Ajay> \author{Name1\\Institution1 \and Name2\\Institution2}

Here is a simple way of tweaking \maketitle (seldom elegant) to
accommodate multiple authors with multiple affiliations.  People can
see how trivial it is to modify this further (like alignment, spacing,
font attributes, ...) to create their own custom title.

--------------------------------------------------------
\documentclass{article}
\usepackage{times}

\makeatletter
\def\@author{}
\def\@address{}
\def\@title{}

\def\address{\@ifnextchar[{\Xaddress}{\Yaddress}}
\def\author{\@ifnextchar[{\Xauthor}{\Yauthor}}
% check if author has affiliation ids

\def\Yauthor#1{\g at addto@macro\@author{%
    \normalfont\normalsize#1 }}
% author names without affiliation ids
% we now add the author name to a register, \@author
% \g at addto@macro does the job for you

\def\Xauthor[#1]#2{\g at addto@macro\@author{%
    \normalfont\normalsize#2\textsuperscript{#1}\space}}
% author names with affiliation ids

\long\def\Yaddress#1{\g at addto@macro\@address{%
    \normalfont\footnotesize\itshape#1\par}}
% address without ids

\long\def\Xaddress[#1]#2{\g at addto@macro\@address{%
    \normalfont\footnotesize\itshape\textsuperscript{#1}#2\par}}
% address with ids

\long\def\maketitle{\vspace*{1.5cm}
     \begin{center}
     \let\!\negthinspace
     \let\thanks\footnote
     \renewcommand\thefootnote{\fnsymbol{footnote}}
     \Large\bfseries\strut\@title\strut\par\vspace{1cm}
     \@author\par\vskip.5cm
     \@address
     \end{center}
     \vspace*{1.5cm}
     \setcounter{footnote}{0}
     }
\makeatother

\begin{document}

\title{This is a long title spanning two or more lines to see
the strut in action\thanks{This is title footnote}}

\author[a]{CV Radhakrishnan,\!}
\author[a,d]{K Anilkumar,\!}
\author[d]{Abraham Thomas}
\author{\\}
\author[a,e]{CV Rajagopal}
\author{and}
\author[b,c]{Ajay Shah\thanks{corresponding author}}

\address[a]{River Valley Technologies, Software Technology Park,
            Trivandrum}

\address[b]{Ministry of Finanace, Government of India, New Delhi}

\address[c]{Department of Economics, Indira Gandhi Instt. for Dev.
            Research, Mumbai}

\address[d]{Linuxense Information Systems, Trivandrum}

\address[e]{Focal Image Ltd., Exeter Business Park, Exeter, UK}

\maketitle

This is a test document.
This is a test document.
This is a test document.\footnote{A footnote in text}
This is a test document.
This is a test document.
This is a test document.
This is a test document.
This is a test document.
This is a test document.
This is a test document.

\end{document}


More information about the tugindia mailing list