Sunteți pe pagina 1din 13

1/13

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

A Getting Started with LTEX PsiPhiETC psiphietc@gmail.com

January 11, 2011

2/13

A Document Structure: Hello LTEX!

Getting Started with L EX AT

Hello World! 1 Sectioning 2 Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . . 5

\documentclass{article} \begin{document} Hello \LaTeX ! \end{document}

A Hello LTEX!

3 4

Preamble, Body, Command, Environment, Argument, .tex, Special Characters: \ { } # $ % & , generated les

I hope to die before I have to use Microsoft Word. -D.E. Knuth

3/13

Sectioning

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

\begin{document} \section{Section Name} Section contents \subsection{Subsection Name} Subsection contents \subsubsection{Three levels only} \subsubsection*{*-form} \section{Next Section} \end{document} \section, \subsection, \subsubsection, \subsubsection*, *-form, \chapter etc.

4/13

Words, Sentences and Paragraphs

Getting Started with L EX AT

Hello World! 1 Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

Space separates words. Period separates sentences. Blank line separates paragraphs. left quote

Space separates words. Period separates sentences. Blank line separates paragraphs. left quote % Comment

2 3

4 5 6

What if period is required within a sentence? Use \followed by space after the period. I am using etc. within sentence. \\, \newline, \par, \newpage.

5/13

A Commanding LTEX: Commands

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

January 11, 2011, . , &, .. 1 text, text, text, , 2 , 3 25

\begin{document} \today, \ldots, \&, 3 \textbf{text}, \textit{text}, 4 \emph{text}, \footnote{text}, 5 $\frac{1}{2}$, 6 $\sqrt[3]{25}$ 7 \end{document}
1 2

Starts with \, follow by case sensitive command name (singlenonletter or string of letters) and terminates by a non-letter. \commandName[optArg1,optArg2,. . . ]{arg1}{arg2} etc. Number of useful commands are limited :) Common Errors: Case sensitivity, space within command name, misspelled command name, \shall be followed by valid command name (use it carefully).

6/13

A Commanding LTEX: Environments

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

The minipage environment takes both optional and compulsory arguments. See the use of \verb and \textwidth

\begin{minipage}[h]{0.4\ textwidth} 2 The minipage environment 3 takes both optional and 4 compulsory arguments. 5 See the use of 6 \textbackslash verb and 7 \verb+\textwidth+ 8 \end{minipage}
1

\begin {environment} \end{environment}. begin must have an end. Example: center, gure, tabular, verbatim, array, equation, itemize, enumerate. PACKAGES, usepackage

7/13

Listing Items

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

First Item Second Item O First Item 1 Second Item


Nesting

\begin{itemize} \item First Item 3 \item Second Item 4 \end{itemize}


1 2 5

\begin{enumerate} \item[O] First Item 8 \item Second Item 9 \begin{itemize} 10 \item Nesting 11 \end{itemize} 12 \end{enumerate}
6 7

list, description

8/13

Verbatim Environment

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

\ $ # \item \begin Contents Inline: \ $ #

\begin{verbatim} \ $ # \item \begin 3 Contents 4 \end{verbatim}


1 2 5 6

Inline: \verb+\ $ #+

verbatim, verb

Its is easy to use - if youre one of the 2 percent of the population who thinks logically and can read an instruction manual. The other 98 percent of the population would nd it very hard to use. -Leslie

9/13

Text Type Styles

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . . tiny,

textit, textbf, textsf text

2 3 4

Huge,

This is
5 6 7

small

\textit{textit}, \textbf{textbf}, \textsf{textsf} \\ \textit{\textbf{\textsf{text}}} \\ \tiny{tiny}, \Huge{Huge}, {\small This is small} \normalsize

Composed of three units (i) shape (e.g. \textup , \textit ) (ii) series (e.g. \textmd, \textbf) (iii) family (e.g. \textrm, \textsf ). Combined in logical fashion to produce a wide variety of type styles. Declaration and scoping rule.

10/13

Titlepage

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

Getting Started with A LTEX


Author Name 1 XYZ 2

January 11, 2011

\documentclass{article} \title{Getting Started with \LaTeX} 3 \author{ Author Name 4 \thanks{Scientist} 5 \and 6 XYZ 7 \thanks{xyz} } 8 \date{\today} 9 \begin{document} 10 \maketitle 11 \end{document}
1 2

title, author, thanks, and, date, today, maketitle

11/13

Try Options. . .

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

A LTEX makes life easy

\documentclass[options]{class} \begin{document} 3 \LaTeX\ makes life easy 4 \end{document}


2

options: 10pt | 11pt | 12pt, a4paper | a5paper, landscape, onecolumn | twocolumn, titlepage | notitlepage class: article | report | book | IEEEtran \tableofcontents, \listofgures, \listoftables \abstract{My Abstract}, \appendix{My Appendix}

12/13

Believe it or not! Its Possible in TEX !

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

1/3 = 0.333333333 2 = 1.414213562 e = 2.718281828 = 3.141592653

3 3 3 3 3 3 3333

3 3 3 3 3 33333

3 3 3 3 3 3333

3 3 33

3 7 3 0 9 5 0488

0 1 6 8 8 72420

9 6 9 8 0 7856

9 6 7 1875

3 769

4 5 9 0 4 5 2 353

6 0 2 8 7 4 7135

2 6 6 2 4 9775

7 2 47 0 93

6 999

5 8 9 7 9 3 2 384

6 2 6 4 3 38327

9 5 0 2 8 8419

7 1 69 3 99

3751

13/13

References

Getting Started with L EX AT

Hello World! Sectioning Spaces Commands Environments Lists Verbatim Type Style Titlepage More. . .

S-ar putea să vă placă și