LaTeX is a command language and as such uses some special characters as part of the language. Thus if you want to use these characters either in your text or bibliography you need to be especially carful about. These characters include % $ # _
Other than in hypreref links and urls you need to put a backslash in front of them. For example to print a % in the text you need to use:
\%
Furthermore tthe character ” is not at all used as discussed in the next section.
Quotes are not written with the ” character, but are embedded in two left single quotes and two right single quotes:
``This is a quote''
which will result in:
“This is a quote”
In many papers we see that the quote is misused while putting quotes around a word. However quotes are often just used to quote a text from another paper. Instead of using quotes authors may actually emphasise a word. LaTeX has a special command for that using:
{\em this is emphasized}
resulting in
this is emphasized
To write a text as bold (which should also be avoided as bold is typically used in section headers), you can use:
{\em this is bold fett}
resulting in
this is bold fett
LaTeX provides a convenient mechanism to structure a paper with sections and subsections THis is achieved with the following commands:
\section{This is a Section}
\subsection{This is a Subsection}
\subsubsection{This is a Subsubsection}
Once you use one of these commands the next paragraph will start bellow the section command.
In addition you have the command:
\paragraph{This is a paragraph.}
The line is behind the paragraph heading
The command is special as it does not introduce a new line between the Heading and the next line even if you include empty lines
Multiple empty lines will be reduced to asingle empty line.
Itemized lists can be written as:
\begin{itemize}
\item First item
\item Second item
\begin{itemize}
resulting in
Enumerations can be written as:
\begin{enumerate}
\item First item
\item Second item
\begin{enumerate}
resulting in
Description lists can be written as:
\begin{itemize}
\item[Cloud] My definition of a Cloud.
\item[Big Data] My definition of Big Data
\begin{itemize}
Figures are extremly easy to handle by including them from source. We realy do never worry about the placement as LaTeX does typically a very good job of doing this.:
In Figure \ref{F:graph} we show a black and white graph about ... .
\begin{figure}
\includegraphics[width=\columnwidth]{images/graph.pdf}
\caption{A sample black and white graphic. \cite{las17graph}}
\label{F:graph}
\end{figure}
Note that las17graph must be a label of a valid bibtex entry. This is needed if you have copied the image from elsewhere to avoid plagiarism. However, if you came up with the graph yourself than you do not need a citation.
We recommend that you place in your paper drafts all images at the which can be done with the endfloat package
This can be enabled if you include the following lines before begin document command:
\usepackage{endfloat}
\renewcommand{\efloatseparator}{\mbox{}}
\begin{document}
tables from csv tables by hand
As we saw already for figures and tables it is recommended to use the label and ref commands to refer to figure or table numbers. This applies also to sections. Thus I can place a label after a section:
\section{Introduction}\label{S:introduction}
and write elswhere in the paper:
As we showcased in Section \ref{S:introduction}
Furthermore to conveniently distinguish sections tables and figures, we use the prefix S T F followed by a colon for the label. This helps organizing your paper in case you have many lables.
One of the strength of LaTeX thi the ability to write easily sophisticated mathematical expressions on paper with high quality. A good online resouce is provided by the following online resource from which we have copied some examples:
Exponensts are using the ^ charater:
$ (a + b)^2 = a^2 + 2ab + b^{c+2} $
Greek letters are referred to by their name preceeded by the slash:
$ \alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi $
Limits can be written as follows:
$ \lim_{x \to \infty} \exp(-x) = 0 $
Fractions are indicated by the frac command, and binomials by binom:
$ \frac{n!}{k!(n-k)!} = \binom{n}{k} $
Matricies can be created as follows:
A_{m,n} =
\begin{pmatrix}
a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\
a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{m,1} & a_{m,2} & \cdots & a_{m,n}
\end{pmatrix}
Point to separate section
https://wch.github.io/latexsheet/latexsheet.pdf
http://tug.ctan.org/info/lshort/english/lshort.pdf
https://en.wikibooks.org/wiki/LaTeX https://upload.wikimedia.org/wikipedia/commons/2/2d/LaTeX.pdf
https://latexforhumans.wordpress.com/2008/10/11/the-best-guides-to-latex/ https://www.latex-project.org/help/books/
Mastering a text processing system is an essential part of a researcher’s life. Not knowing how to use a text processing system can slow down the productivity of research drastically.
The information provided here is not intended to replace one of the many text books available about LaTeX. For the beginning, you might be just fine with the documentation provided here. For serious users, I recommend purchasing a book. Examples for books include
If you do not want to buy a book you can find a lot of useful information in the LaTeX reference manual.
We will refrain from providing a detailed analysis on why we use LaTeX in many cases versus other technologies. In general, we find that LaTeX:
In case you need a graphical view to edit LaTeX or LateX exportable files you also find AucTeX and Lyx.
Word is arguably available to many, but if you work on Linux you may be out of luck. Also Word often focusses not on structure of the text but on its apperance. Many students abuse Word and the documents in Word become a pain to edit with multiple users. Recently Microsoft has offered online services to collaborate on writing documents in groups which work well. Integration with bibliography managers such as endnote or Mendeley is possible.
However, we ran into issues whenever we use word:
However, we highly recommend the collaborative editing features of Word that work on a paragraph and not letter level. Thus saving is essential so you do not block other people from editing the paragraph.
Unfortunately, many useful features got lost in the new google docs. However, it is great to collaborate quickly online, share thoughts and even write your latex documents together if you like (just copy your work in a file offline and use latex to compile it ;-) )
The biggest issue we have with Google Docs is that it does not allow the support of 2 column formats, that the bibliography integration is non-existent and that paste and copy from web pages and images encourages unintended plagiarism when collecting information without annotations (LaTeX and Word are prone to this too, but we found from experience that it tends to happen more with Google docs users.
When looking at the tools we find a place for each:
The text editor emacs provides a great basis for editing TeX and LaTeX documents. Both modes are supported. In addition there exists a color highlight module enabling the color display of LaTeX and TeX commands. On OSX aquaemacs and carbon emacs have build in support for LaTeX. Spell checking is done with flyspell in emacs.
Another popular editor is vi or vim. It is less feature rich but many programmers ar using it. As it can edit ASCII text you can edit LaTeX. With the LaTeX add-ons to vim, vim becomes similar powerful while offering help and syntax highlighting for LaTeX as emacs does. (The authors still prefer emacs)
Other editors such as TeXshop are available which provide a more integrated experience. However, we find them at times to stringent and prefer editors such as emacs/
We have made very good experiences with Lyx. You must assure that the team you work with uses it consistently and that you all use the same version.
Using the ACM templates is documented here:
On OSX it is important that you have a new version of LaTeX and Lyx installed. As it takes up quite some space, you ma want to delete older versions. The new version of LyX comes with the acmsigplan template included. However on OSX and other platforms the .cls file is not included by default. However the above link clearly documents how to fix this.
We have found that editors such as Lyx and Auctex provide very good WYSIWYG alike features. However, we found an even easier way while using skim, a pdf previewer, in conjunction with emacs and latexmk. This can be achieved while using the following command assuming your latex file is called report.tex:
latexmk -pvc -view=pdf report
This command will update your pdf previewer (make sure to use skim) whenever you edit the file report.tex and save it. It will maintain via skim the current position, thus you have a real great way of editing in one window, while seeing the results in the other.
Note
Skim can be found at: http://skim-app.sourceforge.net/
Installing LaTeX is trivial, and is documented on the internet very well. However, it requires sufficient space and time as it is a large environment. A system such as TeX Live takes in full install about 5.5 GB. In addition to LaTeX we recommend that you install jabref and use it for bibliography management.
Thus you will have the most of them on your system.
Make sure you check that these programs are there, for example with the Linux commands:
which pdflatex
which bibtex
which jabref (on OSX you may have an icon for it)
If these commands are missing, please install them. For the newest documentation on instalation of LaTeX we recommend you look up the instalation for your specific OS.
The easiest way to install it on ubuntu is to use the terminal and type in (make sure you have enough space):
sudo apt-get install texlive-full
One of the best editors for LaTeX is emacs as you can also do bibliography management with it and not just LaTeX. However, other editors are avaialable including:
Please look up how to install them if you like to use them. TeXMaker is popular, However I find the combination of emacs and latexmk superior. TeXmaker is installed with:
sudo apt-get install texmaker
Other instalations:
Overleaf.com is a collaborative latex editor. In its free version it has a very limited disk space. However it comes with a Rich text mode that allows you to edit the document in a preview mode. The free templates provided do not include ACM template, put you are allowed to use the OSA template.
Features of overleaf are documented at: https://www.overleaf.com/benefits
We do not know where this service is located. However it offers similar services as Sharelatex and Overleaf.
To create a PDF file from latex yo need to generate it following a simple development and improvement cycle.
First, Create/edit ASCII source file with file.tex
file:
emacs file.tex
Create/edit bibliography file:
jabref refs.bib
Create the PDF:
pdflatex file
bibtex file
pdflatex file
pdflatex file
View the PDF:
open file
Todo
This example needs to be moved to github
A great example is provided at:
It not only showcases you an example file in ACM 2 column format, but also integrates with a bibliography. Furthermore, it provides a sample Makefile that you can use to generate view and recompile, or even autogenerate. A compilation would look like:
make
make view
If however you want to do things on change in the tex file you can do this automatically simply with:
make watch
Note
for make watch its best to use skim as pdf previewer
To produce high quality images the programs PowerPoint and omnigraffle on OSX are recommended. When using powerpoint please keep the image ratio to 4x3 as they produce nice size graphics which you also can use in your presentations. When using other rations they may not fit in presentations and thus you may increase unnecessarily your work. We do not recommend vizio as it is not universally available and produces images that in case you have to present them in a slide presentation does not easily reformat if you do not use 4x3 aspect ratio.
Naturally, graphics should be provided in SVG or PDF format so they can scale well when we look at the final PDF. Including PNG, gif, or jpeg files often do not result in the necessary resolution or the files become real big. For this reason we for example can also not recommend tools such as tablaeu as they do not provide proper exports to high quality publication formats. For interactive display such tool may be good, but for publications it produces inferior formatted images.
LaTeX integrates very well with bibtex. There are several preformatted styles available. It includes also styles for ACM and IEEE bibliographies. For the ACM style we recommend that you replace abbrv.bst with abbrvurl.bst, add hyperref to your usepackages so you can also display URLs in your citations:
\bibliographystyle{IEEEtran}
\bibliography{references.bib}
Then you have to run latex and bibtex in the following order:
latex file
bibtex file
latex file
latex file
or simply call make from our makefile.
The reason for the multiple execution of the latex program is to update all cross-references correctly. In case you are not interested in updating the library every time in the writing progress just postpone it till the end. Missing citations are viewed as [?].
Two programs stand out when managing bibliographies: emacs and jabref:
Other programs such as Mendeley, Zotero, and even endnote integrate with bibtex. However their support is limited, so we recommend that you just use jabref. Furthermore its free and runs on all platforms.
Jabref is a very simple to use bibliography manager for LaTeX and other systems. It can create a multitude of bibliography file formats and allows upload in other online bibliography managers.
According to others it is possible to integrate jabref references directly into MSWord. This has been conducted so far however only on a Windows computer.
Note
We have not tried this ourselves, but give it as a potential option.
Here are the steps the need to be done:
As you can see there is significant effort involve, so we do recommend you use LaTeX as you can focus there on content rather than dealing with complex layout decisions. This is especially true, if your papers have figures or tables, or you need to add references.
Please note that you should first decide which reference manager you like to use. In case you for example install zotero and mendeley, that may not work with word or other programs.
Endnote os a reference manager that works with Windows. Many people use Endnote. However, in the past, Endnote has caused complications when dealing with collaborative management of references. Its price is considerable. We have lost many hours of work because of unstability of Endnote in some cases. As a student, you may be able to use Endnote for free at Indiana University.
Mendeley is a free reference manager compatible with Windows Word 2013, Mac Word 2011, LibreOffice, BibTeX. Videos on how to use it are available at:
Installation instructions are available at
When dealing with large databases, we found the integration of Mendeley into word slow.
Zotero is a free tool to help you collect, organize, cite, and share your research sources. Documentation is available at
The download link is available from
We have limited experience with Zotero
Slides are best produced with the seminar package:
\documentclass{seminar}
\begin{slide}
Hello World on slide 1
\end{slide}
The text between slides is ignored
\begin{slide}
Hello World on slide 2
\end{slide}
However, in case you need to have a slide presentation we recommend you use ppt. Just paste and copy content from your PDF or your LaTeX source file into the ppt.
LaTeX is available on all modern computer systems. A very good installation for OSX is available at:
However, if you have older versions on your systems you may have to first completely uninstall them.
Including figures over two columns:
http://tex.stackexchange.com/questions/30985/displaying-a-wide-figure-in-a-two-column-document
positioning figures with textwidth and columnwidth https://www.sharelatex.com/learn/Positioning_images_and_tables
An organization as the author. Assume the author is National Institute of Health and want to have the author show up, please do:
key= {National Institute of Health},
author= {{National Institute of Health}},
Please note the {{ }}
words containing ‘fi’ or ‘ffi’ showing blank places like below after recompiling it: find as nd efficiency as e ciency
You copied from word or PDF ff which is actually not an ff, but a condensed character, change it to ff and ffi, you may find other such examples such as any non ASCII character. A degree is for example another common issue in data science.
do not use | & and other latex characters in bibtex references, instead use , and the word and
If you need to use _ it is _ but if you use urls leave them as is
We do recommend that you use sharelatex and jabref for writing papers. This is the easiest solution and beats in many cases MSWord as you can focus on writing and not on formatting.