La Te Xcrash Course
La Te Xcrash Course
28.02.2016
1 Introduction to LATEX
history, philosopy
6 =
LaTeX is not latex!
portability, lightness
saves time; you focus on content, LaTeX cares about the layout
I actual typesetting, structuring, numbering, referencing and
cross-referencing, indexing and page formatting
with many contributed packages and styles
compile documents in PDF (export to HTML, RTF)
almost all journals and conferences advice using it for
submission.
easier than word processors
http://www.pinteric.com/miktex.html
Mohammed Ahmed (Assoc. Prof. Dr.Ing.) LATEX Crash–Course 28.02.2016 9 / 36
Installation
MiKTeX
LaTeX typesetting system for Windows.
I comes with easy setup and maintenance program.
I includes all the tools you need (latest ver. 2.9).
get it from: http://www.miktex.org/2.9/setup
1 \ documentclass [ ]{ } 1 \
2 \ usepackage { } 2 \
3 3
4 %b a s i c i n f o 4 %
5 \title{ } 5 \
6 \ author { } 6 \
7 \ date { } 7 \
8 8
9 %s t a r t o f doc 9 %
10 \ b e g i n { document } 10 \
11 \ maketitle 11
12 \ tableofcontents 12
13 \listoffigures 13
14 \listoftables 14
15 15
16 Write s t u f f here 16
17 17
18 \ appendix 18
19 19
20 \ bibliographystyle { ieee } 20
21 \ b i b l i o g r a p h y { myRefFile } 21
22 \ end { document } %h e r i s t h e end 22 \
Mohammed Ahmed (Assoc. Prof. Dr.Ing.) LATEX Crash–Course 28.02.2016 13 / 36
First Document with LaTeX Example
1 \ documentclass { a r t i c l e }
2
3 \ t i t l e { H e l l o , C r u e l World ! }
4 \ a u t h o r { O b e d i e n t Grad S t u d e n t }
5
6 \ b e g i n { document }
7 \ maketitle
8
9 \ section { Introduction }
10 T h i s i s w h e r e you t e l l p e o p l e why t h e y s h o u l d b o t h e r r e a d i n g y o u r
article .
11
12 \ s u b s e c t i o n { L i t e r a t u r e Review }
13 T h i s i s t h e s e c t i o n t h a t i s i n v a r i a b l y much l o n g e r t h a n i t s h o u l d
be , and
14 w h e r e e v e r y o n e t r i e s t o i m p r e s s p e e r s a b o u t how e a s y i t i s t o
locate various
15 references in online databases .
16
17 \ subsubsection { Conclusion }
18 Not much o f a p a p e r , b u t i t ’ s a s t a r t .
19 \ end { document }
Contents
1 Introduction 1
1
2.0.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Introduction
1
1
This is where you tell people why they should bother reading your article.
abc.tex”
locate various references in online databases.
2.0.1 Conclusion
Not much of a paper, but it’s a start.
3 See the output using any pdf viewer This is a line of text. This is more text.
Here comes a new line.
But this is a new paragraph.
4
https://en.wikibooks.org/wiki/LaTeX/Document_Structure
Mohammed Ahmed (Assoc. Prof. Dr.Ing.) LATEX Crash–Course 28.02.2016 17 / 36
Text Commands
Font Styles
Use \textbf{stuff} to make stuff bold
Use \emph{stuff} to italicize stuff
Use \underline{stuff} to underline stuff
Font Sizes
\tiny \scriptsize \footnotesize \small \normalsize
\large \Large \LARGE \huge \Huge
Example
\scriptsize{text goes here} gives: text goes here
These are the different sizes available in order: tiny scriptsize footnotesize
small normalsize large Large LARGE huge Huge
Mohammed Ahmed (Assoc. Prof. Dr.Ing.) LATEX Crash–Course 28.02.2016 18 / 36
Lists
There are many ways to make lists. A few of them are: enumerate,
itemize, description, list
Example
\begin{itemize}
\item here here
\item is is
\item something something
\end{itemize}
There are many ways to make lists. A few of them are: enumerate,
itemize, description, list
Example
\begin{enumerate}
\item here 1 here
\item is 2 is
\item something 3 something
\end{enumerate}
Example
Example
\begin{equation}
a_0 = \frac{1}{\pi} \int \limits_{-\pi}^{\pi} f(x)
x^2 \cos(nx) \, dx
\end{equation}
Zπ
1
a0 = f (x)x 2 cos(nx) dx (1)
π
−π
Example
\begin{align}
a_0 &= f(x) \quad \forall x \in X,\\
y &= \cos(nx)+\phi \quad \exists y \leq \epsilon
\end{align}
a0 = f (x) ∀x ∈ X , (2)
y = cos(nx) + φ ∃y ≤ (3)
m complex number
e x − 1 [ ba ] X e x z }| {
lim = = |{z}
x +i y , ∀x ∈ R, ∃y ≤
x→0 2x H
x→0
2 |{z}
real imaginary
1 X12 X13
1 X22 X23
1 .
min x = a0 + +
β̂∈R 1 .
a1 +
1
.
a2 + 1 XT 2 XT 3
1
a3 +
a4
\begin{tabular}[pos]{column specs}
element & element & ... \\ \hline
\end{tabular}
\begin{tabular}{ | l || c ||| r }
\hline
\textbf{a} & \textbf{b} & \textbf{c}\\
\hline a b c
1 & 2 & 3 \\ 1 2 3
4 & 5 & 6 \\ 4 5 6
\hline
\hline 7 8 9
7 & 8 & 9 \\
\hline
\end{tabular}
\begin{figure}[placementSpecifier]
\includegraphics[...]{...}
\caption{text}
\label{key}
\end{figure}
1 2 3
4 5 6
Table: The same logic can be applied to tables.
1 2 3
4 5 6
Table: The same logic can be applied to tables.
5
5
Copyright c 2016 Dr.Ing. Mohammed Nour Abdelgwad Ahmed as part of his course work and teaching material. All
Rights Reserved. Where otherwise noted, this work is licensed under the Creative Commons Attribution-NonCommercial 4.0
International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/
Mohammed Ahmed (Assoc. Prof. Dr.Ing.) LATEX Crash–Course 28.02.2016 36 / 36