0

For a practice assignment on Latex I need to reproduce a provided PDF with Latex.

Here is my problem:

The result I want, should look like something like this:

        The title of this document: XXXXXX
                Author1     Author2
            {au1, au2}@email-address.com

Two authors, one email address centered beneath them.

This is what I have tried:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\title{The title of this document: XXXXXX}
\author{Author1 \and Author2 \\ \texttt{\{au1, au2\}@email-adress.com}}
\begin{document}
\maketitle 
\end{document}

But with this the email address ends up centered under the right name and the author names are not properly centered under the title.

Since this is an introductory assignment, I likely do not need to use any fancy packages or a complicated way of solving this.

Thanks for your help already!

1

A simple way would be to add the package authblk in your preamble and use the command \affil. Here is code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{authblk}

\title{The title of this document: XXXXXX}
\author{Author1}
\author{Author2}
\affil{\texttt{(au1, au2)@email-address.com}}
\renewcommand\Authand{\hfil} % default:  \renewcommand\Authand{ and }
\date{}
\begin{document}
\maketitle 
\end{document}

enter image description here

1

Here I use a stack...but it will not process the macro \and, so I just use a \quad and\quad.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{stackengine}
\setstackEOL{\cr}
\title{The title of this document: XXXXXX}
\author{\stackunder{Author1 \quad and\quad Author2}
  {\texttt{\{au1, au2\}@email-adress.com}}}
\begin{document}
\maketitle 
\end{document}

enter image description here

Alternately, if I use

\author{\stackunder{Author1 \qquad Author2}
  {\texttt{\{au1, au2\}@email-adress.com}}}

the result is

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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