\blank[inhibit] broken ???
Hi, looking for a reliable soluion to the problem of keeping section heads with following paragraphs I found the email below from Hans 2003. But using it gives an error (see below): \starttext \definehead[myhead][section] \setuphead[myhead][after={\blank[big]\blank[inhibit]}] \input tufte \par \input knuth \par \input tufte \par \input knuth \par \myhead{Sektion} \index{Index} \subsection{Subsektion} \input knuth \par \stoptext Is "inhibit" broken? Steffen (still on mkii) ------------------------------ ! Missing number, treated as zero. <to be read again> i <argument> i nhibit \redoblank ...\else \global \advance \blankskip #1 \relax \fi \fi \fi \dodorepeatwithcommand ...repeatwithcommand [#1]#5 \else \dododorepeatwithcom... \next1 ...lse \dorepeatwithcommand [#1]\redoblank \fi \fi \fi \rawprocesscommaitem ...commalevel \endcsname {#1} \expandafter \rawprocessco... ... l.17 \myhead{Sektion} ? ------------------------------ ------------------------------ Am 10.04.2003 um 18:17 schrieb Hans Hagen: "NTG-context] keep section head with following paragraphs"
At 15:17 09/04/2003 -0700, you wrote:
my question: how do i make sure that section heads will not be alone at the bottom of the page, with the following paragraphs at the start of the next page? i want the section head to stay with the first paragraph (or at least the first two lines) of the paragraph immediately following the section head.
(1) use the sectioning commands, so
\definehead[myhead][subsubsection] \setuphead[myhead][style=bold]
instead of
\def\myhead#1{{\bf#1}}
since the sectioning commands will keep successive heads together as well discourage a pagebreak after a head; only lower level heads are kept together, while sam elevel heads may break (makes sense)
(2) this game is spoiled when the head is followed by a command like \blank; a way out can be:
\setuphead[myhead][after={\blank[big]\blank[inhibit]}]
another option is:
\setuphead[myhead][before={\testpage[4]}]
which will break if there are less than 4 lines left
Hans
------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Fri, Jul 25, 2008 at 9:58 AM, Steffen Wolfrum
Hi,
looking for a reliable soluion to the problem of keeping section heads with following paragraphs I found the email below from Hans 2003.
But using it gives an error (see below):
\starttext
\definehead[myhead][section] \setuphead[myhead][after={\blank[big]\blank[inhibit]}]
\input tufte \par \input knuth \par \input tufte \par \input knuth \par
\myhead{Sektion}
\index{Index}
\subsection{Subsektion}
\input knuth \par
\stoptext
Is "inhibit" broken?
'inhibit' is no legal value for \blank. Wolfgang
... yes, but Hans said so (see my email quoting him)!!! What did he mean? Do you know an other solution? St. Am 25.07.2008 um 10:08 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 9:58 AM, Steffen Wolfrum
wrote: Hi,
looking for a reliable soluion to the problem of keeping section heads with following paragraphs I found the email below from Hans 2003.
But using it gives an error (see below):
\starttext
\definehead[myhead][section] \setuphead[myhead][after={\blank[big]\blank[inhibit]}]
\input tufte \par \input knuth \par \input tufte \par \input knuth \par
\myhead{Sektion}
\index{Index}
\subsection{Subsektion}
\input knuth \par
\stoptext
Is "inhibit" broken?
'inhibit' is no legal value for \blank.
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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
... yes, but Hans said so (see my email quoting him)!!!
What did he mean? Do you know an other solution?
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf} \definehead[myhead][section] \setuphead[myhead][after={\blank[endgraf,nobreak,big]}] Not sure about the order in the blank command but this should work. Wolfgang
Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
wrote: ... yes, but Hans said so (see my email quoting him)!!!
What did he mean? Do you know an other solution?
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]
Not sure about the order in the blank command but this should work.
Hmm, I think I have tried all possible combination now but it does not work. Did you try? \starttext \defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf} \definehead[myhead][section] \setuphead[myhead][after={\blank[nobreak,endgraf,big]}] \input tufte \par \input knuth \par \input tufte \par \input knuth \par \myhead{Sektion} \index{Index} test \stoptext Steffen
On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
wrote: ... yes, but Hans said so (see my email quoting him)!!!
What did he mean? Do you know an other solution?
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]
Not sure about the order in the blank command but this should work.
Hmm, I think I have tried all possible combination now but it does not work. Did you try?
\starttext
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]
\input tufte \par \input knuth \par \input tufte \par \input knuth \par
\myhead{Sektion}
\index{Index}
test
\stoptext
Steffen
You're looking for http://wiki.contextgarden.net/Registers#Technical_note Wolfgang
Am 25.07.2008 um 10:39 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
wrote: Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
wrote: ... yes, but Hans said so (see my email quoting him)!!!
What did he mean? Do you know an other solution?
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]
Not sure about the order in the blank command but this should work.
Hmm, I think I have tried all possible combination now but it does not work. Did you try?
\starttext
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]
\input tufte \par \input knuth \par \input tufte \par \input knuth \par
\myhead{Sektion}
\index{Index}
test
\stoptext
Steffen
You're looking for http://wiki.contextgarden.net/Registers#Technical_note
ok, but this was just one easily reproducible example of troubling situations. For another is \vskip, as sometimes the distance between two heading must be smaller than the normal space above or below: \subsection ... \vskip-14pt \subsubsection ... In this situation I always experience the same problem: you have a heading at bottom of page :o( I just didn't manage to show this with an minimal example. Steffen
On Fri, Jul 25, 2008 at 10:52 AM, Steffen Wolfrum
Am 25.07.2008 um 10:39 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
wrote: Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
wrote: ... yes, but Hans said so (see my email quoting him)!!!
What did he mean? Do you know an other solution?
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]
Not sure about the order in the blank command but this should work.
Hmm, I think I have tried all possible combination now but it does not work. Did you try?
\starttext
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]
\input tufte \par \input knuth \par \input tufte \par \input knuth \par
\myhead{Sektion}
\index{Index}
test
\stoptext
Steffen
You're looking for http://wiki.contextgarden.net/Registers#Technical_note
ok, but this was just one easily reproducible example of troubling situations.
For another is \vskip, as sometimes the distance between two heading must be smaller than the normal space above or below:
\subsection ... \vskip-14pt \subsubsection ...
In this situation I always experience the same problem: you have a heading at bottom of page :o(
I just didn't manage to show this with an minimal example.
\newsignal\sectionsignal \setuphead [section] [before={\blank[big]}, after={\blank[2*big]\vskip\sectionsignal}] \def\subsectionbefore {\ifdim\lastskip=\sectionsignal %\blank[-medium]% \vskip-\medskipamount \else \blank[big]% \fi} \setuphead [subsection] [before=\subsectionbefore, after={\blank[big]}] \showgrid \starttext \section{Section} \subsection{Subsection} text \section{Section} text \subsection{Subsection} \stoptext Wolfgang
wow ... the power of programming. st. Am 25.07.2008 um 13:22 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:52 AM, Steffen Wolfrum
wrote: Am 25.07.2008 um 10:39 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:33 AM, Steffen Wolfrum
wrote: Am 25.07.2008 um 10:25 schrieb Wolfgang Schuster:
On Fri, Jul 25, 2008 at 10:15 AM, Steffen Wolfrum
wrote: ... yes, but Hans said so (see my email quoting him)!!!
What did he mean? Do you know an other solution?
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[endgraf,nobreak,big]}]
Not sure about the order in the blank command but this should work.
Hmm, I think I have tried all possible combination now but it does not work. Did you try?
\starttext
\defineblankmethod [nobreak] {\penalty\plustenthousand} \defineblankmethod [endgraf] {\endgraf}
\definehead[myhead][section] \setuphead[myhead][after={\blank[nobreak,endgraf,big]}]
\input tufte \par \input knuth \par \input tufte \par \input knuth \par
\myhead{Sektion}
\index{Index}
test
\stoptext
Steffen
You're looking for http://wiki.contextgarden.net/Registers#Technical_note
ok, but this was just one easily reproducible example of troubling situations.
For another is \vskip, as sometimes the distance between two heading must be smaller than the normal space above or below:
\subsection ... \vskip-14pt \subsubsection ...
In this situation I always experience the same problem: you have a heading at bottom of page :o(
I just didn't manage to show this with an minimal example.
\newsignal\sectionsignal
\setuphead [section] [before={\blank[big]}, after={\blank[2*big]\vskip\sectionsignal}]
\def\subsectionbefore {\ifdim\lastskip=\sectionsignal %\blank[-medium]% \vskip-\medskipamount \else \blank[big]% \fi}
\setuphead [subsection] [before=\subsectionbefore, after={\blank[big]}]
\showgrid
\starttext \section{Section} \subsection{Subsection} text \section{Section} text \subsection{Subsection} \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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Fri, Jul 25 2008, Wolfgang Schuster wrote:
\defineblankmethod [nobreak] {\penalty\plustenthousand}
Hello, Why "\plustenthousand", and not 10000? Cheers, Peter -- http://pmrb.free.fr/contact/
Taco Hoekwater wrote:
Hi STeffen,
Steffen Wolfrum wrote:
... yes, but Hans said so (see my email quoting him)!!!
What did he mean?
Perhaps he meant \inhibitblank or \blank[disable]. (guessed from the code)
indeed ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Thanks for clarification, Taco! Steffen Am 28.07.2008 um 16:28 schrieb Hans Hagen:
Taco Hoekwater wrote:
Hi STeffen,
Steffen Wolfrum wrote:
... yes, but Hans said so (see my email quoting him)!!!
What did he mean?
Perhaps he meant \inhibitblank or \blank[disable]. (guessed from the code)
indeed
----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________
participants (5)
-
Hans Hagen
-
Peter Münster
-
Steffen Wolfrum
-
Taco Hoekwater
-
Wolfgang Schuster