On 16/08/10 10:42, Sam Liddicott wrote:
I'm trying to use scheme to generate a literal tab character for
verbatim export:
Scheme docs tell me that #\ht should represent the horizontal tab
character, and that (string #\ht) should return such a string, but
texmacs just returns a weird unicode character:
1. <extern|(lambda () `(concat "[" ,(string #\\A) "]"))>
The first example results in [A]
2. <extern|(lambda () `(concat "[" ,(string #\\ht) "]"))>
But the second example does not result in a TAB (ascii 9) within [ ]
but rather unicode, which as two ascii characters is C2 and B8 whose
html representation is ¯
How shall I generate a literal tab character for text export?
For now, I'm using this nf-tab macro:
<assign|nf-tab|<macro|<resize|<htab|3spc|first><with|mode|math|\<mapsto\>>|||l+8spc|>>>
<\code>
something.o: something.c
<nf-tab>CC -o something.o something.c
</code>
I can fixup and replace 0xE2 0x86 0xA6 characters that get output with a
literal tab when I untangle the source.
However I can't manage to have the mapsto arrow centered automatically
(using htabs either side) or find a way to use <space> or <phantom>
based on a calculation because I can't find out how to get the size of a
string.
I also note that in a <code> block, 1em isn't the same as 1spc even
though a letter m is as wide as a space.
It would be nice if I could have tabstops on multiples of a character; like:
<assign|multiple|<macro|n|m|<minus|<arg|n>|<mod|<arg|n>|<arg|m>>>>>
<assign|nf-tab|<macro|<resize|<htab|3spc|first><with|mode|math|\<mapsto\>>|||<multiple|l+8spc|1spc>|>>>
Except of course macro's taking arguments aren't allowed where lengths.
Is there any sneaky way to do this?
Sam
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev