Transcript Slide 1

Writing Papers with
LaTeX and BibTeX
Martin Klein
[email protected]
TechLunch
ODU, Norfolk, VA
05/16/2007
LaTeX is not...
• rubber
• a Bill Gates product
• WYSIWYG (see)
• VooDoo
• just something for crazy (nerdy)
people with lots of equations and
math symbols
LaTeX is...
• document markup language
• document preparation system for TeX
typesetting
• collection of TeX macros
• plain text with formatting cmds
• WYMIWYG (mean)
Basic Concept
• write text in editor of your choice (*.tex)
• compile (latex)
• results in *.aux, *.log and *.dvi file
• convert dvi to ps, pdf, etc
• or create pdf directly from source
(pdflatex)
• done!
LaTeX - What Do You Need?
• editor of your choice
• WinEdt (compiles and generates pdf for
you)
http://www.winedt.com/
• LaTeX environment (UNIX)
• MikTeX (WIN)
http://miktex.org/
LaTeX Document Structure
• \documentclass{article}
(article, report, book, letter)
• preamble
• \begin{document}
• body
• \end{document}
LaTeX Title Page
• \title{This Is My Title}
• \author{Martin Klein}
• \date{16. May 2007}
• \date{} - to leave it out
• %\date{} - to have LaTeX do it
• \maketitle (in body)
LaTeX Structures
• \chapter{Name of the Chapter}
(not in article)
• \section{My Section}
• \subsection{A Subsection}
• \subsubsection{Subsubsection}
• \tableofcontents (in body)
• e.g. \section*{without numbering, not in
index}
Some LaTeX Commands
\textbf{bold text}
\textit{text in italics}
\texttt{teletype}
\scriptsize - 7pt
\small - 9pt
\normalsize - 10pt
\large - 12pt
\Large - 14pt
\begin{verbatim}
...
\end{verbatim}
\begin{itemize}
\item my item
\end{itemize}
\begin{enumerate}....
\item first item
\end{enumerate}
Equations in LaTeX
•
•
•
•
\begin{equation} ... \end{equation}
\begin{eqnarray} ... \\ ... \end{eqnarray}
$ ... $
\label{mylabel}
Tables in LaTeX
•
•
\begin{table}
\centering
\begin{tabular}{rlc} (|c|c|c|)
•
•
•
•
columns divided by ‘&’
rows end with ‘\\’
\end{tabular}
\caption{mycaption}
\label{mylabel}
\end{table}
Figures in LaTeX
• \usepackage{graphicx} (in preamble)
• \begin{figure}
• \centering
• \includegraphics{filename} (pdf, png, jpg)
• \caption{...}
• \label{...}
• \end{figure}
EPS Figures in LaTeX
• \usepackage{epsfig} (in preamble)
• \epsfig{file=epsfig.eps, scale=0.6}
• use: latex, dvips/dvipdf(m),
ps2pdf/pstopdf
• use: ‘convert fig.png eps3:fig.eps’
Referencing in LaTeX
• \ref{mylabel} for figures, tables,
(sub)sections, equations
• \begin{figure}
...
\label{mylabel}
...
\end{figure}
• \section{mysection} \label{mylabel}
Citations in LaTeX
• data about cited paper stored in .bib file
• \cite{mypaperid}
• before \end{document}
• \bibliographystyle{abbrv}
• \bibliography{mybibfile}
• bibtex command creates .bbl file
• latex, bibtex, latex, latex
Sample BibTeX File Structure
@inproceedings{bergmark:paper,
author = {Donna Bergmark},
title = {Collection synthesis},
booktitle = {JCDL '02: Proceedings of the 2nd ACM/IEEE-CS Joint Conference on DL},
year = {2002},
isbn = {1-58113-513-0},
pages = {253--262},
location = {Portland, Oregon, USA},
doi = {http://doi.acm.org/10.1145/544220.544275},
}
@article{bekaert:didl,
author = {Jeroen Bekaert and Patrick Hochstenbach and Herbert {Van de Sompel}},
title = {Using {MPEG-21 DIDL} to Represent Complex Digital Objects in the {L}os
{A}lamos {N}ational {L}aboratory Digital Library},
journal = {D-Lib Magazine},
volume = {9},
number = {11},
month = {November},
year = {2003},
note = "{doi:10.1045/november2003-bekaert}"
}
http://portal.acm.org/citation.cfm?doid=509907.509965
Books about LaTeX
• Lamport: “LaTeX: A Document Preparation
System”
http://www.amazon.com/LaTeX-Document-Preparation-System2nd/dp/0201529831/ref=pd_bbs_sr_1/104-66439592471150?ie=UTF8&s=books&qid=1179321727&sr=8-1
• Kopka: “Guide to LaTeX”
http://www.amazon.com/Guide-LaTeX-Techniques-ComputerTypesetting/dp/0321173856/ref=pd_bxgy_b_img_b/104-66439592471150?ie=UTF8&qid=1179321727&sr=8-1
• Mittelbach: “LaTeX Companion”
http://www.amazon.com/LaTeX-Companion-Techniques-ComputerTypesetting/dp/0201362996/ref=pd_bxgy_b_img_b/104-66439592471150?ie=UTF8&qid=1179321727&sr=8-1