Download presentation
Presentation is loading. Please wait.
Published byJacob Blair Modified over 9 years ago
1
Adopted from: PRISM Brownbag Series June 9 th, 2009 Byungwon Woo
2
What is LaTeX? LaTeX is pronounced “lay-tech” or “lah- tech,” not “la-teks.” LaTeX is a document preparation system for high-quality typesetting. LaTeX is most often used to produce technical or scientific documents, but it can be used for almost any form of publishing.
3
Why Use LaTeX? Designed by academics and easily accommodates academic use. Professionally crafted predefined layouts make a document really look as if “printed.” Mathematical symbols and equations are easily integrated. Even complex structures such as footnotes, references, table of contents, and bibliographies can be generated easily. Forces author to focus on logical instead of aesthetic structure of a document. Creates more beautiful documents. Portable, compatible, flexible, versatile, and cheap (or free)!
5
Installing LaTeX In Windows MiKTeX MiKTeX is a typesetting system for the Windows. Download from www.miktex.org for freewww.miktex.org It is generally recommended to install MiKTeX first, then WinEdt. WinEdt WinEdt is a text editor. WinEdt creates the source file (.tex and others). Download from www.winedt.com for free for 30 days.www.winedt.com WinEdt costs $30.
6
Installing LaTeX Other text editors There are other text editors. Winshell for free (http://www.winshell.de/)http://www.winshell.de/ Scientific Workplace ○ Combination of LaTeX and Mathematics program ○ Does a good job of calculating and graphing, very user friendly, but expensive In Mac TexShop Download for free http://www.uoregon.edu/~koch/texshop/ http://www.uoregon.edu/~koch/texshop/ Includes everything!
7
DIY
8
Basic Document Structure The format of a document is pretty simple. – In the preamble Documentclass Packages – In the front matter Title/author – In the body Contents – In the back matter bibliography
9
In the Preamble You specify your document class. Document classes: letter, article, report, book, slides(beamer, prosper) ○ \documentclass[12pt]{article} ○ Backslash – at the beginning of text markup command Packages: numerous packages are available ○ \usepackage[margin=1in]{geometry} ○ \usepackage{setspace} ○ \usepackage{harvard}
11
In the Front Matter \begin{document} \title{} \author{} \maketitle \begin{abstract} \end{abstract} \pagebreak
13
Journal Article
14
Document Class Article – has sections, subsections etc Report – has chapters, sections, subsections etc. Book – all the stuff for real books Slides – clearly for slides
15
Document Class Options Size of main font in document Paper size Number of columns in document Duplexing or not (double sided printing) Page layout Whether chapters must begin on a RHS page
16
Project Management Sometimes you don’t want to keep everything in one text file Often it is more convenient to have one file per chapter, section, etc.
17
Multiple-file Project \begin{document}[letter,12pt]{report} \title{A Simple Report} \include{Chapter1} \include{Chapter2} \end{document} Main.tex Chapter2.tex Chapter1.tex
18
In the Body To begin a new section \section{} – Similarly, \subsection{}, \subsubsection{}, \subsubsubsection{} – LaTeX does automatic numbering. If you don’t like it, use section*{} \emph{}, \textbf{} \singlespacing, \doublespacing, \onehalfspacing \centering or \begin{centering} & \end{centering}
19
Footnotes/Quotes/Equations \footnote{} \begin{quote} & \end{quote} ` ’, `` ’’ for quatations Mathematical Equations Math always in between $ & $ ○ Alternatively, \begin{equation} & \end{equation} $ 1+4=5 $ \frac{}{}, \sqrt{}, \sum_{k=1}^{n} ^{}, _{} \greek letters (e.g. \alpha or \Alpha) WinEdt also provides click and type functions.
20
Citations \cite{bibtexkey}, citeyear{bibtexkey} It is more convenient to create a bibliography file, called bibtex file(.bib) and use it as needed. WinEdt is capable of creating a bib file, but there are more convenient tools out there. JabRef (http://jabref.sourceforge.net/)http://jabref.sourceforge.net/
24
Typing Normal Text Quotation marks – `` -> “ and ‘‘ -> ” & symbol is saved so use \& % symbol is saved so use \% ~ is a non-breaking space so use ~~
25
Cross-referencing First label what you wish to reference \section{Wing Design}\label{sec:wingDesign} Then you can reference it by using \ref{} So as I was saying in~\ref{sec:wingDesign} Bibliographies work very similarly
26
Environments Environments are used to hold special things like Figures and Tables Figures will float – meaning they will move with the text so that they appear in the best spot for the manuscript’s appearance This means that figures are placed at the top or bottom of pages wherever possible. Also includes things like lists
27
Lists There are 3 basic types of lists Enumerate (numbered lists) Itemize (bulleted lists) Description (lists started by a descriptor) \begin{enumerate} \item Birds \item Trees \end{enumerage} 1.Birds 2.Trees \begin{itemize} \item Birds \item Trees \end{ itemize } \begin{description} \item[Birds] fly \item [Trees] don’t \end{description} Birds Trees Birds fly Trees don’t
28
Tables Tables are anchored in the text C1C2C3 ABC DEF \begin{table} \center\caption{A Simple Table}\label{tb:simple} \begin{tabular}{r|rc} C1 & C2 & C3 \\ \hline A & B & C\\ D & E & F\\ \end{tabular} \end{table} Table 1: A Simple Table
29
Figures Tables are anchored in the text \begin{figure}[h] % Requires \usepackage{graphicx} \includegraphics[width=8in]{SimpleFigure}\\ \center\caption{A Simple Figure}\label{fig:simple} \end{figure} Figure 1: A Simple Figure
30
Mathematical Formulae Multiple ways to enter math mode 1. In line with text using $ 2. Equation environment – This will number your equations off to the side! 3. Equation array environment – Allows you to type multiple equations at a time in a single environment and have them nicely separated.
31
Math Mode Changes many rules from normal text Most spaces in math mode have no significance and are ignored Empty lines are not allowed – only one paragraph per formula There are LOTS and LOTS of symbols Use references or GUI shortcuts until you learn the ones you will need
32
In line with Text
33
Equation Environment \begin{equation} \label{eq:eps} \epsilon > 0 \end {equation} From (\ref{eq:eps}), we gather \ldots{}From \eqref{eq:eps} we do the same.
34
Equation Array Environment \begin{eqnarray} f(x) & = & \cos x\\ f ’(x) & = & -\sin x\\ \int_{0}^{x} f(y)dy & = & \sin x \end{eqnarray}
35
In the Back Matter Don’t forget bibliography{filename} Make sure that the bibtex file is saved in the same location where the main tex file is saved. Don’t forget end{document}
36
Seeing the Document Press on the smiling bear to convert to.dvi Press on the PDF/LaTeX to convert to.pdf Press on the PDF+happy bear to convert to.pdf and open it
37
Common Mistakes Often times, you make a mistake when creating a document. You will notice the log file reporting a problem. There are some common mistakes: “end” doesn’t follow “begin” $ doesn’t follow $ Using commands from packages lot defined in the preamble Don’t forget “\”s.
38
Other Resources Books Leslie Lampert. 1994. LaTeX: A Document Preparation System. Helmut Kopta and Patrick W. Daly. 2004.Guide to LaTex Frank Mittelbach et al. 2004. The LaTeX Companion Online Guides http://en.wikibooks.org/wiki/LaTeX http://tobi.oetiker.ch/lshort/lshort.pdf CV and dissertation templates are available on line
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.