Head First
TEIL Group Meeting
ChungHsiang Hsueh
2010.12.9
Agenda
• Introduction
o LaTeX
o TexMaker
• Basic scripts
o Document settings
o others
• Advanced scripts
o Math equations
o Table
o Reference
• Examples
Agenda
• Introduction
o LaTeX
o TexMaker
• Basic scripts
o Document settings
o others
• Advanced scripts
o Math equations
o Insert graph
• Examples
Introduction
Engine
Macro
GUI
Installation Instruction
• Ubuntu: software center
-> find Texmaker
-> one click
-> Texmaker and TexLive are installed !
• Windows: Install TexLive and Texmaker respectively.
• Mac OSX: Haven’t tried…
Head First : Hello World
1.Make a new file(Ctrl+n)
2.Insert “Hello World!” here
3.Save file and then choose
Latex and press down the
arrow
Head First : Hello World
Debug Message
Head First : Hello World
Agenda
• Introduction
o LaTeX
o TexMaker
• Basic scripts
o Document settings
o others
• Advanced scripts
o Math equations
o Insert graph
• Examples
Character and Control Sequences
Symbol Function Example Output
 Starter of commend LaTeX
% comment %this line is ignored
this line is not ignored
{} Required Argument
s/Args Grouping
LaTeX is good
{LaTeX} is good
%=LaTeX{} = LaTeX
[] Optional arguments documentclass[12pt]{arti
cle}
$...$
(inline)
$$...$$
(display)
Embedding math
expressions
$math$
$math2$
$$math double$$
~ Generate a space Hello~World~
# Define macro
& Separate the entries
in different columns.
Document Environment
• Environment =
documentclass{article}
%preamble
begin(document)
%contents
%.......
%......
end(document)
Document Class[opt args]{type}
{
opt args =
[ FontSize = 10pt,11pt,12pt…]
[ PaperSize = a4paper,
letterpaper,b5paper…]
[ onecolumn ,twocolumn]
[oneside,twoside]
[ lanscape, portait ]
…etc
type =
[article = no chapter,oneside]
[report = with chapter,oneside]
[book]
[letter]
[slides]
[minimal] %for test
}
Case Study: Article
Title page & nested settings
preamble
Preamble
‧usepackage[]{} %include necessary macros
-usepackage{graphicx,times,amsmath}
-usepackage[usenames,dvipsnames]{color}
‧Format settings for whole document
-linespread{1.36} %行距
-parindent=0pt %內縮
-textwidth 178mm
-topmargin -6mm
-etc…
Title Page & Abstract
• Title page
o title{This Is a Title}
o author{ A and B }
o data{9 Dec 2010}
o thanks{Thank u~} %similiar to footnote{…}
o maketitle %collect the info above and make a title page
• Abstract
o begin{abstract}…end{abstract}
Fonts
Font
encoding OT1/T1/…
family
series
shape
size
Huge,Large,Med
ium,Small,Tiny
…
Fonts
emph{Typestyle Roman} change to
Largetextbf{Bold Style}, then to
smalltextsl{Slant style} and back to
Hugetextrm{Rome}.
Paragraph
1.2+lines
2.par
Agenda
• Introduction
o LaTeX
o TexMaker
• Basic scripts
o Document settings
o others
• Advanced scripts
o Math mode
o Insert graph
• Examples
Math Mode
• Inline
o $...$ or (…)
• Display
o $$...$$ or […]
• Ex.
Math Mode
• Functions
o $frag{numerator}{denominator}$
o $sqrt[root]{function}$
o $exp{arg}$
o $int_ini^end{function}$
o …etc
• Array
o [
begin{array}{|r|c|l|} hline
x11 &x12 &x13  hline
x 21 &x22 &x23  cline{2-3}
x 31 &x32 &x33  hline
end{array}
]
Case Study: Trap function
Math Mode
• Multiline Formulae--eqnarray
List Items
• Itemized List
o begin{itemized}
item[label] A
item[label] B
end{itemized}
• Enumerated
o begin{enumerated}
item N
end{enumerated}
• Descriptive List
o begin{description}
item N
end{description}
Tabular
• Tabular
Reference
• begin{thebibliography}{fontSize}
bibitem{key} Author (Year) “Title”{Journal} …
end{thebibliography}{fontSize}
TODO…
• Figure
• Root structure
• Reference
• Label
• Cite
• Section

Head first latex