Start LaTeX with Windows
[40 mn of reading - published 5/4/2004 6:31:25 PM - Target : Débutant]
|
   
|
Author
5. Creation of an advanced LATEX document
The following example shows a quick view of the most interesting functions given by LaTeX :
| \documentclass[a4paper,10pt]{article}
\usepackage[francais]{babel}
\usepackage[latin1]{inputenc}
\usepackage[dvips]{graphics}
\usepackage{graphicx}
\usepackage{pstricks}
\usepackage{endnotes}
\title{Document {\LaTeX} avancé}
\author{Vincent TROTTIER}
\begin{document}
\psset{linewidth=1mm}
\maketitle
\tableofcontents
\pagebreak
\section{Chapitre 1}
\subsection{Première partie}
Le {\LaTeX} c'est bien...
\subsection{Deuxième partie}
On peut générer des fichiers au format DVI, PS ou PDF avec...
\subsubsection{Une première sous-partie}
On peut insérer un tableau :
\vskip .5cm
\begin{center}
\begin{tabular}{|r|c|c|c|c|}
\hline
Heure & Lundi & Mardi & Jeudi & Vendredi\\
\hline
9h00 & Langage Java & Langage Java & Technologies Cisco & Technologies Oracle\\
11h00 & Entreprise & Langage Java & Entreprise & Technologies Oracle\\
14h00 & Technologies Cisco & Anglais & Langage C++ & Bases de donnees\\
16h00 & Technologies Cisco & Communication & Langage Java & Bases de donnees\\
18h00 & Langage Java & Langage Java & Technologies Linux & Technologies Linux\\
\hline
\end{tabular}
\end{center}
\subsubsection{Deuxième sous partie}
Une photo :
\centerline{\resizebox{10cm}{!}{\includegraphics*[0,0][600,500]{aurelie.jpg}}}
\subsection{Troisième partie}
Et le tout de façon propre...
\section{Chapitre 2}
\subsection{J'imagine que vous devez commencer à comprendre...}
Une formule mathématiques propre et claire\footnote{C'est d'ailleurs pour cette raison que \LaTeX a été écrit} :
\vskip .5cm
$$ \Gamma(z)=\sum_{n=0}^{+\infty} \frac{(1-)^n}{n!(n+z+1)} + \int_{1}^{+\infty}e^{-t}t^{z+1} dt $$
Ou encore :
$$\sum_{n=1}^{+\infty} \frac{1}{n^2}=\frac{\pi^2}{6}$$
\subsection{Il n'y a pas de limites...}
\vskip .5cm
\begin{center}
\begin{pspicture}(-4,-4)(5,5)
\psset{xunit=1cm,yunit=1cm}
\psgrid[subgriddiv=0,griddots=5,gridlabels=7pt](-5,-5)(5,5)
\psline[linewidth=1pt]{->}(-5,0)(5,0)
\psline[linewidth=1pt]{->}(0,-5)(0,5)
\psline[linewidth=.002,linecolor=red](-6,-6)(6,6)
\parabola[linewidth=0.5pt,linecolor=blue](-4,-6)(0,4)
\pscurve[showpoints=true,linewidth=0.5pt](.167,6)(.2,5)(.25,4)(.33,3)(.5,2)(1,1)(2,.5)(3,.33)(4,.25)(5,.2)(6,.167)
\pscurve[showpoints=true,linewidth=0.5pt](-.167,-6)(-.2,-5)(-.25,-4)(-.33,-3)(-.5,-2)(-1,-1)(-2,-.5)(-3,-.33)(-4,-.25)(-5,-.2)(-6,-.167)
\vspace{2cm}
\end{pspicture}
\end{center}
\end{document}
|
Download the source (advanced.tex)
Download the PostScript file (advanced.ps)
Download the PDF file (advanced.pdf)
Download the JPEG file (aurelie.jpg)
The six packages used here have their proper utility. Like it has been explained before, the {babel} package permits you to specify the localsettings to apply on the current document.
The {graphics} package with the option [dvips] permits you to export graphics during the generation of the .ps file.
The {graphicx} package permits you to show pictures, in fact, when it is missing, the file is compiling itself without the picture.
The {pstricks} package permits you to create nice graphics.
At last, the {endnotes} package concerns the notes which are at the end of the page, it is absolutely possible to create end notes without it but not to put them at the end of the file.
When we create a tab, the first thing to do is to explain we are starting it with the command : \begin{tabular}. The \begin{center} and \end{center} commands permits you to center the tab by positionating them before and after the tab.
What we can see after the declaration of he tab permits you on the one hand to show the number of columns that your tab will have and on the other hand to specify the alignment type which will be applied on each column. For example, if you want to create a tree columns tab, with the left one aligned on the left, the center one aligned on the center and the right one aligned on the right, you have to use the following command : \begin{tabular}{|l|c|r|}.
The \hline command permits you to show a line of your tab.
When you want to add a picture, there is a little bit much parameters.
The \centerline{} command permits to center the picture into the page. With the command \resizebox{10cm}{!}{image.eps}, you can defined if you want to resize picture. The exclamation point is here to indicate that if you would modified the abscisse, the ordonned would be automaticaly modified in a proportionnal way. At last, the command : \includegraphics*[0,0][600,500]{image.eps} shows the picture with the parameters under brackets which indicate where we want to place the picture.
As explained before, one of the first target of laTeX is to bring the posssibility for the user to create mathematics formulas. To step in this mathematics mode in LaTeX, it exists somme possibilities : start with \[ and close with \], or start with \begin{displaymath} and close with \end{displaymath}, or again start with $$ ans close with $$. The tree methods are identical from the point of vue of LaTeX, il seems that il would be more interesting to work with $$ because of the simplicity of use and the very small probability of errors in synatx. In the case of the formulas which must be used in a line, you have to use a $ at the beginning of the formulas and a $ at the end.
The following symbols are the most current ones :
\sum_{}
\int_{}
\infty
\frac{}{}
^
\alpha
\beta
\gamma
\delta
\epsilon
\varepsilon
\lambda
\pi
\ro
\sigma
\phi
\omega
|
sum
integral
infinity
fraction
power
alpha
beta
gamma
delta
epsilon
varespilon
lambda
pi
ro
sigma
phi
omega |
|
\Gamma
\Lambda
\Sigma
\Delta
\Omega
\Pi
\forall
\exists
\neg
\prod{}
\oint{}
\bigcap
\bigcup
\in
\sin
\cos
\tan
|
gamma capital
lambda capital
sigma capital
delta capital
omage capital
pi capital
For all
It exists
Logic No
Cross
integral
intersection
union
Is in
Sinus
Cosinus
Tangente |
To compare LaTeX2e and Microsoft Equation 3.0, you can find there some examples of mathematics and scientifics formulas.We will see for example The Passeval equality or again the Biot et Savant rule. All theses formulas had been created with Microsoft Equation 3.0 and LaTeX2e :
This comparative is in any way a value judgement, it only permits you to make yourself an opinion.
|