Skip to content

Instantly share code, notes, and snippets.

@VincentTam
Last active October 21, 2015 05:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VincentTam/9569005 to your computer and use it in GitHub Desktop.
Save VincentTam/9569005 to your computer and use it in GitHub Desktop.
This is a LaTeX template for an English essay with a reference list with the APA format. For details, you may visit http://vincenttam.github.io/blog/2014/03/16/latex-template-for-essays/
@online{Gnu13,
author = {Richard Stallman},
title = {{Free Software and Education}},
date = {2013-11-06},
url = {http://www.gnu.org/education/education.html}
}
@article{kaplan2010users,
title={{Users of the world, unite! The challenges and opportunities
of social media}},
author={Kaplan, Andreas M and Haenlein, Michael},
journal={{Business Horizons}},
volume={53},
number={1},
pages={59--68},
year={2010},
publisher={Elsevier}
}
\documentclass[12pt,a4paper]{article}
\usepackage[margin=1in]{geometry} % set page margin to 1 inch
% Some formatting
\usepackage{indentfirst}
% double spacing
\usepackage{setspace}
\doublespacing
% An empty line between each paragraph
\setlength{\parskip}{\baselineskip}
% For bibliography
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa,backend=biber]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\addbibresource{article.bib}
\usepackage[]{url}
\urlstyle{tt}
\usepackage[hidelinks]{hyperref} % Add hyperlinks to the PDF
\title{ABCD1234: Title Here}
\author{
John Doe\\ % If you don't need the ID, simply omit
1234567890 % the trailing backslashes and this line.
\and
Johnny Hung\\
2345678901
}
% If this line is omitted, today's date will be used.
\date{January 23, 2014}
\begin{document}
\maketitle
This is the first paragraph of the document. To enable editors to
focus on the layout of the document, rather than its contents, the
famous ``Lorem ipsum'' is used.
There's a blank line between two different paragraphs. The citations
here are samples only. \parencite{Gnu13} Moreover, the line spacing
of this article enables readers to make notes inside the paragraph.
For instance, if \textcite{kaplan2010users} include some difficult
words that you don't know their meaning, you can look up the
dictionary and write the meaning above those words.
\section{Introduction}
% lorem{{{
Vitae, vulputate et, massa. Nulla sed erat vel eros ornare venenatis.
In hac habitasse platea dictumst. Sed nisl nunc, suscipit id, feugiat.
% lorem}}}
\subsection{Opener}
% lorem{{{
Justo posuere mattis. Suspendisse egestas bibendum nulla. In erat
nunc, posuere sed, auctor quis, pulvinar quis, mi. Mauris at est.
Phasellus lacinia eros in arcu. Maecenas lobortis, tellus vel gravida
tincidunt, elit erat suscipit arcu, in varius erat risus vel magna.
Fusce nec ante quis dolor vestibulum bibendum. Pellentesque sit amet
urna.
Curabitur eget nisi at lectus placerat gravida. Vivamus nulla. Donec
luctus. Sed quis tellus. Quisque lobortis faucibus mi. Aenean vitae
risus ut arcu malesuada ornare. Maecenas nec erat. Sed rhoncus, elit
laoreet sagittis luctus, nulla leo faucibus lectus, vitae accumsan est
diam id felis. Nunc dui pede, vestibulum eu, elementum.
% lorem}}}
\subsection{Purpose}
% lorem{{{
Eros sit amet ante. Vestibulum ante. Sed quis ipsum non ligula
dignissim luctus. Integer quis justo id tortor accumsan tempus. Cras
vitae magna. Nunc bibendum lacinia tellus. Quisque porttitor ligula
et pede. Nam erat nibh, fringilla ac, rutrum sit amet, rhoncus in,
ipsum. Mauris rhoncus, lacus eu convallis sagittis, quam magna.
% lorem}}}
\section{New section}
% lorem{{{
Commodo. Vestibulum enim felis, interdum non, sollicitudin in, posuere
a, sem. Cras nibh. Sed facilisis ultrices dolor. Vestibulum pretium
mauris sed turpis.
% lorem}}}
\subsection{New subsection}
% lorem{{{
Rutrum. Nam quis tellus. Cras elit nisi, ornare a, condimentum vitae,
rutrum sit amet, tellus. Maecenas a dolor. Praesent tempor, felis eget
gravida blandit, urna lacus faucibus velit, in consectetuer sapien
erat nec quam. Integer bibendum odio sit amet neque. Integer.
% lorem}}}
\subsection{Another subsection}
% lorem{{{
Sed, fringilla non, odio. Nulla porta, tortor non suscipit gravida,
velit enim aliquam quam, nec condimentum orci augue vel magna. Nulla
facilisi. Donec ipsum enim, congue in, tempus id, pulvinar sagittis,
leo. Donec et elit in nunc blandit auctor. Nulla congue.
% lorem}}}
\section{Conclusion}
% lorem{{{
Accumsan justo ut nibh. Donec ac lectus vitae odio lobortis tristique.
Donec vestibulum mattis lectus. Donec et lorem.
Cras sit amet mauris. Curabitur a quam. Aliquam neque. Nam nunc nunc,
lacinia sed, varius quis, iaculis eget, ante. Nulla dictum justo eu
lacus.
% lorem}}}
\printbibliography
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment