ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setup -- when is it expanded?
@ 2000-05-18 10:27 Michal Kvasnicka
  2000-05-18 12:49 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Kvasnicka @ 2000-05-18 10:27 UTC (permalink / raw)


Hallo!

The last problem in the list made me to ask this very question? When are

setup's expanded? For example, I have in my preamble the setting
  \setupinterlinespace[3ex]
When 3ex is transleted to pt? When \setup... is typed, or whenever the
underlying command (here line space) is executed? Is it the same for
ALL setups?

Many thanks.
Have a nice day you all.

Michal Kvasnicka

--
Economics is the only field in which two people can get a Nobel Prize
for saying exactly the opposite things.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: setup -- when is it expanded?
  2000-05-18 10:27 setup -- when is it expanded? Michal Kvasnicka
@ 2000-05-18 12:49 ` Hans Hagen
       [not found]   ` <39266FAC.CC2FECF4@econ.muni.cz>
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2000-05-18 12:49 UTC (permalink / raw)
  Cc: Context

At 12:27 PM 5/18/2000 +0200, Michal Kvasnicka wrote:

>The last problem in the list made me to ask this very question? When are
>
>setup's expanded? For example, I have in my preamble the setting
>  \setupinterlinespace[3ex]
>When 3ex is transleted to pt? When \setup... is typed, or whenever the
>underlying command (here line space) is executed? Is it the same for
>ALL setups?

This is not so much a matter of expansion. The interline space is set [and
one can define different ones for each bodyfont environment, see for
instance s-map-01.tex] when the body font is switched. So, it's 3ex of
12pt, 11pt, 10pt etc. The 3ex is just stored in a variable.

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: setup -- when is it expanded?
       [not found]   ` <39266FAC.CC2FECF4@econ.muni.cz>
@ 2000-05-21 20:32     ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2000-05-21 20:32 UTC (permalink / raw)
  Cc: ntg-context

At 12:57 PM 5/20/2000 +0200, Michal Kvasnicka wrote:

>Well, my fault -- bad example. But anyway, how does it work? Let's suppose
>I want to set some distance in the \setup... macro to a \baselineskip. Will
>it be
>relative to the current baselineskip in the document, or is it set up to the
>\baselineskip
>in the time when \setup... macro is processed?

It depends. In many cases context does what you expect. Nearly all setup
macros only store values and switch states. This means that setting
something to \somedimension results in an adapting something. 

Some setups indeed so some pre-processing, for instance to save
re-processing time. 

If you want a fixed something, you can always say something: 

\expanded{\setupwhatever[height=\the\baselineskip]}

This will expand \the\baselineskip into a fixed value. 

There are (as far as I know) no setups that are dependant of the order in
which they appear. [in the back of my mind there are a few, but I think I
already adapted them] 

It's different with \define macros; 

\definecolor[red][r=.6]
\definecolor[veryred][red]

In this case, very red is fixed at definition time. I may change this -) 

So, the answer to your question is: when needed. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-05-21 20:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-18 10:27 setup -- when is it expanded? Michal Kvasnicka
2000-05-18 12:49 ` Hans Hagen
     [not found]   ` <39266FAC.CC2FECF4@econ.muni.cz>
2000-05-21 20:32     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).