• Aucun résultat trouvé

Creating Presentations

Dans le document The Not So Short Introduction to LATEX 2ε (Page 102-106)

In the example above I have included thehyperref package even in the non-PDF version. The effect of this is to make the \hrefcommand work in all cases, which saves me from wrapping every occurrence into a conditional statement.

Note that in recent TEX distributions (TEXLive for example), the nor-mal TEX program is actually pdfTEX it will automatically switch between producing pdf and dvi according to the settings in the document class. If you use the code above then you can still use thepdflatexcommand to get pdf output andlatex for normal dvi output.

4.8 Creating Presentations

By Daniel Flipo < Daniel.Flipo@univ- lille1.fr>

You can present the results of your scientific work on a blackboard, with transparencies, or directly from your laptop using some presentation soft-ware.

pdfLATEX combined with the beamer class allows you to create presen-tations in PDF, looking much like something you might be able to generate with PowerPoint if you had a very good day, but much more portable be-cause Acrobat Reader is available on many more systems.

The beamerclass uses graphicx,colorand hyperref with options adapted to screen presentations.

When you compile the code presented in figure4.2with PDFLATEX you get a PDF file with a title page and a second page showing several items that will be reveled one at a time as you step though your presentation.

One of the advantages of the beamer class is that it produces a PDF file that is directly usable without first going through a PostScript stage like prosper or requiring additional post processing like presentations created with theppower4package.

With thebeamerclass you can produce several versions (modes) of your document from the same input file. The input file may contain special instructions for the different modes in angular brackets. The following modes are available.

beamer for the presentation PDF discussed above.

trans for slides.

handout for the printed version.

The default mode is beamer, you can change it by setting a different mode as a global option, like \documentclass[10pt,handout]{beamer}to print the handouts for example.

\documentclass[10pt]{beamer}

\mode<beamer>{%

\usetheme[hideothersubsections,

right,width=22mm]{Goettingen}

}

\title{Simple Presentation}

\author[D. Flipo]{Daniel Flipo}

\institute{U.S.T.L. \& GUTenberg}

\titlegraphic{\includegraphics[width=20mm]{USTL}}

\date{2005}

\begin{document}

\begin{frame}<handout:0>

\titlepage

\end{frame}

\section{An Example}

\begin{frame}

\frametitle{Things to do on a Sunday Afternoon}

\begin{block}{One could \ldots}

\begin{itemize}

\item walk the dog\dots \pause

\item read a book\pause

\item confuse a cat\pause

\end{itemize}

\end{block}

and many other things

\end{frame}

\end{document}

Figure 4.2: Sample code for the beamerclass

The look of the screen presentation depends on the theme you choose.

You can either pick one of the themes shipped with the beamer class or you can even create your own. See the beamer class documentation in beameruserguide.pdffor more information on this.

Lets have a closer look at the code in figure 4.2.

For the screen version of the presentation\mode<beamer>we have chosen theGoettingen theme to show a navigation panel integrated into the table of contents. The options allow to choose the size of the panel (22 mm in this case) and its position (on the right side of the body text). The option hideothersubsections, shows the chapter titles, but only the subsections of the present chapter. There are no special settings for \mode<trans> and

\mode<handout>. They appear in their standard layout.

The commands \title{},\author{},\institute{}, and

\titlegraphic{}set the content of the title page. The optional arguments of\title[]{}and\author[]{}let you specify a special version of the title and the author name to be displayed on the panel of theGoettingen theme.

The titles and subtitles in the panel are created with normal\section{}

and \subsection{} commands that you place outside the frame environ-ment.

The tiny navigation icons at the bottom of the screen also allow to navigate the document. Their presence is not dependent on the theme you choose.

The contents of each slide or screen has to be placed inside a frame environment. There is an optional argument in angular brackets (< and

>), it allows to suppress a particular frame in one of the versions of the presentation. In the example the first page would not be shown in the handout version due to the<handout:0>argument.

It is highly recommended to set a title for each slide apart from the title slide. This is done with the command \frametitle{}. If a subtitle is necessary you can use theblock environment as shown in the example.

Note that the sectioning commands\section{}and\subsection{}do not produce output on the slide proper.

The command \pause in the itemize environment lets you reveal the items one by one. For other presentation effects check out the commands

\only, \uncover, \alt and \temporal. In many place you can also use angular brakes to further customize the presentation.

In any case make sure you read through the beamer class documenta-tion beameruserguide.pdf to get a complete picture of what is in store for you. This package is being actively developed, check out their website http://latex-beamer.sourceforge.net/to get the latest information.

Producing Mathematical Graphics

Most people use LATEX for typesetting their text. But as the non content and structure oriented approach to authoring is so convenient, LATEX also offers a, if somewhat restricted, possibility for producing graphical output from textual de-scriptions. Furthermore, quite a number of LATEX extensions have been created in order to overcome these restrictions. In this section, you will learn about a few of them.

5.1 Overview

The picture environment allows programming pictures directly in LATEX.

A detailed description can be found in the LATEX Manual [1]. On the one hand, there are rather severe constraints, as the slopes of line segments as well as the radii of circles are restricted to a narrow choice of values.

On the other hand, thepictureenvironment of LATEX 2εbrings with it the

\qbeziercommand, “q” meaning “quadratic”. Many frequently used curves such as circles, ellipses, or catenaries can be satisfactorily approximated by quadratic Bézier curves, although this may require some mathematical toil. If, in addition, a programming language like Java is used to generate

\qbezier blocks of LATEX input files, the picture environment becomes quite powerful.

Although programming pictures directly in LATEX is severely restricted, and often rather tiresome, there are still reasons for doing so. The documents thus produced are “small” with respect to bytes, and there are no additional graphics files to be dragged along.

Packages likeepicandeepic(described, for instance, inThe LATEX Com-panion[3]), orpstrickshelp to eliminate the restrictions hampering the orig-inal picture environment, and greatly strengthen the graphical power of LATEX.

While the former two packages just enhance thepicture environment, the pstricks package has its own drawing environment, pspicture. The power ofpstricksstems from the fact that this package makes extensive use of PostScript possibilities. In addition, numerous packages have been written for specific purposes. One of them is XY-pic, described at the end of this chapter. A wide variety of these packages is described in detail in The LATEX Graphics Companion [4] (not to be confused with The LATEX Companion [3]).

Perhaps the most powerful graphical tool related with LATEX is META -POST, the twin of Donald E. Knuth’s METAFONT. METAPOST has the very powerful and mathematically sophisticated programming language of METAFONT. Contrary to METAFONT, which generates bitmaps, META -POST generates encapsulated PostScript files, which can be imported in LATEX. For an introduction, see A User’s Manual for METAPOST [15], or the tutorial on [17].

A very thorough discussion of LATEX and TEX strategies for graphics (and fonts) can be found in TEX Unbound [16].

Dans le document The Not So Short Introduction to LATEX 2ε (Page 102-106)

Documents relatifs