Re: [NTG-context] keeping headings with following texts
Am 13.07.2013 um 16:08 schrieb Pablo Rodríguez : >\setuplayout[setups=*lessstrict] >\startsetups[*lessstrict] >\setup[reset] >\widowpenalty=1 >\clubpenalty=1 >\brokenpenalty=1 >\stopsetups \startsetups[lessstrict] \setups[*reset] \setpenalties\widowpenalties {2}{1} \setpenalties\clubpenalties {2}{1} \setpenalties\brokenpenalties{2}{1} \stopsetups \setuplayout[setups=lessstrict] 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 ___
Re: [NTG-context] keeping headings with following texts
On 13/07/13 17:22, Wolfgang Schuster wrote: > Am 13.07.2013 um 16:39 schrieb Peter Münster : >> On Sat, Jul 13 2013, Pablo Rodríguez wrote: >>> >>> If I replace those lines with \setupbodyfont[pagella,12pt], nothing >>> changes, but if I remove the first two lines quoted above, everything works. >> >> No. You don't need those lines for a minimal example: >> [...] > The penalty between the heading and the following text isn’t high enough > to prevent a page break. When you set a higher value through the after key > with the \blank command the break disappears. > > \setuphead[section][after={\blank[samepage,big]}] Many thanks for your help, Wolfgang. It works perfectly now. I’m still wondering why your setup isn’t the default in ConTeXt. 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 ___
Re: [NTG-context] keeping headings with following texts
Am 13.07.2013 um 16:39 schrieb Peter Münster : > On Sat, Jul 13 2013, Pablo Rodríguez wrote: > >>>\usemodule[simplefonts] >>>\setmainfont[TeX Gyre Pagella] >> >> If I replace those lines with \setupbodyfont[pagella,12pt], nothing >> changes, but if I remove the first two lines quoted above, everything works. > > No. You don't need those lines for a minimal example: > > \setupinterlinespace[line=4ex] > \starttext > \dorecurse{560}{bla } > \section{section} > \dorecurse{30}{bla } > \stoptext The penalty between the heading and the following text isn’t high enough to prevent a page break. When you set a higher value through the after key with the \blank command the break disappears. \setuphead[section][after={\blank[samepage,big]}] 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 ___
Re: [NTG-context] keeping headings with following texts
On Sat, Jul 13 2013, Pablo Rodríguez wrote: >> \usemodule[simplefonts] >> \setmainfont[TeX Gyre Pagella] > > If I replace those lines with \setupbodyfont[pagella,12pt], nothing > changes, but if I remove the first two lines quoted above, everything works. No. You don't need those lines for a minimal example: \setupinterlinespace[line=4ex] \starttext \dorecurse{560}{bla } \section{section} \dorecurse{30}{bla } \stoptext -- Peter ___ 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 ___
Re: [NTG-context] keeping headings with following texts
On 13/07/13 16:08, Pablo Rodríguez wrote: > On 13/07/13 15:19, Wolfgang Schuster wrote: >> [...] >> Can you make a minimal tex document out of this. It would be also >> interesting to see your definition for the problematic heading which >> seems to use your own code. > > Here you have it: > > \usemodule[simplefonts] > \setmainfont[TeX Gyre Pagella] Just in case it helps. If I replace those lines with \setupbodyfont[pagella,12pt], nothing changes, but if I remove the first two lines quoted above, everything works. Recursion set to 27 times allows the whole contents on the first page. And set to 28 times moves the heading to next page. What does it make such a difference? 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 ___
Re: [NTG-context] keeping headings with following texts
On 13/07/13 15:19, Wolfgang Schuster wrote: > [...] > Can you make a minimal tex document out of this. It would be also > interesting to see your definition for the problematic heading which > seems to use your own code. Here you have it: \usemodule[simplefonts] \setmainfont[TeX Gyre Pagella] \setuplayout[setups=*lessstrict] \startsetups[*lessstrict] \setup[reset] \widowpenalty=1 \clubpenalty=1 \brokenpenalty=1 \stopsetups \setupinterlinespace[line=3.2ex] \setupnote[footnote][split=verystrict] \starttext \dorecurse{28}{line\\} \subsection{Subsection Heading} line one\\ line two% \footnote{This should be on the same page.}. \stoptext I need split set to verystrict in footnotes, otherwise footnotes can be placed in the next page where their body text reference occurs (I have never seen this on any printed book). This is exactly what happens when \setupnote[footnote] is disabled. But even removing the footnote itself and setting the recursion to 30 times, the subsection heading is also left alone on the first page. What am I doing wrong here? 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 ___
Re: [NTG-context] keeping headings with following texts
Am 13.07.2013 um 15:09 schrieb Pablo Rodríguez : > On 13/07/13 14:23, Wolfgang Schuster wrote: >> Am 13.07.2013 um 14:07 schrieb Pablo Rodríguez : >>> [...] >>> Is there a way to enable the “keep with next” option for all headings? >> >> Do you have a example where this happens because context tries to prevent >> a page break after a heading which can fail when you put \placefigure etc. >> between the heading and the following text. > > Thanks for your reply, Wolfgang. > > I guess you refer to the case, not to the code: > http://www.ousia.tk/wrong-title-break.pdf (only the two involved pages > included). Can you make a minimal tex document out of this. It would be also interesting to see your definition for the problematic heading which seems to use your own code. 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 ___
Re: [NTG-context] keeping headings with following texts
On 13/07/13 14:23, Wolfgang Schuster wrote: > Am 13.07.2013 um 14:07 schrieb Pablo Rodríguez : >> [...] >> Is there a way to enable the “keep with next” option for all headings? > > Do you have a example where this happens because context tries to prevent > a page break after a heading which can fail when you put \placefigure etc. > between the heading and the following text. Thanks for your reply, Wolfgang. I guess you refer to the case, not to the code: http://www.ousia.tk/wrong-title-break.pdf (only the two involved pages included). Thanks again 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 ___
Re: [NTG-context] keeping headings with following texts
Am 13.07.2013 um 14:07 schrieb Pablo Rodríguez : > Dear list, > > writing an article on ConTeXt, I have found what I think is a surprising > feature (at least, a surprising default): headings don’t always keep > with next paragraph, so they can end up in being widowed (heading + page > break + first paragraph on next page). > > Sorry, but I’m afraid that I don’t understand this default. I have never > seen a printed book that displays this behavior (unless the heading was > alone on its page). > > Don‘t get me wrong, I‘m more than happy with ConTeXt. But would anyone > be so kind to explain the reason of the described default? (I’m trying > to understand, so I can explain to others.) > > I have found on the list > (http://www.ntg.nl/pipermail/ntg-context/2007/023357.html) the way to > avoid this: > >\setuphead[section][before={\page[bigpreference]}] > > How can I know which is the exact default value in any given command? (I > need to know the before values for headings, at least.) > > Is there a way to enable the “keep with next” option for all headings? Do you have a example where this happens because context tries to prevent a page break after a heading which can fail when you put \placefigure etc. between the heading and the following text. 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 ___
[NTG-context] keeping headings with following texts
Dear list, writing an article on ConTeXt, I have found what I think is a surprising feature (at least, a surprising default): headings don’t always keep with next paragraph, so they can end up in being widowed (heading + page break + first paragraph on next page). Sorry, but I’m afraid that I don’t understand this default. I have never seen a printed book that displays this behavior (unless the heading was alone on its page). Don‘t get me wrong, I‘m more than happy with ConTeXt. But would anyone be so kind to explain the reason of the described default? (I’m trying to understand, so I can explain to others.) I have found on the list (http://www.ntg.nl/pipermail/ntg-context/2007/023357.html) the way to avoid this: \setuphead[section][before={\page[bigpreference]}] How can I know which is the exact default value in any given command? (I need to know the before values for headings, at least.) Is there a way to enable the “keep with next” option for all headings? 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 ___