SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
J. Gardner                                             LaTeX Quick Reference                         http://dataninja.wordpress.com

                                               Verbatim                                        can use multiple file types – eps, pdf, jpg,
           Basic Commands                      begin{verbatim}                                  png
                                               ...                                             same rules for referencing and positioning
Notes                                          end{verbatim}
 = line break                                                                                  as table environment
                                               use for typesetting code
bigskip, medskip, smallskip to increase     use verb+stuff here+ for inline verbatim       Footnote
   size of line break                            environment (any delimiter works)             Normal textfootnote{Contents}.
hangindent=.5in before a paragraph forces                                                     thanks{text} can be used to insert
   a hanging indent                            Verse                                             attribution footnote with * at beginning
% = comment                                    begin{verse}
run LaTeX twice if any references,             First line                                    Theorem
                                               Second line                                   newthoerem{name}[counter]{text}
   citations or tables of contents are used.                                                   [section]
                                               end{verse}
Preamble                                       lines have hanging indents                      begin{name}{text}
usepackage[margin=1in]{geometry} for                                                          ...
  tree-saving margins                          Quote                                           end{name}
                                               begin{quote}                                   “text” is what gets printed, “name” is the
usepackage{setspace} doublespacing for       ...
  double-spaced documents                                                                        reference
                                               end{quote}                                     Use newtheorem*{…} for unnumbered
Document template                              Table                                           Precede newtheorem with
documentclass{article}                        begin{table}[htbp]                               theoremstyle{plain, remark, …}
usepackage[options]{packagename               begin{center}                                  Requires usepackage{amsthm}
}                                              begin{tabular}{ccc}
author{Name}                                  0 & 0 & 0                                                        Math
title{Title}                                  0 & 0 & 0
date{Date}                                    end{tabular}                                   Inline formula
begin{document}                               caption{default}                               $x+y$
maketitle                                     end{center}
...                                                                                            Display formulas
                                               label{defaulttable}                            [x+y]
end{document}                                 end{table}
Document structure                             multicolumn{3}{c}{Column Header}               Equation environment
section{Name}                                 begin{tabular}{|llr|} to put vertical lines    begin{equation}
subsection{Name}                                on either side and to make the first          x=y
                                                                                               label{whatever}
subsubsection{Name}                             columns left-aligned and the thirds right-
paragraph{Name}                                                                               end{equation}
                                                 aligned
subparagraph{Name}                            use hline to make a horizontal line            Equation array environment
section*{Name} suppresses numbering           [htbp] specifies position preferences – h:      begin{eqnarray}
tableofcontents generates the TOC               here; t:top; b:bottom; p: special page for    a&=&b+c
                                                 just float objects – in order specified       d&=&e+f
Font styles                                                                                    label{whatever}
bold: textbf{stuff}                           use ref{defaulttable} to reference the table
                                               use p{2in} to create a paragraph columns        end{eqnarray}
italic: emph{stuff}                                                                           aligns equations at = signs
typewriter: texttt{stuff}                     use [3pt] to adjust spacing between rows
                                                                                               nonumber suppresses number on specified
Cite                                           Longtable                                         line
cite{cite-key}                                begin{longtable}{lrr}
                                               caption{text}                                Key mathematical symbols
works with BibTeX and thebibliography                                                         superscript: x^2; subscript: x_2
                                               1 & 2 
Quick bibliography                             endhead                                        fraction: frac{x}{y} = x/y
begin{thebibliography}{99}                    3 & 4                                         Greek letters: alpha, beta, gamma, etc.
bibitem{cite-key} Citation.                   label{text}                                    decorations: hat{x}, bar{x}, tilde{x},
end{thebibliography}                          end{longtable}                                   vec{a}. dot{a}, stackrel{a}{b} puts a
                                               Use for multipage tables                          over b
BibTeX bibliography                            Requires usepackage{longtable}
bibliographystyle{plain}                                                                      rightarrow, leftarrow, Rightarrow
bibliography{database}                        Automatically centered and positioned             (double arrow), Leftrightarrow
database is a .bib file stored externally      Text before endhead is repeated across         leq less than or equal to, geq
plain, unsrt, abbrev are default                pagebreaks                                     fences: left(, right), left[, etc.
  bibliography styles                          Graphics                                        Matrix
                                               begin{figure}[htbp]                            left[begin{array}{ccc}
             Environments                      begin{center}                                  a&b&c
                                               includegraphics{Graphic.pdf}                   d&e&f
Lists                                          caption{example caption}
begin{itemize}                                                                                end{array}right]
                                               label{fig:example}
item Thing
                                               end{center}
end{itemize}
                                               end{figure}
produces a bulleted list                       requires graphicx package
use begin{enumerate} for a numbered list

Contenu connexe

Tendances

Airspeeds | Q & A | Question Analysis | Flight Mechanics | GATE Aerospace
Airspeeds | Q & A | Question Analysis | Flight Mechanics | GATE AerospaceAirspeeds | Q & A | Question Analysis | Flight Mechanics | GATE Aerospace
Airspeeds | Q & A | Question Analysis | Flight Mechanics | GATE AerospaceAge of Aerospace
 
3 strain transformations
3 strain transformations3 strain transformations
3 strain transformationsLisa Benson
 
EES Functions and Procedures for Forced convection heat transfer
EES Functions and Procedures for Forced convection heat transferEES Functions and Procedures for Forced convection heat transfer
EES Functions and Procedures for Forced convection heat transfertmuliya
 
Mechanic of materials 1 lecture 1
Mechanic of materials 1 lecture 1Mechanic of materials 1 lecture 1
Mechanic of materials 1 lecture 1JunaidMasood15
 
Applications Of Mohr's Circle
Applications Of Mohr's CircleApplications Of Mohr's Circle
Applications Of Mohr's CircleMohit Shivane
 
AERODYNAMICS FORCES AND MOMENTS.ppt
AERODYNAMICS FORCES AND MOMENTS.pptAERODYNAMICS FORCES AND MOMENTS.ppt
AERODYNAMICS FORCES AND MOMENTS.ppttauraimamire
 
Simple stresses and strain
Simple stresses and strainSimple stresses and strain
Simple stresses and strainDhruv Trambadiya
 
Chapter 8: Transformation of Stress and Strain; Yield and Fracture Criteria
Chapter 8: Transformation of Stress and Strain; Yield and Fracture CriteriaChapter 8: Transformation of Stress and Strain; Yield and Fracture Criteria
Chapter 8: Transformation of Stress and Strain; Yield and Fracture CriteriaMonark Sutariya
 
Chapter 2 lecture 2 mechanical vibration
Chapter 2  lecture 2 mechanical vibrationChapter 2  lecture 2 mechanical vibration
Chapter 2 lecture 2 mechanical vibrationBahr Alyafei
 
Som (lecture 2)
Som (lecture  2)Som (lecture  2)
Som (lecture 2)Saswat Das
 
EES Functions and Procedures for Natural convection heat transfer
EES Functions and Procedures for Natural convection heat transferEES Functions and Procedures for Natural convection heat transfer
EES Functions and Procedures for Natural convection heat transfertmuliya
 
Basics of finite element method 19.04.2018
Basics of finite element method 19.04.2018Basics of finite element method 19.04.2018
Basics of finite element method 19.04.2018Dr. Mohd Zameeruddin
 
7. Cantilever beam with point load
7. Cantilever beam with point load7. Cantilever beam with point load
7. Cantilever beam with point loadMohammed Imran
 

Tendances (20)

Bending of curved bars
Bending of curved barsBending of curved bars
Bending of curved bars
 
Airspeeds | Q & A | Question Analysis | Flight Mechanics | GATE Aerospace
Airspeeds | Q & A | Question Analysis | Flight Mechanics | GATE AerospaceAirspeeds | Q & A | Question Analysis | Flight Mechanics | GATE Aerospace
Airspeeds | Q & A | Question Analysis | Flight Mechanics | GATE Aerospace
 
Complex stresses (2nd year)
Complex stresses (2nd year)Complex stresses (2nd year)
Complex stresses (2nd year)
 
3 strain transformations
3 strain transformations3 strain transformations
3 strain transformations
 
EES Functions and Procedures for Forced convection heat transfer
EES Functions and Procedures for Forced convection heat transferEES Functions and Procedures for Forced convection heat transfer
EES Functions and Procedures for Forced convection heat transfer
 
Higher order elements
Higher order elementsHigher order elements
Higher order elements
 
Complex stresses
Complex stressesComplex stresses
Complex stresses
 
Basic Elasticity
Basic ElasticityBasic Elasticity
Basic Elasticity
 
Mechanic of materials 1 lecture 1
Mechanic of materials 1 lecture 1Mechanic of materials 1 lecture 1
Mechanic of materials 1 lecture 1
 
Strength of materials
Strength of materialsStrength of materials
Strength of materials
 
Applications Of Mohr's Circle
Applications Of Mohr's CircleApplications Of Mohr's Circle
Applications Of Mohr's Circle
 
AERODYNAMICS FORCES AND MOMENTS.ppt
AERODYNAMICS FORCES AND MOMENTS.pptAERODYNAMICS FORCES AND MOMENTS.ppt
AERODYNAMICS FORCES AND MOMENTS.ppt
 
Simple stresses and strain
Simple stresses and strainSimple stresses and strain
Simple stresses and strain
 
Chapter 8: Transformation of Stress and Strain; Yield and Fracture Criteria
Chapter 8: Transformation of Stress and Strain; Yield and Fracture CriteriaChapter 8: Transformation of Stress and Strain; Yield and Fracture Criteria
Chapter 8: Transformation of Stress and Strain; Yield and Fracture Criteria
 
Chapter 2 lecture 2 mechanical vibration
Chapter 2  lecture 2 mechanical vibrationChapter 2  lecture 2 mechanical vibration
Chapter 2 lecture 2 mechanical vibration
 
Som (lecture 2)
Som (lecture  2)Som (lecture  2)
Som (lecture 2)
 
EES Functions and Procedures for Natural convection heat transfer
EES Functions and Procedures for Natural convection heat transferEES Functions and Procedures for Natural convection heat transfer
EES Functions and Procedures for Natural convection heat transfer
 
Solution manual 16
Solution manual 16Solution manual 16
Solution manual 16
 
Basics of finite element method 19.04.2018
Basics of finite element method 19.04.2018Basics of finite element method 19.04.2018
Basics of finite element method 19.04.2018
 
7. Cantilever beam with point load
7. Cantilever beam with point load7. Cantilever beam with point load
7. Cantilever beam with point load
 

Similaire à Latex cheat sheet

Latex_Tutorial.pdf
Latex_Tutorial.pdfLatex_Tutorial.pdf
Latex_Tutorial.pdfContactAt1
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with TexstudioHossein Babashah
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptMichalis33
 
Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabatinabati
 
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...Jim Webb
 
La tex basics
La tex basicsLa tex basics
La tex basicsawverret
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latextran dinh
 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginnersssuser9e8fa4
 
How to Start Using LaTeX and BibTeX
How to Start Using LaTeX and BibTeXHow to Start Using LaTeX and BibTeX
How to Start Using LaTeX and BibTeXPaolo Pareti
 
Latex for beginners
Latex for beginnersLatex for beginners
Latex for beginnersKaushik Naik
 

Similaire à Latex cheat sheet (20)

Ltxcrib
LtxcribLtxcrib
Ltxcrib
 
LaTeX Cheat Sheet
LaTeX Cheat SheetLaTeX Cheat Sheet
LaTeX Cheat Sheet
 
LaTeX Cheat Sheet
LaTeX Cheat Sheet LaTeX Cheat Sheet
LaTeX Cheat Sheet
 
Latex_Tutorial.pdf
Latex_Tutorial.pdfLatex_Tutorial.pdf
Latex_Tutorial.pdf
 
LaTex tutorial with Texstudio
LaTex tutorial with TexstudioLaTex tutorial with Texstudio
LaTex tutorial with Texstudio
 
Latex Tuitorial
Latex TuitorialLatex Tuitorial
Latex Tuitorial
 
LaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.pptLaTeX_tutorial_Syed_Jan09.ppt
LaTeX_tutorial_Syed_Jan09.ppt
 
Introduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah NabatiIntroduction to latex by Rouhollah Nabati
Introduction to latex by Rouhollah Nabati
 
latex.pptx
latex.pptxlatex.pptx
latex.pptx
 
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
A Hitchhiker S Guide To LaTex (Or How I Learned To Stop Worrying And Love Wri...
 
La tex basics
La tex basicsLa tex basics
La tex basics
 
Introduction Latex
Introduction LatexIntroduction Latex
Introduction Latex
 
Latex Introduction for Beginners
Latex Introduction for BeginnersLatex Introduction for Beginners
Latex Introduction for Beginners
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
Latex Tutorial
Latex TutorialLatex Tutorial
Latex Tutorial
 
Latex hafida-benhidour-19-12-2016
Latex hafida-benhidour-19-12-2016Latex hafida-benhidour-19-12-2016
Latex hafida-benhidour-19-12-2016
 
Chap10 scr
Chap10 scrChap10 scr
Chap10 scr
 
Learn Latex
Learn LatexLearn Latex
Learn Latex
 
How to Start Using LaTeX and BibTeX
How to Start Using LaTeX and BibTeXHow to Start Using LaTeX and BibTeX
How to Start Using LaTeX and BibTeX
 
Latex for beginners
Latex for beginnersLatex for beginners
Latex for beginners
 

Plus de Piyush Mittal

Plus de Piyush Mittal (20)

Power mock
Power mockPower mock
Power mock
 
Design pattern tutorial
Design pattern tutorialDesign pattern tutorial
Design pattern tutorial
 
Reflection
ReflectionReflection
Reflection
 
Gpu archi
Gpu archiGpu archi
Gpu archi
 
Cuda Architecture
Cuda ArchitectureCuda Architecture
Cuda Architecture
 
Intel open mp
Intel open mpIntel open mp
Intel open mp
 
Intro to parallel computing
Intro to parallel computingIntro to parallel computing
Intro to parallel computing
 
Cuda toolkit reference manual
Cuda toolkit reference manualCuda toolkit reference manual
Cuda toolkit reference manual
 
Matrix multiplication using CUDA
Matrix multiplication using CUDAMatrix multiplication using CUDA
Matrix multiplication using CUDA
 
Channel coding
Channel codingChannel coding
Channel coding
 
Basics of Coding Theory
Basics of Coding TheoryBasics of Coding Theory
Basics of Coding Theory
 
Java cheat sheet
Java cheat sheetJava cheat sheet
Java cheat sheet
 
Google app engine cheat sheet
Google app engine cheat sheetGoogle app engine cheat sheet
Google app engine cheat sheet
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Vi cheat sheet
Vi cheat sheetVi cheat sheet
Vi cheat sheet
 
Css cheat sheet
Css cheat sheetCss cheat sheet
Css cheat sheet
 
Cpp cheat sheet
Cpp cheat sheetCpp cheat sheet
Cpp cheat sheet
 
Ubuntu cheat sheet
Ubuntu cheat sheetUbuntu cheat sheet
Ubuntu cheat sheet
 
Php cheat sheet
Php cheat sheetPhp cheat sheet
Php cheat sheet
 
oracle 9i cheat sheet
oracle 9i cheat sheetoracle 9i cheat sheet
oracle 9i cheat sheet
 

Latex cheat sheet

  • 1. J. Gardner LaTeX Quick Reference http://dataninja.wordpress.com Verbatim can use multiple file types – eps, pdf, jpg, Basic Commands begin{verbatim} png ... same rules for referencing and positioning Notes end{verbatim} = line break as table environment use for typesetting code bigskip, medskip, smallskip to increase use verb+stuff here+ for inline verbatim Footnote size of line break environment (any delimiter works) Normal textfootnote{Contents}. hangindent=.5in before a paragraph forces thanks{text} can be used to insert a hanging indent Verse attribution footnote with * at beginning % = comment begin{verse} run LaTeX twice if any references, First line Theorem Second line newthoerem{name}[counter]{text} citations or tables of contents are used. [section] end{verse} Preamble lines have hanging indents begin{name}{text} usepackage[margin=1in]{geometry} for ... tree-saving margins Quote end{name} begin{quote} “text” is what gets printed, “name” is the usepackage{setspace} doublespacing for ... double-spaced documents reference end{quote} Use newtheorem*{…} for unnumbered Document template Table Precede newtheorem with documentclass{article} begin{table}[htbp] theoremstyle{plain, remark, …} usepackage[options]{packagename begin{center} Requires usepackage{amsthm} } begin{tabular}{ccc} author{Name} 0 & 0 & 0 Math title{Title} 0 & 0 & 0 date{Date} end{tabular} Inline formula begin{document} caption{default} $x+y$ maketitle end{center} ... Display formulas label{defaulttable} [x+y] end{document} end{table} Document structure multicolumn{3}{c}{Column Header} Equation environment section{Name} begin{tabular}{|llr|} to put vertical lines begin{equation} subsection{Name} on either side and to make the first x=y label{whatever} subsubsection{Name} columns left-aligned and the thirds right- paragraph{Name} end{equation} aligned subparagraph{Name} use hline to make a horizontal line Equation array environment section*{Name} suppresses numbering [htbp] specifies position preferences – h: begin{eqnarray} tableofcontents generates the TOC here; t:top; b:bottom; p: special page for a&=&b+c just float objects – in order specified d&=&e+f Font styles label{whatever} bold: textbf{stuff} use ref{defaulttable} to reference the table use p{2in} to create a paragraph columns end{eqnarray} italic: emph{stuff} aligns equations at = signs typewriter: texttt{stuff} use [3pt] to adjust spacing between rows nonumber suppresses number on specified Cite Longtable line cite{cite-key} begin{longtable}{lrr} caption{text} Key mathematical symbols works with BibTeX and thebibliography superscript: x^2; subscript: x_2 1 & 2 Quick bibliography endhead fraction: frac{x}{y} = x/y begin{thebibliography}{99} 3 & 4 Greek letters: alpha, beta, gamma, etc. bibitem{cite-key} Citation. label{text} decorations: hat{x}, bar{x}, tilde{x}, end{thebibliography} end{longtable} vec{a}. dot{a}, stackrel{a}{b} puts a Use for multipage tables over b BibTeX bibliography Requires usepackage{longtable} bibliographystyle{plain} rightarrow, leftarrow, Rightarrow bibliography{database} Automatically centered and positioned (double arrow), Leftrightarrow database is a .bib file stored externally Text before endhead is repeated across leq less than or equal to, geq plain, unsrt, abbrev are default pagebreaks fences: left(, right), left[, etc. bibliography styles Graphics Matrix begin{figure}[htbp] left[begin{array}{ccc} Environments begin{center} a&b&c includegraphics{Graphic.pdf} d&e&f Lists caption{example caption} begin{itemize} end{array}right] label{fig:example} item Thing end{center} end{itemize} end{figure} produces a bulleted list requires graphicx package use begin{enumerate} for a numbered list