From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23474 Path: news.gmane.org!not-for-mail From: Mojca Miklavec Newsgroups: gmane.comp.tex.context Subject: Re: The whole (sub)section on a single page Date: Tue, 15 Nov 2005 09:15:28 +0100 Message-ID: <6faad9f00511150015l6c4819c9qda1afd2e33dd3ee5@mail.gmail.com> References: <6faad9f00511121555x5ff6084dn26e714128030392e@mail.gmail.com> <4377468E.4010802@elvenkind.com> <6faad9f00511141011g40a31af8nac87df252a3d6f5e@mail.gmail.com> <4378E7F8.4000505@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1132042539 31581 80.91.229.2 (15 Nov 2005 08:15:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 15 Nov 2005 08:15:39 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 15 09:15:37 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ebvya-0001hB-Gp for gctc-ntg-context-518@m.gmane.org; Tue, 15 Nov 2005 09:15:36 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B9C94127D0; Tue, 15 Nov 2005 09:15:35 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03236-07; Tue, 15 Nov 2005 09:15:31 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4FC4E1278D; Tue, 15 Nov 2005 09:15:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EEB3F1278D for ; Tue, 15 Nov 2005 09:15:29 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03270-07 for ; Tue, 15 Nov 2005 09:15:29 +0100 (CET) Original-Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.196]) by ronja.ntg.nl (Postfix) with ESMTP id 0AB0812778 for ; Tue, 15 Nov 2005 09:15:28 +0100 (CET) Original-Received: by nproxy.gmail.com with SMTP id n15so282900nfc for ; Tue, 15 Nov 2005 00:15:28 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SgS1ROyXdNKJrxvIyTBz0M62T3zp5p0tPqZksSK7H0d8Nrsn6vSZFMF8cNK5KXVlmZG7XpqW6vay5qdjVi3XZvxkt2nGTHmB8j4JsjCnZH2bqrJDVRBZ+WXtfWXBHZLPiY/OANHDpR1GKXGpNJ6pkm4IO42O0gZwnpNQ5j7RRQo= Original-Received: by 10.48.199.17 with SMTP id w17mr251745nff; Tue, 15 Nov 2005 00:15:28 -0800 (PST) Original-Received: by 10.48.3.15 with HTTP; Tue, 15 Nov 2005 00:15:28 -0800 (PST) Original-To: mailing list for ConTeXt users In-Reply-To: <4378E7F8.4000505@wxs.nl> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:23474 Archived-At: 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