viewing - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Printing and Viewing Maple LaTeX Documents

 

Setup for Printing and Viewing Maple LaTeX Documents

Document Structure

Changing Overall Layout Parameters

Exporting Worksheets Containing Plots

Printing LaTeX Files Containing Maple Plots

Setup for Classic Maple LaTeX Documents

Setup for Printing and Viewing Maple LaTeX Documents

• 

To format and print documents exported (or saved) as LaTeX from Maple worksheets, you require access to a standard version of LaTeX and to the LaTeX style file maple.sty located in the etc subdirectory of your Maple installation. If you are unable to locate the maple.sty file, in Maple, enter kernelopts(mapledir) to see the directory of your Maple installation, then use a File Manager to locate that directory, and under it you will find the etc directory containing maple.sty.

• 

Copy the maple.sty file into the same directory (or folder) as the LaTeX file you want to process. Processing your file with LaTeX creates a .pdf or .dvi file.

  

Note: For Classic worksheets (.mws files), see Setup for Classic Maple LaTeX Documents.

Document Structure

• 

In the exported "Maple to LaTeX" document, the preamble contains the packages used, necessary to represent in LaTeX what you see in the worksheet, and the \documentclass{article}, that can be changed.

• 

Next, there are the LaTeX definitions of the more specialized Maple paragraph styles, corresponding to the ones you can use for text in the Maple worksheet.

• 

The "Maple Normal" LaTeX environment, that in the exported file contains the text and in-lined math found in the Maple sheet using the "Normal" or "Text" Maple worksheet styles, as well as some other LaTeX macro definitions and environments used in the translation, are all included in the maple.sty file.

• 

Maple spreadsheets are exported to a special tabular environment:

  

\begin{maplespreadsheet}...\end{maplespreadsheet}

Changing Overall Layout Parameters

• 

You can change the overall layout either by choosing a different document class, for example

  

\documentclass[10pt]{book}  % a standard LaTeX style

  

or by making a copy of the maple.sty file and editing some of the parameters that are set in that file. These parameters control properties such as page height and width and the amount of spacing above and below Maple objects.

Exporting Worksheets Containing Plots

• 

When you export a Maple worksheet that contains Maple-generated plots, each plot is regenerated by Maple in PostScript and saved to a separate file. The plot file names are generated automatically from the name of the worksheet and are numbered sequentially.

  

A reference to the exported PostScript file, such as

  

\mapleplot{worksheetname01.ps}

  

is inserted into your LaTeX file at the location where the inline plot will appear.

Printing LaTeX Files Containing Maple Plots

• 

To process a LaTeX file that contains macros of the form \mapleplot{...}, LaTeX must know which dvi-to-PostScript conversion program is to be used.

• 

By default, it is assumed that the PostScript conversion program dvips is in use, but there are several other such programs to choose from, depending on which LaTeX installation you are using.

• 

To make use of a different dvi-to-PostScript converter (for example, dvi2ps), modify the maple usepackage definition in your document preamble to read

  

\usepackage[dvi2ps]{maple}

• 

If you do not have any dvi-to-PostScript conversion program installed, modify the usepackage macro call to read

  

\usepackage[noplots]{maple}

Setup for Classic Maple LaTeX Documents

• 

To format and print documents exported (or saved) as LaTeX from Classic Maple worksheets (.mws files), use the LaTeX style package maple2e.sty.  This style file is also located in the etc subdirectory of your Maple installation.  Follow the instructions above to copy the contents of the etc directory to the location with your LaTeX file.  In the document preamble, the following command instructs LaTeX to use the maple2e package.

  

\documentclass[fullpage,11pt]{article}  % a standard LaTeX style

  

\usepackage{maple2e}

• 

The formatting and style macros are the same as those described above for maple.

• 

To set the dvi-to-PostScript converter (for example, dvi2ps), modify the usepackage definition in your document preamble to read

  

\usepackage[dvi2ps]{maple2e}

See Also

latex