Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to span \textit{} in several line in \author{} tag.

So far I know I can do this ( but here \LARGE will only affect the Name) :

% title
\title{\textbf{Cool title}}
\author{\LARGE Name\\
        \emph{University}\\
        \emph{Faculty}\\
        \emph{mail@mail.com}
        }
\date{}         % Do not print the date on the final paper!
\maketitle

But if I try to

\author{\LARGE{Name\\
        \emph{University\\ 
        Faculty\\ 
        mail@mail.com}
        }
        }

I get the following error :

There were errors in your LaTeX source

./main.tex:60: Missing } inserted. [\maketitle]
./main.tex:60: Missing } inserted. [\maketitle]
./main.tex:60: Missing \cr inserted. [\maketitle]
./main.tex:60: Missing \cr inserted. [\maketitle]
./main.tex:60: Misplaced \cr. [\maketitle]

EDIT

\author{\itshape Name\\
        University\\ 
        Faculty\\ 
        mail@mail.com
        }

This would only affect Name also.

EDIT

I use following the documentclass

\documentclass[a4paper,11pt]{article}
share|improve this question
1  
The reason this happens, I think, is that internally LaTeX typesets the author in a tabular environment. That is, article.cls includes a definition of \maketitle which includes \begin{tabular}[t]{c}\@author\end{tabular} and so the font selection is "grouped" in the same way it is in any entry in a tabular. It is also why you get errors if you try to use e.g. \emph across lines. You would either need to redefine \maketitle or use a package which does so, I think. For example, you might look at the titling package. –  cfr Jan 5 at 20:37

4 Answers 4

up vote 5 down vote accepted

The typesetting of the address takes place in a one column tabular environment, so

\emph{First line\\
second line}

is illegal as it would be in

\begin{tabular}{c}
\emph{First line\\
second line
\end{tabular}

The simplest remedy is to use the package authblk:

\documentclass{article}
\usepackage{authblk}
\renewcommand{\Authfont}{\LARGE\normalfont}
\renewcommand{\Affilfont}{\normalsize\itshape}

\begin{document}

\title{Some title}
\author{Name}
\affil{University\\
  Faculty\\
  email@uni.edu}

\maketitle

\end{document}

enter image description here

share|improve this answer

The reason this happens is that internally LaTeX typesets the author in a tabular environment. That is, article.cls includes a definition of \maketitle which includes

\begin{tabular}[t]{c}
\@author
\end{tabular} 

and so the font selection is "grouped" in the same way it is in any entry in a tabular. It is also why you get errors if you try to use e.g. \emph across lines.

The titling package can be used to redefine elements of the \maketitle command. This example adds a little space beneath your name before typesetting your affiliation and email details. It defines a new command \affiliation{} to hold these details which does not use the tabular environment. It also builds the font shape selection into the redefinition of \maketitle.

\documentclass[a4paper,11pt]{article}
\usepackage{titling}
  \pretitle{\begin{center}\LARGE\bfseries}
  \preauthor{\begin{center}
    \LARGE \lineskip 0.5em%
    \begin{tabular}[t]{c}}
  \postauthor{\end{tabular}\end{center}}
  \newcommand{\affiliation}[1]{%
    \gdef\affil{#1}}
  \renewcommand{\maketitlehookc}{%
    \centering\itshape \affil\par}


% title
\title{Cool title}
\author{Name}
\affiliation{University\\
        Faculty\\
        mail@mail.com
        }
\date{}         % Do not print the date on the final paper!

\begin{document}
\maketitle

\end{document}

Use of titling command to redefine aspects of \maketitle

share|improve this answer

I struggled with this many times. I suggest you give up and do what I did: type \LARGE in each line again. If you need to change the line spacing, you can always use \renewcommand\baselinestretch to whatever number you need.

share|improve this answer
1  
Never give up if your desires are legal especially when you have this site up and running ;-) –  Harish Kumar Jan 6 at 0:04

With any KOMA-Script class or with the package scrextend in combination with a standard class the following works since recently published version 3.12. So, in your situation with the latter case you can do this:

\documentclass{article}
\usepackage[T1]{fontenc}

\usepackage[extendedfeature=title]{scrextend} % adds several KOMA-Script
                                              % specific features
\addtokomafont{author}{\Huge\em} % KOMA-Script command

\begin{document}
\title{\textbf{Cool title}}
\author{\textup{Name}\\
        University\\
        Faculty\\
        mail@mail.com
       }
\date{}
\maketitle
\end{document}

The KOMA-Script specific titling feature must explicitly activated in scrextend. Note, that I added \Huge\em (very huge just for making it more visible) for the whole entry and then switched back from emphasising only for the “Name”.

In all earlier KOMA-Script versions inclusive 3.11b the command \addtokomafont{author}{…} does not work. KOMA-Script also switches to the sans-serif font for all titles. If this is not appealing, one can add the following line before or after \addtokomafont…:

\setkomafont{disposition}{\rmfamily}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.