aboutsummaryrefslogtreecommitdiff
path: root/src/interp/setvars.boot
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/setvars.boot')
-rw-r--r--src/interp/setvars.boot109
1 files changed, 109 insertions, 0 deletions
diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot
index c32d85d9..f0836086 100644
--- a/src/interp/setvars.boot
+++ b/src/interp/setvars.boot
@@ -1238,6 +1238,115 @@ describeSetOutputFortran() ==
'"The current setting is: ",'%b,setOutputFortran "%display%",'%d)
+-- See the section mathml in setvart.boot.pamphlet
+--
+-- ----------------------- The mathml Option ------------------------
+--
+-- Description: create output in MathML style
+--
+-- )set output mathml is used to tell AXIOM to turn MathML-style output
+-- printing on and off, and where to place the output. By default,
+-- the destination for the output is the screen but printing is
+-- turned off.
+--
+-- Syntax: )set output mathml <arg>
+-- where arg can be one of
+-- on turn MathML printing on
+-- off turn MathML printing off (default state)
+-- console send MathML output to screen (default state)
+-- fp<.fe> send MathML output to file with file prefix fp
+-- and file extension .fe. If not given,
+-- .fe defaults to .stex.
+--
+-- If you wish to send the output to a file, you must issue
+-- this command twice: once with on and once with the file name.
+-- For example, to send MathML output to the file polymer.stex,
+-- issue the two commands
+--
+-- )set output mathml on
+-- )set output mathml polymer
+--
+-- The output is placed in the directory from which you invoked
+-- OpenAxiom or the one you set with the )cd system command.
+-- The current setting is: Off:CONSOLE
+
+setOutputMathml arg ==
+
+ arg = "%initialize%" =>
+ $mathmlOutputStream :=
+ DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
+ $mathmlOutputFile := '"CONSOLE"
+ $mathmlFormat := NIL
+
+ arg = "%display%" =>
+ if $mathmlFormat then label := '"On:" else label := '"Off:"
+ STRCONC(label,$mathmlOutputFile)
+
+ (null arg) or (arg = "%describe%") or (first arg = '_?) =>
+ describeSetOutputMathml()
+
+ -- try to figure out what the argument is
+
+ if arg is [fn] and
+ fn in '(Y N YE YES NO O ON OF OFF CONSOLE y n ye yes no o on of off console)
+ then 'ok
+ else arg := [fn,'smml]
+
+ arg is [fn] =>
+ UPCASE(fn) in '(Y N YE O OF) =>
+ sayKeyedMsg("S2IV0002",'(MathML mathml))
+ UPCASE(fn) in '(NO OFF) => $mathmlFormat := NIL
+ UPCASE(fn) in '(YES ON) => $mathmlFormat := true
+ UPCASE(fn) = 'CONSOLE =>
+ SHUT $mathmlOutputStream
+ $mathmlOutputStream :=
+ DEFIOSTREAM('((MODE . OUTPUT) (DEVICE . CONSOLE)),255,0)
+ $mathmlOutputFile := '"CONSOLE"
+
+ (arg is [fn,ft]) or (arg is [fn,ft,fm]) => -- aha, a file
+ if (ptype := pathnameType fn) then
+ fn := STRCONC(pathnameDirectory fn,pathnameName fn)
+ ft := ptype
+ if null fm then fm := 'A
+ filename := $FILEP(fn,ft,fm)
+ null filename =>
+ sayKeyedMsg("S2IV0003",[fn,ft,fm])
+ (testStream := MAKE_-OUTSTREAM(filename,255,0)) =>
+ SHUT $mathmlOutputStream
+ $mathmlOutputStream := testStream
+ $mathmlOutputFile := object2String filename
+ sayKeyedMsg("S2IV0004",['"MathML",$mathmlOutputFile])
+ sayKeyedMsg("S2IV0003",[fn,ft,fm])
+
+ sayKeyedMsg("S2IV0005",NIL)
+ describeSetOutputMathml()
+
+describeSetOutputMathml() ==
+ sayBrightly LIST ('%b,'")set output mathml",'%d,_
+ '"is used to tell AXIOM to turn MathML-style output",'%l,_
+ '"printing on and off, and where to place the output. By default, the",'%l,_
+ '"destination for the output is the screen but printing is turned off.",'%l,_ '
+ '%l,_
+ '"Syntax: )set output mathml <arg>",'%l,_
+ '" where arg can be one of",'%l,_
+ '" on turn MathML printing on",'%l,_
+ '" off turn MathML printing off (default state)",'%l,_
+ '" console send MathML output to screen (default state)",'%l,_
+ '" fp<.fe> send MathML output to file with file prefix fp and file",'%l,_
+ '" extension .fe. If not given, .fe defaults to .stex.",'%l,
+ '%l,_
+ '"If you wish to send the output to a file, you must issue this command",'%l,_
+ '"twice: once with",'%b,'"on",'%d,'"and once with the file name. For example, to send",'%l,_
+ '"MathML output to the file",'%b,'"polymer.smml,",'%d,'"issue the two commands",'%l,_
+ '%l,_
+ '" )set output mathml on",'%l,_
+ '" )set output mathml polymer",'%l,_
+ '%l,_
+ '"The output is placed in the directory from which you invoked OpenAxiom or",'%l,_
+ '"the one you set with the )cd system command.",'%l,_
+ '"The current setting is: ",'%b,setOutputMathml "%display%",'%d)
+
+
-- See the subsection output openmath in setvart.boot
--
-- ------------------ The openmath Option ------------------------