我正在尝试写一篇类似于这个问题。我正在使用naaclhlt2016
模板(必需),可用这里。以下是我所拥有的 MWE:
%
% 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}
我怎样才能让作者姓名保持在页边距内?
编辑:我的实际文章已加载以下库。
\documentclass[11pt,letterpaper]{article}
\usepackage{authblk}
\usepackage{naaclhlt2016}
\usepackage{times}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{apacite}
答案1
您可以重新定义使用的命令\outauthor
来打印作者。将以下代码添加到您的序言中(更改p{13cm}
为您需要的值):
\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
命令>{\centering}
用于获取作者和所属机构的中心列表。您必须array
为此调用包。
使用以下 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}
得到结果: