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: Empty heads after leading whitespace
Date: Sat, 3 May 2014 16:52:26 +0200	[thread overview]
Message-ID: <FCE49067-4709-42D7-82C7-3442264135F8@gmail.com> (raw)
In-Reply-To: <CAJ2CwZ2SbnEh6vciLX5WmJitjZPX3iagNMOTX8jQaS8s2btocg@mail.gmail.com>


Am 03.05.2014 um 16:32 schrieb Maggyero <maggyero@gmail.com>:

> A more explicit minimal example of the problem:
> 
> 
> \setupheadertexts[section]
> \setuphead[section][%
>     placehead=empty,
>     before=,
>     after=]
> \setuphead[subsection][%
>     placehead=yes,
>     before={\blank[line]},
>     after={\blank[line]}]
> 
> \starttext
> \showframe
> \section{My section}
> \subsection{My subsection (whitespace before: problem)}
> \input knuth
> \subsection{My subsection (whitespace before: fine)}
> \input knuth
> \page
> \subsection{My subsection (NO whitespace before: fine)}
> \input knuth
> \subsection{My subsection (whitespace before: fine)}
> \input knuth
> \stoptext

When you don’t need a section entry in the TOC you can use “placehead=hidden”,
the title of the section head can be accessed with the \namedstructurevariable command.

\setupheadertexts[\namedstructurevariable{section}{title}]

\setuphead
  [section]
  [placehead=hidden]

\setuphead
  [subsection]
  [placehead=yes,
   before={\blank[line]},
   after={\blank[line]}]

\showframe

\starttext

\dorecurse{2}
  {\page
   \section{Section #1}
   \dorecurse{2}
     {\subsection{Subsection #1.##1}
      \input knuth\par}}

\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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2014-05-03 14:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03 14:32 Maggyero
2014-05-03 14:52 ` Wolfgang Schuster [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-06  7:38 Maggyero
2014-05-05 12:48 Maggyero
2014-05-06  5:08 ` Thangalin
2014-05-06  8:06   ` Hans Hagen
2014-05-05  2:19 Maggyero
2014-05-05  7:09 ` Thangalin
2014-05-03 23:22 Maggyero
2014-05-01 21:15 Maggyero
2014-04-30 16:09 Maggyero
2014-05-01 18:41 ` Thangalin

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=FCE49067-4709-42D7-82C7-3442264135F8@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).