Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Difference in \assign and \with?

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Difference in \assign and \with?


Chronological Thread 
  • From: Henri Lesourd <address@hidden>
  • To: Robert Lamar <address@hidden>
  • Cc: address@hidden
  • Subject: Re: [TeXmacs] Difference in \assign and \with?
  • Date: Sat, 21 Apr 2007 20:40:47 +0200

Robert Lamar wrote:

Fellow TeXmacs users,

Can someone tell me the difference between the 'assign' command and the
'with' command?

'Assign' is for defining *global* variables, while 'with' is for
definining a chunk of markup with variables defined *locally*
only inside this chunk.

In other words, in the following document :
[[
blah blah (1)
<assign|a|1>
blah blah (2)
<with|a|2|b|3|
blah blah (3)
>
blah blah (4)
]]

-> Inside the "blah blah (1)", the variables a and b
are undefined ;

-> Inside the "blah blah (2)", the variable a is defined
and has the value '1' ;

-> Inside the "blah blah (3)", the variable a is redefined
and has the value '2', and the local variable b is defined
and has the value '3' ;

-> Inside the "blah blah (4)", we are outside and after the
block defined by the 'with', thus everything becomes again
as previously : the (global) variable a is defined and has the
value '1', and the (local) variable b becomes undefined again ;




Archive powered by MHonArc 2.6.19.

Top of Page