ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: orphan headline
Date: Thu, 26 May 2016 21:55:23 +0200	[thread overview]
Message-ID: <574754AB.80500@gmail.com> (raw)
In-Reply-To: <AC28CC7E-1339-4E36-BB80-A323D16CB000@di.unito.it>


[-- 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
___________________________________________________________________________________

  parent reply	other threads:[~2016-05-26 19:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  8:56 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 [this message]
2016-05-27  8:16   ` Andrea Valle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=574754AB.80500@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).