0% found this document useful (0 votes)
4 views47 pages

dissertationLaTeX_June7_18

The document provides a comprehensive guide on using LaTeX for dissertation and manuscript formatting, emphasizing its advantages over traditional word processors like MS Word. It covers essential topics such as downloading templates, document structure, citation management with BibTeX, and advanced formatting techniques. The workshop aims to help users navigate the complexities of LaTeX, despite its steep learning curve and time-consuming nature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views47 pages

dissertationLaTeX_June7_18

The document provides a comprehensive guide on using LaTeX for dissertation and manuscript formatting, emphasizing its advantages over traditional word processors like MS Word. It covers essential topics such as downloading templates, document structure, citation management with BibTeX, and advanced formatting techniques. The workshop aims to help users navigate the complexities of LaTeX, despite its steep learning curve and time-consuming nature.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

UCR LATEX Dissertation Template

and Advanced Manuscript Formatting

Gianluca Bianchin
[email protected]

Graduate Quantitative Methods Center


University of California, Riverside

LFSC1425 - June 7, 2018

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 1 / 40


What is LATEX

LaTeX is a document preparation system.

When writing, we use instructions as opposed to the formatted text found


in WYSIWYG processors (“what you see is what you get”) like Ms Word

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 2 / 40


This workshop

Good reasons to use LATEX:


Would like to use LATEX for dissertation, but don’t know where to start
Documents written by your peers look a lot fancier than yours!!!

In this workshop:
Downloading and understanding templates (UCR dissertation)
Provide references to “work your way around”

Difficulties with using LATEX:


Way more time consuming than MS Word
LATEX is a lot of “guess-and-check”
The most effective way is to learn by doing

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 3 / 40


This workshop

Good reasons to use LATEX:


Would like to use LATEX for dissertation, but don’t know where to start
Documents written by your peers look a lot fancier than yours!!!

In this workshop:
Downloading and understanding templates (UCR dissertation)
Provide references to “work your way around”

Difficulties with using LATEX:


Way more time consuming than MS Word
LATEX is a lot of “guess-and-check”
The most effective way is to learn by doing

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 3 / 40


This workshop

Good reasons to use LATEX:


Would like to use LATEX for dissertation, but don’t know where to start
Documents written by your peers look a lot fancier than yours!!!

In this workshop:
Downloading and understanding templates (UCR dissertation)
Provide references to “work your way around”

Difficulties with using LATEX:


Way more time consuming than MS Word
LATEX is a lot of “guess-and-check”
The most effective way is to learn by doing

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 3 / 40


Advanced Formatting in LATEX: Outline

1 Getting started with templates

2 Working on the document body

3 Citations with BibTeX

4 Extras: Double spacing, environments, and editors

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 4 / 40


Getting started with templates

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 5 / 40


Articles template: IEEE
Most scientific paper venues provide templates for manuscripts:

For instance: IEEE templates link


G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 6 / 40
UCR thesis template
If you are about to graduate ,:

UCR thesis template link


G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 7 / 40
Components of a template or LATEX documents

Source code file:


.tex file (source code)
⇒ the only document you should edit

Formatting files:
.cls file (document class file)
.clo file (class option file)
.sty file (style file)
.bst file (BibTeX style file)
.bib file (BibTeX file)

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 8 / 40


Typical (.tex) document

Typical LATEX document:

Packages: Provide sets of


commands or affect the
appearance of the output
document

Commands: Provide markup,


start by backslash
\commandName[...]{...}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 9 / 40


Document Hierarchy: Chapters

The main matter of a typical longer document is divided into chapters

For longer documents it is desirable to separate chapters into different


LATEX files for better organization and readability

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 10 / 40


Defining the main file in ShareLaTeX

The main document is the file which LATEX will be told to compile first

By default in ShareLaTeX, the main document will be set to be the


document in the project which begins with:
\documentclass[...]{...}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 11 / 40


Working on the document body

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 12 / 40


Backslash operator in LATEX

The Backslash operator is used for:


Commands
\section{}, \cite{}, \ref{}, \label{}, \begin{}, \end{}
Formatting
\tetxit{} (italic), \textbf{} (bold), \\ (new line)
Special characters and math
\sigma, \Phi, \frac{}{},\sum {}ˆ{}
Display reserved characters
\#, \$, \ˆ, \%, \&, \{, \}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 13 / 40


Sectioning

Chapters can be organized into sections, subsections, subsubsections,


paragraphs, and subparagraphs:

1 \section{Title}
2 \subsection{Title}
3 \subsubsection{Title}
4 \paragraph{Title}
5 \subparagraph{Title}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 14 / 40


Sectioning

Any sectioning command may be followed by


\label{labelName}
so that you can refer to the section number in the text

1 \section{My First Section}


2 \label{S:sec1}
3 We can reference "My first Section" in the text with the
command \ref{S:sec1}, while the command \pageref{S:sec1}
will reference the corresponding page.

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 15 / 40


Sectioning

Any sectioning command may be followed by


\label{labelName}
so that you can refer to the section number in the text

1 \section{My First Section}


2 \label{S:sec1}
3 We can reference "My first Section" in the text with the
command \ref{S:sec1}, while the command \pageref{S:sec1}
will reference the corresponding page.

NOTE
References are automatically updated whenever changes are made to
the structure of the document
Referencing requires compiling twice!

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 16 / 40


Numbered lists
A numbered list is created with the enumerate environment:

1 This space has the following properties:


2 \begin{enumerate}
3 \item Grade 2 Cantor; \label{Cantor}
4 \item Half-smooth Hausdorff; \label{Hausdorff}
5 \item Metrizably smooth. \label{smooth}
6 \end{enumerate}
7 Therefore, we can apply the Main Theorem.

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 17 / 40


Numbered lists
A numbered list is created with the enumerate environment:

1 This space has the following properties:


2 \begin{enumerate}
3 \item Grade 2 Cantor; \label{Cantor}
4 \item Half-smooth Hausdorff; \label{Hausdorff}
5 \item Metrizably smooth. \label{smooth}
6 \end{enumerate}
7 Therefore, we can apply the Main Theorem.

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 17 / 40


Bulleted lists

A bulleted list is created with the itemize environment:

1 We set out to accomplish a variety of goals:


2 \begin{itemize}
3 \item To introduce the concept of smooth functions.
4 \item To show their usefulness in differentiation.
5 \item To point out the efficacy of using smooth functions in
Calculus.
6 \end{itemize}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 18 / 40


Bulleted lists

A bulleted list is created with the itemize environment:

1 We set out to accomplish a variety of goals:


2 \begin{itemize}
3 \item To introduce the concept of smooth functions.
4 \item To show their usefulness in differentiation.
5 \item To point out the efficacy of using smooth functions in
Calculus.
6 \end{itemize}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 18 / 40


Floating: tables and figures

Figures and tables are treated in a special way in LATEX since they cannot
be broken across pages

LATEX moves a table or an illustration (floats) to the top or bottom of


the current or the next page if possible
Further away otherwise

Placing tables and figures is often a tedious guess-and-check process, that


requires extensive online help

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 19 / 40


Floating: tables and figures

Figures and tables are treated in a special way in LATEX since they cannot
be broken across pages

LATEX moves a table or an illustration (floats) to the top or bottom of


the current or the next page if possible
Further away otherwise

Placing tables and figures is often a tedious guess-and-check process, that


requires extensive online help

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 19 / 40


Tables

A simple table is set up as follows:

1 \begin{tabular}{ | c | c | c | }
2 \hline
3 cell1 & cell2 & cell3 \\
4 cell4 & cell5 & cell6 \\
5 cell7 & cell8 & cell9 \\
6 \hline
7 \end{tabular}

Sample tables:
ShareLaTeX page
OverLeaf page

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 20 / 40


Tables

Including captions and references in the text requires more effort

1 \begin{table}[h!]
2 \begin{center}
3
4 \begin{tabular}{ |c|c|c| }
5 \hline
6 cell1 & cell2 & cell3 \\
7 cell4 & cell5 & cell6 \\
8 cell7 & cell8 & cell9 \\
9 \hline
10 \end{tabular}
11
12 \caption{Table to test captions and labels}
13 \label{table:1}
14 \end{center}
15 \end{table}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 21 / 40


Figures

\usepackage{graphicx} (in the preamble of main file!!)

A figure environment is set up as follows:

1 \includegraphics[width=4cm, height=4cm]{lion}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 22 / 40


Figures

\usepackage{graphicx} (in the preamble of main file!!)

A figure environment is set up as follows:

1 \includegraphics[width=4cm, height=4cm]{lion}

TIP: organize your images in a single folder using:

\graphicspath{ {images folder/} }

Reference for figures:


ShareLaTeX page

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 23 / 40


Figures

Including captions and references in the text requires more effort:

1 \begin{figure}[h]
2 \centering
3
4 \includegraphics[width=4cm, height=4cm]{lion}
5
6 \label{figure:1}
7 \caption{This figure shows a lion.}
8 \end{figure}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 24 / 40


Formulas: in-Line vs displayed

Syntax of mathematical expressions

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 25 / 40


Displayed formulas

In-line formulas are delimited by $ $ symbols


Displayed formulas are defined through the equation environment

1 This is an in-line formula $\sum { k=0}ˆ{\infty} rˆk$,


2 while the following is a displayed formula
3
4 \begin{equation}
5 \label{E:geometricSeries}
6 \sum { k=0}ˆ{\infty} rˆk
7 \end{equation}

The equation number, which is automatically generated, depends on how


many numbered displayed formulas occur before the given equation

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 26 / 40


Displayed formulas

In-line formulas are delimited by $ $ symbols


Displayed formulas are defined through the equation environment

1 This is an in-line formula $\sum { k=0}ˆ{\infty} rˆk$,


2 while the following is a displayed formula
3
4 \begin{equation}
5 \label{E:geometricSeries}
6 \sum { k=0}ˆ{\infty} rˆk
7 \end{equation}

The equation number, which is automatically generated, depends on how


many numbered displayed formulas occur before the given equation

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 26 / 40


Displayed formulas

In-line formulas are delimited by $ $ symbols


Displayed formulas are defined through the equation environment

1 This is an in-line formula $\sum { k=0}ˆ{\infty} rˆk$,


2 while the following is a displayed formula
3
4 \begin{equation}
5 \label{E:geometricSeries}
6 \sum { k=0}ˆ{\infty} rˆk
7 \end{equation}

The equation number, which is automatically generated, depends on how


many numbered displayed formulas occur before the given equation

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 26 / 40


Aligned formulas

Alignment is very important for multi-line formulas, especially when


working with double column documents.
LATEX has many ways to typeset multiline formulas.
One of these is the align environment.

To generate multiple lines, separate each line with \\ symbols

r 2 = s2 + t2 ,
1 \begin{align*}
2 rˆ{2} = sˆ{2}+tˆ{2}, \\ 2u + 1 = v + wα ,
3 2u + 1 = v + wˆ{\alpha}, \\ x+z
4 x = \frac{x+z}{\sqrt{s+2u}} \\ x= √
s + 2u
5 \end{align*}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 27 / 40


Aligned formulas

To create an alignment use the & symbol

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 28 / 40


Citations with BibTeX

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 29 / 40


BibTeX: Basics

There are two ways of composing a bibliography in LATEX:


Package thebibliography (manual)
Package BibTeX (automated)

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 30 / 40


BibTeX: Basics

Three elements of a bibliography in BibTeX:


Bibliographic database file
A bibliographic style
Citations in the text

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 31 / 40


BibTeX: The Database

A BibTeX database has extension .bib and contains bibliographic entries

The keyword einstein is a TAG, and will be used to cite in the text
G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 32 / 40
BibTeX: The database

Common ways to (quickly) create a database are:


Google Scholar
Paper Management apps (Paperpile, Mendeley)

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 33 / 40


BibTeX: The main file

The following command declares the database and makes the


bibliography visible:
\bibliography{nameOfYourBibliographyFile}

TIP: place it at the end of your document, before \end{document}

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 34 / 40


BibTeX: The main file

The following command declares the database and makes the


bibliography visible:
\bibliography{nameOfYourBibliographyFile}

TIP: place it at the end of your document, before \end{document}

The following command defines the style of your bibliography


\bibliographystyle{styleOfYourBibliography}

Common styles and layouts link

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 35 / 40


BibTeX: The main file

Only the entries referenced in the .tex file will be shown in the Bibliography

\cite{myBook} shows the reference in the bibliography and cites the


entry in the text
\nocite{pK57} shows the reference in the bibliography
\nocite{*} shows all references in the bibliography

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 36 / 40


Extras: Double spacing, environments, and editors

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 37 / 40


Aligned formulas

Default document spacing (and more formatting) are specified in the


style-file ucr.cls (you are not supposed to modify this file)

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 38 / 40


Compiling LATEX documents directly in your computer

Compiling documents directly in your computer may be desirable for faster


file management (images), faster compiling times, online app licence, ...

Installing LATEXon your computer requires two steps:


1 Install the typesetting environment

(MikTeX for Windows, MacTeX for Mac)


2 Use a text editor to create a .tex source file

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 39 / 40


GradQuat at UCR

GradQuant:
Website: http://gradquant.ucr.edu
Workshops → Previous workshop resources
Resources → Programming and databases

If you seek help with LATEX:


Drop-in hours: Thursday 12pm-2pm
Schedule a consultation (Gianluca)
Email: [email protected]

G. Bianchin (UCR GradQuant) Advanced Formatting in LATEX June 7, 2018 40 / 40

You might also like