aboutsummaryrefslogtreecommitdiff
path: root/src/interp/i-output.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-11-02 03:16:09 +0000
committerdos-reis <gdr@axiomatics.org>2008-11-02 03:16:09 +0000
commitd7abce535075910edbd16db165588b6c99c37e77 (patch)
treef02ec0748665d09da614167937a9e9ab97616787 /src/interp/i-output.boot
parent080cc997345ac89c030ca945501b931af8ba11a5 (diff)
downloadopen-axiom-d7abce535075910edbd16db165588b6c99c37e77.tar.gz
* interp/g-util.boot: Import "ggreater".
* interp/category.boot: Import "g-cndata" * interp/c-util.boot: Import "g-opt". * interp/Makefile.pamphlet: Adjust Make rules.
Diffstat (limited to 'src/interp/i-output.boot')
-rw-r--r--src/interp/i-output.boot20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot
index 2a625592..be25b4ac 100644
--- a/src/interp/i-output.boot
+++ b/src/interp/i-output.boot
@@ -2677,3 +2677,23 @@ inputForm2String x ==
inputForm2OutputForm x ==
INTERN inputForm2String x
+-- function for turning strings in tex format
+
+str2Outform s ==
+ parse := ncParseFromString s or systemError '"String for TeX will not parse"
+ parse2Outform parse
+
+parse2Outform x ==
+ x is [op,:argl] =>
+ nargl := [parse2Outform y for y in argl]
+ op = 'construct => ['BRACKET,['ARGLST,:[parse2Outform y for y in argl]]]
+ op = 'brace and nargl is [[BRACKET,:r]] => ['BRACE,:r]
+ [op,:nargl]
+ x
+
+str2Tex s ==
+ outf := str2Outform s
+ val := coerceInt(objNew(wrap outf, '(OutputForm)), '(TexFormat))
+ val := objValUnwrap val
+ CAR val.1
+