Outils pour utilisateurs

Outils du site


issue66:tutoriel_-_apprendre_latex

Table des matières

intro

Titre : Learning LaTeX Don't kernel panic Python fans. Greg will return next month. LaTeX is a document preparation system for high-quality typesetting. Although it is mainly used in the technical or scientific fields, it is suitable for almost any form of publishing. This short article will take you from program-installation to the production of a typeset document. The intention is to help those who are unfamiliar with LaTeX to make a start on this interesting journey. Old hands are unlikely to learn anything new here. First, you need some way of processing your documents. I would recommend an editor. Begin by installing LaTeXila. I use Synaptic, but the Ubuntu Software Center should also suffice. Hard-core Ubuntu users may prefer the command-line, using apt-get. If you do not know how to install programs on Ubuntu, ask a geek for help, or hunt around on the internet.

Titre: Apprendre LaTeX

Fans de Python, ne passez pas en mode « kernel panic ». Greg sera de retour le mois prochain.

LaTeX est un système de préparation de documents pour une typographie de haute qualité.

Bien qu'il soit principalement utilisé dans les domaines techniques ou scientifiques, il est adapté à presque n'importe quelle forme de publication.

Ce court article va vous guider depuis l’installation du programme à la production d'un document composé.

Le but est d'aider ceux qui ne connaissent pas LaTeX à faire les premiers pas sur ce chemin captivant. Les vieux routards ne sont pas susceptibles d'apprendre quelque chose de nouveau ici.

Tout d'abord, vous devez trouver un moyen de traiter vos documents. Je recommanderais un éditeur. Commencez par installer LaTeXila. J'utilise Synaptic, mais la Logithèque Ubuntu devrait suffire. Les utilisateurs purs et durs d'Ubuntu peuvent préférer la ligne de commande, en utilisant apt-get. Si vous ne savez pas comment installer des programmes sous Ubuntu, demandez de l'aide à un connaisseur, ou faites des recherches sur Internet.

LaTeXila

I have chosen LaTeXila simply because I am most familiar with it, and it includes everything you need to follow this article. There is also Lyx, Winefish LaTeX Editor, and Texmaker, to name others. Stick with LaTeXila for now. Now that LaTeXila is installed, open it and do the following: File, New, Article, Ok. You should see this in the edit window: \documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \title{} \author{} \begin{document} \maketitle \tableofcontents \begin{abstract} \end{abstract} \section{} \end{document}

J'ai choisi LaTeXila simplement parce qu'il m'est très familier et contient tout ce dont vous avez besoin pour suivre cet article. Il y a aussi, notamment, Lyx, Winefish LaTeX Editor, Texmaker. Restons avec LaTeXila pour l'instant.

Maintenant que LaTeXila est installé, ouvrez-le et procédez comme suit :

File, New, Article, Ok.

Vous devriez voir ceci dans la fenêtre d'édition :

\documentclass[a4paper,11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern}

\title{} \author{}

\begin{document}

\maketitle \tableofcontents

\begin{abstract} \end{abstract}

\section{}

\end{document}

LaTeXila initialises the new article by including the basic instructions required for typesetting. Now you can add text. Put the cursor between the curly brackets in the title line and give the document a title. For example: “\title{Learning \LaTeX\@}” but without the quotation marks. Don't forget the space between the “g” of “Learning” and the backslash next to “LaTeX”; also don't forget the “@”. Type the name of the author. For example: “\author{Tex Ryter}”. Omit the quotation marks. Type a few words between “\begin{abstract}” and “\end{abstract}.” Such as: “A wonderful way to write good looking documents.” Again, leaving out the quotation marks. “\section{}” is where you type the title of the first section of your document. “\section{The First Step To Learning \LaTeX\@}” Then, between \section{} and \end{document}, let's paste some text. Use Lorem Ipsum. It is simply dummy text used by the printing and typesetting industry. See http://www.lipsum.com/ for further details. Here is a small sample: “Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id erat sodales sem laoreet euismod.” You can use whatever plain text you like, just make sure it is letters, numbers and punctuation like commas and full stops only. Paste about five paragraphs.

LaTeXila initialise le nouvel article en incluant les instructions de base nécessaires pour la composition/mise en page. Maintenant, vous pouvez ajouter du texte.

Placez le curseur entre les accolades de la ligne de titre et donnez un titre au document. Par exemple : « \title{Learning \LaTeX\@} » sans les guillemets. Ne pas oublier l'espace entre le « g » de « Learning » et le backslash à côté de « LaTeX » ; ne pas oublier non plus le « @ ».

Tapez le nom de l'auteur. Par exemple : « \author{Tex Ryter} », sans les guillemets.

Tapez quelques mots entre « \begin{abstract} » et « \end{abstract} », tels que : « Une merveilleuse façon d'écrire de bons documents de qualité. » Encore une fois, en laissant de côté les guillemets.

« \section{} » est l'endroit où vous tapez le titre de la première section de votre document. « \section{Première étape pour apprendre \LaTeX\@} ».

Puis, entre \section{} et \end{document}, collons du texte. Utilisez Lorem Ipsum. C'est tout simplement un faux texte utilisé par l'industrie de l'impression et de la typographie. Voir http://www.lipsum.com/ pour plus de détails. Voici un petit échantillon : « Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id erat sodales sem laoreet euismod. » Vous pouvez utiliser le texte que vous voulez, mais assurez-vous qu'il n'est composé que de lettres, de chiffres et de signes de ponctuation tels que des virgules et des points. Coller environ cinq paragraphes.

Section 2

Now you want to process your document. First save it. Use a file name without spaces, followed with the extension tex. (filename.tex) Then press F7. The document should be processed quickly with details appearing at the bottom of the screen, as shown above right. The warnings are just to let you know that you must compile again. LaTeX needs two passes to process the Table of Contents. (TOC) What happened to LaTeXila? Let's just say, it's all part of the LaTeX system and LaTeXila is a front-end. Press F7 again and you should see something like the image shown below right.

Maintenant, vous allez traiter votre document. D'abord enregistrez-le. Utilisez un nom de fichier sans espaces, suivi de l'extension tex (filename.tex).

Ensuite, appuyez sur F7. Le document doit être traité rapidement avec des détails apparaissant au bas de l'écran, comme illustré ci-dessus à droite.

Les avertissements sont là juste pour que vous sachiez que vous devez compiler à nouveau. LaTeX a besoin de deux passes pour traiter la table des matières (Table Of Contents - TOC).

Qu'est-il arrivé à LaTeXila ? Disons simplement que tout cela fait partie du système LaTeX et LaTeXila est une interface homme-machine.

Appuyez encore sur F7 et vous devriez voir quelque chose comme l'image ci-dessous à droite.

A successful compilation. Now you will want to see your document in all its glory. Press F8. Document Viewer should open, showing title, author, date, abstract, section 1, and the text – covering about two pages. You will notice that the text is arranged as if a typesetter had done the work. This is the essence of LaTeX. You concentrate on your writing, LaTeX does the typesetting. This is but a small beginning to what could be a happy working relationship between yourself and LaTeX. Apart from the rubbery things, there is plenty of information on LaTeX available on the internet. As a colleague once said, “If I can't get something to work in LaTeX, I Google the problem.” Have patience, persevere, and make LaTeX your friend. Further information: http://www.latex-project.org/intro.html http://en.wikipedia.org/wiki/LaTeX

Une compilation réussie.

Maintenant, vous voulez voir votre document dans toute sa splendeur. Appuyez sur F8. Le lecteur de document doit s'ouvrir, montrant le titre, l'auteur, la date, le résumé, la section 1 et le texte, ce qui couvre environ deux pages.

Vous remarquerez que le texte est disposé comme si un composeur avait fait le travail. C'est l'essence même de LaTeX. Vous vous concentrez sur votre écriture, LaTeX fait la composition.

Ce n'est qu'un petit début de ce que pourrait être une relation de travail exceptionnelle entre vous et LaTeX. Mis à part les trucs sur le caoutchouc, il y a beaucoup d'informations sur LaTeX dans les articles disponibles sur Internet. Comme a dit un jour un collègue : « Si je n'arrive pas à faire marcher quelque chose dans LaTeX, je “Google” le problème. »

Soyez patient, persévérez et faites de LaTeX votre ami.

Plus d'informations :

http://www.latex-project.org/intro.html

http://en.wikipedia.org/wiki/LaTeX

issue66/tutoriel_-_apprendre_latex.txt · Dernière modification : 2012/11/23 10:32 de auntiee