latex intro s_dutta_v2

29
An Introduction to Soumyo Dutta [email protected] GT Library & Information Center Graduate Library User Education Workshop Series

Upload: soumyodutta

Post on 17-May-2015

442 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Latex intro s_dutta_v2

An Introduction to

Soumyo [email protected] Library & Information CenterGraduate Library User Education Workshop Series

Page 2: Latex intro s_dutta_v2

2

OutlineLaTeX advantagesLaTeX IDE Parts of LaTeX documentExamplesGeorgia Tech ThesisResources

Page 3: Latex intro s_dutta_v2

3

Why LaTeX is not WYSIWYG*

◦ Manuscript/Typesetting program

Easy to handle large documents◦ Break-up chapters/sections into separate

documents

◦ Easily handle cross-references/citations across parts (almost impossible with Word)

References◦ Cite as you go

◦ Reference generated/sorted automatically

Equations◦ Professional look

◦ Easy to cite

◦ Easy subequations/Math type in text

Formatting◦ Formatting of group of text very easy to change

◦ Change paper from Style A (for a conference) to Style B (for GT Thesis) using the same LaTeX code* What You See Is What You Get

Page 4: Latex intro s_dutta_v2

4

Why LaTeX is not WYSIWYG*

◦ Manuscript/Typesetting program

Easy to handle large documents◦ Break-up chapters/sections into separate

documents

◦ Easily handle cross-references/citations across parts (almost impossible with Word)

References◦ Cite as you go

◦ Reference generated/sorted automatically

Equations◦ Professional look

◦ Easy to cite

◦ Easy subequations/Math type in text

Formatting◦ Formatting of group of text very easy to change

◦ Change paper from Style A (for a conference) to Style B (for GT Thesis) using the same LaTeX code* What You See Is What You Get

Word example of in text equations

Page 5: Latex intro s_dutta_v2

5

LaTeX IDE* – TeXnicCenter

* Integrated Development Environment

Output format

Build (Ctrl + F7)

View Output (F5)

Errors

Warnings

Bad Box

Page 6: Latex intro s_dutta_v2

6

LaTeX IDE – Installing Packages

Page 7: Latex intro s_dutta_v2

7

Parts of LaTeX documentFile saved

as .texDocument

parts:◦ Document class◦ Packages◦ Title block◦ Start/end code◦ Specialized

section◦ Bibliography

Page 8: Latex intro s_dutta_v2

8

Parts of LaTeX documentFile saved

as .texDocument

parts:◦ Document class [option

]{type}

option:• Font size• Papersize

type:• Article• Book• Letter• Report• {.cls}

• Mandatory for all documents

Page 9: Latex intro s_dutta_v2

9

Parts of LaTeX documentFile saved

as .texDocument

parts:◦ Packages

{type}

• After document class• Not mandatory for all documents• Allows you to use commands not included

with LaTeX distribution (e.g. subfigures)

[option]

Page 10: Latex intro s_dutta_v2

10

Parts of LaTeX documentFile saved

as .texDocument

parts:◦ Bibliography

{style}

• Usually before \end{document}• Creates bibliography at that point in the

document• Not mandatory for all documents

style:• .bst• Style

downloaded from Internet

• Various citation styles (e.g. Chicago, IEEE, etc.){reference

file}

reference file:• .bib• Your citation info• Use Jabref or by-

hand

Page 11: Latex intro s_dutta_v2

11

Parts of LaTeX documentImportant code characters

◦ Start/end characters \begin{} … \end{} { [ ( ) ] }

◦ Math text: damping sum $(C_{mq}+C_{m\alpha})$

◦ Commands start with \◦ Comments %

Dividing commands (no need for start/end)◦ \chapter{}◦ \section{} \subsection{} \subsubsection{}

{Name of Section}

Page 12: Latex intro s_dutta_v2

12

Example # 1: Lists• itemize or enumerate

Blank line in LaTeX is not equal to blank line in

text

Page 13: Latex intro s_dutta_v2

13

Example # 1: Lists (Practice)

Page 14: Latex intro s_dutta_v2

14

Example # 2: Figures• graphicx for \includegraphics• subfigure for \subfigure

• \includegraphics[scaling]{location of graphic}

• \subfigure[subcaption]{figure information}

\ref{keyword} refers back to \label{keyword}~ = automatically adds space between words

Page 15: Latex intro s_dutta_v2

15

Example # 2: Figures (Practice) Go to:

◦ http://www.gatech.edu/about save image

◦ http://www.gatech.edu/sports save image

Page 16: Latex intro s_dutta_v2

16

Example # 2: Figures (Practice) Go to:

◦ http://www.gatech.edu/about save image

◦ http://www.gatech.edu/sports save image

Page 17: Latex intro s_dutta_v2

17

Example # 3: Tables

Page 18: Latex intro s_dutta_v2

18

Example # 3: Tables

table and tabular

\multicolumn[num col]{format}{text}

Page 19: Latex intro s_dutta_v2

19

Example # 4: Equations

• amsmath for greek symbols, math, equations

equation and subequation

align and &

Page 20: Latex intro s_dutta_v2

20

Example # 5: References

Manual entriesor

\bibliography{.bib} \bibliographystyle{.b

st}

Page 21: Latex intro s_dutta_v2

21

Combined Practice

Page 22: Latex intro s_dutta_v2

22

Combined Practice

Page 23: Latex intro s_dutta_v2

23

Georgia Tech ThesisDownload thesis template

◦ http://gradadmiss.gatech.edu/thesis/templates.php (Updated August 2010)

What’s included◦ example-thesis.tex – main TeX

file◦ gatech-thesis.cls – class file◦ example-thesis.bib –

bibliography fileFor more information visit

◦ http://gradadmiss.gatech.edu/thesis.php

Page 24: Latex intro s_dutta_v2

24

Georgia Tech ThesisChapter organization

Page 25: Latex intro s_dutta_v2

25

Nomenclature◦makeindex.exe

Georgia Tech Thesis

Sets-up TeXnicCenter to run makeindex automatically

Page 26: Latex intro s_dutta_v2

26

Georgia Tech Thesis• Define nomenclature and nomunit

commandsPackages: nomenclAlso need ifthen to define commands

\makenomenclatureCreates nomenclature before document

Creating a new LaTeX command:\nomenclature[type]{symbol}{text}\nomunit{text}

Page 27: Latex intro s_dutta_v2

27

Georgia Tech Thesis

Example of usage of \nomenclature and \nomunit in code and output

Page 28: Latex intro s_dutta_v2

28

Resources LaTeX 2 Cheat Sheet Math symbols

◦ amath.colorado.edu/documentation/LaTeX/Symbols.pdf Examples from previous GT LaTeX classes

◦ www.prism.gatech.edu/~lo24/LaTeX/◦ www.math.gatech.edu/~keller/latex/

Wikibooks◦ http://en.wikibooks.org/wiki/LaTeX

Google Group: LaTeX Users Group Google: “LaTeX” + (margins, figures, floats, etc.)

Page 29: Latex intro s_dutta_v2

29

Example codes from this classhttp://www.prism.gatech.edu/

~sdutta8/latexDownload

SDutta_Latex_Example_Code.zipUnzip file