L A TEX Overview. Jiayi Liu. January 31, Colorado School of Mines

Similar documents
Basic L A TEX. what is LaTeX?

Introduction to LATEX

Introduction to LaTeX. Paul Fodor Stony Brook University

LaTeX. Information Literacy II EN(IL2) Course

Dec. 27 th, 2010 University of Isfahan

An Introduction to L A TEX

Helen Cameron. A Brief Overview of LATEX

Introduction to Latex. A workshop by Dr. Ala Eshmawi

Introduction to LATEX

Introduzione a LaTex. Fabrizio Messina

L A TEX Tutorial. 1 Introduction. 2 Running L A TEX. J. E. Rice. May 2010

What is LaTeX. Is a document markup language and document preparation system for the TeX typesetting program

Latex Tutorial. CIS400 Senior Design 9/5/2013

COMP496/901: Academic Presentation and Writing Skills Using LaTeX

Formatting with LaTeX

عمادة البحث العلمي جامعة الملك سعود

Introduction to L A T E X

An introduction to L A TEX for students

Introduction to L A TEX beamer

An Introduction to. Rado Ivanov CIS400 Senior Design Tutorial September 18, 2014

L A TEXcourse. Carmen Alonso Montes. 30th May-2nd June, 2016

An Introduction to LATEX

Workshop on LATEX 2ε. Asst. Prof. Dr. Kemal Bagzibagli Department of Economics. 20 May 2015

Introduction to L A TEX

Mikkel Madsen

An introduction. C.D. Emmery & M.M. van Zaanen. October 22, Tilburg University

Lecture 1. MA2730: Analysis I. Lecture slides for MA2730 Analysis I. Study and Assessment Components. MA L A TEX: topics for Lecture 1

Mikkel Madsen

COMS 6100 Class note

LaTeX A Tutorial. Mohsen Alimomeni, 2010

L A TEX Workshop. Don Brower

Using L A T E X for scientific writing

Introduction to LaTeX. Christoph Pickl

L A TEX From The Ground Up

Outline. A Sneak Peek

What is T E X? T E X and L A T E X Document preparation tools. Setting and casting type. What Knuth was setting. Setting and casting type

LAT E X week 2: Basics for Writing a Document

Guide to using L A TEX

Researcher Development Unit: Introduction to Latex

Introduction to L A TEX

Helen Cameron. A Brief Overview of LATEX

Useful L A TEX Commands

An Interactive Introduction to L A TEX. Part 2: Structured Documents & More. Dr John D. Lees-Miller. writel A TEX.

Assessments for CS students:

Using LaTex and BibTex to Write Academic Documents. Ligang He Department of Computer Science University of Warwick

Excellent support for mathematical formatting. Automatically downloads/installs missing components as needed Updates somewhat frequently

Learning L A TEX. Patrick Lam

Introduction to L A TEX

Intro to LATEX I. Aaron Erlich POLS/CSSS 510, Why LATEX? Programming Document Structure Floats Tables Lists Math

Research Method and Report Writing Lecture 4: An Introduction to L A TEX

How to get started in L A TEX

An Introduction to L A T E X

CSCM10 Research Methodology A Taster of L A TEX

WYSIWYG Systems. CSCM10 Research Methodology A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems.

L A TEX incollaboration

An Introduction to. Andrew G. West, Jian Chang CIS400 Senior Design Tutorial September 15, 2009

GROUP ASSIGNMENT. L A TEX Assignment 1/3

L A T E X FOSSEE. Department of Aerospace Engineering IIT Bombay. FOSSEE (IIT Bombay) LAT E X 1 / 58

Document Preparation Word Processors

L A TEX-cursus 5th e session: thesis in L A TEX

David Helmbold, October 2005, Revised October 2007

Very Short Introduction to LaTeX

(Yet Another) Introduction to L A TEX 2ε (V3)

Student Learning Service: Introduction to Latex

Introduction to L A TEX

Began as TeX, in 1982 (Knuth). Purely a typesetting tool. LaTeX added macros, maintaining TeX as it s typesetting engine (Lamport).

A Brief Introduction to L A TEX

Introduction to typesetting with L A TEX

Using Beamer for Presentations

L A T E X Workshop. Bijulal D & Anu Thomas Industrial Engineering and Operations Research Indian Institute of Technology

Literate programming with R and L A TEX

L A TEX Class Holiday Inn Fisherman s Wharf San Francisco, CA July Cheryl Ponchin Sue DeMerritt

How to L A TEX. George Wong, David Mykytyn. 6 October 2016

L A TEX. COMPSCI 111 / 111G Mastering Cyberspace: An introduction to practical computing. LaTeX. Development. Why?

PRISM Introduction to L A TEX

WYSIWYG Systems. CSCM10 Research Methodology Lecture 4 (11/2/16): A Taster of L A TEX WYSIWYM. Advantages/Disadvantages of WYSIWYG Systems

LATEX and Beamer. L A TEX and Beamer. Software Freedom Day, Indian Statistical Institute, Kolkata. September 16, 2011.

An Introduction to L A T E X

LATEX TYPESETTING SYSTEM. CAAM 519, CHAPTER 3

CSCM10 Research Methodology A Taster of L A TEX

The basics of LaTeX. Cédric Buron. April 25, 2016

VERY VERY SHORT GUIDE TO LATEX

L A TEX for Psychological Researchers

T E X and L A T E X Document preparation tools

Introduction to. Research Seminar System Analysis. Florian Kragulj

Math 235: Introduction to LaTeX

Introduction to LaTex 2ε. Based on The Not So Short Introduction to LaTeX 2ε by Tobias Oetiker et al., April 2001

A Demonstration of the L A TEX 2ε Class File for the Oxford University Press Ltd Journal. First Author 1 and Second Author 2.

A Beginner s guide to L A TEX for CSCA67/MATA67. Kohilan Mohanarajan

Workshop: A Simple Introduction to L A TEX

Introduction to L A TEX

MATLAB for the Sciences

1 Obtaining LyX and L A TEX

L A TEX: Eh? What is it, what isn t it, who cares? Andy Caird. LATEX: Eh? p.1/13

LYX with Beamer and Sweave

L A TEX for Philosophers

A Brief Introduction to LaTeX

CTAN lion drawing by Duane Bibby \LaTeX and \BibTeX. HJ Hoogeboom 19 april 2013 Bachelorklas

A Very Brief Introduction to L A T E X MAT 3535

An Introduction to LATEX

Transcription:

1 L A TEX Overview Jiayi Liu Colorado School of Mines January 31, 2017 Please refer to LATEX WikiBooks and ShareLaTeX.com Documentation for more details.

2 Brief History TEX ( Tech ) A low-level markup and programming language created by Donald Knuth for typesetting documents L A TEX ( Lah-tech or Lay-tech ) A macro package based on TEX created by Leslie Lamport to simplify TEX typesetting

3 MS Word vs L A TEX Comparison: Word WYSIWYG Convenient Cumbersome Can be ugly L A TEX Use markup language Convenient Cumbersome Mostly pretty Work flow: Word Heavily mouse-oriented Type Use mouse to change See L A TEX Heavily keyboard-oriented Type Compile See

4 Terms System L A TEX is a document preparation system based on TEX Engine An executable that can turn the source code into a printable output format Distribution A collection of packages and programs (compilers, fonts, and macro packages) All in all, distributions are an easy way to install what you need to use the engines and the systems you want.

5 Common Distributions Linux TeX Live Mac OS MacTeX Windows MiKTeX, protext, TeX Live Online Overleaf, Papeeria, ShareLaTeX Just like programming, L A TEX documents can be developed just using simple text editors and command lines, or through the GUI front-end editors (IDE): https://en.wikipedia.org/wiki/comparison_of_tex_editors For direct source editing, I personally recommend TeXstudio. There are also WYSIWYG and WYSIWYM editors.

6 Document Classes L A TEX needs to know the type of document the author wants to create: article IEEEtran report letter beamer (presentations) and many customized classes, eg., thesis

7 Global Structure No matter what document class is selected, the L A TEX files share the same structure: \documentclass{...} % Preamble \usepackage{...} \begin{document} \ title {...} % Top Matter \author{...} \date{...} \maketitle... % Abstract, TOC, Sections, Bibliography, etc. \end{document}

8 Example for Slides Within the Global Structure above, frames can be inserted after the Top Matter and before \end{document}: %----------- slide -----------% \begin{frame}{first Frame} Hello, world! \end{frame} %----------- slide -----------% \begin{frame}{second Frame} A very important point \end{frame}

9 Example for Papers Within the Global Structure, sections can be inserted after the Top Matter and before \end{document}: \ section {...} This section s content... \subsection{...} This subsection s content... \subsubsection{...} This subsubsection s content... L A TEX takes care of the numbering of all sections automatically.

10 Elements Line break One line paragraph.\\ Quotes `quote = quote ``quote = quote ``quote = quote Ellipsis \ldots =... Italic \emph{sample} = Sample Bold \textbf{sample} = Sample Tiny size {\tiny Sample} = Sample Normal size {\normalsize Sample} = Sample Huge size {\huge Sample} = Sample

11 Lists List structures come in three types: itemize: a bullet list enumerate: an enumerated list description: a descriptive list \begin{itemize} \item Item A \item Item B \end{itemize} \begin{enumerate} \item First item \item Second item \end{enumerate} \begin{description} \item [Ant] Ants are tiny \item [Whale] Whales are huge \end{description} Item A Item B 1 First item 2 Second item Ant Ants are tiny Elephant Elephants are huge

12 Footnotes and Links Creating a footnote is easy.\footnote{an example footnote.} Creating a footnote is easy. 1 \url{https://en.wikibooks.org/wiki/latex} \href{https://en.wikibooks.org/wiki/latex}{wikibooks LaTeX} https://en.wikibooks.org/wiki/latex Wikibooks LaTeX 1 An example footnote.

13 Figures \usepackage{graphicx} \begin{figure} \ centering \includegraphics[width=0.5\textwidth]{figures/opencv.png} \ caption{opencv logo.} \end{figure} Figure 1 : OpenCV logo.

14 Subfigures \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{figure} \ centering \begin{subfigure}[h]{0.4\textwidth} \includegraphics[width=\textwidth]{object1.png} \ caption{this is Object 1.} \ label {fig:obj1} \end{subfigure} ~ % add desired spacing between images \begin{subfigure}[h]{0.4\textwidth} \includegraphics[width=\textwidth]{object2.jpg} \ caption{this is Ojbect 2.} \ label {fig:obj2} \end{subfigure} \ caption{here are two objects.}\label{fig:objs} \end{figure}

15 Labels and Cross-Referencing \ section {Greetings}\label{sec:greetings} Hello! \ section {Referencing} I greeted in Section~\ref{sec:greetings}, and I also showed Object 2 in Figure~\ref{fig:obj2}.

16 Tables \begin{tabular}{ l c r } \ hline 1 & 2 & 3 \\ \hline 4 & 5 & 6 \\ \hline 7 & 8 & 9 \\ \ hline \end{tabular} One Two Three Four Five Six Seven Eight Nine l: left-justified column c: centered column r: right justified column : vertical line \hline: horizontal line

17 Maths and Symbols \usepackage{amsmath} There are two ways to show math contents: text: text formulas are displayed inline \(...\), or $...$ displayed: displayed formulas are separate from the main text \[...\], or \begin{equation}...\end{equation} See the Math sections of the WikiBooks for details on displaying math symbols, Greek letters, operators, powers, fractions, integrals, etc.

18 Algorithms and Source Code Listings \usepackage{algorithmic} \begin{algorithmic} \IF {$i \geq maxval$} \STATE $i \gets 0$ \ELSE \IF {$i+k \leq maxval$} \STATE $i \gets i+k$ \ENDIF \ENDIF \WHILE{condition} \STATE stuff \ENDWHILE \end{algorithmic} if i maxval then i 0 else if i + k maxval then i i + k end if end if while condition do stuff end while

19 Algorithms and Source Code Listings This single line directly displays the code from an external C file! \lstinputlisting[language=c,showstringspaces=false]{code/foo.c} #include <stdio.h> #define N 10 /* Comment */ int main() { int i; // Line comment. puts("hello world!"); for (i = 0; i < N; i++) { puts("latex is also great for programmers!"); } return 0; }

20 Columns for Slides \begin{columns} \begin{column}{0.6\textwidth} This way, the space of this very slide is divided into \end{column} \begin{column}{0.4\textwidth} 60\% for the left part and 40\% for the right part. \end{column} \end{columns} This way, the space of this very slide is divided into 60% for the left part and 40% for the right part.

21 Columns for Papers Using a standard L A TEX document class, like article, you can simply pass the optional argument twocolumn to the document class, e.g., \documentclass[twocolumn]{article}. Another method is to use the multicol package: \usepackage{multicol} \begin{multicols}{3} lots of text \end{multicols}

22 Bibliography One way to attach the references after the text and just before the \end{document} command is to use the built-in thebibliography environment: \begin{thebibliography}{7} \bibitem{lamport94} Leslie Lamport, \emph{\latex: a document preparation system}, Addison Wesley, Massachusetts, 2nd edition, 1994. \end{thebibliography} [1] Leslie Lamport, L A TEX: a document preparation system, Addison Wesley, Massachusetts, 2nd edition, 1994. The parameter after the \begin{thebibliography} command tells L A TEX to reserve the width of the parameter itself for all the entries. Here is an example:

23 Bibliography \begin{thebibliography}{makeitthiswide} \bibitem{lamport94} Leslie Lamport, \emph{\latex: a document preparation system}, Addison Wesley, Massachusetts, 2nd edition, 1994. \end{thebibliography} [1] Leslie Lamport, L A TEX: a document preparation system, Addison Wesley, Massachusetts, 2nd edition, 1994. It is the width of the parameter that matters.

24 Citations To cite a given document, just insert the citation key in the text: LaTeX \cite{lamport94} has some advantages and disadvantages in comparison with LibreOffice Writer or Microsoft Word. LaTeX [1] has some advantages and disadvantages in comparison with LibreOffice Writer or Microsoft Word.

25 BibTeX A BibTeX database is stored as a.bib file. It is a plain text file, and so can be viewed and edited easily. An example of a BibTeX entry is like: @article{greenwade93, author = "George D. Greenwade", title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({ CTAN})", year = "1993", journal = "TUGBoat", volume = "14", number = "3", pages = "342--351" } Each entry begins with the declaration of the reference type, in the form of @type.

26 BibTeX To include the BibTeX entries, place the following commands before \end{document}: \ bibliographystyle {plain} \ bibliography {db1.bib,db2.bib,db3.bib} Note the lack of whitespace between the commas and the next bib file. A commonly used bibliography style for papers is IEEEtran.

27 Examples A minimal working example for slides is in the Example slides folder. The Example papers folder includes the IEEE L A TEX and BibTeX templates. You can start with the bare conf.tex file. There are lots of great comments in these templates. They are also available at https://www.ieee.org/conferences_events/conferences/ publishing/templates.html The GUI L A TEX editors like TeXstudio provide template wizards for various document types.