SlideShare a Scribd company logo
1 of 44
Download to read offline
Brief intro to L
ATEX
Veronika Heimsbakk
Brief intro to L
ATEX
∠ A document markup language.
∠ Released in 1984.
∠ L
ATEXan abbreviation for Lamport TEX.
‡ https://github.com/latex3/latex2e
Brief intro to L
ATEX
TEX
TEX (τχ) is an abbreviation τχνη—TEXNH—technē. Greek for art and craft, root
for technical.
∠ Released in 1978 by Donald Knuth.
∠ Typesetting system.
∠ Developed to let anyone on any machine could create books and documents of
high quality.
∠ https://www.tug.org/texlive/devsrc/Build/source/texk/web2c/tex.web
Brief intro to L
ATEX
Installation
∠ TeXworks, Kile, Vim, Emacs etc.
∠ Package handling: MikTeX, MacTeX
∠ apt-get install texlive
∠ Browser based Overleaf1
1 https://www.overleaf.com/
Brief intro to L
ATEX
Mitt første dokument
documentclass[a4paper, 10pt]{article}
begin{document}
My first document!
end{document}
A lot of options for documentclass.
documentclass[options]{class}
∠ Options: font size, paper size, twoside/oneside, landscape etc.
∠ Class: book, article, report, minimal, beamer etc.
Brief intro to L
ATEX
Packages
For language and type faces.
usepackage[norsk]{babel}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
A lot of packages for anything! More on this later...
usepackage{hyperref}
usepackage{mathtools}
usepackage{listings}
usepackage{graphicx}
Brief intro to L
ATEX
Author and title
title{Introduction to LaTeX{}}
author{Veronika Heimsbakkveronika.heimsbakk@capgemini.com}
begin{document}
maketitle
end{document}
Brief intro to L
ATEX
Sections
section{Section}
This is section 1!
subsection{Sub section}
This is section 1's first sub section.
subsubsection{Sub sub section}
This is section 1's first sub section's sub section!
Brief intro to L
ATEX
Paragrafer
paragraph{Paragraph}
This is a paragraph.
subparagraph{Sub paragraph}
This is the paragraph's sub paragraph.
Brief intro to L
ATEX
Misc.
% This is a comment.
newline

Brief intro to L
ATEX
Fonts
textbf textit texttt underline
Bold Italic Typeface Underscore
textbf{Bold}
bfseries{Bold}
textit{Italic}
itshape{Italic}
Brief intro to L
ATEX
Fonts, packages
∠ Several packages for font styling.
∠ soul, color, . . .
st textcolor{red}{Rød tekst}
Strike through Red text
caps so
Small Capitals s p a c e y s t u f f
Brief intro to L
ATEX
Fonts, sizing
tiny Example text
scriptsize Example text
footnotesize Example text
small Example text
normalsize Example text
large Example text
Large Example text
LARGE Example text
huge Example text
Huge Example text
Brief intro to L
ATEX
Fonts, type faces
normalfont Example text
rmfamily Example text
sffamily Example text
ttfamily Example text
A lot of type faces to explore in L
ATEX. Check out http://www.tug.dk/FontCatalogue/
Brief intro to L
ATEX
Tables
begin{tabular}[h!]{|l|r|c|}
textbf{Table}  textbf{Table}  textbf{Table}
hline
one  two  three
four  five  six
seven  eight  nine
end{tabular}
Brief intro to L
ATEX
Table
Table Table Table
one two three
four five six
seven eight nine
Brief intro to L
ATEX
table
Table Table Table
one two three
four five six
seven eight nine
Table: Example of a table.
begin{table}[h!]
centering
begin{tabular}[h!]{|l|r|c|}
textbf{Table}  textbf{Table}  textbf{Table}
hline
one  two  three
four  five  six
seven  eight  nine
end{tabular}
caption{Eksempel på en tabell.}
label{tab:example}
end{table}
Brief intro to L
ATEX
References
∠ May use label for references.
∠ Example på reference to tabel 1.
∠ pageref, ref, cite
Example på reference to tabel ref{tab:example}.
Brief intro to L
ATEX
References
Need tagging of reference.
sec: section
subsec: subsection
fig: figure
tab: table
eq: equation
itm: enumerated list item
Brief intro to L
ATEX
Figure
begin{figure}[h!]
centering
includegraphics[width=textwidth]{img/latexlogo.png}
caption{LaTeX{} logo.}
end{figure}
Brief intro to L
ATEX
Figure placement
h here
t top of page
b bottom of page
! Override internal L
ATEXparameters that fixes good float for the position
H Equal to ht!
Brief intro to L
ATEX
Lists, itemize
∠ This is a list element.
∠ This is another list element.
begin{itemize}
item
This is a list element.
item
This is another list element.
end{itemize}
Brief intro to L
ATEX
Lists, enumeration
1. This is a list element.
1.1 This is another list element.
begin{enumerate}
item
This is a list element.
begin{enumerate}
item
This is another list element.
end{enumerate}
end{enumerate}
Brief intro to L
ATEX
Lists, description
* This is a list element.
Element This is another list element.
begin{description}
item[*] This is a list element.
item[Element] This is another list element.
end{description}
Brief intro to L
ATEX
Emph, footnotes and verbatim
Everything is allowed in verbatim (except from verbatim).
This is a verbatim.
This is a emph.
Example text with footnote.2
emph{ ... }
footnote{ ... }
2This is a footnote.
Brief intro to L
ATEX
Hyperlinks
Include the package hyperref.
http://tug.org/
TEX Users Group web site
veronahe@ifi.uio.no
url{http://tug.org/}
href{http://tug.org/}{TeX{} Users Group web site}
href{mailto:veronahe@ifi.uio.no}{veronahe@ifi.uio.no}
Brief intro to L
ATEX
Mathematics
Environment from TEX
$ ... $ % In-line equation
$$ ... $$ % Highlighted equation
In-line equation ∀x ∈ X, ∃y ≤ 
Highlighted equation
∀x ∈ X, ∃y ≤ 
forall x in X, quad exists y leq epsilon
Brief intro to L
ATEX
Mathematics
Environment, new in L
ATEX
( ... ) % In-line equation
[ ... ] % Highlighted equation
In-line equation ∀x ∈ X, ∃y ≤ 
Highlighted equation
∀x ∈ X, ∃y ≤ 
Alternative ways of writing equations
∠ begin{equation}
∠ begin{align}
∀x ∈ X, ∃y ≤  (1)
align will enumerate equations.
Brief intro to L
ATEX
Symbols
Symbol Command
∩ cap
∪ cup
⊆ subseteq
≡ equiv
∈ in
/
∈ notin
∧ land
∨ lor
|= models
∅ emptyset
Λ Lambda
λ lambda
∠ The Comprehensive L
ATEXSymbol List
∠ L
ATEXWiki Mathematics
Brief intro to L
ATEX
lstlistings
1 public class Code {
2 public static void main ( String [ ] args ) {
3 System . out . println (  Hello , world !  ) ;
4 }
5 }
Brief intro to L
ATEX
Innstillinger for lstlistings
lstset{
language=Java,
keywordstyle=color{blue},
stringstyle=color{red},
numbers=left,
numberstyle=tinycolor{lightgray},
tabsize=2
}
Brief intro to L
ATEX
lstlistings
begin{lstlisting}
public class Code {
public static void main(String[] args) {
System.out.println(Hello, world!);
}
}
end{lstlisting}
Load code by using lstinputlisting{source_filename.py}
Brief intro to L
ATEX
Languages supported by lstlistings
ABAP, ACSL, Ada, Algol, Ant, Assembler, Awk, bash, Basic, C#, C++, C, Caml, Clean,
Cobol, Comal, csh, Delphi, Eiffel, Elan, erlang, Euphoria, Fortran, GCL, Go (golang),
Gnuplot, Haskell, HTML, IDL, inform, Java, JVMIS, ksh, Lisp, Logo, Lua, make,
Mathematica, Matlab, Mercury, MetaPost, Miranda, Mizar, ML, Modelica, Modula-2,
MuPAD, NASTRAN, Oberon-2, Objective C , OCL, Octave, Oz, Pascal, Perl, PHP, PL/I,
Plasm, POV, Prolog, Promela, Python, R, Reduce, Rexx, RSL, Ruby, S, SAS, Scilab, sh,
SHELXL, Simula, SQL, tcl, TEX, VBScript, Verilog, VHDL, VRML, XML, XSLT
Add custom keywords with morekeywords in lstset.
Brief intro to L
ATEX
Bibliography
A simple reference system included in L
ATEX.
begin{thebibliography}
bibitem{tolkien77}
J.R.R. Tolkien,
textit{The Silmarillion},
George Allen  Unwin, United Kingdom,
1st edition,
1977.
end{thebibliography}
Use cite to reference to bibitem{tolkien77}
Brief intro to L
ATEX
TikZ
1
2
4 5
3
A
B
Brief intro to L
ATEX
TikZ
usepackage{tikz}
Brief intro to L
ATEX
Draw
begin{tikzpicture}
draw (0,0) -- (5,0);
end{tikzpicture}
Standard unit (cm)
em
pt
mm
Brief intro to L
ATEX
Shapes
usetikzlibrary{shapes}
draw (0,0) rectangle (2,2); draw (0,0) circle (1);
draw (0,0) ellipse (1 and 0,5);
Brief intro to L
ATEX
Options
draw[draw=yellow, thick, fill=orange] (0,0) rectangle (2,2);
draw[draw=none, fill=teal] (0,0) circle (1);
draw[draw=red, ultra thick, dashed] (0,0) ellipse (1 and 0.5);
Brief intro to L
ATEX
Tree
1
2 3
4 5
node {1}
child {node {2}}
child {node {3}
child {node {4}}
child {node {5}}
}
;
Brief intro to L
ATEX
Style for all nodes
1
2 3
4 5
Brief intro to L
ATEX
Style for all nodes
begin{tikzpicture}[every node/.style={circle, draw=black}]
node {1}
child {node {2}}
child {node {3}
child {node {4}}
child {node {5}}
}
;
end{tikzpicture}
Brief intro to L
ATEX
Intelligence: Finding an error in a Knuth text.
Stupidity: Cashing that $2.56 check you got.
Brief intro to L
ATEX
Useful resources
∠ TEX Users Group
∠ TEXample
∠ TikZ  PGF Manual
∠ L
ATEXWiki
Brief intro to L
ATEX

More Related Content

Similar to Basic Introduction to LaTeX

Lex tool manual
Lex tool manualLex tool manual
Lex tool manual
Sami Said
 
Create the code for the ----Todo-- comments in the network-h header- (.docx
Create the code for the ----Todo-- comments in the network-h header- (.docxCreate the code for the ----Todo-- comments in the network-h header- (.docx
Create the code for the ----Todo-- comments in the network-h header- (.docx
earleanp
 

Similar to Basic Introduction to LaTeX (20)

محاضرة 7
محاضرة 7محاضرة 7
محاضرة 7
 
The use of the code analysis library OpenC++: modifications, improvements, er...
The use of the code analysis library OpenC++: modifications, improvements, er...The use of the code analysis library OpenC++: modifications, improvements, er...
The use of the code analysis library OpenC++: modifications, improvements, er...
 
Latex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. HanumantharajuLatex Tutorial by Dr. M. C. Hanumantharaju
Latex Tutorial by Dr. M. C. Hanumantharaju
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
 
Algorithm2e package for Latex
Algorithm2e package for LatexAlgorithm2e package for Latex
Algorithm2e package for Latex
 
عمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latex
عمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latexعمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latex
عمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latex
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manual
 
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
How to make a presentation with LATEX? Introduction to BeamerPresentation ben...
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS
 
LaTeX for begyndere
LaTeX for begyndereLaTeX for begyndere
LaTeX for begyndere
 
Chap02 scr
Chap02 scrChap02 scr
Chap02 scr
 
Create the code for the ----Todo-- comments in the network-h header- (.docx
Create the code for the ----Todo-- comments in the network-h header- (.docxCreate the code for the ----Todo-- comments in the network-h header- (.docx
Create the code for the ----Todo-- comments in the network-h header- (.docx
 
Perl Programming - 01 Basic Perl
Perl Programming - 01 Basic PerlPerl Programming - 01 Basic Perl
Perl Programming - 01 Basic Perl
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
 
LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
 
sigproc-sp.pdf
sigproc-sp.pdfsigproc-sp.pdf
sigproc-sp.pdf
 
LaTeX Part 1
LaTeX Part 1LaTeX Part 1
LaTeX Part 1
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
Language-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible researchLanguage-agnostic data analysis workflows and reproducible research
Language-agnostic data analysis workflows and reproducible research
 
example.pdf
example.pdfexample.pdf
example.pdf
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Recently uploaded (20)

The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 

Basic Introduction to LaTeX

  • 1. Brief intro to L ATEX Veronika Heimsbakk Brief intro to L ATEX
  • 2. ∠ A document markup language. ∠ Released in 1984. ∠ L ATEXan abbreviation for Lamport TEX. ‡ https://github.com/latex3/latex2e Brief intro to L ATEX
  • 3. TEX TEX (τχ) is an abbreviation τχνη—TEXNH—technē. Greek for art and craft, root for technical. ∠ Released in 1978 by Donald Knuth. ∠ Typesetting system. ∠ Developed to let anyone on any machine could create books and documents of high quality. ∠ https://www.tug.org/texlive/devsrc/Build/source/texk/web2c/tex.web Brief intro to L ATEX
  • 4. Installation ∠ TeXworks, Kile, Vim, Emacs etc. ∠ Package handling: MikTeX, MacTeX ∠ apt-get install texlive ∠ Browser based Overleaf1 1 https://www.overleaf.com/ Brief intro to L ATEX
  • 5. Mitt første dokument documentclass[a4paper, 10pt]{article} begin{document} My first document! end{document} A lot of options for documentclass. documentclass[options]{class} ∠ Options: font size, paper size, twoside/oneside, landscape etc. ∠ Class: book, article, report, minimal, beamer etc. Brief intro to L ATEX
  • 6. Packages For language and type faces. usepackage[norsk]{babel} usepackage[utf8]{inputenc} usepackage[T1]{fontenc} A lot of packages for anything! More on this later... usepackage{hyperref} usepackage{mathtools} usepackage{listings} usepackage{graphicx} Brief intro to L ATEX
  • 7. Author and title title{Introduction to LaTeX{}} author{Veronika Heimsbakkveronika.heimsbakk@capgemini.com} begin{document} maketitle end{document} Brief intro to L ATEX
  • 8. Sections section{Section} This is section 1! subsection{Sub section} This is section 1's first sub section. subsubsection{Sub sub section} This is section 1's first sub section's sub section! Brief intro to L ATEX
  • 9. Paragrafer paragraph{Paragraph} This is a paragraph. subparagraph{Sub paragraph} This is the paragraph's sub paragraph. Brief intro to L ATEX
  • 10. Misc. % This is a comment. newline Brief intro to L ATEX
  • 11. Fonts textbf textit texttt underline Bold Italic Typeface Underscore textbf{Bold} bfseries{Bold} textit{Italic} itshape{Italic} Brief intro to L ATEX
  • 12. Fonts, packages ∠ Several packages for font styling. ∠ soul, color, . . . st textcolor{red}{Rød tekst} Strike through Red text caps so Small Capitals s p a c e y s t u f f Brief intro to L ATEX
  • 13. Fonts, sizing tiny Example text scriptsize Example text footnotesize Example text small Example text normalsize Example text large Example text Large Example text LARGE Example text huge Example text Huge Example text Brief intro to L ATEX
  • 14. Fonts, type faces normalfont Example text rmfamily Example text sffamily Example text ttfamily Example text A lot of type faces to explore in L ATEX. Check out http://www.tug.dk/FontCatalogue/ Brief intro to L ATEX
  • 15. Tables begin{tabular}[h!]{|l|r|c|} textbf{Table} textbf{Table} textbf{Table} hline one two three four five six seven eight nine end{tabular} Brief intro to L ATEX
  • 16. Table Table Table Table one two three four five six seven eight nine Brief intro to L ATEX
  • 17. table Table Table Table one two three four five six seven eight nine Table: Example of a table. begin{table}[h!] centering begin{tabular}[h!]{|l|r|c|} textbf{Table} textbf{Table} textbf{Table} hline one two three four five six seven eight nine end{tabular} caption{Eksempel på en tabell.} label{tab:example} end{table} Brief intro to L ATEX
  • 18. References ∠ May use label for references. ∠ Example på reference to tabel 1. ∠ pageref, ref, cite Example på reference to tabel ref{tab:example}. Brief intro to L ATEX
  • 19. References Need tagging of reference. sec: section subsec: subsection fig: figure tab: table eq: equation itm: enumerated list item Brief intro to L ATEX
  • 21. Figure placement h here t top of page b bottom of page ! Override internal L ATEXparameters that fixes good float for the position H Equal to ht! Brief intro to L ATEX
  • 22. Lists, itemize ∠ This is a list element. ∠ This is another list element. begin{itemize} item This is a list element. item This is another list element. end{itemize} Brief intro to L ATEX
  • 23. Lists, enumeration 1. This is a list element. 1.1 This is another list element. begin{enumerate} item This is a list element. begin{enumerate} item This is another list element. end{enumerate} end{enumerate} Brief intro to L ATEX
  • 24. Lists, description * This is a list element. Element This is another list element. begin{description} item[*] This is a list element. item[Element] This is another list element. end{description} Brief intro to L ATEX
  • 25. Emph, footnotes and verbatim Everything is allowed in verbatim (except from verbatim). This is a verbatim. This is a emph. Example text with footnote.2 emph{ ... } footnote{ ... } 2This is a footnote. Brief intro to L ATEX
  • 26. Hyperlinks Include the package hyperref. http://tug.org/ TEX Users Group web site veronahe@ifi.uio.no url{http://tug.org/} href{http://tug.org/}{TeX{} Users Group web site} href{mailto:veronahe@ifi.uio.no}{veronahe@ifi.uio.no} Brief intro to L ATEX
  • 27. Mathematics Environment from TEX $ ... $ % In-line equation $$ ... $$ % Highlighted equation In-line equation ∀x ∈ X, ∃y ≤ Highlighted equation ∀x ∈ X, ∃y ≤ forall x in X, quad exists y leq epsilon Brief intro to L ATEX
  • 28. Mathematics Environment, new in L ATEX ( ... ) % In-line equation [ ... ] % Highlighted equation In-line equation ∀x ∈ X, ∃y ≤ Highlighted equation ∀x ∈ X, ∃y ≤ Alternative ways of writing equations ∠ begin{equation} ∠ begin{align} ∀x ∈ X, ∃y ≤ (1) align will enumerate equations. Brief intro to L ATEX
  • 29. Symbols Symbol Command ∩ cap ∪ cup ⊆ subseteq ≡ equiv ∈ in / ∈ notin ∧ land ∨ lor |= models ∅ emptyset Λ Lambda λ lambda ∠ The Comprehensive L ATEXSymbol List ∠ L ATEXWiki Mathematics Brief intro to L ATEX
  • 30. lstlistings 1 public class Code { 2 public static void main ( String [ ] args ) { 3 System . out . println ( Hello , world ! ) ; 4 } 5 } Brief intro to L ATEX
  • 32. lstlistings begin{lstlisting} public class Code { public static void main(String[] args) { System.out.println(Hello, world!); } } end{lstlisting} Load code by using lstinputlisting{source_filename.py} Brief intro to L ATEX
  • 33. Languages supported by lstlistings ABAP, ACSL, Ada, Algol, Ant, Assembler, Awk, bash, Basic, C#, C++, C, Caml, Clean, Cobol, Comal, csh, Delphi, Eiffel, Elan, erlang, Euphoria, Fortran, GCL, Go (golang), Gnuplot, Haskell, HTML, IDL, inform, Java, JVMIS, ksh, Lisp, Logo, Lua, make, Mathematica, Matlab, Mercury, MetaPost, Miranda, Mizar, ML, Modelica, Modula-2, MuPAD, NASTRAN, Oberon-2, Objective C , OCL, Octave, Oz, Pascal, Perl, PHP, PL/I, Plasm, POV, Prolog, Promela, Python, R, Reduce, Rexx, RSL, Ruby, S, SAS, Scilab, sh, SHELXL, Simula, SQL, tcl, TEX, VBScript, Verilog, VHDL, VRML, XML, XSLT Add custom keywords with morekeywords in lstset. Brief intro to L ATEX
  • 34. Bibliography A simple reference system included in L ATEX. begin{thebibliography} bibitem{tolkien77} J.R.R. Tolkien, textit{The Silmarillion}, George Allen Unwin, United Kingdom, 1st edition, 1977. end{thebibliography} Use cite to reference to bibitem{tolkien77} Brief intro to L ATEX
  • 37. Draw begin{tikzpicture} draw (0,0) -- (5,0); end{tikzpicture} Standard unit (cm) em pt mm Brief intro to L ATEX
  • 38. Shapes usetikzlibrary{shapes} draw (0,0) rectangle (2,2); draw (0,0) circle (1); draw (0,0) ellipse (1 and 0,5); Brief intro to L ATEX
  • 39. Options draw[draw=yellow, thick, fill=orange] (0,0) rectangle (2,2); draw[draw=none, fill=teal] (0,0) circle (1); draw[draw=red, ultra thick, dashed] (0,0) ellipse (1 and 0.5); Brief intro to L ATEX
  • 40. Tree 1 2 3 4 5 node {1} child {node {2}} child {node {3} child {node {4}} child {node {5}} } ; Brief intro to L ATEX
  • 41. Style for all nodes 1 2 3 4 5 Brief intro to L ATEX
  • 42. Style for all nodes begin{tikzpicture}[every node/.style={circle, draw=black}] node {1} child {node {2}} child {node {3} child {node {4}} child {node {5}} } ; end{tikzpicture} Brief intro to L ATEX
  • 43. Intelligence: Finding an error in a Knuth text. Stupidity: Cashing that $2.56 check you got. Brief intro to L ATEX
  • 44. Useful resources ∠ TEX Users Group ∠ TEXample ∠ TikZ PGF Manual ∠ L ATEXWiki Brief intro to L ATEX