You are on page 1of 9

Typesetting in wxMaxima

1 Introduction

To make your paper look as good as possible you should be familiar with the following: how to format text and create sections (and subsections, etc.), how to typeset equations, and how to incorporate graphics. These topics are discussed below. We begin with how to incorporate graphics, because we use the screenshots A that follow to illustrate what follows. At the end of this paragraph is the L TEX command to include a file named wxMaxima1.png and to set its with to 12 centimeters. This graph is in the Textsetting_img folder. We discuss the creation of this folder just below the graph. The command is this: \includegraphics[width=12cm]{Typesetting_img/wxMaxima1.png}. The width specification is optional. The brackets identify the image to be included. The default assumption is that its location is relative to the folder in which the wxMaxima file is located.


A Entering Material and Exporting L TEX Files

The image above shows the wxMaxima file that created the document that you are reading now, when it consisted of a single paragraph. This conent is repeated A in the graphic image that follows, as it appears in the L TEX editor TexMaker. 1

Select Save as type and make the proper selection (wxMaxima’s default is HTML file (*. select Export. We discourage this approach. Each text cell must have this preface if wxMaxima is to export the material to A a L TEX file.tex). and subsection titles can be entered with wxMaxima commands.. Then move to TexMaker. Placing all other graphs. section. Then Save it. In that box. These instructions continue after we have discussed the TexMaker screenshot. At first.. Be sure to change that and to select the name of the file from the list in the dialog box (it should be the only entry). follow these steps. because titles entered this way can cause difficulties when the tex file is processed to produce a pdf file. which opens the dialog box that appears below. which contains all wxMaxima. however. wxMaxima creates a folder named Typesetting. Giving the file the same name as the folder in which it is located has some advantages. In this A illustrative case. Once the text and related material are entered into wxMaxima. into this folder simplifies matters.tex. just below.generated graphics. Within that menu. Instruct wxMaxima to save it. like our screenshots.img. Use the File menu option for this purpose. The first. obvious point is that the text cell begins with TeX:. consider some points regarding the wxMaxima image.htm). you should export files frequently. Each time you do so. Document. 2 . select the Save as type drop-down menu box and then select pdfLaTex file (*. A dialog box should appear warning that saving this file will overwrite the existing file. the material is to A be exported to a L TEX file.. and the L TEX file is named Typesetting. Then enter the name of the file. the folder is named Typesetting.Before looking at the Texmaker image.

To open the file that wxMaxima created. this window reports where the error occurs and tries to indicate the nature of the error. This file can be read in any PDF reader. A The main window shows the L TEX file’s content. This window can be used for navigation. The next section addresses the reading of the file. As more sections are entered.2 TeXstudio A The TexStudio editor screenshot appears below. TeXstudio is a freeware L TEX editor that provides a useful intemediary between wxMaxima and the PDF file that shows the resulting typeset-quality output. The document itself lies between \begin{document} and \end{document}. It is exactly as entered into wxMaxima. as often happens. they are reported here. a L TEX error occurs. which wxMaxima creates and which we need not address. which consists of a heading (the material before \begin{document}.tex.pdf. First. Once the F6 key is struck. then selecting Tools/pdfLaTeX from the menu or using the F6 key generates the file Typesetting.1. consider a few more aspects of the screenshot above. The third window keeps a log of file creation. but they are beyond the scope of the overview. It has other uses as well. this log is opened. 3 . If. It shows A that the process begins and ends normally. Then select Typesetting. the log entry is quite simple. In the case shown above. The window on the left keeps track of the file. Before turning to reading the file. use the File/Open menu option or click on the second icon from the left. TeXstudio has three windows. If nothing else is to be done to the file.

An affirmative response will result in this replacement occurring automatically after each export of a revised file from wxMaxima. 4 . The image on the top left shows the wxMaxima text cell. Sumatra’s default is to refresh the display any time the PDF file is modified. Use the Options / Configure TeXstudio menu. and Sumatra (or another PDF reader) open at the same time. correct the spelling in wxMaxima. TexMaker (or another L TEX editor). overwriting the old file. The first time the file is overwritten. Any such reader can be used.3 Reading the PDF File Once PDFLaTeX is executed the resulting file appears as below. By default. but this is easily changed. When an error is found. one should export the file to the existing tex file. If screen space allows. the image on the top right shows TeXstudio with the tex file exported by wxMaxima. as below.TexStudio can be used to check spelling (wxMaxima lacks this feature). K. and the image at the lower left shows the pdf file that TeXstudio generates. Each time a file is revised in wxMaxima. The PDFLaTeX command (or F6) will automatically update the pdf file. 1. The menu entry Tools/Check Spelling checks spelling. TeXstudio will ask whether the revised file is to replace the existing one. it helps to have A wxMaxima.) spelling. It is useful to ensure that the PDF viewer being used is set to this option. Because writing a document involves a number of revisions. having them appear simultaneously on the screen. We use the freeware PDF reader Sumatra for this purpose. TexMaker uses English (U. helps.

To insert a sub-section title between two cells. Selecting the menu entry Cell/Insert Text Cell or selecting the F6 key creates a text cell. Rather use the L TE \subsection{Subsection Title}. This tells wxMaxima to produce L TEX mark-up for the material in this cell.” wmMaxima assumes that an input cell is about to be created. We return to such cells below. One should immediately enter TeX:. we consider text cells and title cells. wxMaxima’s “horizontal cursor. such as those that have appeared up to this point. First. While section and subsection cells can be A created and used to produce section and subsection titles in L TEX we discourage A X markup \section{Section Title} and that approach. and F9 results in a title for the document. 5 . F8 results in a section title. either type straight A text or enter standard L TEX mark-up commands. click there and select F7 or the associated Cell menu entry. Likewise. The case is A critical as is the colon after TeX.2 Creating wxMaxima Cells Clicking between any two cells in wxMaxima or at the beginning or end of a session window results in the appearance of a horizontal line. Once a text cell has been created and TEX: has be entered. Entering a command directly or selecting F5 or Cell/Insert Input Cell creates such a cell.

2*%pi))$ (%o3) f (θ) := sin (θ) (%t4) wxMaxima creates two pieces of graphical output.tex. created a separate font for verbatim material which is exempt A A from L TEX mark-up. It also places references to these into the file Typesetting. wxdraw2d( explicit(f(%theta).1 A Review Up to this point a few aspects of marking up text have been used. preceded by a \ and place the material to 1 Actually two: we used verb and we used texttt. wxMaxima places each of these into the Typesetting_img folder. 3. %theta. (%i3) f(%theta) := sin(%theta).1 we created the L TEX logo as part of the file. -2*%pi. We provided for emphasis. and we inserted figures. 6 .1 wxMaxima Input and Output The material just below shows the result of entering an equation into a wxMaxima input cell and applying the wxdraw2d command. Then it addresses some mark-up rules for mathematics. the equation in output %o1 and the graph.2. 3 A Some L TEX Basics A This introduction covers the most basic of L TEX editing. Emphasis (italicized font) is one of a set of mark-up options that share the same rules: specify the command. For example verb cannot be used in footnotes like this one. It reviews the markup that has been used to create the file to this point. These two are not identical.

as noted turns off L TEX mark-up. One special use warrants mention: When the carat ^ appears outside of a mathematical expression. Either one produces this result: x2 . it can cause mischief. texttt produces typewriter-style output. The resulting expression. m where a and F. This command is useful for specifying names such as Maxima commands. place the expression within this bracket: \[ expression \]. and mass (m) is a scalar. To achieve this. special characters like the ampersand (&) or the percent sign (%) A appear as text. For example. Here we want to ensure that the exponents are subscripted. acceleration and force. First. \[ \mathbf{a} = \frac{\mathbf{F}}{m}. 3. The reason for the brackets for the exponents of x and y is different. are vectors. That is. To inform L TEX that these are to be treated as text and not as A special L TEX characters. Phasing it verbatim avoids such concern. typset. 1 Often the material is easier to follow if the mathematical expression appears on a separate line. The text is embedded between these apostrophes. Note the use of \frac to affect the appearance of the fraction. In the first case \alpha t is placed inside brackets because failure to do so would A result in this: eα t. The simplest is to insert the expression between two dollar signs. {}. place a backward slash (\) before them. is this: z = eαt xβ1 y β2 Before looking at alternatives.2 Math Basics A Mathematical expressions may be entered into L TEX in any of three treated by the command inside curly brackets. similar commands are textbf. Other. with a back slash preceding the letter’s name. 1 In the expression z = eαt xβ1 y β2 . Note also that 7 . Note the command’s structure: the word verb is followed by two apostrophes. Here is the result of not using brackets for the x variable: xβ . A The verb command. which creates bold font within mathematical expressions. all exponents are enclosed in brackets. Occasionally. the superscript A (^) and the subscript (_) commands mirror each other. like this: $z = e^{\alpha t}x^{\beta_1}y^{\beta_2}$. \] produces this result: a= F . the Greek letters are entered as indicated. Other characters can be used in place of the apostrophe. L TEX treats these two expressions as equivalent: $x_1^2$ and $x^2_1$. and mathbf. The last section of this overview provides references that contain much more extensive lists and instructions. L TEX treats the first character to follow the carat as the exponent and anything that follows as another part of the expression. Second. consider some aspects of A L TEX that this example points out. Capitalizing the first letter of the name would result in the capital letter. even though the order of subscripting and superscripting is reversed. which creates bold font text in the body of a report. Also.

Unix/Linux. code folding and syntax highlighting.sourceforge.http://texstudio. the expression could have been stated this way: a = F/m. It works on Windows 2000 and later operating systems. BSD and MacOSX systems and modify it if you want. Without frac. A The following sites provide more information on typesetting with L TEX. Finally.5 and higher is said to combine the five most important numbers in since it is licensed under the GPL.kowalczyk. due to Euler.sourceforge. \label{eq:euler} (1) This expression. like interactive spell checking. . 4 Software and Instructional Sources We have used the following software in developing this guide. You can run it on Windows. Also it serves as a starting point from where you can easily run all necessary LaTeX tools. • Skim PDF is a small and fast PDF reader for use in the Mac OX 10. 8 .html. • Sumatra is a small and fast PDF reader for use in the Microsoft Windows environment. Download Sumatra at http://blog. • TeXstudio “gives you an environment where you can easily create and manage LaTeX documents.html. like this: eiπ + 1 = 0.brackets can be nested to as many levels as is required. Download Skim PDF at http://sourceforge. we often wish to place a mathematical expression on a separate line and A have L TEX assign a number to .” (from the software’s web site: http://www. It provides modern writing support. Use this command set to generate the result above: \begin{equation} \end{equation} e^{i \pi} + 1 = 0. We may refer to Equation eq:euler at any point in the remainder of this document by using the instruction \Equation~{eq:euler}. . • wxMaxima is part of the Maxima package that can be downloaded at http://maxima.

is available at many sites.pdf. Gavin. including this one: http://www.pdf.stat. You may access information online or download the entire set of hypertext material to your Also. A • Hypertext Help with L TEX.A • Jeff Clark. Its address is: http://www. by the developer of L TEX is Leslie Lamport. A brief L TEX tutorial from Duke University. entering a few keywords and latex into a search engine generates helpful references. This is a PDF file.duke. 9 . This is a PDF file. developed by LaTeX: User’s Guide & Reference Manual.unipg. A • The classic reference. Its address is http://frodo. L TEX Tutorial is provided for students at Elon A • A briefer introduction is Henri P.