TUTORIAL ON PROSPER BY Rouben Rostamian Department of Mathematics and Statistics University of Maryland, Baltimore County Baltimore, MD 21250, USA phone: 410-455-2412 fax: 410-455-1066 email: rostamian@umbc.edu http://www.math.umbc.edu/~rouben/prosper/index.html A BARE-BONES SAMPLE FILE The basic structure of a Prosper input file is pretty simple. Consider the file sample.tex, the content of which is shown below: % sample.tex \documentclass[pdf,azure,slideColor,colorBG]{prosper} \begin{document} \begin{slide}{Elementary mathematics} Observations: \[ \int_{-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi} \] \[ e^{i\pi} = -1 \] Conclusions: \begin{itemize} \item $\sqrt{2}$ is irrational \item $e$ and $\pi$ are transcendental \item $42$ and 42 are not the same in \LaTeX \end{itemize} \end{slide} \end{document} To compile the previous section's LaTeX source file, sample.tex, into a PDF file for on-screen presentation, do: latex sample.tex # will create sample.dvi dvips -t a4 sample.dvi # will create sample.ps ps2pdf -dPDFSETTINGS=/prepress sample.ps # will create sample.pdf acroread sample.pdf # view the resulting pdf file But make sure to read the section Configuring dvips below, before you do this. Also see the section A Makefile for LaTeX/Prosper to see how to automate the compilation process and save yourself from typing all these ugly commands. During the development cycle, you may want to do the following instead, which is much quicker: latex sample.tex # will create sample.dvi dvips -t a4 sample.dvi # will create sample.ps gv -landscape sample.ps # view the resulting postscript file Important! The "-t a4" flag tells dvips to treat its input as having the dimensions of the international A4 paper size rather than the US 8.5"x11" paper size. This is because Prosper's design is based on the A4 geometry. Without that flag, parts of the slide may be cut off. Remark: The "-dPDFSETTINGS=/prepress" flag optimizes the output resolution for producing sharper graphics. Without it, included graphics and images may look fuzzy. You may omit this flag if you don't have graphics in your slides. NAVIGATING WITH HYPERLINKS During a live slide presentation, it is often helpful being able to jump several slides back to remind the audience of a formula or a picture. You don't want to page through 17 slides to go to that particular slide and back through 17 slides to return to where you were. Hyperlinks in a PDF file enable you to jump from one slide to any other slide with one mouse click. The following input file defines two slides. You should imagine that these are two out of a very large number of slides which are not shown here to save space. One slide contains a \hyperlink command and the other slide contains a \hypertarget command. If you click on the \hyperlink with the mouse, the Acrobat Reader will jump from the current page to the page containing the corresponding \hypertarget. The \hyperlink{...}{...} command takes two arguments. The first argument (the words "test target" in the example below,) is an arbitrary but unique label which associates a hyperlink/hypertarget pair. The second argument (the words "Click here" in the example below,) is the text which will receive the mouse click. That text will be shown in red color, or any other color specified in the hypersetup command; see the sample below. The \hypertarget{...}{...} command also takes two arguments. The first argument is identical to that of the corresponding hyperlink. The second argument can contain an arbitrary text. In a slide presentation, the second argument has no useful role, therefore it is left empty in the following sample. % hyperlinks.tex \documentclass[pdf,umbc4,slideColor,colorBG]{prosper} \hypersetup{colorlinks=true,linkcolor=red} \begin{document} \begin{slide}{Starting slide} \hyperlink{testtarget}{Click here} to go to the target slide. \end{slide} \begin{slide}{Target slide} \hypertarget{testtarget}{} Yup, we are there! \end{slide} \end{document} It is difficult to illustrate the dynamic action of hyperlinks with words. I suggest that you download the sample file above, compile, and try it yourself. Returning to the calling page Now you know how to jump from page N1 to page N2. But how to you return to page N1? Well, you can page through all the intervening pages to get there, but that's not very professional. If you are using the Acrobat Reader for your presentation, which most likely you are, then press Control-Left Arrow (that is, hold down the Control key and press the Left Arrow key.) That will take you back to the previous page in one step! Remark: Yet another way to return to the calling page would be by adding another hyperlink/hypertarget pair that works in the opposite way. Thus you put a hyperlink in page N1 that takes you to a hypertarget in page N2, and put a hyperlink in page N2 that takes you to a hypertarget in page N1. This trick is not as useful as it may look at first. Suppose that you have an important formula on page N1. You want to put links in pages N2 and N3 and N4, each of which takes you to page N1. But once in page N1, we don't know which of the pages N2 or N3 or N4 we are supposed to return to. The Control-Left Arrow method does not have this problem. STANDARD PROSPER STYLES The following standard Prosper styles are available. I have provided sample images for those styles which I think are more interesting than others. Also see the gallery for a wider variety of samples. alcatel (alcatel is broken; see Remark below) alienglow autumn azure contemporain darkblue default frames gyom lignesbleues nuancegris pascal rico troispoints DOCUMENTCLASS OPTIONS There are several documentclass options associated with the Prosper documentclass. The keywords within the square brackets below are documentclass options: \documentclass[pdf,azure,slideColor,colorBG]{prosper} The meaning and effect of the azure option was described in the previous section. In this section I will describe the meanings of the other options. THE COLORBG OPTION In sample.tex, changing the line: \documentclass[pdf,azure,slideColor,colorBG]{prosper} to: \documentclass[pdf,azure,slideColor,nocolorBG]{prosper} Observe how the text color, which was white originally, has changed to black, otherwise you would have had white text on white background, which is not a good thing. Remark 1: The effects of colorBG and nocolorBG options vary with the choice of style. Some Prosper styles may completely ignore these options. Experiment to find out their effects. THE SLIDECOLOR OPTION The opposite of slideColor is slideBW. The option slideBW suggests to Prosper to minimize the use of color in slides. This may be useful for printing the slides on a black-and-white printer. The line: \documentclass[pdf,azure,slideBW,nocolorBG]{prosper} produces the following slide: THE PDF OPTION The opposite of the pdf option is the ps option. The ps option is useful when printing slides to a printer. With the ps option, slides which comprise several overlays, are printed as one composite slide. With the pdf option, a slide containing 5 overlays will be printed on 5 separate sheets. THE TITLE PAGE Prosper provides an easy way to make a title page for a slide presentation. The file titlepage.tex, shows how. % titlepage.tex \documentclass[pdf,autumn,slideColor,colorBG]{prosper} \title{Traveling Waves in Layered Combustible Media} \subtitle{Homogenization and phase-space analysis} \author{Rouben Rostamian} \email{rostamian@umbc.edu} \institution{ Department of Mathematics \& Statistics \\ University of Maryland, Baltimore County (UMBC) \\ Baltimore, MD~21250, USA } % Optional: text to put in the bottom of each slide. % By default, the title of the talk will be placed there. %\slideCaption{\textit{Rouben Rostamian, UMBC}} \begin{document} % make the title slide \maketitle % % make the rest of the slides as usual: % \begin{slide}{The first slide} % Body of the first slide % \end{slide} \end{document} OVERLAYS Probably the most interesting effect achieved by Prosper is overlays, which gives the appearance of incremental exposure of a given slide. Prosper provides two different mechanisms for achieving this. The first, and the easier one to describe, allows incremental exposure of an itemized list. The second, which is a bit more complicated, allows incremental exposure of any part of a slide, not necessarily contained in an itemized list. OVERLAYS WITH ITEMIZED LISTS Prosper defines a new LaTeX environment, called itemstep, which can be used to expose an itemized list one item at a time. The following sample LaTeX file illustrates the concept: % overlays1.tex \documentclass[pdf,umbc4,slideColor,colorBG]{prosper} \begin{document} \overlays{5}{% \begin{slide}{Outline of the talk} \begin{itemstep} \item Introduction \item Statement of the main theorem \item Technical lemmata \item Proof of the main theorem \item Conclusions \end{itemstep} \end{slide} } % closing brace of \overlays \end{document} OVERLAYS IN GENERAL The following sample input illustrates how to expose a slide incrementally. I think the syntax is obvious. % overlays2.tex \documentclass[pdf,rico,slideColor,colorBG]{prosper} \begin{document} \overlays{3}{% \begin{slide}{Fermat's Last Theorem} In this talk I will give a very elementary proof of the theorem. I am surprised that no one else has thought of this before. \medskip \fromSlide{2}{% Fermat's Last Theorem says that the equation \[ x^2 + y^2 = z^2 \] has no solution in the set of natural numbers. } % closing brace of \fromSlide \medskip \fromSlide{3}{% This is not true. After a lengthy calculation on the department's Linux machines, I have verified that within the numerical accuracy of the Pentium-4 processor, we have: \[ 5000^2 + 12000^2 = 13000^2 \] } % closing brace of \fromSlide \end{slide} } % closing brace of \overlays \end{document} INCLUDING GRAPHICS In this section I will describe how to include graphics in your slides. Actually this topic is not specific to Prosper at all; the same instructions apply to including graphics in any LaTeX document. Although this is not supposed to be a LaTeX tutorial, I am including this section here because graphics so often are used in slide presentations. Encapsulated Postscript is the most common image format for inclusion in LaTeX documents. I assume that you know how to create and save graphics as encapsulated Postscript files. The following sample shows how to include three side-by-side pictures in a slide. % graphics.tex \documentclass[pdf,umbc3,slideColor,colorBG]{prosper} \Logo{\umbclogo} % add an optional UMBC logo \begin{document} \begin{slide}{Graphics} Use the \verb|\includegraphics| command to include encapsulated Postscript graphics in \LaTeX\ documents, like this: \bigskip \begin{center} \includegraphics[height=35mm]{ns-2d-u.eps} \includegraphics[height=35mm]{ns-2d-v.eps} \includegraphics[height=35mm]{ns-2d-p.eps} \end{center} \end{slide} \end{document} Note the UMBC logo in the bottom-left corner -- a result of the \Logo{\umbclogo} command. Remark 1: The [height=35mm] arguments to the \includegraphics commands shown above set the scaled heights of the images. Adjust as needed. Remark 2: The \includegraphics command is defined in LaTeX's graphics package. Normally you would put a \usepackage{graphics} command in your document's preamble to make \includegraphics known to LaTeX. However, the Prosper documentclass adds the graphics package implicitly, therefore no explicit invocation of a \usepackage{graphics} is required. ODDS AND ENDS In this page I will include a miscellany of topics which may be of occasional use but which are not absolutely essential for running Prosper. The \ptsize command The command \ptsize{n} switches the default font size to n where n can be one of 8, 9, 10, 11, 12, 14, 17. The default n is 14. I find 14 point fonts too large for presentations involving a lot of mathematics. A point size of 10 works better for this purpose. Therefore I put a \ptsize{10} somewhere before \begin{document} in my slides. Experiment to see what works best for you. Remark: If you put a \ptsize command within the body of a slide, that is, just after the slide's \begin{slide}{...} command, it will affect that slide only. For instance, if your document uses 10 point fonts, you can change a particular slide to the 9 point fonts by putting a \ptsize{9} within it. This can be useful for squeezing a little extra text in a slide. The \slideCaption command Prosper puts a caption at the foot of each slide. The default caption looks like this: title of this slideshow - p.7/12 where "title of this slide show" is replaced by text specified by the \title command. (See section The titlepage.) The "p.7/12" indicates that this is the seventh of 12 slides. If you don't specify a title, only the "- p.7/12" will be shown. You may override the text that appears in the caption using the \slideCaption command. For instance, if you put \slideCaption{Joe Smith, Maryland Institute of Technology} somewhere before \begin{document}, then the caption will change to: Joe Smith, Maryland Institute of Technology - p.7/12 The \Logo command The command \Logo{someobject} (spelled with capital L) puts the TeX object someobject, which is typically an image, such as a company logo, on each slide other than the titlepage slide. Put the command somewhere before the \begin{document}. Typically this macro will be invoked as: \usepackage{graphics} \Logo{\includegraphics{logo.eps}} where "logo.eps" is the name of an encapsulated Postscript file that contains the logo image. Remark 1: If you are using any of the UMBC styles, you may use the command \Logo{\umbclogo} to put this logo on your slides: Remark 2: The logo's default position varies, depending on the documentclass option. It's possible to override the default by specifying the position's x and y coordinates, as in \Logo(x,y){someobject}. MAKEFILE FOR LATEX/PROSPER The sequence of commands for processing a LaTeX file into a PDF file were described in the section Compiling slides into PDF. Although these commands can be typed and executed manually, their repeated use during a write/test/debug cycle can be tiresome and error-prone. In my writing and programming projects I use Makefiles to organize and automate the flow of work. A Makefile contains a sequence of instructions to be performed. The UNIX utility, make, reads and executes instructions specified in a Makefile. The description of the make utility is outside of the scope of this tutorial so I will not get into that. However, you don't need to be a make expert in order to use it. I suggest that you download the Makefile pointed to by this link and modify it for your own use. (Note that on some browsers you will have to right-click on a link to download it.) The contents of that file are shown below. Important! Beware that the layout of a Makefile follows certain very precise rules. Cutting and pasting by mouse almost certainly will destroy that precise layout. Don't cut and paste. Download it as instructed in the the previous paragraph. # Generic make file for LaTeX: requires GNU make TEXFILE = slides.tex .PHONY: dvi ps pdf clean pdf: $(TEXFILE:.tex=.pdf) ps: $(TEXFILE:.tex=.ps) dvi: $(TEXFILE:.tex=.dvi) %.dvi: %.tex ( \ \latex $<; \ while \grep -q "Rerun to get cross-references right." $(<:.tex=.log); \ do \ \latex $<; \ done \ ) %.ps: %.dvi \dvips -q -t a4 $< %.pdf: %.ps \ps2pdf -dPDFSETTINGS=/prepress $< clean: @\rm -f \ $(TEXFILE:.tex=.aux) \ $(TEXFILE:.tex=.log) \ $(TEXFILE:.tex=.out) \ $(TEXFILE:.tex=.dvi) \ $(TEXFILE:.tex=.pdf) \ $(TEXFILE:.tex=.ps) In normal use, you will edit the Makefile's "TEXFILE = slides.tex" line and replace "slides.tex" by the name of your LaTeX file. No other changes should be necessary. Then the single command "make" will process your LaTeX file and produce a PDF file. That's all! Remark 1: The command "make" takes your file through the following sequence: file.tex --> file.dvi --> file.ps --> file.pdf The command "make dvi" will run only the first step, i.e., file.tex --> file.dvi This is useful for debugging your LaTeX source file. The command "make ps" will run only the first and second steps, i.e., file.tex --> file.dvi --> file.ps This is useful for creating files for viewing with ghostview, as in: gv -landscape file.ps The command "make clean" will delete all the files created by make. This is useful for removing clutter from your directory. Remark 2: In the Makefile shown above, I have made essential use of extensions available in GNU make; it will not work with the classic UNIX make. Since GNU make is commonly available on all platforms, I don't consider this a serious drawback. Remark 3: You may use the Makefile above for other LaTeX projects -- to write your thesis, for instance -- not necessarily for Prosper presentations only. If your document is expected to be printed on an 8.5"x11" paper, then make sure to delete the "-t a4" flag from the Makefile, that is, change the line containing the dvips command to: \dvips -q $< FURTHER READING You have reached the last section of my Prosper tutorial. Equipped with the knowledge gained from these pages, you should be able to put Prosper to good use. You should know, however, that I have not touched on all features available in Prosper. You should read Prosper's own documentation to learn the rest. If you have a user account on UMBC's Department of Mathematics and Statistics computers, then you can view Prosper's original source and documentation in the directory: /usr/local/TeX/docs/prosper I suggest that you explore that directory and its subdirectories. In particular, have a look at the sample PDF files: /usr/local/TeX/docs/prosper/doc/prosper-tour.pdf /usr/local/TeX/docs/prosper/doc/prosper-doc.pdf You will find it instructive to compare these with their corresponding source files: /usr/local/TeX/docs/prosper/doc/prosper-tour.tex /usr/local/TeX/docs/prosper/doc/prosper-doc.tex Prosper's home page If you don't have a Mathematics and Statistics account, you can find the complete Prosper distribution, including the documents mentioned above, in Prosper's home page at: http://prosper.sourceforge.net/prosper.html and the development site: http://sourceforge.net/projects/prosper