ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Empty heads after leading whitespace
@ 2014-05-06  7:38 Maggyero
  0 siblings, 0 replies; 12+ messages in thread
From: Maggyero @ 2014-05-06  7:38 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 697 bytes --]

> 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

[-- Attachment #1.2: Type: text/html, Size: 1132 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Empty heads after leading whitespace
@ 2014-05-05 12:48 Maggyero
  2014-05-06  5:08 ` Thangalin
  0 siblings, 1 reply; 12+ messages in thread
From: Maggyero @ 2014-05-05 12:48 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 47 bytes --]

> Avoid vskip.

Do you have a better solution?

[-- Attachment #1.2: Type: text/html, Size: 95 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Empty heads after leading whitespace
@ 2014-05-05  2:19 Maggyero
  2014-05-05  7:09 ` Thangalin
  0 siblings, 1 reply; 12+ messages in thread
From: Maggyero @ 2014-05-05  2:19 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 671 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1041 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Empty heads after leading whitespace
@ 2014-05-03 23:22 Maggyero
  0 siblings, 0 replies; 12+ messages in thread
From: Maggyero @ 2014-05-03 23:22 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1030 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1470 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Empty heads after leading whitespace
@ 2014-05-03 14:32 Maggyero
  2014-05-03 14:52 ` Wolfgang Schuster
  0 siblings, 1 reply; 12+ messages in thread
From: Maggyero @ 2014-05-03 14:32 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 572 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 900 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Empty heads after leading whitespace
@ 2014-05-01 21:15 Maggyero
  0 siblings, 0 replies; 12+ messages in thread
From: Maggyero @ 2014-05-01 21:15 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 219 bytes --]

> 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?

[-- Attachment #1.2: Type: text/html, Size: 312 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Empty heads after leading whitespace
@ 2014-04-30 16:09 Maggyero
  2014-05-01 18:41 ` Thangalin
  0 siblings, 1 reply; 12+ messages in thread
From: Maggyero @ 2014-04-30 16:09 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 635 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 1010 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-05-06  8:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-06  7:38 Empty heads after leading whitespace Maggyero
  -- strict thread matches above, loose matches on Subject: below --
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-03 14:32 Maggyero
2014-05-03 14:52 ` Wolfgang Schuster
2014-05-01 21:15 Maggyero
2014-04-30 16:09 Maggyero
2014-05-01 18:41 ` Thangalin

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).