Re: [NTG-context] TOC: page headers

2007-11-29 Thread Hans Hagen
Jeff Smith wrote:

 So, what to do here? I do need the frontmatter/bodymatter structure
 anyway. So there must be something else...

adding \page before ending the sectionblock may help

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC: page headers

2007-11-29 Thread Jeff Smith
On Nov 29, 2007 5:41 AM, Wolfgang Schuster
[EMAIL PROTECTED] wrote:
 But this give also a rule in the header at the last page, the following code
 give at least a empty last page.

 \setupsectionblock
  [bodypart]
  [page=no,
   before=\setups{header:bodymatter},
   after={\page\setupbackgrounds[header][text][bottomframe=off]}]

An empty page? Good enough for me! :-)

As always, many thanks!
Jeff
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC: page headers

2007-11-28 Thread Jeff Smith
On Nov 15, 2007 6:02 AM, Wolfgang Schuster
[EMAIL PROTECTED] wrote:
 \usemodule[visual] % example with faked text

 \setuplayout
   [width=middle,
   footer=2cm,
   topspace=2cm,
   header=1.3em,
   height=middle,
   backspace=3cm,
   headerdistance=0.3cm,
   footerdistance=0cm]

 \startsetups header:bodymatter

 \setupbackgrounds[header][text][frame=off,bottomframe=on]

 % Hans mentioned this method long ago on the list

 \setupheader
   [text]
   [lefttext={\it\getmarking[chapternumber].\space\getmarking[chapter]},
righttext=\pagenumber]

 \stopsetups

 \startsetups header:frontmatter

 \setupheader
   [text]
   [righttext=\pagenumber]

 \stopsetups

 \setupsectionblock
   [frontpart]
   [page=yes, % else problem with last page of the table of contents
before=\setups{header:frontmatter}]

 \setupsectionblock
   [bodypart]
   [page=no,
before=\setups{header:bodymatter}]

 \setupsectionblock[appendix] [page=no]
 \setupsectionblock[backpart] [page=no]

 \setuppagenumbering
   [state=start,
location=, % already set with \setupheadertexts
way=bytext,
partnumber=no,
conversion=numbers] % default

 \definetext[chapter][footer][pagenumber]
 \setuphead[chapter][header=high,footer=chapter]

 \setuphead
   [part]
   [%header=high, % already done for the chapter header
%footer=high, % overloads the chapter setting, footer=pagenumber
placehead=no,
resetnumber=no]

 \setupheadtext[fr][content=Table des mati\egrave res]
 \mainlanguage[fr]

 \starttext

 \startfrontmatter

 \completecontent

 \stopfrontmatter

 \startbodymatter

 \dorecurse{3}
   {\part{\fakewords{5}{10}}
\dorecurse{3}
  {\chapter{\fakewords{5}{10}}
   \dorecurse{2}
 {\section{\fakewords{5}{10}}
  \fakewords{150}{200}
  \dorecurse{2}
{\subsection{\fakewords{5}{10}}
 \fakewords{150}{200}

 \stopbodymatter

 \stoptext

Hi,

I'm bringing that example up again because there is a small problem with it. :-)

The very last page of the resulting document has no header!

I've been having this problem before, and I mentioned it on this list
a while ago.

What I did was lazily abandon the frontmatter/bodymatter structure and
it was solved. So I guess this is part of the problem as well here.

Or at least, on my side of things. When I compile the example above,
as is, there is no header on the very last page. The header should
have a bottom frame with the chapter number and title on the left, and
page number of the right. The exception to this is the first page of a
chapter. And indeed, everything is as expected in the document, until
the very last page, as I said, which is not the beginning of a new
chapter.

So, what to do here? I do need the frontmatter/bodymatter structure
anyway. So there must be something else...

Thanks!
Jeff
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC: page headers

2007-11-17 Thread Wolfgang Schuster
On Fri, 16 Nov 2007 11:17:51 -0500
Jeff Smith [EMAIL PROTECTED] wrote:

 On Nov 15, 2007 6:02 AM, Wolfgang Schuster
 [EMAIL PROTECTED] wrote:
 
  you can use dummy chapters next time without problems. I changed a few
  of your settings because this should be a nice example I could use myself
  in the future (it's to easy to forgot many of the necessary settings).
 
 So the strategy is to use \startsetups. This worked beautifully! Thank
 you VERY much! :-)

The important thing is to change the header after the table of contents
and not before it, you need also to force a page break after the table
of contents or the last page has a rule in the head.

I used setups only to make everything with ConTeXt's setup command and
remove all unnecessary code from the normal text.

 Do you think your example should go in the Wiki somewhere?

Why not, you can increase your chance to win Mojca's price.

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


Re: [NTG-context] TOC: page headers

2007-11-16 Thread Jeff Smith
On Nov 15, 2007 6:02 AM, Wolfgang Schuster
[EMAIL PROTECTED] wrote:

 you can use dummy chapters next time without problems. I changed a few
 of your settings because this should be a nice example I could use myself
 in the future (it's to easy to forgot many of the necessary settings).

So the strategy is to use \startsetups. This worked beautifully! Thank
you VERY much! :-)

Do you think your example should go in the Wiki somewhere?

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


Re: [NTG-context] TOC: page headers

2007-11-16 Thread luigi scarso
 So the strategy is to use \startsetups. This worked beautifully! Thank
 you VERY much! :-)

 Do you think your example should go in the Wiki somewhere?

 Why don't you register as user and edit your page ?
-- 
luigi
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC: page headers

2007-11-15 Thread Wolfgang Schuster
2007/11/15, Jeff Smith [EMAIL PROTECTED]:
 On Nov 14, 2007 8:15 PM, Idris Samawi Hamid [EMAIL PROTECTED] wrote:

  If possible, post a minimal example that illustrates the problem; use
  \input's like ward.tex, knuth.tex, zapf.tex etc. (in the distro) so some
  of us can run the test file and report back. Sometimes someone will know
  the answer without such an example but for even faster service ;-) always
  try to include a minimal example when possible.

 Indeed. I'm truly sorry. I attach a sample document with the relevant
 stuff. I made the TOC start a little lower on the page just to provoke
 the page switching, instead of adding an unwieldy amount of dummy
 chapters to acheive the same result.

 Thanks, and sorry again!
 Jeff

Hi Jeff,

you can use dummy chapters next time without problems. I changed a few
of your settings because this should be a nice example I could use myself
in the future (it's to easy to forgot many of the necessary settings).

\usemodule[visual] % example with faked text

\setuplayout
  [width=middle,
  footer=2cm,
  topspace=2cm,
  header=1.3em,
  height=middle,
  backspace=3cm,
  headerdistance=0.3cm,
  footerdistance=0cm]

\startsetups header:bodymatter

\setupbackgrounds[header][text][frame=off,bottomframe=on]

% Hans mentioned this method long ago on the list

\setupheader
  [text]
  [lefttext={\it\getmarking[chapternumber].\space\getmarking[chapter]},
   righttext=\pagenumber]

\stopsetups

\startsetups header:frontmatter

\setupheader
  [text]
  [righttext=\pagenumber]

\stopsetups

\setupsectionblock
  [frontpart]
  [page=yes, % else problem with last page of the table of contents
   before=\setups{header:frontmatter}]

\setupsectionblock
  [bodypart]
  [page=no,
   before=\setups{header:bodymatter}]

\setupsectionblock[appendix] [page=no]
\setupsectionblock[backpart] [page=no]

\setuppagenumbering
  [state=start,
   location=, % already set with \setupheadertexts
   way=bytext,
   partnumber=no,
   conversion=numbers] % default

\definetext[chapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=chapter]

\setuphead
  [part]
  [%header=high, % already done for the chapter header
   %footer=high, % overloads the chapter setting, footer=pagenumber
   placehead=no,
   resetnumber=no]

\setupheadtext[fr][content=Table des mati\egrave res]
\mainlanguage[fr]

\starttext

\startfrontmatter

\completecontent

\stopfrontmatter

\startbodymatter

\dorecurse{3}
  {\part{\fakewords{5}{10}}
   \dorecurse{3}
 {\chapter{\fakewords{5}{10}}
  \dorecurse{2}
{\section{\fakewords{5}{10}}
 \fakewords{150}{200}
 \dorecurse{2}
   {\subsection{\fakewords{5}{10}}
\fakewords{150}{200}

\stopbodymatter

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


Re: [NTG-context] TOC: page headers

2007-11-14 Thread Jeff Smith
Hi again,

Thank you again everyone for your help. The list is very helpful. I
got one last question and then I promise I'll stop spamming the list
for a bit. ;-)

Oddly enough, the archives are very unclear on this one, and anyway
what I try with the little I find doesn't work -- or I don't know how
to implement it. But anyway, my problem is the following.

When my TOC goes on more than one page, the page header doesn't
follow. It becomes what I use much later in my document (namely,
chapter number and title, pagenumber, and a thin line across the width
of the page), but I don't want that. In fact, I don't want *any* page
header for my TOC, but this works only on the first page. No amount of
\noheaderandfooterlines, \setuphead[header=nomarking] or
\setupbackgrounds[state=stop] can make the header disappear on
subsequent TOC pages... :-(

What do I have to do?

Thanks a zillion times again!
Jeff
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC: page headers

2007-11-14 Thread Idris Samawi Hamid
Hi,

On Wed, 14 Nov 2007 18:03:20 -0700, Jeff Smith [EMAIL PROTECTED] wrote:

 Hi again,

 Thank you again everyone for your help. The list is very helpful. I
 got one last question and then I promise I'll stop spamming the list
 for a bit. ;-)

No, spam away! ;-)

 Oddly enough, the archives are very unclear on this one, and anyway
 what I try with the little I find doesn't work -- or I don't know how
 to implement it. But anyway, my problem is the following.

 When my TOC goes on more than one page, the page header doesn't
 follow. It becomes what I use much later in my document (namely,
 chapter number and title, pagenumber, and a thin line across the width
 of the page), but I don't want that. In fact, I don't want *any* page
 header for my TOC, but this works only on the first page. No amount of
 \noheaderandfooterlines, \setuphead[header=nomarking] or
 \setupbackgrounds[state=stop] can make the header disappear on
 subsequent TOC pages... :-(

If possible, post a minimal example that illustrates the problem; use  
\input's like ward.tex, knuth.tex, zapf.tex etc. (in the distro) so some  
of us can run the test file and report back. Sometimes someone will know  
the answer without such an example but for even faster service ;-) always  
try to include a minimal example when possible.

Best
Idris

-- 
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shi`i Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] TOC: page headers

2007-11-14 Thread Jeff Smith
On Nov 14, 2007 8:15 PM, Idris Samawi Hamid [EMAIL PROTECTED] wrote:

 If possible, post a minimal example that illustrates the problem; use
 \input's like ward.tex, knuth.tex, zapf.tex etc. (in the distro) so some
 of us can run the test file and report back. Sometimes someone will know
 the answer without such an example but for even faster service ;-) always
 try to include a minimal example when possible.

Indeed. I'm truly sorry. I attach a sample document with the relevant
stuff. I made the TOC start a little lower on the page just to provoke
the page switching, instead of adding an unwieldy amount of dummy
chapters to acheive the same result.

Thanks, and sorry again!
Jeff


headertoc.tex
Description: TeX document
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___