TexmacsSupport

 Author: Kurt Pagani
 Date Created: Sun Jan 19 02:19:26 CET 2020
 Date Revised: So 20 Okt 2024 18:24:51 CEST
 License: BSD
 References:
   https://github.com/texmacs/texmacs/tree/master/TeXmacs/progs
   TeXmacs - Scheme Developer Guide [texmacs-scheme.en.pdf]
 Description:
   TeXmacs support package.
   Control of TeXmacs Interface/GUI from FriCAS.
   E.g. toggling header/footer, including images, adding/removing style files
   and so on.
   Rev. added: lispEval, ioHook (font-size, font-color in BOOT)
     e.g. FONT_-SIZE$Lisp -> "tiny"
     setFricasPrompt (similar to macro in fricas.input)

message : (String,String) -> Void
 message(typ,msg) send a message to TeXmacs where 'typ' is one
 of {ps,latex,verbatim,html,command,scheme,prompt#,input#,output#}
 and 'msg' a corresponding string.
verbatim : String -> Void
 verbatim(s) is shorthand for message("verbatim",s). The string s
 will be output 'verbatim' in TeXmacs.
command : String -> Void
 command(s) is shorthand for message("command",s). The command
 s will be execute in TeXmacs.
latex : String -> Void
 latex(s) is shorthand for message("latex",s). The string s
 containing LaTeX code is rendered in TeXmacs.
scheme : String -> Void
 scheme(s) is shorthand for message("scheme",s). The scheme code
 s is interpreted in TeXmacs.
html : String -> Void
 html(s) is shorthand for message("html",s). The HTML code in s
 is rendered (as much as possible) in TeXmacs.
ps : String -> Void
 ps(s) is shorthand for message("ps",s). The postscript code in s
 is rendered in TeXmacs.
output : String -> Void
 output(s) is shorthand for message("output#",s). The string s
 is output in TeXmacs.
prompt : String -> Void
 prompt(s) is shorthand for message("prompt#",s).
input : String -> Void
 input(s) is shorthand for message("input#",s). The string s
 will be written into an input field of TeXmacs (session). E.g
 input "D(sin x,x)".
addStyle : String -> Void
 addStyle(s) adds the style s into current session.
removeStyle : String -> Void
 removeStyle(s) removes the style s from the current session.
toggleHeader : () -> Void
 toggleHeader() shows or hides the TeXmacs top header (menus, icons).
toggleFooter : () -> Void
 toggleFooter() shows or hides the TeXmacs footer (status bar etc.).
insertTextFieldAbove : () -> Void
 insertTextFieldAbove() inserts a text field just above the current
 input field.
insertTextFieldBelow : () -> Void
 insertTextFieldBelow() inserts a text field just below the current
 input field.
addDefaultStyle : () -> Void
 addDefaultStyle() adds the default style.
removeDefaultStyle : () -> Void
 removeDefaultStyle() removes the default style.
inlineImage : String -> Void
 inlineImage(img) inserts an image 'img' after the current input
 field.
linkImage : String -> Void
 linkImage(img) inserts a hyperlink to the image 'img' after the
 current input field.
tmActive? : () -> Boolean
 tmActive?() is true when TeXmacs is active, that is when fricas
 was started with the '.texmacs' option.
toggleMathInput : () -> Void
 toggleMathInput() toggles between math input and standard input.
toggleMultilineInput : () -> Void
 toggleMultilineInput() toggles between single line input and multiline
 input.
toggleMathOutput : () -> Void
 toggleMathOutput() toggles between standard (ASCII) output and
 math output (rendered).
toggleTreeOutput : () -> Void
 toggleTreeOutput() toggles tree output.
toggleSchemeTreeOutput : () -> Void
 toggleSchemeTreeOutput() toggles scheme tree output.
showTimings : () -> Void
 showTimings() shows process time information. Note that this is
 not the same as FriCAS timing.
clearAllFields : () -> Void
 clearAllFields() clears all fields.
foldAllFields : () -> Void
 foldAllFields() folds all fields.
unfoldAllFields : () -> Void
 unfoldAllFields() unfolds all fields.
evaluateFieldsInOrder : () -> Void
 evaluateFieldsInOrder() evaluates all fields in order.
createSubsession : () -> Void
 createSubsession() creates a subsession.
splitSession : () -> Void
 splitSession() splits the session.
sessionEval : () -> Void
 sessionEval() evaluates the current session.
evaluateAll : () -> Void
 evaluateAll() evaluates everything.
evaluateAbove : () -> Void
 evaluateAbove() evaluates the input field above.
evaluateBelow : () -> Void
 evaluateBelow() evaluates the input field below.
previousField : () -> Void
 previousField() focus to the previous field.
nextField : () -> Void
 nextField() go to the next field.
firstField : () -> Void
 firstField() go to the first field.
lastField : () -> Void
 lastField() go to the last field.
insertFieldAbove : () -> Void
 insertFieldAbove() inserts a new input field above.
insertFieldBelow : () -> Void
 insertFieldBelow() inserts a new input field below.
removePreviousField : () -> Void
 removePreviousField() removes the previous field.
removeNextField : () -> Void
 removeNextField() removes the next field.
removeBanner : () -> Void
 removeBanner() removes the session banner.
removeLastField : () -> Void
 removeLastField() removes the last field.
closeSession : () -> Void
 closeSession() closes the session.
toggleFullScreenMode : () -> Void
 toggleFullScreenMode() switches between full screnn mode and normal
 mode.
changeZoomFactor : Float -> Void
 changeZoomFactor(f) changes the zoom factor by f (floating point).
zoomIn : Float -> Void
 zoomIn(f) zooms in by f.
zoomOut: Float -> Void
 zoomOut(f) zooms out by f.
fitAllToScreen : () -> Void
 fitAllToScreen() fits everything to screen.
fitToScreen : () -> Void
 fitToScreen() fits current view to screen.
fitToScreenWidth : () -> Void
 fitToScreenWidth() fits to screen width.
fitToScreenHeight : () -> Void
 fitToScreenHeight() fits to screen height.
mathInput : String -> String
 mathInput(s) ???
lispEval : String -> SExpression
 lispEval(s) evaluates the string (lisp code) in the underlying
 lisp (with which FriCAS was built).
setFricasPrompt : (String,String) -> SExpression
 setFricasPrompt(beg,end) redefines the FriCAS prompt. For example,
 setFricasPrompt("[","] ") has the effect: "[1] " instead of of the
 default prompt "(1)-> ".
ioHook : () -> Void
 ioHook() redefines the |$ioHook| function with which FriCAS -texmacs
 is started. It uses "latex" instead of "verbatim" to output "Types"
 in smaller font and colored.
check_iohook : () -> Boolean
 check_iohook() checks whether ioHook() has been applied.
setTypeFontSize : String -> SExpression
 setTypeFontSize(fs) sets the font size of the "Type:" output,
 where 'fs' is a LaTeX font size term, e.g. small, tiny.
setTypeFontColor : String -> SExpression
 setTypeFontColor(fc) sets the font color of the "Type:" output,
 where 'fc' is a LaTeX color, e.g. red,blue, etc.
mainMenu : () -> Void
 mainMenu() inserts a "[FriCAS]" menu in the top header of
 TeXmacs-