On Thu, 7 Apr 2011, Wolfgang Schuster wrote:


Am 07.04.2011 um 03:20 schrieb Aditya Mahajan:

Hi,

I want to create a frame that should occupy the remaining space on the page. 
For example, if I call this frame when the page is 1/3rd full, I want the frame 
to have an height of 0.667\textheight. How can I do that?

In other words, how to I find out how much space is left on the current page?

\framed[width=\textwidth,height=\dimexpr\pagegoal-\pagetotal-\lineheight\relax]{}

In case someone else is interested, I finally ended up using the following code:

\definemeasure[page][\dimexpr\pagegoal-\pagetotal-\lineheight\relax]

\starttext

\input knuth

\framed[width=\textwidth, height=\measure{page}]{test}

\input knuth
\input knuth
\input knuth

\framed[width=\textwidth, height=\measure{page}]{test}

\stoptext

I think that this is easier than having to type the complicated \dimexpr everytime.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to