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
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
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
Matthew Huggett
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
participants (4)
-
Martin Kolarík
-
Matthew Huggett
-
Patrick Gundlach
-
Willi Egger