ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: The whole (sub)section on a single page
Date: Tue, 15 Nov 2005 09:15:28 +0100	[thread overview]
Message-ID: <6faad9f00511150015l6c4819c9qda1afd2e33dd3ee5@mail.gmail.com> (raw)
In-Reply-To: <4378E7F8.4000505@wxs.nl>

Hans Hagen wrote:
> Mojca Miklavec wrote:
> >Taco Hoekwater wrote:
> >>Mojca Miklavec wrote:
> >>
> >>
> >>>It doesn't need to automatically determine the subsection boundaries
> >>>automatically (although this would be great), so I can write something
> >>>like this:
> >>>
> >>>\startmaterialforonepage
> >>>\subsection{split only if too long for one page}
> >>>\dorecurse{10}{whatever comes here \dots }
> >>>\stopmaterialforonepage
> >>>
> >>>
> >>Do you want something like this?
> >>
> >>   \long\def\startmaterialforonepage#1\stopmaterialforonepage%
> >>     {\setbox0\vbox{#1}\ifdim\ht0<\textheight \page\fi #1}
> >>
> >>
> >
> >Thak you, Taco. Yes, this is almost exactly what I wanted to do,
> >except that I would substitute
> >    \ifdim\ht0<\textheight
> >with
> >    \ifdim\ht0<\theremainingpageheight
> >
> >How/where can I get \theremainingpageheight? I saw some strange
> >"keywords" like \pagegoal, \pagetotal spread through the source, ...
> >but I have no clue what they are for and if they have anyting to do
> >with what I'm looking for.
> >
> >
> that's always tricky, because it's not really possible to determine the
> rest of the available space without entering the output routing, which
> then spoils spacing
>
> (there is \testpage[n] with n being a minimal number of lines, so,
> \testpage[10] will move to the next page if there are less than 10 lines)

Thank you, Hans. I have to refresh my knowledge about the syntax and
I'll try it out. Making
    \setbox0\vbox{#1}
and then executing the \testpage with "ceil(ht0 / lineheight)" should
then work OK, I hope.


I understand the problem of the approach that I asked for: as soon as
someone enters a \vfill(l) or \vss, it's approximately impossible to
determine where the text on the page ends. But in the first
approximation I would be satisfied with the empty space that would
remain if the document ended at that specific place.

That information is also very valuable when trying to put pictures on
slides, where picture has to be as big as possible, but still has to
fit on the space under the title (I tuned them manually, which was OK
for just a couple of slides).

Thank you,
    Mojca

  reply	other threads:[~2005-11-15  8:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-12 23:55 Mojca Miklavec
2005-11-13 13:58 ` Taco Hoekwater
2005-11-14 18:11   ` Mojca Miklavec
2005-11-14 19:39     ` Hans Hagen
2005-11-15  8:15       ` Mojca Miklavec [this message]
2005-11-15  9:38         ` Hans Hagen
2005-12-01  8:35       ` Christopher Creutzig
2005-12-01  9:29         ` Hans Hagen
2005-12-06 22:00           ` Christopher Creutzig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6faad9f00511150015l6c4819c9qda1afd2e33dd3ee5@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).