SlideShare a Scribd company logo
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

محاضرة 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...
PVS-Studio
 
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
BMS Institute of Technology and Management
 
Write effectlively in late x
Write effectlively in late xWrite effectlively in late x
Write effectlively in late x
C-CORE
 
Algorithm2e package for Latex
Algorithm2e package for LatexAlgorithm2e package for Latex
Algorithm2e package for Latex
Chris Lee
 
عمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latex
عمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latexعمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latex
عمل العروض التقديمية باستخدام برنامج مقدمه في استخدام برنامج Latex
researchcenterm
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manualSami Said
 
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...
researchcenterm
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS
charsbar
 
LaTeX for begyndere
LaTeX for begyndereLaTeX for begyndere
LaTeX for begyndere
Arne Jørgensen
 
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
 
Perl Programming - 01 Basic Perl
Perl Programming - 01 Basic PerlPerl Programming - 01 Basic Perl
Perl Programming - 01 Basic Perl
Danairat Thanabodithammachari
 
LaTeX for beginners
LaTeX for beginnersLaTeX for beginners
LaTeX for beginners
Stéphane Péchard
 
LATEX.ppt
LATEX.pptLATEX.ppt
LATEX.ppt
Rajesh Patel
 
LaTeX Part 1
LaTeX Part 1LaTeX Part 1
LaTeX Part 1
awv7t
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
Aisha Abdullahi
 
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
Andrew Lowe
 

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

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 

Recently uploaded (20)

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 

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