* orphan headline
@ 2016-05-26 8:56 Andrea Valle
2016-05-26 15:40 ` Pablo Rodriguez
2016-05-26 19:55 ` Wolfgang Schuster
0 siblings, 2 replies; 9+ messages in thread
From: Andrea Valle @ 2016-05-26 8:56 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1994 bytes --]
Dear all,
I’m finishing a book, and getting the following undesired result.
Many times I have section or subsection title at the bottom of a page, with no text. Text starts on the next page.
I have looked at
http://wiki.contextgarden.net/Widows_and_orphans_control
but I wasn’t able to solve.
I guess it could depend on the formatting of my headlines. Here they are:
\setuphead[section]
[style=\ss\tfa, before={\blank[0.5cm]\startframedtext[offset=0.25cm,framecolor=black,
rulethickness=0.01cm, frame=off, topframe=off, bottomframe=on]\crlf},after={\stopframedtext\noindentation\blank[1cm]}]
\setuphead[subsection]
[style=\ss, before={\blank[0.5cm]\startframedtext[offset=0.25cm,framecolor=black,
rulethickness=0.01cm, frame=off, topframe=off, bottomframe=on]\crlf},after={\stopframedtext\noindentation\blank[1cm]}]
thanks
Best
-a-
--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> andrea.valle@unito.it
--------------------------------------------------
"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a lotta what-have-yous."
(Jeffrey 'The Dude' Lebowski)
--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> andrea.valle@unito.it
--------------------------------------------------
"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a lotta what-have-yous."
(Jeffrey 'The Dude' Lebowski)
[-- Attachment #1.2: Type: text/html, Size: 6258 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-26 8:56 orphan headline Andrea Valle
@ 2016-05-26 15:40 ` Pablo Rodriguez
2016-05-26 15:45 ` Andrea Valle
2016-05-26 19:55 ` Wolfgang Schuster
1 sibling, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2016-05-26 15:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 05/26/2016 10:56 AM, Andrea Valle wrote:
> Dear all,
>
> I’m finishing a book, and getting the following undesired result.
> Many times I have section or subsection title at the bottom of a page,
> with no text. Text starts on the next page.
> I have looked at
>
> http://wiki.contextgarden.net/Widows_and_orphans_control
>
> but I wasn’t able to solve.
>
> I guess it could depend on the formatting of my headlines. Here they are:
>
> \setuphead[section]
> [style=\ss\tfa,
> before={\blank[0.5cm]\startframedtext[offset=0.25cm,framecolor=black,
> rulethickness=0.01cm, frame=off, topframe=off,
> bottomframe=on]\crlf},after={\stopframedtext\noindentation\blank[1cm]}]
>
> \setuphead[subsection]
> [style=\ss,
> before={\blank[0.5cm]\startframedtext[offset=0.25cm,framecolor=black,
> rulethickness=0.01cm, frame=off, topframe=off,
> bottomframe=on]\crlf},after={\stopframedtext\noindentation\blank[1cm]}]
Hi Andrea,
you may replace \blank[1cm] with \blank[samepage,1cm].
This should move the heading to the next page.
Just in case it helps,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-26 15:40 ` Pablo Rodriguez
@ 2016-05-26 15:45 ` Andrea Valle
2016-05-26 19:29 ` Pablo Rodriguez
0 siblings, 1 reply; 9+ messages in thread
From: Andrea Valle @ 2016-05-26 15:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 866 bytes --]
Thanks a lot Pablo,
> On 26 May 2016, at 17:40, Pablo Rodriguez <oinos@gmx.es> wrote:
>
> On 05/26/2016 10:56 AM, Andrea Valle wrote:
> you may replace \blank[1cm] with \blank[samepage,1cm].
>
> This should move the heading to the next page.
alas, it does not, seems ineffective
Best
-a-
--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> andrea.valle@unito.it
--------------------------------------------------
"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a lotta what-have-yous."
(Jeffrey 'The Dude' Lebowski)
[-- Attachment #1.2: Type: text/html, Size: 5265 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-26 15:45 ` Andrea Valle
@ 2016-05-26 19:29 ` Pablo Rodriguez
2016-05-27 12:49 ` Wolfgang Schuster
0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2016-05-26 19:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 05/26/2016 05:45 PM, Andrea Valle wrote:
> Thanks a lot Pablo,
>
>> On 26 May 2016, at 17:40, Pablo Rodriguez wrote:
>>
>> On 05/26/2016 10:56 AM, Andrea Valle wrote:
>> you may replace \blank[1cm] with \blank[samepage,1cm].
>>
>> This should move the heading to the next page.
>
> alas, it does not, seems ineffective
In a much simpler case, it seems to work:
\setuphead[section]
[style=\ss\tfa, after={\hrule\blank[samepage,big]}]
%~ [style=\ss\tfa, after={\hrule\blank[big]}]
\setuphead[subsection]
[style=\ss, after={\hrule\blank[samepage,medium]}]
%~ [style=\ss, after={\hrule\blank[medium]}]
\starttext
\dorecurse{10}{\section{Section}
\input knuth
\subsection{Subsection}
\input zapf}
\stoptext
Do you really need headings to be inside framed texts?
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-26 8:56 orphan headline Andrea Valle
2016-05-26 15:40 ` Pablo Rodriguez
@ 2016-05-26 19:55 ` Wolfgang Schuster
2016-05-27 8:16 ` Andrea Valle
1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2016-05-26 19:55 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1996 bytes --]
> Andrea Valle <mailto:valle@di.unito.it>
> 26. Mai 2016 um 10:56
> Dear all,
>
> I’m finishing a book, and getting the following undesired result.
> Many times I have section or subsection title at the bottom of a page,
> with no text. Text starts on the next page.
> I have looked at
>
> http://wiki.contextgarden.net/Widows_and_orphans_control
>
> but I wasn’t able to solve.
>
> I guess it could depend on the formatting of my headlines. Here they are:
>
> \setuphead[section]
> [style=\ss\tfa,
> before={\blank[0.5cm]\startframedtext[offset=0.25cm,framecolor=black,
> rulethickness=0.01cm, frame=off, topframe=off,
> bottomframe=on]\crlf},after={\stopframedtext\noindentation\blank[1cm]}]
>
> \setuphead[subsection]
> [style=\ss,
> before={\blank[0.5cm]\startframedtext[offset=0.25cm,framecolor=black,
> rulethickness=0.01cm, frame=off, topframe=off,
> bottomframe=on]\crlf},after={\stopframedtext\noindentation\blank[1cm]}]
Your lack of a working minimal example makes it hard to give a solution
but adding changing the way how the frame is added should improve things.
\startsetups[section:andrea]
\ifconditional\headshownumber
\scratchdimenone\dimexpr\headnumberwidth+\headnumberdistance\relax
\scratchdimentwo\dimexpr\headnumberdistance\relax
\else
\scratchdimenone\zeropoint
\scratchdimentwo\zeropoint
\fi
\startframedtext[offset=0.25cm,loffset=\scratchdimenone,rulethickness=0.01cm,frame=off,bottomframe=on]
\dontleavehmode\llap{\headnumbercontent\hskip\scratchdimentwo}
\headtextcontent
\stopframedtext
\stopsetups
\defineheadalternative[section:andrea][alternative=vertical,renderingsetup=section:andrea]
\setuphead
[section]
[alternative=section:andrea,
numberwidth=1em,
before={\blank[0.5cm]},
after={\blank[1cm]}]
\starttext
\section{\input ward }
\subject{\input ward }
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 3751 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-26 19:55 ` Wolfgang Schuster
@ 2016-05-27 8:16 ` Andrea Valle
0 siblings, 0 replies; 9+ messages in thread
From: Andrea Valle @ 2016-05-27 8:16 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1915 bytes --]
Thanks a lot Wolfgang
--------------------------------------------------
Andrea Valle
--------------------------------------------------
CIRMA - StudiUm
Università degli Studi di Torino
--> http://www.cirma.unito.it/andrea/
--> http://www.fonurgia.unito.it/andrea/
--> http://www.flickr.com/photos/vanderaalle/sets/
--> http://vimeo.com/vanderaalle
--> andrea.valle@unito.it
--------------------------------------------------
"This is a very complicated case, Maude. You know, a lotta ins, a lotta outs, a lotta what-have-yous."
(Jeffrey 'The Dude' Lebowski)
> Your lack of a working minimal example makes it hard to give a solution
Sorry, I know, but I didn’t know to reproduce the situation.
> but adding changing the way how the frame is added should improve things.
>
> \startsetups[section:andrea]
> \ifconditional\headshownumber
> \scratchdimenone\dimexpr\headnumberwidth+\headnumberdistance\relax
> \scratchdimentwo\dimexpr\headnumberdistance\relax
> \else
> \scratchdimenone\zeropoint
> \scratchdimentwo\zeropoint
> \fi
> \startframedtext[offset=0.25cm,loffset=\scratchdimenone,rulethickness=0.01cm,frame=off,bottomframe=on]
> \dontleavehmode\llap{\headnumbercontent\hskip\scratchdimentwo}
> \headtextcontent
> \stopframedtext
> \stopsetups
>
look likes it solves all the problems! I really have no idea of what’s going on here. Luckily this mailing list is super friendly.
Manuals are cool, but I always miss the big picture that would allow me to generalise over a problem!
Thanks
Best
> \defineheadalternative[section:andrea][alternative=vertical,renderingsetup=section:andrea]
>
> \setuphead
> [section]
> [alternative=section:andrea,
> numberwidth=1em,
> before={\blank[0.5cm]},
> after={\blank[1cm]}]
>
> \starttext
[-- Attachment #1.2: Type: text/html, Size: 23907 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-26 19:29 ` Pablo Rodriguez
@ 2016-05-27 12:49 ` Wolfgang Schuster
2016-05-29 9:57 ` Pablo Rodriguez
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2016-05-27 12:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 860 bytes --]
> Pablo Rodriguez <mailto:oinos@gmx.es>
> 26. Mai 2016 um 21:29
>
> In a much simpler case, it seems to work:
>
> \setuphead[section]
> [style=\ss\tfa, after={\hrule\blank[samepage,big]}]
> %~ [style=\ss\tfa, after={\hrule\blank[big]}]
>
> \setuphead[subsection]
> [style=\ss, after={\hrule\blank[samepage,medium]}]
> %~ [style=\ss, after={\hrule\blank[medium]}]
>
> \starttext
> \dorecurse{10}{\section{Section}
> \input knuth
> \subsection{Subsection}
> \input zapf}
> \stoptext
>
> Do you really need headings to be inside framed texts?
A good idea but it can be improved.
\definevspace[sectionrule][3mm]
\setuphead
[section]
[ width=0.8\textwidth,
commandafter={\vspace[sectionrule]\hrule},
before={\blank[0.5cm]},
after={\blank[1cm]}]
\starttext
\section{\input ward }
\subject{\input ward }
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2060 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-27 12:49 ` Wolfgang Schuster
@ 2016-05-29 9:57 ` Pablo Rodriguez
2016-05-29 11:26 ` Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: Pablo Rodriguez @ 2016-05-29 9:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 05/27/2016 02:49 PM, Wolfgang Schuster wrote:
>> Pablo Rodriguez 26. Mai 2016 um 21:29
>>
>> In a much simpler case, it seems to work:
>>
>> \setuphead[section]
>> [style=\ss\tfa, after={\hrule\blank[samepage,big]}]
>> %~ [style=\ss\tfa, after={\hrule\blank[big]}]
>> [..]
>
> A good idea but it can be improved.
>
> \definevspace[sectionrule][3mm]
>
> \setuphead
> [section]
> [ width=0.8\textwidth,
> commandafter={\vspace[sectionrule]\hrule},
> before={\blank[0.5cm]},
> after={\blank[1cm]}]
Wolfgang,
many thanks for the improvement.
I have a question about your code:
What prevents page break between heading the next paragraph?
I might guess that is the two distinct options commandafter and after.
But this is only my suspicion on what may work there.
Many thanks for your help,
Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
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] 9+ messages in thread
* Re: orphan headline
2016-05-29 9:57 ` Pablo Rodriguez
@ 2016-05-29 11:26 ` Hans Hagen
0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2016-05-29 11:26 UTC (permalink / raw)
To: ntg-context
On 5/29/2016 11:57 AM, Pablo Rodriguez wrote:
> On 05/27/2016 02:49 PM, Wolfgang Schuster wrote:
>>> Pablo Rodriguez 26. Mai 2016 um 21:29
>>>
>>> In a much simpler case, it seems to work:
>>>
>>> \setuphead[section]
>>> [style=\ss\tfa, after={\hrule\blank[samepage,big]}]
>>> %~ [style=\ss\tfa, after={\hrule\blank[big]}]
>>> [..]
>>
>> A good idea but it can be improved.
>>
>> \definevspace[sectionrule][3mm]
>>
>> \setuphead
>> [section]
>> [ width=0.8\textwidth,
>> commandafter={\vspace[sectionrule]\hrule},
>> before={\blank[0.5cm]},
>> after={\blank[1cm]}]
>
> Wolfgang,
>
> many thanks for the improvement.
>
> I have a question about your code:
>
> What prevents page break between heading the next paragraph?
a rather complex method of weighted penalties that also needs to make
sure we don't break between successive heads but at the same time makes
sure that we don't overflow the page
> I might guess that is the two distinct options commandafter and after.
> But this is only my suspicion on what may work there.
>
> Many thanks for your help,
>
> Pablo
>
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-05-29 11:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-26 8:56 orphan headline Andrea Valle
2016-05-26 15:40 ` Pablo Rodriguez
2016-05-26 15:45 ` Andrea Valle
2016-05-26 19:29 ` Pablo Rodriguez
2016-05-27 12:49 ` Wolfgang Schuster
2016-05-29 9:57 ` Pablo Rodriguez
2016-05-29 11:26 ` Hans Hagen
2016-05-26 19:55 ` Wolfgang Schuster
2016-05-27 8:16 ` Andrea Valle
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).