0

I want to add citations in the APA style "Citation (Author, Year)" and to have them linking to the article entry in the References section. Exactly this way: https://aclanthology.org/2023.acl-long.5.pdf (just an example). Is there a way to do this automatically with Latex? I only found tutorials on how to do this with index citations like "Citation [1]".

To illustrate what I want:
enter image description here

This link has to take me here:

enter image description here

My current code is:

    % !TEX TS-program = xelatex
% !TEX encoding = UTF-8

% This is a simple template for a XeLaTeX document using the "article" class, % with the fontspec package to easily select fonts.

\documentclass[11pt]{article} % use larger type; default would be 10pt

\usepackage{fontspec} % Font selection for XeLaTeX; see fontspec.pdf for documentation \defaultfontfeatures{Mapping=tex-text} % to support TeX conventions like ``---'' \usepackage{xunicode} % Unicode support for LaTeX character names (accents, European chars, etc) \usepackage{xltxtra} % Extra customizations for XeLaTeX

%\setsansfont{Deja Vu Sans} %\setmonofont{Deja Vu Mono}

% other LaTeX packages..... \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. \geometry{a4paper} % or letterpaper (US) or a5paper or.... %\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent \usepackage{hyperref} \usepackage{graphicx} % support the \includegraphics command and options

\title{My title} \author{Me} \date{} % Activate to display a given date or no date (if empty), % otherwise the current date is printed

\begin{document} \maketitle

Just \hyperlink{label1}{Click me!}. In the paper \cite{Test00}... \pagebreak \hypertarget{label1}{I'm target} \pagebreak \begin{thebibliography}{99} \bibitem{Test00} T. Test, \emph{Test testing tests}, Journal of Testing \end{thebibliography}

\end{document}

%\section{}

%\subsection{}

\end{document}

  • The hyperref package makes it possible to add links to documents. When hyperref is used alongside the APA style in natbib, the links should be automatically added to citations. Perhaps you could show the code you're using now, so that people can tell you what parts to change? – gz839918 Dec 24 '23 at 23:34
  • Surely. It's done – invalid syntax Dec 24 '23 at 23:47
  • 1
    Because your bibitems are simply strings of text, LaTeX can't tell what citation format you're using. It can't tell which part of your citation is the author, year, title, etc. As a result, it can't tell how to format your citations in (author, year) format. If you want APA citation, you may want to consider using biblatex or natbib. – gz839918 Dec 25 '23 at 00:14
  • Welcome! At least for Biblatex, you also get the hyperlinks created automatically. Note that biblatex or natbib requires some investment of time in converting your bibitems to entries in a bibliography database, but you can use the same database other documents and easily switch between bibliography/citation styles. – cfr Dec 25 '23 at 03:24

0 Answers0