LaTeX is a document preparation system for typesetting documents. It separates the content from the formatting to allow the author to focus on the content. LaTeX is commonly used in scientific and technical fields for publishing research papers and theses. It provides features for formatting text, creating lists, inserting images and tables, writing mathematical equations, and generating bibliographies. The LaTeX code is compiled to PDF output for high quality typesetting and layout.
2. A
What is LTEX?
Definition
La-tex [lah-tek or lay-tek]
-noun
A powerful document markup system that uses the
TeX typesetting program. The current version is
LaTeX2e.
3. A
LTEXPhilosophy
Content and Styling should remain separate.
The author writes the content. LaTeX takes care of
formatting details like margins, indentation, and
layout.
4. A
Who uses LTEX?
Users include:
Journals and conferences primarily in scientific
and technical disciplines
Researchers publishing in a scientific, technical
field(mathematics, physics, computer science,
engineering), or humanities field
Students studying in a scientific, technical, or
humanities discipline
6. A
Why use LTEX?
A
LTEXis:
Free and easy to get
Platform independent
Flexible
Capable of superior typographical output
Well suited to typesetting mathematics
8. Getting LaTeX
Windows - Miktex
(http://www.miktex.org/ or ProTeX
http://www.tug.org/protext/)
9. Getting LaTeX
Windows - Miktex
(http://www.miktex.org/ or ProTeX
http://www.tug.org/protext/)
Mac - MacTeX
(http://www.tug.org/mactex/2009/)
10. Getting LaTeX
Windows - Miktex
(http://www.miktex.org/ or ProTeX
http://www.tug.org/protext/)
Mac - MacTeX
(http://www.tug.org/mactex/2009/)
Linux - TeX Live
(http://www.tug.org/texlive/)
11. Specialized Editors
Many free editors are available:
LED (http://www.latexeditor.org/)
TeXnicCenter (http://www.texniccenter.org/)
TeXWorks (http://www.tug.org/texworks/)
TeXMaker (http://www.xm1math.net/texmaker/)
Winedt (http://www.winedt.com/)
TeXlipse-Eclipse plug-in
(http://texlipse.sourceforge.net/)
14. Lyx
The Lyx document processor:
Utilizes the TeX language
Offers a graphical user interface
Offers full support for document features such as equations,
bibliographies, indexes, etc.
Is designed for those who prefer to use LaTeX like a word
processor
www.lyx.org
25. Document Classes
article - shorter works such as papers for class,
conference submissions, and journal articles
report - longer works such as dissertations,
theses, or short books
book - long works with many sections or
chapters
letter - provides special structure for various
aspects of a letter
41. Bibliographies
A
BibTeX is used with LTEXto generate bibliographies.
1. Place bib entries in a separate .bib file
2. Reference the entries in the .tex file
3. Compile both files to generate the bibliography and references
42. Bib Entries
Bib file entry
@Book{ B r o o k s 0 3 ,
a u t h o r = {Max B r o o k s } ,
t i t l e = {The Zombie S u r v i v a l G u i d e } ,
p u b l i s h e r = { Three R i v e r s P r e s s } ,
y e a r = {2003} ,
i s b n = {1400049628} ,
n o t e = { Complete p r o t e c t i o n from t h e l i v i n g dead . }
}
43. Citations
Tex file citation
For more information on attack methods, please consult The
Zombie Survival Guidecite{Brooks03}.
Include these commands at the end of the tex file:
bibliography{bib file name}
bibliographystyle{style name}
53. Mathematics
A
LTEXmust be put into math mode before using
mathematical symbols
Math environments:
Math - short in-line equations
54. Mathematics
A
LTEXmust be put into math mode before using
mathematical symbols
Math environments:
Math - short in-line equations
Displaymath - equations set apart in text
55. Mathematics
A
LTEXmust be put into math mode before using
mathematical symbols
Math environments:
Math - short in-line equations
Displaymath - equations set apart in text
Equation - numbered and centered equations
57. Mathematical Notation
Example:
B· dl = µo IS + µo
∂S
o
∂ΦE ,S
∂t
$$ o i n t { p a r t i a l S}B cdotp d l = mu o I S + mu o
e p s i l o n o f r a c { p a r t i a l Phi { E , S }}{ p a r t i a l t }
58. More Examples
Example:
∞
n=0
f n (a)
(x − a)n
n!
$$sum^{infty}_{n=0} frac{f^{n}(a)}{n!}(x - a)^n$$
¬(p ∨ q) ⇐⇒ (¬p) ∧ (¬q)
$$neg (p vee q) Longleftrightarrow (neg p)
wedge (neg q) $$
60. Math Assistance
You can find:
Binary operators
Trig functions
Set notation
Greek Symbols
Delimeters
and more here : http://web.ift.uib.no/
Fysisk/Teori/KURS/WRK/TeX/symALL.html
63. Amsmath Package
If you use mathematics heavily in your documents,
you might consider using the amsmath package. It
provides some enhancements to the normal LaTeX
math capabilities which make typesetting formulas
easier and more attractive.
Go here for more info:
http://www.ams.org/tex/amslatex.html
64. Packages
A
LTEXpackages are add-ons that provide added or
modified styling features to your document
color- enables you to typeset in color
babel- offers support for other languages
hyperref- provides support for url’s in a
document
Include the following command in the preamble:
usepackage{package name}
65. Graphics
A
LTEXuses the package graphicx to manage graphics
include{graphicx}
This package allows you to:
Use several file formats
Scale images
Crop images
Rotate images
70. Figures
Include figures using the figure environment:
begin{figure}...end{figure}
Placement options:
h - here
t - top of page
b - bottom of page
p - separate page
77. Referencing Figures
Inside the figure environment include:
label{fig:Figure name}
begin{figure}
centering
includegraphics{figure}
caption{Place caption here}
label{fig:figure}
end{figure}
Reference the figure in text with:
ref{fig:Figure name}
78. How to Make A Table
A
To make a table in LTEX use the tabular environment:
begin{tabular}...end{tabular}
79. How to Make A Table
A
To make a table in LTEX use the tabular environment:
begin{tabular}...end{tabular}
Separate columns with the ”&” symbol
Separate rows with the double backslash ””
80. Tabular Layout
Specify the column layout when you call tabular:
begin{tabular}{l|l|l}
Vertical bars produce vertical lines between columns.
Alignment Symbols
l - align left
r - align right
c - centered
81. Tables
begin{tabular}{ l | l | l }
Class
& Species & Lays eggs?
mammal & lion
& XSolidBrush
mammal & tiger
& XSolidBrush
mammal & platypus
& Checkmark
reptile & iguana & Checkmark
reptile & snake
& Checkmark
aves & flamingo & Checkmark
end{tabular}
Class
mammal
mammal
mammal
reptile
reptile
aves
Species
lion
tiger
platypus
iguana
snake
flamingo
Lays eggs?
%
%
!
!
!
!
90. Decoding Error Messages
Steps to decode error messages:
Begin with the first error message
Look for line numbers (l.43 for example)
Line number indicates where error was first
detected
Check spelling!
91. Common Errors
Undefined control sequence - you used a
command that doesn’t exist
Runaway argument - you left off a ”}”
Missing $ inserted - some of your text needs to
be in math mode
Paragraph ended before end was complete missing ”}”
A
LTEXWarning: Reference ... undefined on A
recompile so LTEXcan get all of your references
92. Where To Get Help
A
Books - LTEXConcisely by Adrian Johnstone
Online - numerous manuals available
Research Computing Lab www2.lib.virginia.edu/brown/rescomp/
help/index.html
93. Most Commonly Used Commands
Figure: Top 10 Commands Out of 37,400 .tex Files
95. Special Characters
A
Some characters have a special significance in LTEX
#
$
%
&
ˆ
{
}
They must be preceded by the escape character ””
For example:
$
96. Fonts
Default Font: Computer modern
Default font size: 10pt
How to change the default font:
Additional fonts are available for installation
(http://www.tug.dk/FontCatalogue/)
97. Fonts
Default Font: Computer modern
Default font size: 10pt
How to change the default font:
Additional fonts are available for installation
(http://www.tug.dk/FontCatalogue/)
How to change the default font size:
documentclass command accepts [11pt] and [12pt] as options
fix-cm package overrides font size defaults
special commands