Keeping section and subsection together
Hello, the following sample generates section title "5 Sec" as a last/solitary heading (section) on the page. ---- \starttext \dorecurse{5}{ \section{Sec} \subsection{Subsec} \input ward } \stoptext ---- Is there a way to bind it with the next head (subsection) - so that "5 Sec", "5.1 Subsec" (and at least one line of the following paragraph) would be together on one page? Kind regards, Lukas -- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 04/23/2015 11:50 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
the following sample generates section title "5 Sec" as a last/solitary heading (section) on the page.
---- \starttext \dorecurse{5}{ \section{Sec} \subsection{Subsec} \input ward } \stoptext ----
Is there a way to bind it with the next head (subsection) - so that "5 Sec", "5.1 Subsec" (and at least one line of the following paragraph) would be together on one page?
Hi Lukáš, add the following to the document preamble: \setuphead[section][after={\blank[samepage,big]}] BTW, could you add this to http://wiki.contextgarden.net/Titles? Many thanks, Pablo -- http://www.ousia.tk
On 4/24/2015 7:32 AM, Pablo Rodriguez wrote:
On 04/23/2015 11:50 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
the following sample generates section title "5 Sec" as a last/solitary heading (section) on the page.
---- \starttext \dorecurse{5}{ \section{Sec} \subsection{Subsec} \input ward } \stoptext ----
Is there a way to bind it with the next head (subsection) - so that "5 Sec", "5.1 Subsec" (and at least one line of the following paragraph) would be together on one page?
Hi Lukáš,
add the following to the document preamble:
\setuphead[section][after={\blank[samepage,big]}]
BTW, could you add this to http://wiki.contextgarden.net/Titles?
actually there is rather complex code in the core that deals with it .. (and also deals with too many on one page and so, as it's a weighted system) ... i just checked and a variable is not reset .. fixed in an upcoming beta (no upload yet, first alan and i need to agree on some bib issues working ok) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hello,
thanks Pablo for the suggestion and Hans for the solution...
I'd rather wait publishing the "trick" "\setuphead[section][after={\blank[samepage,big]}]" as I think this issue will be handled systematically (Hans' intention for the next beta).
Best regards,
Lukas
On Fri, 24 Apr 2015 10:31:50 +0200, Hans Hagen
On 4/24/2015 7:32 AM, Pablo Rodriguez wrote:
On 04/23/2015 11:50 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
the following sample generates section title "5 Sec" as a last/solitary heading (section) on the page.
---- \starttext \dorecurse{5}{ \section{Sec} \subsection{Subsec} \input ward } \stoptext ----
Is there a way to bind it with the next head (subsection) - so that "5 Sec", "5.1 Subsec" (and at least one line of the following paragraph) would be together on one page?
Hi Lukáš,
add the following to the document preamble:
\setuphead[section][after={\blank[samepage,big]}]
BTW, could you add this to http://wiki.contextgarden.net/Titles?
actually there is rather complex code in the core that deals with it .. (and also deals with too many on one page and so, as it's a weighted system) ... i just checked and a variable is not reset .. fixed in an upcoming beta (no upload yet, first alan and i need to agree on some bib issues working ok)
Hans
-- Ing. Lukáš Procházka | mailto:LPr@pontex.cz Pontex s. r. o. | mailto:pontex@pontex.cz | http://www.pontex.cz Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
On 04/24/2015 11:07 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote:
Hello,
thanks Pablo for the suggestion and Hans for the solution...
I'd rather wait publishing the "trick" "\setuphead[section][after={\blank[samepage,big]}]" as I think this issue will be handled systematically (Hans' intention for the next beta).
Hi Lukáš, of course, my suggestion to add this to the wiki was motivated because I thought it was a feature rather than a bug. But it turns out that I was wrong again :-). Pablo -- http://www.ousia.tk
participants (3)
-
Hans Hagen
-
Pablo Rodriguez
-
Procházka Lukáš Ing. - Pontex s. r. o.