Subject: mailing-list for TeXmacs Users
List archive
From : "Sam Liddicott" <address@hidden>- To: address@hidden
- Subject: [TeXmacs] More quasi and cline
- Date: Wed, 06 Apr 2011 16:39:33 +0100
- Envelope-to:
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAADxQTFRF NTdQY2Z/i286eHFugnNXoJBwm5GCs5VeoqO0ua+fwLCQ4c2q19C81NDF4eLr/unQ/PTf/fXW+/rq /f/7XKo76wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAi9JREFUSMetloGSqyAMRVsFNAQkxP//15cE 62rFdt/MZqbTVu/hBhLEx/qf8fgDIAN455wHyPk7wCIe9nA+fwGSH87hgD8AHPfRpy2GwdMtcBh+ mg4Ech9Ih+RNixJKDLEL0GF8VLkSojePHrDlryNijbFW8zBg8PUKbBOI6D1WCV5Rf2DzxCtgBlMs tRRVW5LyVW3ew1TfAZZ6RcQicpb4yZmaC74DJADK6BdATOrUAbJzsZie+K22ZnEBknNYysvhVH6u 1X8CqAe4DuANoPoOrAbsHXUARJ5knc5z4EyyTnHoAqj7xvkYIdk65AwhyEZKMusOIDV2QQQaCnDQ gBiDR3RdIEb5CBESt2wgQJI0Yx/Agphg1MgNsD+QkszM9wHVPx/PeQOW+fmcR9DF8+4CyCJhCuP8 fDzmBbLqs8JzMODqYNfDvKhoGYM2lDosy5jlRozccRAgrPM8iygQS3Mv87IugUgKlC7NZ6liuy4r uresVq5QuQAr09ZKEga8OkluyKXeQ6Bs3SrtqgC1pWLNqAfwDhBnB+sK8OrVL4D4h1B4zWPWhJhu gPUHKA5EwSMYUMsdQK+UKDhIOTSHeg+8HCoTOGtB/gwcl4mSdGybwXegPWhM/RHYKwchkckhUNMX 6j7ueQNScLbZZOPRxaADyO2UQCJpl7wbnE6gQ+ksWjpngxOwF1tF5ecP3R6KB+AQxPfHLncQ+nKw 06fhu68OTIfJ869eTtg22l+9zfwDK3mKl5BFHMYAAAAASUVORK5CYII=
This texmacs draws a triangle
<assign|x|<tuple|<point|2|2>|<point|3|3>|<point|1|0>>>
<quasi|<cline|<point|0|0>|<point|1|1>|<unquote*|<value|x>>>>
I have a macro "jags" which returns a tuple of points that might be used by cline to make a jagged line.
<assign|append-tuple|<macro|name|t|<if|<equal|<get-label|<value|<arg|name>>>|tuple>|<assign|<arg|name>|<merge|<value|<arg|name>>|<arg|t>>>|<assign|<arg|name>|<arg|t>>>>>
<assign|jags|<macro|c|<with|x|0|xpoints||<while|<less|<value|x>|7>|<append-tuple|xpoints|<tuple|<point|<value|x>|<mod|<value|x>|2>>>><assign|x|<plus|<value|x>|1>>><value|xpoints>>>>
Sadly, cline does not take a tuple, but using the output of the macro "jags" keeps causing a segfault:
<assign|x|<jags|>>
<quasi|<cline|<point|0|0>|<point|1|1>|<unquote*|<value|x>>>>
or
<quasi|<assign|x|<unquote|<jags|>>>>
<quasi|<cline|<point|0|0>|<point|1|1>|<unquote*|<value|x>>>>
both crash texmacs.
but not using jags but a tuple directly works and draws the triangle:
<assign|x|<tuple|<point|2|2>|<point|3|3>|<point|1|0>>>
<quasi|<cline|<point|0|0>|<point|1|1>|<unquote*|<value|x>>>>
Any tips?
Judicious use of get-label shows that for both of these:
<quasi|<assign|x|<unquote|<jags|>>>>
<assign|x|<jags|>>
x is a "with" and not a "tuple"
This is clearly the contents of the jags macro showing up - whose first item is a "with" clause
I cannot work out why: <quasi|<assign|x|<unquote|<jags|>>>>
did not evaluate jags but rather just fetches it's definition
Sam
- [TeXmacs] More quasi and cline, Sam Liddicott, 04/06/2011
- Re: [TeXmacs] More quasi and cline, Sam Liddicott, 04/06/2011
- Re: [TeXmacs] More quasi and cline, Sam Liddicott, 04/06/2011
- Re: [TeXmacs] More quasi and cline, Sam Liddicott, 04/06/2011
Archive powered by MHonArc 2.6.19.