ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Frame until the bottom of the page
@ 2011-04-07  1:20 Aditya Mahajan
  2011-04-07  7:13 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2011-04-07  1:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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?

Thanks,
Aditya
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Frame until the bottom of the page
  2011-04-07  1:20 Frame until the bottom of the page Aditya Mahajan
@ 2011-04-07  7:13 ` Wolfgang Schuster
  2011-04-07 18:35   ` Aditya Mahajan
  2011-04-12 23:12   ` Aditya Mahajan
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2011-04-07  7:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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?

\starttext

\input ward

\blank

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

\stoptext

Wolfgang

___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Frame until the bottom of the page
  2011-04-07  7:13 ` Wolfgang Schuster
@ 2011-04-07 18:35   ` Aditya Mahajan
  2011-04-12 23:12   ` Aditya Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2011-04-07 18:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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?
>
> \starttext
>
> \input ward
>
> \blank
>
> \framed[width=\textwidth,height=\dimexpr\pagegoal-\pagetotal-\lineheight\relax]{}
>
> \stoptext

Thanks a lot.

Aditya
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Frame until the bottom of the page
  2011-04-07  7:13 ` Wolfgang Schuster
  2011-04-07 18:35   ` Aditya Mahajan
@ 2011-04-12 23:12   ` Aditya Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2011-04-12 23:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 : ntg-context@ntg.nl / 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
___________________________________________________________________________________


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

end of thread, other threads:[~2011-04-12 23:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07  1:20 Frame until the bottom of the page Aditya Mahajan
2011-04-07  7:13 ` Wolfgang Schuster
2011-04-07 18:35   ` Aditya Mahajan
2011-04-12 23:12   ` Aditya Mahajan

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