introduction to… about tex & latex what is tex? what is latex? advantages - disadvantages

28
Introduction to… Introduction to…

Upload: peter-sharp

Post on 26-Dec-2015

257 views

Category:

Documents


3 download

TRANSCRIPT

Introduction to…Introduction to…

About Tex & LaTeXAbout Tex & LaTeX

What is TeX?

What is LaTeX?

Advantages - Disadvantages

Text in LaTeXText in LaTeX latex special characters ( % $ # & _ { } \ \textbackslash)

latex commands: “\” + begin {command} “\” + end {command} or “\” + command { applied text }

(one space before (optional) and after command) comments : %comments

Starting a document:

Preamble:Define Document Class :

\documentclass[options]{type}

Options: 11pt, 12pt…Type : article, report, book, letter, slides

(The declaration of the user packages takes place between the preamble and the body of the .tex source file)

Body:Body: (document environment)(document environment)

\begin{document}

.

.

.

\end{document}

All that follows here is ignored.

Plain TextPlain Text

Empty spaces are ignored and are taken as one space.

ParagraphParagraph

(empty line) starts new paragraph \newline or \\ or \linebreak (justifies old line) \newpage or \pagebreak (justifies last line) \bigskip \medskip \smallskip \noindent \indent \centerline{Text-line centered }

\begin{x}...\end{x}

x : center, flushleft, flushright default: justified  Put the “~” symbol or “\nolinebreak” between

words that you don’t want them to be separated..

 

\textbf{BoldFace text} \textit{Italic text} \underline{Underlined text} \textsc{SmallCapitals text} \texttt{Typewriter text} One can go into the other, e.g. BoldItalic \

textbf{\textit{text in BoldItalic}} etc.

Spacing and DotsSpacing and Dots

\tiny \small \large \Large \LARGE \huge \Huge

\ldots \dots \dotfill \hrulefill

Text SizeText Size

FrameBox Lists (enumerate – itemize) Greek: you have to include user package. In

order to include English text within the greek, you have to write: \textlatin{English text}.

Mathematical expressionsMathematical expressions

$ math mode $

(also for simple alphabet letters that you want to use as math symbols.)

Symbols

Other : superscript : $a^n$ or for more, $a^{2+6}$ subscript: $a_b$ or for more $a_{2+6}$

$\overline{x} $ $\frac{numerator}{denominator} $ $\sqrt{x} $ $\overbrace{ x + y bla bla y } $ $\underbrace{ x + y bla bla y } $

Making TablesMaking Tables \begin{tabular}{ | c r | l | } \hlinerow1 cell1 & row1 cell2 & row1 cell3 \\ \hlinerow2 cell1 & row2 cell2 & row2 cell3 \\ \hlinerow3 cell1 & row3 cell2 & row3 cell3 \\ row4 cell1 & row4 cell2 & row4 cell3 \\ \hlinerow5 cell1 & row5 cell2 & row5 cell3 \\ \end{tabular}

MatrixMatrix\[ \left[ \begin{array}{rrrrrrrrrrrrrr}1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 \\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 \\0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 \\

\end{array} \right] \]

Result :Result :

ParBoxParBox \parbox[t]{4in}{Text}

\begin{tabular}{ | c r | l | } \hlinerow1 cell1 & row1 cell2 & \parbox[t]{4in}{\begin{center} row1

cell3\end{center}} \\ \hlinerow2 cell1 & row2 cell2 & row2 cell3 \\ \hlinerow3 cell1 & row3 cell2 & row3 cell3 \\ row4 cell1 & row4 cell2 & row4 cell3 \\ \hlinerow5 cell1 & row5 cell2 & row5 cell3 \\

\end{tabular} The third column’s width is now 4 inches.

Result :Result :

TabbingTabbing

…lets you set your own column Tabs :

Commands :

\= : to define a Tab setting \> : to move to a Tab setting \\ : ends each Row

example :example :

\begin{tabbing} \= \hspace*{.1in} \= \hspace*{.3in} \= \kill\> a)

\> \> Find the powersets and the cardinal numbers of the

following Sets : \\ \> \> \> A = \O , \\ \> \> \> B = \{0,1\} , \\ \> \> \> C = \{1,\{2\}\}, \\

\> \> \> D = \{$x | x = \{ y | y > 0 \wedge y < 4 \} \wedge |x| = 1 \wedge y \in N$\}, \\

\> \> \> E = $C \cap D$ \\\end{tabbing}

Result :Result :

Sometimes we do not want to have the longest portion of text first, yet it is needed to define the tab. The above figure illustrates how this is solved with the \kill command. In the first tabbing, the lines are in the order we want,but the tab is set by the shorter string ‘1-3’, making ‘4-6-8’ extend past the tab. The second tabbing puts the longer field first, in order to set the tab correctly, then specifies \kill instead of \\ to suppress (or “kill”) the printing of the line.

Insert PicturesInsert Pictures\usepackage{graphicx}

 In text: \includegraphics{ picture.eps }

Only .eps format!!!

We think that the best EPS produces is Corel.

Thank you Nenad

Table of ContentsTable of Contents

Manually! :P

Cover PageCover Page

\title{ Aunt Marika’s Autobiography }

\author{ Marika Eleftheraki }

\date{ 1968 } %optional

\maketitle

 

Bibliography / ReferencesBibliography / References

The command “~cite{name}” is put at the point where the user wants to refer to a source.

 \begin{thebibliography}{99} %At most 99 reference items.

 \bibitem{name} surname ~name:

\emph{text appearing in italic},

TitleOfBook % not italic

\end{thebibliography}

Ps TricksPs Tricks Download Package from: ftp://ftp.tex.ac.uk/tex-archive

 At the preamble : \usepackage{pst-all} In text :\psframebox{text in framebox}\psframebox[framearc=.x]{ text in rounded framebox} (x = radius of

corners) \psshadow{ text in shadowed framebox }\psdblframebox{ text in doubled framebox }\pscirclebox[linewidth=xpt]{text in circle} ( % x = line width )\psovalbox[linestyle=dotted] \rotateX{text rotated} ( % X = left, right, down.)\scalebox{x y} ( % x = width , y = height )

Thank you for lis ningThank you for lis ningHave fun using LaTeX

\begin { feelings }

\end { feelings }

Andreas Protopapas&

Phani Nikolopoulou

TeXTeX