2

I am trying to write a paper that looks similar to the one in this question. I am using the naaclhlt2016 template (required), available here. Below is an MWE of what I have:

%
% File naaclhlt2016.tex
%

\documentclass[11pt,letterpaper]{article}
\usepackage{authblk}
\usepackage{naaclhlt2016}
\usepackage{times}
\usepackage{latexsym}

\naaclfinalcopy % Uncomment this line for the final submission

\newcommand\BibTeX{B{\sc ib}\TeX}


\title{Instructions for NAACL HLT 2016 Proceedings - This stays within the margins}


\author[1]{Author 1 who has a very very long name}
\author[2]{Author 2 who also has a very very very long name}
\author[1]{Author 2 who has a very very very long name}
\affil[1]{Department of Linguistics, University}
\affil[2]{School of Medicine, University}

\renewcommand\Authands{ and }

\date{}

\begin{document}

\maketitle

\end{document}

The output looks as follows: resulting pdf

How can I get the author names to stay within the margins?

EDIT: My actual article has the following libraries loaded.

\documentclass[11pt,letterpaper]{article}
\usepackage{authblk}
\usepackage{naaclhlt2016}
\usepackage{times}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{apacite}
  • The template doesn't use authblk and that's precisely the problem. The instructions are not crystal clear, but not too obscure either. – egreg Oct 17 '17 at 17:17
  • Interesting. Is one of the packages masking it? – Adam_G Oct 17 '17 at 17:19
  • In other words, use what they want, and not authblk. – egreg Oct 17 '17 at 17:20
  • I haven't found a way to get the desired output using their template, though. – Adam_G Oct 17 '17 at 17:25
  • You have to use their style. – egreg Oct 17 '17 at 17:28
2

You can redefine the used command \outauthor to print the author(s). Add to your preamble the following code (change p{13cm} to the value you need):

\makeatletter
\renewcommand\outauthor{
    \begin{tabular}[t]{>{\centering}p{13cm}} % <========================
    \ifnaaclfinal 
         \bf\@author
    \else 
        % Avoiding common accidental de-anonymization issue. --MM
            \bf Anonymous NAACL submission
    \fi
    \end{tabular}}
\makeatother

Command >{\centering} is used to get a centered list of authors and affiliations. You have to call package array for this.

With the following MWE

\documentclass[11pt,letterpaper]{article}
\usepackage{authblk}
\usepackage{naaclhlt2016}
\usepackage{times}
\usepackage{latexsym}
\usepackage{array} % for >{\centering}

\naaclfinalcopy % Uncomment this line for the final submission

\makeatletter
\renewcommand\outauthor{
    \begin{tabular}[t]{>{\centering}p{13cm}} % <==========================
    \ifnaaclfinal 
         \bf\@author
    \else 
        % Avoiding common accidental de-anonymization issue. --MM
            \bf Anonymous NAACL submission
    \fi
    \end{tabular}}
\makeatother

\newcommand\BibTeX{B{\sc ib}\TeX}


\title{Instructions for NAACL HLT 2016 Proceedings - This stays within the margins}


\author[1]{Author 1 who has a very very long name}
\author[2]{Author 2 who also has a very very very long name}
\author[1]{Author 2 who has a very very very long name}
\affil[1]{Department of Linguistics, University}
\affil[2]{School of Medicine, University}

\renewcommand\Authands{ and }

\date{}

\begin{document}

\maketitle

\end{document}

you get the result:

resulting pdf

  • I was not referring to a space. I'm just referring to centering the author part and keeping the affiliation part left-justified. – Adam_G Oct 17 '17 at 17:15
  • Thanks. I didn't quite understand the last 2 questions. – Adam_G Oct 17 '17 at 17:26
  • 1
    @Adam_G I guess you are writing a official paper and the institution advised you to use a special style (you use in the given mwe). If that is so, are you allowed to change there style? Usually you have to use their style without changings ... Changing their style code result that they do not want to accept your paper ... – Mensch Oct 17 '17 at 17:35

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.