Skip to content

Commit bace58f

Browse files
Merge pull request #69 from acl-org/latex_20211025
change package/bst loading
2 parents 57870bd + d12d160 commit bace58f

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

latex/acl.sty

+18-15
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,6 @@
2828

2929
\usepackage{xcolor}
3030

31-
\ifacl@hyperref
32-
\PassOptionsToPackage{breaklinks}{hyperref}
33-
\RequirePackage{hyperref}
34-
% make links dark blue
35-
\definecolor{darkblue}{rgb}{0, 0, 0.5}
36-
\hypersetup{colorlinks=true, citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}
37-
\else
38-
% This definition is used if the hyperref package is not loaded.
39-
% It provides a backup, no-op definiton of \href.
40-
% This is necessary because \href command is used in the acl_natbib.bst file.
41-
\def\href#1#2{{#2}}
42-
\usepackage{url}
43-
\fi
44-
4531
\ifacl@finalcopy
4632
% Hack to ignore these commands, which review mode puts into the .aux file.
4733
\newcommand{\@LN@col}[1]{}
@@ -207,7 +193,9 @@
207193
% \cite, \newcite, and \shortcite for compatibility with older ACL .sty files
208194
\renewcommand\cite{\citep} % to get "(Author Year)" with natbib
209195
\newcommand\shortcite{\citeyearpar}% to get "(Year)" with natbib
210-
\newcommand\newcite{\citet} % to get "Author (Year)" with natbib
196+
\newcommand\newcite{\citet} % to get "Author (Year)" with natbib
197+
198+
\bibliographystyle{acl_natbib}
211199

212200
% Bibliography
213201

@@ -310,3 +298,18 @@
310298
\def\LARGE{\@setsize\LARGE{20pt}\xviipt\@xviipt}
311299
\def\huge{\@setsize\huge{23pt}\xxpt\@xxpt}
312300
\def\Huge{\@setsize\Huge{28pt}\xxvpt\@xxvpt}
301+
302+
% The hyperref manual (section 9) says hyperref should be loaded after natbib
303+
\ifacl@hyperref
304+
\PassOptionsToPackage{breaklinks}{hyperref}
305+
\RequirePackage{hyperref}
306+
% make links dark blue
307+
\definecolor{darkblue}{rgb}{0, 0, 0.5}
308+
\hypersetup{colorlinks=true, citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}
309+
\else
310+
% This definition is used if the hyperref package is not loaded.
311+
% It provides a backup, no-op definiton of \href.
312+
% This is necessary because \href command is used in the acl_natbib.bst file.
313+
\def\href#1#2{{#2}}
314+
\usepackage{url}
315+
\fi

latex/acl_latex.tex

+1-4
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,12 @@ \subsection{Citations}
203203

204204
\subsection{References}
205205

206-
\nocite{Ando2005,borschinger-johnson-2011-particle,andrew2007scalable,rasooli-tetrault-2015,goodman-etal-2016-noise,harper-2014-learning}
206+
\nocite{Ando2005,andrew2007scalable,rasooli-tetrault-2015}
207207

208208
The \LaTeX{} and Bib\TeX{} style files provided roughly follow the American Psychological Association format.
209209
If your own bib file is named \texttt{custom.bib}, then placing the following before any appendices in your \LaTeX{} file will generate the references section for you:
210210
\begin{quote}
211211
\begin{verbatim}
212-
\bibliographystyle{acl_natbib}
213212
\bibliography{custom}
214213
\end{verbatim}
215214
\end{quote}
@@ -218,7 +217,6 @@ \subsection{References}
218217
To include both the Anthology and your own .bib file, use the following instead of the above.
219218
\begin{quote}
220219
\begin{verbatim}
221-
\bibliographystyle{acl_natbib}
222220
\bibliography{anthology,custom}
223221
\end{verbatim}
224222
\end{quote}
@@ -261,7 +259,6 @@ \section*{Acknowledgements}
261259

262260
% Entries for the entire Anthology, followed by custom entries
263261
\bibliography{anthology,custom}
264-
\bibliographystyle{acl_natbib}
265262

266263
\appendix
267264

0 commit comments

Comments
 (0)