[NTG-context] Empty heads after leading whitespace

2014-05-06 Thread Maggyero
 after={\blank[0em]\blank[disable]}]

Yes it also works, thank you Thangalin. So here is the final solution (I
have added the 'nowhite' keyword in the second blank to kill whitespaces
when they are active) to get real empty heads (sections here) in the
document:


\setupwhitespace[line]

\setuphead
  [section]
  [placehead=empty,
   page=yes,
   after={\blank[none]\blank[nowhite, disable]}]

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

\setupheadertexts[section]

\showframe

\starttext
   \completecontent
   \dorecurse{2}
 {\section{My section}
  \dorecurse{2}
{\subsection{My subsection}
 \input knuth}}
\stoptext
___
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] Empty heads after leading whitespace

2014-05-06 Thread Hans Hagen

On 5/6/2014 7:08 AM, Thangalin wrote:

\setuphead
   [section]
   [placehead=empty,
page=yes,
after={\blank[0em]\blank[disable]}]

That works for me. I don't know if it is better, but if it works for
you as well then it is probably the way to go.

mtx-context | current version: 2014.01.03 00:40


if you want no head-related nodes interfering, use:

% \setuphead[chapter][placehead=hidden]
% \chapter {test}
%
% %(\synchronizehead{chapter}) % \getheadsyncs
% %(\getfullstructurenumber{\thenamedheadlevel{chapter}})
% %(\getspecificstructuretitle{\thenamedheadlevel{chapter}})
%
% (\placerawheaddata  [chapter])
% (\placerawheadnumber[chapter])
% (\placerawheadtext  [chapter])

at some point you need to make sure you flush but you can decide to do 
it in some safe place (a header or footer or whatever you build as 
chapter opening)



-
  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
-
___
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] Empty heads after leading whitespace

2014-05-05 Thread Thangalin
Avoid vskip.

http://wiki.contextgarden.net/Command/vskip
___
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] Empty heads after leading whitespace

2014-05-05 Thread Maggyero
 Avoid vskip.

Do you have a better solution?
___
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] Empty heads after leading whitespace

2014-05-05 Thread Thangalin
\setuphead
  [section]
  [placehead=empty,
   page=yes,
   after={\blank[0em]\blank[disable]}]

That works for me. I don't know if it is better, but if it works for
you as well then it is probably the way to go.

mtx-context | current version: 2014.01.03 00:40
___
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] Empty heads after leading whitespace

2014-05-04 Thread Maggyero
For those who are interested, I've finally solved my problem (the vertical
space before a subsection which was not automatically swallowed at the top
of a page when the page started with an empty section) by using the pair
'after={\vskip 0em\blank[disable]}' for sections:


\setuphead
  [section]
  [placehead=empty,
   page=yes,
   after={\vskip 0em\blank[disable]}]

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

\setupheadertexts[section]

\showframe

\starttext
   \completecontent
   \dorecurse{2}
 {\section{My section}
  \dorecurse{2}
{\subsection{My subsection}
 \input knuth}}
\stoptext
___
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] Empty heads after leading whitespace

2014-05-03 Thread Maggyero
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
___
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] Empty heads after leading whitespace

2014-05-03 Thread Wolfgang Schuster

Am 03.05.2014 um 16:32 schrieb Maggyero maggy...@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
___


[NTG-context] Empty heads after leading whitespace

2014-05-03 Thread Maggyero
Thanks Wolfgang. I could even have sections in the TOC  with
'\setuptexttexts[{\placerawheaddata[section]}]'.

However, how can I start a new page at each new section? The 'page=yes'
pair does no longer work with your solution 'placehead=hidden' (since the
head is not placed I guess). I also tried 'before=\page' or 'after=\page'
without more success. Here is a minimal example showing the absence of page
breaks though I specified 'page=yes' (the section numbers are also
mismatched but if one puts manual page breaks they match again, so it's not
really a problem for me):


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

\setuphead
  [section]
  [placehead=hidden,
   page=yes] % -- This key does NOT work.

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

\setuptexttexts[{\placerawheaddata[section]}]

\showframe

\starttext
\completecontent
\dorecurse{2}
  {\section{My section}
   \dorecurse{2}
 {\subsection{My subsection}
  \input knuth}}
\stoptext
___
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] Empty heads after leading whitespace

2014-05-01 Thread Thangalin
\setuphead[section][%
placehead=empty,
before=,
after=]
\setuphead[subsection][%
placehead=yes,
before=\empty,
after={\blank[line]}]
\setupheadertexts[section]

\starttext
\showframe
\section{My section}
\subsection{My subsection (whitespace before)} % Here is my problem.
\page
\subsection{My subsection (NO whitespace before)}
\stoptext

Is that what you mean?
___
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] Empty heads after leading whitespace

2014-05-01 Thread Maggyero
 before=\empty,

\empty is not even required. The problem with your solution (setting
'before=' i.e. empty) is that there is also no whitespace before a
subsection which doesn't start on a new page.

Any better ideas?
___
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] Empty heads after leading whitespace

2014-04-30 Thread Maggyero
Hello,


Here after is my problem:


\setuphead[section][%
placehead=empty,
before=,
after=]
\setuphead[subsection][%
placehead=yes,
before={\blank[line]},
after={\blank[line]}]
\setupheadertexts[section]

\starttext
\showframe
\section{My section}
\subsection{My subsection (whitespace before: )} % Here is my problem.
\page
\subsection{My subsection (NO whitespace before)}
\stoptext


The mechanism that automatically removes the leading whitespace at the top
of a page doesn't work if there is an EMPTY head followed by another head
(of a different level). How can I remove that whitespace?


Best regards.
___
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
___