ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* values relative to \textwidth etc.
@ 2003-03-20  3:01 Matthew Huggett
  2003-03-20  7:43 ` Martin Kolarík
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Matthew Huggett @ 2003-03-20  3:01 UTC (permalink / raw)


Hi:

Is it possible to specify a value relative to a variable like \textwidth 
or \pageheight etc.  For example, is there a way to get 1/3 of \textwidth?

thanks

Matthew

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

* RE: values relative to \textwidth etc.
  2003-03-20  3:01 values relative to \textwidth etc Matthew Huggett
@ 2003-03-20  7:43 ` Martin Kolarík
  2003-03-20  8:19   ` Patrick Gundlach
  2003-03-21 21:01 ` Willi Egger
  2003-03-22 12:25 ` Patrick Gundlach
  2 siblings, 1 reply; 5+ messages in thread
From: Martin Kolarík @ 2003-03-20  7:43 UTC (permalink / raw)


> Is it possible to specify a value relative to a variable like \textwidth
> or \pageheight etc.  For example, is there a way to get 1/3 of \textwidth?

You always can use TeX's multiplying of dimension with constant like:

\setuplayout
  [leftmargin=0.33333\textwidth]

or for sophisticated expressions you can use ConTeXt's \dimexpr:

\setuplayout
  [leftmargin=\dimexpr(0.33333\textwidth+3cm+\topspace)]

Martin

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

* Re: values relative to \textwidth etc.
  2003-03-20  7:43 ` Martin Kolarík
@ 2003-03-20  8:19   ` Patrick Gundlach
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick Gundlach @ 2003-03-20  8:19 UTC (permalink / raw)


Martin Kolarík <martin@mii.cz> writes:

Hello Martin,

> or for sophisticated expressions you can use ConTeXt's \dimexpr:

\dimexpr (and some other) are etex not ConTeXt primitives. Not trying
to be smart or so, just for those who might use eLaTeX or pdftex
wihout e.

Patrick

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

* Re: values relative to \textwidth etc.
  2003-03-20  3:01 values relative to \textwidth etc Matthew Huggett
  2003-03-20  7:43 ` Martin Kolarík
@ 2003-03-21 21:01 ` Willi Egger
  2003-03-22 12:25 ` Patrick Gundlach
  2 siblings, 0 replies; 5+ messages in thread
From: Willi Egger @ 2003-03-21 21:01 UTC (permalink / raw)


> Is it possible to specify a value relative to a variable like \textwidth
> or \pageheight etc.  For example, is there a way to get 1/3 of \textwidth?

You can use any decimal value of e.g. \texwidth. I use to tune tables with
values like .125\textwidh or .33\textwidth

Willi

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

* Re: values relative to \textwidth etc.
  2003-03-20  3:01 values relative to \textwidth etc Matthew Huggett
  2003-03-20  7:43 ` Martin Kolarík
  2003-03-21 21:01 ` Willi Egger
@ 2003-03-22 12:25 ` Patrick Gundlach
  2 siblings, 0 replies; 5+ messages in thread
From: Patrick Gundlach @ 2003-03-22 12:25 UTC (permalink / raw)


Matthew Huggett <mhuggett@zam.att.ne.jp> writes:

Hello Matthew,

> Is it possible to specify a value relative to a variable like
> \textwidth or \pageheight etc.  For example, is there a way to get 1/3
> of \textwidth?

Besides the answer from Willi, I'd like to add that in the specific
case of layout tuning you might be careful with the naming. For
example when you want to use the "height" parameter that is given
with the \setuplayout macro, you have to refer to \makeupheight. To
see what I mean, use the \showsetups command. It gives you the
\setuplayout parameter and the connected name.

Patrick

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

end of thread, other threads:[~2003-03-22 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-20  3:01 values relative to \textwidth etc Matthew Huggett
2003-03-20  7:43 ` Martin Kolarík
2003-03-20  8:19   ` Patrick Gundlach
2003-03-21 21:01 ` Willi Egger
2003-03-22 12:25 ` Patrick Gundlach

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).