- From: Lionel Elie Mamane <address@hidden>
- To: Henri Lesourd <address@hidden>
- Cc: address@hidden
- Subject: Re: [TeXmacs] Scheme string to tm tree conversion
- Date: Tue, 28 Feb 2006 21:57:04 +0100
On Tue, Feb 28, 2006 at 09:35:25PM +0100, Henri Lesourd wrote:
>
Lionel Elie Mamane wrote:
>
>
>Hi,
>
>
>
>What is the scheme function foo such that (foo s) is the TeXmacs tree
>
>(document snippet) whose rendering is s? I tried string->tree, but
>
>this _interprets_ the string. verbatim->tree doesn't do what I want
>
>either. I grepped the source for "string->" and "->tree" without
>
>success.
>
>
>
>In particular:
>
>
>
>- (foo "<gtr>") is the tree whose .tm serialisation is:
>
> \<less\>gtr\<gtr\> .
>
>
>
>
>
>
>
Uh, that is not clear. As for me, I get :
>
[[
>
(string->tree "<gtr>") or
>
(string->tree ">")
>
=>
>
'>'
>
]]
Notice that the tree produced by (string->tree "<gtr>") and
(string->tree ">") is not the same one. Save your file and look at it
in less (or more or emacs or ...). One is \>, the other \<gtr\>.
Try with (string->tree "<"). It gives an _invalid_ tree.
>
isn't it what you want ?
No. I want (foo "<gtr>") to be the tree that gets serialized as
\<less\>gtr\<gtr\> in a .tm file. This means the '<' symbol, followed
by the letters g, t and r and then the '>' symbol. Not the '>' symbol
alone.
>
Or rather would you like to get :
>
[[
>
(string->tree ">")
>
=>
>
'\<gtr\>'
>
]]
Yes, exactly.
>
In my own case, I got fed up with these escaping problems in the
>
strings, thus I finally decided to do my escapings myself.
So you are saying that this function is _not_ part of TeXmacs?
>
The following ones work well for me :
Thanks. Will try them out.
--
Lionel
Archive powered by MHonArc 2.6.19.