Skip to content

Instantly share code, notes, and snippets.

@tmalsburg
Last active August 16, 2022 13:58
Show Gist options
  • Save tmalsburg/d1969dfc7623117a2c62946b0a1f303b to your computer and use it in GitHub Desktop.
Save tmalsburg/d1969dfc7623117a2c62946b0a1f303b to your computer and use it in GitHub Desktop.
LaTeX template for articles in APA format

Compile this template by executing the following in a command shell:

  pdflatex test && biber test && pdflatex test && pdflatex test

This template uses biblatex and biber instead of good old BibTeX. The bibliography files (*.bib) can have the same format (although biblatex allows using some interesting extensions). However, the biblatex+biber combo is much more powerful than good-old BibTeX (e.g. support for multiple bibliographies in one document) and comes with great documentation.

Suggestions for improvements welcome.

@article{MalsburgVasishth2011,
author = {von der Malsburg, Titus and Shravan Vasishth},
sortname = {Malsburg},
title = {What is the scanpath signature of syntactic reanalysis?},
journal = {Journal of Memory and Language},
volume = {65},
number = {2},
pages = {109--127},
year = {2011},
doi = {10.1016/j.jml.2011.02.004},
abstract = {Which repair strategy does the language system deploy when it gets garden-pathed, and what can regressive eye movements in reading tell us about reanalysis strategies? Several influential eye-tracking studies on syntactic reanalysis (Frazier & Rayner, 1982; Meseguer,Carreiras, & Clifton, 2002; Mitchell, Shen, Green, & Hodgson, 2008) have addressed this question by examining scanpaths, i.e., sequential patterns of eye fixations. However, in the absence of a suitable method for analyzing scanpaths, these studies relied on simplified dependent measures that are arguably ambiguous and hard to interpret. We address the theoretical question of repair strategy by developing a new method that quantifies scanpath similarity. Our method reveals several distinct fixation strategies associated with reanalysis that went undetected in a previously published data set (Meseguer et al., 2002). One prevalent pattern suggests re-parsing of the sentence, a strategy that has been discussed in the literature (Frazier & Rayner, 1982); however, readers differed tremendously in how they orchestrated the various fixation strategies. Our results suggest that the human parsing system non-deterministically adopts different strategies when confronted with the disambiguating material in garden-path sentences.},
keywords = {eyemovements, method, parsing, scanpaths, syntacticreanalysis},
}
\documentclass[man]{apa6}
\usepackage[american]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[backend=biber,useprefix=true,style=apa,url=false,doi=false,eprint=false]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{test.bib}
\title{Full title}
\shorttitle{Short title}
\leftheader{Author 1, Author 2}
\twoauthors{Author 1}{Author 2}
\twoaffiliations{Affiliation 1}{Affiliation 2}
\authornote{Here are the acknowledgements.}
\keywords{keyword1, keyword2}
\abstract{Here’s the abstract.}
\begin{document}
\maketitle
This is the body of the manuscript \parencite{MalsburgVasishth2011}.
\printbibliography[]
\end{document}
@jrichardsz
Copy link

Thanks for your template. Could you help me? I have this error

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2017-04-15>
Babel <3.18> and hyphenation patterns for 3 language(s) loaded.

! LaTeX Error: File `apa6.cls' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)

after run

  pdflatex test && biber test && pdflatex test && pdflatex test

@tmalsburg
Copy link
Author

You need to install the apa6 LaTeX class.

@Doyoulikemilk
Copy link

Hello tmalsburg! It is great to have your project! However, could I ask whether you are planning the APA7 program or not?

@tmalsburg
Copy link
Author

Haven't used the apa7 package yet, but have you tried replacing apa6 with apa7 in the first line?

@Doyoulikemilk
Copy link

Hi thank you so much for you reply! I think it did not work. I am a coding novice. And I find things are getting complicated when downloading a LaTeX project from Overleaf then editing on VS Code + Mactex... If you would to have a look at this project. It is performing differently on Overleaf and locally, especially in terms of citation.

https://www.overleaf.com/latex/templates/template-and-sample-for-authoring-apa7-manuscripts/pvhtwcrvcmsp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment