LaTeX Tutorial
2015.01.28
Agenda
•
• LaTeX
• Hello LaTeX!
•
• Bibliography
• Build
• Writing Tips
LaTeX
• LaTeX TeX Leslie
Lamport
• Leslie Lamport: LaTeX, Paxos algorithm, 2013
Turing award
• TeX Knuth
LaTeX
•
• Word + OneNote LaTeX
•
•
• Knuth The Art of Computer Programming
TeX
•
LaTeX
• Beamer
• Pandoc
• musixtex
• circuitkz
•
• LaTeX
• /ˈleɪtɛk/ /ˈlɑːtɛk/
• X k
LaTeX
• Overleaf
• https://www.overleaf.com
• writelatex WYSIWYG
• build ...
• StackExchange TeX
• http://tex.stackexchange.com
• BJ4
LaTeX
• LaTeX Wikibook
• http://en.wikibooks.org/wiki/LaTeX
• (?)
• CTAN
• http://www.ctan.org
• TeX package
• API Reference
Installation
• http://en.wikibooks.org/wiki/LaTeX/Installation
• Linux: TeX Live package
• distribution
200 - 300 MB
• Windows: MiKTeX 160 MB
• Mac: MacTeX 2.4 GB
Hello LaTeX!
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
LaTeX Tutorial
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
• documentclass
•
• a4paper: A4
• 12pt: 12
• report:
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
• begin end
•
•
document
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
• • LaTeX:
LaTeX
command
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
• emph: emphasis
• textbf:
• rq: right quote
• .tex
documentclass[a4paper, 12pt]{report}
begin{document}
Hello, LaTeX{}!
emph{Welcome} to this textbf{world}!
Itorq{}s formula:
$$ dX_t = mu_tdt + sigma_tdB_t $$
end{document}
• $
TeX
• $
$
•
• .tex
• indent
• # $ % ˆ & _ { } ̃ 
• Tab
• %
LaTeX Group
• { } group
•
{
color{red}
This line will be red.
}
This line will not.
LaTeX Command
• command
• function
• { } argument
• [ ] optional option
•
LaTeX Environment
• begin{name} end
environment
• Environment command
environment
Input TeX Files
• include
• input{another.tex}
• another.tex
input
• .tex
input
• Global structure
• Document class
• Package
• Chapter, section, subsection
Global Structure
documentclass{…}
usepackage{…}
% settings
begin{document}
% content…
end{document}
• document
class
•
•
• document
Document Class
article Journal short report etc.
report chapter
book
book
IEEEtran IEEE Transaction format
•
Document Class
• options
10pt, 11pt, 12pt
10pt
12pt
a4paper, letterpaper
onecolumn, twocolumn column twocolumn
twoside, oneside
book twoside article & report
oneside
Package
• usepackage{…} package
• usepackage{verbatim}
•
•
• cite citation
• graphicx
• tabularx
• listings
• LaTeX
• chapter book report
• section
• subsection
• subsubsection
...
• List (ordered &
unordered)
• Font
• Source code
• Table
• Table of Contents
• Citation and Footnote
• Figure
• Reference
List (unordered)
begin{itemize}
item The first item
item The second
item The third
end{itemize}
• The first item
• The second
• The third
List (ordered)
begin{enumerate}
item The first item
item The second
item The third
end{enumerate}
1. The first item
2. The second
3. The third
begin{enumerate}
item The first item
begin{itemize}
item 1 of the first
item 2 of the first
end{itemize}
item The second
end{enumerate}
1. The first item
• 1 of the first
• 2 of the first
2. The second
Font
• textbf{…}
• emph{…}, italic{…}
• monospace texttt{…}
• listings
• usepackage{listings}
• lstlistings
begin{lstlistings}[breakline]
int my_count = 0;
println(“hello world!”);
end{lstlistings}
• syntax highlight
• document
lstset{
language=C,
numbers=none,
tabsize=2,
basicstyle=ttfamilysmall,
breakatwhitespace=true
}
• LaTeX
•
• PPT
begin{tabular}{ l l l }
1 & 2 & 3 
4 & 5 & 6 
7 & 8 & 9 
end{tabular}
1 2 3
4 5 6
7 8 9
begin{tabular}{ | c | c | c | }
hline
1 & 2 & 3 
hline
4 & 5 & 6 
hline
7 & 8 & 9 
hline
end{tabular}
1 2 3
4 5 6
7 8 9
Column
c
l
r
p{12cm}
| column
|| column
• tableofcontents
•
• book: chapter, section, subsection
• report: section, subsection, subsubsection
Citation
• usepackage{cite}
• cite{bib_key}
• bib_key bibliography key
Citation
Those techniques are usually used in a client-server scenario where
the program is partitioned into tasks and some tasks are offloaded to
the server from clients~cite{MCCSurvey, Chun2011, hung2014mobilefbp}.
Following the emerging HTML5 and JavaScript technologies,
web apps are enhanced with increased capabilities that are more
specific for mobile contexts cite{WEBAPP}.
Footnote
• citation bibliography
•
• footnote
• footnote{put footnote texts here}
• footnotemark footnotetext
Footnote
Web applications are the most widely-adopted cross-platform
solution for mobile devices,
footnote{This work was in part supported by MOST under
102-2221-E-002-087-MY3 and by III under 104-EC-17-A-24-0691}
Footnote
section[Introduction]{Introductionfootnotemark}
footnotetext{This work was in part supported by MOST under
102-2221-E-002-087-MY3 and by III under 104-EC-17-A-24-0691}
• usepackage{graphicx}
•
• includegraphics[...]{file_path}
• file_path
• .jpg, .png, .pdf
• .tex input input
• includegraphics[width=1.0columnwidth]{…}
• column
• 1.0 .8
• textwidth
twocolumn
optional ...
• width=xx height=xx
•
• keepaspectratio
• width height
Figure
• Figure graphic graphic
table
• begin{figure} end{figure}
Figure: graphic
begin{figure}[htb!]
begin{centering}
includegraphics[width=1.0
columnwidth]{figures/
usecase-webcam}
caption{A distributed
webcams example}
label{fig:usecase-webcam}
end{centering}
end{figure}
figure
LaTeX Tutorial
Figure: table
begin{figure}[htb!]
begin{centering}
begin{tabular}
% table content...
end{tabular}
caption{A distributed webcams example}
label{fig:usecase-webcam}
end{centering}
end{figure}
Figure
• Figure float flow
• begin{figure}[htb!]
• placement specifier figure
• h: here source code
• t: top
• b: bottom
• !: LaTeX
• LaTeX
•
Figure Graphic
• figure
begin{figure}[htb!]
includegraphics[width=1.0columnwidth]{file1}
caption{Caption 1}
label{fig:file1}
includegraphics[width=1.0columnwidth]{file2}
caption{Caption 2}
label{fig:file2}
end{figure}
Label
• label{label_name}
•
• chapter section figure
• label_name
• label{fig:system_architecture}
• label{sec:introduction}
Reference
• ref
The high-level overview of Migratom.js is
illustrated in Figure~ref{fig:Architecture}.
• Figure
Chapter Table !!
Bibliography
• LaTeX bib
• BibTeX
• .bib key-value pair
citation
• cite{key} Biliography
.bib key-value
@article{MCCSurvey,
author = {Fernando, Niroshinie and Loke, Seng W. and Rahayu,
Wenny},
title = {{Mobile Cloud Computing: A Survey}},
journal = {Future Gener. Comput. Syst.},
issue_date = {January, 2013},
volume = {29},
number = {1},
month = jan,
year = {2013},
issn = {0167-739X},
pages = {84--106},
numpages = {23},
url = {http://dx.doi.org/10.1016/j.future.2012.05.023},
doi = {10.1016/j.future.2012.05.023},
acmid = {2388260},
publisher = {Elsevier Science Publishers B. V.},
address = {Amsterdam, The Netherlands, The Netherlands},
keywords = {Mobile cloud computing, Pervasive networks, Task
offload},
}
Best Practices
• survey bib
• title
• Google Scholar BibTeX
•
• addcontentsline{toc}{chapter}{bibname}
• bibliography{bib_file_name}
• usepackage[notbib]
{tocbibind}
• Mac xelatex bibtex
• xelatex thesis.tex
• bibtex thesis.tex
• xelatex thesis.tex
• xelatex thesis.tex
• Linux pdftex
1. xelatex thesis.tex: xelatex cite
thesis.aux
2. bibtex thesis.tex: bibtex thesis.aux
key .bib values
thesis.bbl
3. xelatex thesis.tex: xelatex .bbl
bibliography{…}
4. xelatex thesis.tex:
BibTeX
• definecolor
• lstdefinelanguage
• hyphenation
• pdfpages
• listoffigures listoftables
• vspace noindent
definecolor
• definecolor{my_red}{RGB}{223,0,2}
{
color{my_red}
This sentence is red.
}
lstdefinelanguage
lstdefinelanguage{JavaScript}{
keywords={typeof, new, true, false, catch, function, return, null,
catch, switch, var, if, in, while, do, else, case, break},
keywordstyle=color{jskw}bfseries,
ndkeywords={class, export, boolean, throw, implements, import,
this},
ndkeywordstyle=color{darkgray}bfseries,
identifierstyle=color{black},
sensitive=false,
comment=[l]{//},
morecomment=[s]{/*}{*/},
commentstyle=color{jsgreen}ttfamily,
stringstyle=color{jsred}ttfamily,
morestring=[b]',
morestring=[b]"
}
… lstset
lstset{
language=JavaScript,
numbers=none,
tabsize=2,
basicstyle=ttfamilysmall,
breakatwhitespace=true
}
Hyphenation
• LaTeX
• hyphenation
• hyphenation{Java-Script}
pdfpages
• usepackage{pdfpages}
addcontentsline{toc}{chapter}{ }
includepdf[pages={1}]{cert.pdf}
listoffigures & listoftables
• listoffigures listoftables
• tableofcontents
vspace
• vspace{5mm}
• v = verticle
• 5mm
noindent
• noindent
•
Best Practices
• input input
•
• ~
• e.g. i.e.
• emph textbf texttt
• itemize enumerate
• build.sh makefile
• Google Scholar bib
• Git Github Bitbucket
• TeX .gitignore
• https://www.gitignore.io/api/latex

More Related Content

PDF
LaTeX Introduction for Word Users
PDF
Training basic latex
PDF
Introduction to LaTeX
PDF
Introduction to Latex
PPT
documents writing with LATEX
PPTX
Latex workshop
PDF
Latex slides
PPTX
Latex for beginner
LaTeX Introduction for Word Users
Training basic latex
Introduction to LaTeX
Introduction to Latex
documents writing with LATEX
Latex workshop
Latex slides
Latex for beginner

What's hot (20)

PDF
LaTeX Part 1
PDF
Latex workshop: Essentials and Practices
PPT
Introduction to latex by Rouhollah Nabati
PDF
LATEX and BEAMER for Beginners
PDF
LaTeX for beginners
PDF
Introduction to LaTeX
PPTX
Introduction Latex
PDF
Introduction to Latex
PDF
scientific writing 01 - latex
PDF
Research 101 - Paper Writing with LaTeX
PDF
Technical writing using LaTeX
PDF
A gentle introduction to Latex
PDF
LaTeX Survival Guide
PDF
LaTeX Part 2
PDF
How to use LaTeX and Beamer to prepare presentation for Slideshare
PDF
Tutorial on LATEX: A Computer Program for Typesetting Documents
PDF
LaTeX Basics
PPTX
LaTex tutorial with Texstudio
PDF
Introduction to LaTeX - Workshop Day 1
LaTeX Part 1
Latex workshop: Essentials and Practices
Introduction to latex by Rouhollah Nabati
LATEX and BEAMER for Beginners
LaTeX for beginners
Introduction to LaTeX
Introduction Latex
Introduction to Latex
scientific writing 01 - latex
Research 101 - Paper Writing with LaTeX
Technical writing using LaTeX
A gentle introduction to Latex
LaTeX Survival Guide
LaTeX Part 2
How to use LaTeX and Beamer to prepare presentation for Slideshare
Tutorial on LATEX: A Computer Program for Typesetting Documents
LaTeX Basics
LaTex tutorial with Texstudio
Introduction to LaTeX - Workshop Day 1
Ad

Similar to LaTeX Tutorial (20)

PDF
LaTeX로 문서 작성하자
PDF
Electronic Grading of Paper Assessments
PPTX
Hadoop and HBase experiences in perf log project
PPTX
mongodb-aggregation-may-2012
PPT
Latex intro
PPT
latex document for IT workshop Lab . B.Tech
PDF
Couchbas for dummies
PPTX
Latex ppt copy
PDF
C++ Windows Forms L01 - Intro
PDF
Microservices, containers, and machine learning
PPTX
How to use Latex in Paper , Book writing in an easy way
PDF
ログ収集プラットフォーム開発におけるElasticsearchの運用
PPTX
MongoDB's New Aggregation framework
PDF
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
PDF
The Nitty Gritty of Advanced Analytics Using Apache Spark in Python
PDF
Data Processing with Cascading Java API on Apache Hadoop
PDF
FiloDB: Reactive, Real-Time, In-Memory Time Series at Scale
PDF
Head first latex
PPTX
Introduction to LaTeX9very important )..
PPTX
LaTeX for B.Sc. Mathematics,an introduction
LaTeX로 문서 작성하자
Electronic Grading of Paper Assessments
Hadoop and HBase experiences in perf log project
mongodb-aggregation-may-2012
Latex intro
latex document for IT workshop Lab . B.Tech
Couchbas for dummies
Latex ppt copy
C++ Windows Forms L01 - Intro
Microservices, containers, and machine learning
How to use Latex in Paper , Book writing in an easy way
ログ収集プラットフォーム開発におけるElasticsearchの運用
MongoDB's New Aggregation framework
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVM
The Nitty Gritty of Advanced Analytics Using Apache Spark in Python
Data Processing with Cascading Java API on Apache Hadoop
FiloDB: Reactive, Real-Time, In-Memory Time Series at Scale
Head first latex
Introduction to LaTeX9very important )..
LaTeX for B.Sc. Mathematics,an introduction
Ad

Recently uploaded (20)

PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
Computer Architecture Input Output Memory.pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PDF
Trump Administration's workforce development strategy
PDF
International_Financial_Reporting_Standa.pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
HVAC Specification 2024 according to central public works department
PPTX
History, Philosophy and sociology of education (1).pptx
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
My India Quiz Book_20210205121199924.pdf
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
Computer Architecture Input Output Memory.pptx
Weekly quiz Compilation Jan -July 25.pdf
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Trump Administration's workforce development strategy
International_Financial_Reporting_Standa.pdf
B.Sc. DS Unit 2 Software Engineering.pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Paper A Mock Exam 9_ Attempt review.pdf.
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
AI-driven educational solutions for real-life interventions in the Philippine...
What if we spent less time fighting change, and more time building what’s rig...
HVAC Specification 2024 according to central public works department
History, Philosophy and sociology of education (1).pptx
Cambridge-Practice-Tests-for-IELTS-12.docx
My India Quiz Book_20210205121199924.pdf
FORM 1 BIOLOGY MIND MAPS and their schemes
A powerpoint presentation on the Revised K-10 Science Shaping Paper

LaTeX Tutorial