Outils pour utilisateurs

Outils du site


issue66:tutoriel_-_apprendre_latex

Ceci est une ancienne révision du document !


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.

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} 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.

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. 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

issue66/tutoriel_-_apprendre_latex.1353347951.txt.gz · Dernière modification : 2012/11/19 18:59 de frangi