How do I specify a dimension that is an arithmetic expression? For example, \framed[width=\textwidth-12pt]{} Thanks, Bart
Bart C. Wise wrote:
How do I specify a dimension that is an arithmetic expression?
For example, \framed[width=\dimexpr\textwidth-12pt\relax]{}
Thanks, Bart ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
The syntax of \dimexpr and \numexpr is subtle and mysterious. For example, \framed[width=.61\textwidth,height=\dimexpr.61\textwidth*1486/1200\relax]{} works, but I never understood the limitations. How about an entry on the wiki?
Am 26.01.2009 um 20:12 schrieb Alan BRASLAU:
The syntax of \dimexpr and \numexpr is subtle and mysterious. For example, \framed[width=.61\textwidth,height=\dimexpr. 61\textwidth*1486/1200\relax]{} works, but I never understood the limitations. How about an entry on the wiki?
\dimexpr and \numexpr are explaines in the e-tex manual. The only important thing for \dimexpr is to write the dimen value as first value after the \dimexpr command and then the numeric values. Wolfgang
On Mon, Jan 26, 2009 at 9:32 PM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote:
Am 26.01.2009 um 20:12 schrieb Alan BRASLAU:
The syntax of \dimexpr and \numexpr is subtle and mysterious.
For example,
\framed[width=.61\textwidth,height=\dimexpr.61\textwidth*1486/1200\relax]{} works, but I never understood the limitations. How about an entry on the wiki?
\dimexpr and \numexpr are explaines in the e-tex manual.
... which you'll find here: http://www.ntg.nl/maps/20/38.pdf Best, Alan
The only important thing for \dimexpr is to write the dimen value as first value after the \dimexpr command and then the numeric values.
Wolfgang
participants (6)
-
Alan BRASLAU
-
Alan Stone
-
Bart C. Wise
-
Bart C. Wise
-
Hans Hagen
-
Wolfgang Schuster