mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Re: Macros with default values.


Chronological Thread 
  • From: "Sam Liddicott" <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] Re: Macros with default values.
  • Date: Sat, 04 Dec 2010 21:17:14 -0000
  • 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=


On 04/12/10 20:54, Adrian S. wrote:
I found a way to do it. It is just doing the example in the manual,
with one modification.
The example in the texmacs manual did not work, but this version did.

<inactive|<assign|hey|<inactive|<macro|first|second|<inactive|<if|<inactive|<equal|<arg|second>|>>|Only
<arg|first>|<arg|first> and<arg|second>>>>>>>

This is the version that the manual had in the section "Writing
Texmacs Stylefiles" under
"Writing a simple style package". The only problem is that the uninit
should be erased for it to work.

<inactive|<assign|hey|<inactive|<macro|first|second|<inactive|<if|<inactive|<equal|<arg|second>|<uninit>>>|Hey
<arg|first>, you look lonely today...|Hey<arg|first> and<arg|second>, you
form a nice couple!>>>>>>

I hope this helps someone.

It helps me - thanks!

Sam

Peace.
-Adrian.

On Wed, Dec 1, 2010 at 10:24 PM, Adrian S.<address@hidden> wrote:
I wanted to write a macro with default values something like, in python,
def f(x=1,y=2):
return x+y


I saw the following example in the manual, but I have not managed to
make it work.

<assign|hey|<macro|first|second|<style-with|src-compact|none|<if|<equal|<arg|second>|<uninit>>|Hey
<arg|first>, you look lonely today...|Hey<arg|first> and<arg|second>, you
form a nice couple!>>>>>

Is this a bug?

Thanks for you help!

Peace.
-Adrian



--
[FSF Associate Member #2325] <http://www.fsf.org/register_form?referrer=2325>

<http://www.openrightsgroup.org/>



Archive powered by MHonArc 2.6.19.

Top of page