|
Document 175
How to import the LaTeX output of a Maple worksheet into
Scientific WorkPlace
Version: 2.5 - Scientific WorkPlace & Scientific Word
You can use SW version 2.5 to edit a Maple VR4 worksheet that has been output
as a LaTeX file, but you must first make certain changes to your SW 2.5
installation and to the Maple LaTeX file.
-
Copy the \etc\maple2e.sty file from your MapleV4 directory to your swp25\tex\macros\misc directory.
The maple2e.sty file is the MapleVR4 style file for the worksheet.
-
Modify the misc.lat file in your swp25\styles\misc directory to add a new
section for the maple2e style:
-
Use an ASCII editor to open the swp25\styles\misc\misc.lat file.
-
In the file, find the [maple] group, which looks
like this:
[maple]
DESCRIPTION=Maple Worksheet - Import Style
DOCSTYLE=[12pt,maplems]{article}
SHELLFILE=empty
CSTFILE=maplems
DOCCLASS=[12pt]{article}
PACKAGES={maplems}
Several lines in the group use a file called maplems, which is a Maple VR3
style file and which will not work with the output from Maple VR4.
-
Copy the section to the clipboard, then paste it back into the misc.lat file
just below the original [maple] section.
-
Modify the copied section:
-
Change the section name from [maple] to
[mapleR4].
-
Change the DESCRIPTION line so that it reads
DESCRIPTION=Maple R4 Worksheet.
-
Change the DOCSTYLE line so that it reads
DOCSTYLE=[12pt,maple2e]{article}
-
Change the PACKAGES line so that it reads
PACKAGES={maple2e}
-
Change the CSTFILE line so that it reads
CSTFILE=maple2e
The new [mapleR4] group should now look like this:
[mapleR4]
DESCRIPTION=Maple R4 Worksheet
DOCSTYLE=[12pt,maple2e]{article}
SHELLFILE=empty
CSTFILE=maple2e
DOCCLASS=[12pt]{article}
-
PACKAGES={maple2e}
-
Save and close the swp25\styles\misc\misc.lat file.
-
Create a new .cst file for the maple2e style by modifying the maplems.cst file
in the swp25\styles directory:
-
Use an ASCII editor to open the swp25\styles\maplems.cst file.
-
In the [FILTER] section at the first of the file,
find the line that reads \newverbatim{mapleinput}{}{}
-
Place a semicolon at the beginning of the line so that it reads
;\newverbatim{mapleinput}{}{}.
-
Save the file as maple2e.cst in the \sw25\styles directory.
-
Close the file.
-
Modify the Maple VR4 LaTeX file for your Maple worksheet:
-
Use an ASCII editor to open the file.
-
Use the Search/Replace function of the editor to delete the lines that read
\begin{maplegroup}
and the lines that read
\end{maplegroup}
-
Save and close the file.
-
Import the Maple VR4 LaTeX file to SW 2.5:
-
Open SW.
-
Start a new document:
-
From the File menu, choose
New.
-
In the Style List Filters section, check
Other.
-
In the Document Type section of the Predefined
Styles dialog box, select Miscellaneous.
-
In the Style section, select
Maple R4 Worksheet.
-
Choose OK.
-
From the File menu, choose
Import Contentsand select the Maple VR4 LaTeX
file.
The contents of the document will appear on the SW screen as a series of gray
boxes.
-
Save the file, then close and reopen it.
Your Maple worksheet should now appear correctly on the screen. Note that the
Maple Input lines appear as in this example:
\mapleinline{active}{1d}{
Int(x^2,x=1..2);}{%
}
The part of the Maple Input line shown in bold above consists of formatting
instructions to Maple. Do not edit this part of the line. The
rest of the line is your input to Maple; this is the only part of the Maple
Input line that your should edit. You can edit any part of the Maple results.
You need to complete steps 1-3 only once. However, you must complete steps 4
and 5 each time you want to import a Maple LaTeX worksheet.
Added 0814/96
This document was created with Scientific WorkPlace.
|