- 1 LaTeX for Psychological Researchers
- 1.1 LaTeX Distributions
- 1.2 LaTeX editors
- 1.3 Templates
- 1.4 Additional Links
LaTeX for Psychological Researchers
In november 2011 I have given a short course on using LaTeX for psychological researchers, which included the following subjects:
- how to obtain a LaTeX distribution
- How to use LaTeX to write professional scientific reports
- How to use the apa document class to produce articles in APA-style
- How to use BibTeX and apacite to easily add references from google scholar and completely automate the reference list
- How to use Beamer to produce presentation slides
- How to use Sweave to incorperate R codes in your LaTeX document to keep your analyses reproducible
On this page are all the slides and examples used in the course as well as a lot of additional links to other online resources.
Lecture 1: Introduction
Lecture 2: Basics of the LaTeX language
Here is a small .tex file to play around with that contains most of the codes discussed in the slides:
Lecture 3: bibTeX, APA style and beamer
Note, very recently the apa6 package is released. This replaces the apa package (which is no longer supported) and supports the 6th version of the APA manual. For more details:
Some useful links:
- apacite manual
- Information on APA 6 style
- natbib documentation
- apa.cls CTAN site (see apacls.html for documentation)
- Beamer user guide
- Beamer examples
Lecture 4: Reproducible research using Sweave
Here is some extra material:
This is the package I made to facilitate reporting statistics in Sweave. If a class is not yet supported please mail me or implement it yourself on GitHub.
I recommend the following LaTeX distributions.
- Windows: MikTeX (http://miktex.org/)
- Mac: MacTeX (http://www.tug.org/mactex)
- Linux: TeXlive (http://www.tug.org/texlive/)
LaTeX documents can be edited with any plain text editor. Some of these editors are specifically aimed at the LaTeX language while others are aimed at any programming language.
A good editor for LaTeX has at least:
- A customizable shortcut for compiling documents
- Line numbers
- Syntax highlighting
What editor you want depends on your needs and experience.
TeXworks is a very basic LaTeX editor. It does the above three things and not much else. It is a very stable editor and usually comes together with a LaTeX distribution.
It can be downloaded from:
Recommended for learning the basics of LaTeX. A benefit is that it also comes with the portable MikTeX distribution for editing LaTeX documents wherever you are. Another benefit of TeXworks is that it can be used on Windows, Mac and Linux.
A solid LaTeX editor that comes with a menu with a lot of shortcuts to command. Works somewhat similar to WYSIWYG editors like MS word, LibreOffice or OpenOffice.org in that you can select text and press a button to apply something to that text (the proper code is added into the document).
It is only available on Windows, and can be downloaded from:
The default options seem to have compatibility problems with Adobe Reader 10, to solve these see this link:
TeXnicCenter is highly recommended for beginners in LaTeX since it has a familiar interface.
A crossplatform LaTeX editor similar to TeXnicCenter. Has less options but a cleaner interface. Is very clear in reporting errors. It can be downloaded from:
A very light-weight plain text editor for Windows. You probably want to have this installed in case you ever need a plain text editor to do anything (and seriously, notepad is not a good alternative). Has LaTeX syntax highlighting and line numbers, I am not sure about a compile shortcut.
Emacs + AucTeX
A very sophisticated cross platform plain text editor that is used by many programmers to do everything they want. Is considered an IDE (interactive development environment) in that it can run programs such as R (through ESS). Some even consider it a operating system
Emacs is hard to learn but well worth it if you have to work much in plain text editors. It can be downloaded from:
Contact me for more details.
Another sophisticated cross platform editor that is used by many programmers. I don’t have experience with it but I am sure it has excellent LaTeX support. It can be downloaded here:
The official Gnome text editor. Use the External Tools plugin to create command line shortcuts for LaTeX.
Do you like LaTeX but miss seeing your end result as you would in a WYSIWYG editor? Then maybe LyX is for you! It can be used to edit LaTeX documents in a WYSIWYG editor. Has native Sweave support as well.
- Assignments: http://sachaem47.fortyseven.versio.nl/latexcourse/assignments.tex
- Resume: http://www.rpi.edu/dept/arc/training/latex/resumes/
- Simple Article: http://www.cs.technion.ac.il/~yogi/Courses/CS-Scientific-Writing/examples/simple/simple.htm
- Presentations (beamer): http://www.ctan.org/tex-archive/macros/latex/contrib/beamer/solutions
- APA style: http://mirrors.ctan.org/macros/latex/contrib/apa/apaexample.tex
- Book: http://sigquit.wordpress.com/2010/01/12/simple-latex-template-for-books/
The stackoverflow site dedicated to TeX, has an active community of helpfull people waiting to answer your questions: