![](https://secure.gravatar.com/avatar/468d45d9f34c99f0697f0e59e2e73b46.jpg?s=120&d=mm&r=g)
How do I specify a dimension that is an arithmetic expression? For example, \framed[width=\textwidth-12pt]{} Thanks, Bart
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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 -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/ac3fbaf0a287c4cffbc9f18fa931586c.jpg?s=120&d=mm&r=g)
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?
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/1f1420d2f042c8497d63406a4033a676.jpg?s=120&d=mm&r=g)
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