/
A Short Intro to A Short Intro to

A Short Intro to - PowerPoint Presentation

jane-oiler
jane-oiler . @jane-oiler
Follow
400 views
Uploaded On 2016-06-22

A Short Intro to - PPT Presentation

Marco D Santambrogio Politecnico di Milano Sala Seminari DEIB 2 Sept 2015 Ver 10 2 915 What are TeX and LaTeX LaTeX is a typesetting systems suitable ID: 372632

document latex tex file latex document file tex bibliography section create text bibtex usepackage matter winedt www title author figure packages http

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "A Short Intro to" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

A Short Intro to

Marco D. SantambrogioPolitecnico di Milano

Sala Seminari @ DEIB2 Sept 2015

Ver. 1.0 @ 2/9/15Slide2

What are TeX and

LaTeX?LaTeX is a typesetting systems suitable

for producing scientific and mathematical documentsLaTeX enables authors to typeset and print their work at the highest typographical quality.LaTeX is pronounced “Lay-tech”.LaTeX uses TeX formatter as its typesetting engine.TeX is a program written by Donald Kunth for typesetting text and mathematical formulas

2Slide3

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.3Slide4

Process to Create a Document

Using LaTeX4

TeX input filefile.tex

DVI filefile.dvi

Out input file

file.ps or file.pdf

Run LaTeX program

Run Device Driver

Your source LaTeX document

Device independent output

> latex file.tex

> xdiv file.dvi

> dvips file.dvi

> pdflatex file.tex

Unix Commands

runs latex

previewer

creates .

ps

creates .

pdf

directly Slide5

Installing LaTeX

In WindowsMiKTeXMiKTeX is a typesetting system for the Windows.Download from

www.miktex.org for freeIt is generally recommended to install MiKTeX first, then WinEdt.WinEdtWinEdt is a text editor.WinEdt creates the source file (.tex and others).Download from www.winedt.com for free for 30 days.WinEdt costs $30.Slide6

Installing LaTeX

Other text editorsThere are other text editors.Winshell for free (http://www.winshell.de/

)Scientific WorkplaceCombination of LaTeX and Mathematics programDoes a good job of calculating and graphing, very user friendly, but expensiveIn MacTexShop Download for free http://www.uoregon.edu/~koch/texshop/Includes everything!Slide7

How to Use LaTeX to Create

DocumentsStart with a skeleton document (create it by yourself

, get it from you classmates, download it from journals’ website)Fill stuff (text, formula, figure, table …) into your skeleton document Run LaTeX to generate output and make modificationsLearn as you goThe not so short introduction to LaTeX2e http://tobi.oetiker.ch/lshort/lshort.pdfComprehensive TeX archive network http://www.ctan.org/

Beginning LaTeX http://www.cs.cornell.edu/Info/Misc/LaTeX-Tutorial/LaTeX-Home.htmlGoogle7Slide8

Basic Document Structure

\

documentclass [12pt]{article}

\usepackage {color}\usepackage {graphicx}\begin{document}\end{document}

Define the types of the document (article, book, thesis …)

Preamble. Incorporate packages or define macros here

Main body, stuff to be printed, title, authors, abstract, sections, references, ….Slide9

Basic Document Structure…

more detailsThe format of a document is pretty simple.

In the preambleDocumentclassPackagesIn the front matterTitle/authorIn the bodyContentsIn the back matterbibliographySlide10

Basic Document Structure…

more detailsThe format of a document is pretty simple.

In the preambleDocumentclassPackagesIn the front matterTitle/authorIn the bodyContentsIn the back matterbibliographySlide11

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}Slide12

In the Front Matter

\begin{document}\title{}\author{}\maketitle\begin{abstract}\end{abstract}

\pagebreakSlide13

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{}. \textit{}\singlespacing, \doublespacing, \onehalfspacing\centering or \begin{centering} & \end{centering}Slide14

Footnotes/Quotes/Equations

\footnote{}\begin{quote}, \end{quote}

Mathematical EquationsMath always in between $ & $Alternatively, \begin{equation} & \end{equation}$ 1+4=5 $\frac{}{}, \sqrt{}, \sum_{k=1}^{n}^{}, _{}\greek letters (e.g. \alpha or \Alpha)Slide15

Figures

You can insert figures in pdf, jpg, eps, and other

formats into your document.Multiple figures can be inserted using \subfigure15\begin{figure} \centering \includegraphics {name of the figure file} \caption{Put the caption here} \end{figure}Slide16

Cross Referencing

LaTeX generates numbers for Theorem, Equation, Section, Figure and other environments automatically. You can access them with \label and \ref

16\section{Introduction} \label{sec:intro} ….In Section \ref{sec:intro}, we ….Slide17

Citations

\cite{bibtexkey}It is more convenient to create a bibliography file, called bibtex file(.bib) and use it as needed.Slide18

Bibliography by hand

\begin{thebibliography}{} \bibitem[Come95]{Come95} Comer,D. E., {\it Internetworking with TCP/IP:Principles, Protocols and Architecture},

volume 1, 3rd edition. Prentice-Hall,1995.\end{thebibliography} Slide19

Bibliography using Bibtex

Bibliography information is stored in a *.bib file, in Bibtex format.Include

chicago package\usepackage{chicago}Set referencing style\bibliographystyle{chicago}Create reference section by\bibliography{bibfile with no extension}Slide20

In the *.bib file…

@book{Come95,author=“D. E. Comer”,title={Internetworking with TCP/IP: Principles, Protocols and Architecture},

publisher=“Prentice-Hall”,year=1995,volume=1,edition=“Third”}Slide21

How to cite

Citing references in text\cite{cuc98} = (Cuce 1998)\citeN{cru98} = Crud (1998)\shortcite{tom98}

= (Tom, et. al. 1998)Creating Bibtex FilesUse Emacs with extensions.or copy Bibtex entries from bibliography database.Slide22

In the Back Matter

Do not forget bibliography{filename}Make sure that the bibtex file is saved in the same location where the main tex file is saved.Do not forget

\end{document}Slide23

To Do…

Install all the necessary toolsTry to write your first LaTeX docHow to create a list?How to create numbered list?How to add a table?How to organize the doc over several files (e.g. one file per chapter/section)?

23Slide24

Credits

PRISM Brownbag Series, Byungwon WooDept. of Applied Math & Statistics, School of Engineering, University of California Santa CruzThomas Madsen

24Slide25

QUESTIONS?

25