[NTG-context] Header problem

2011-01-30 Thread Keith McKay

Dear All

I have a problem with a chapter title which I am using as a header.  The 
title's length in the header is such that it extends into the page 
margin.  I would have thought that the text would have stayed within the 
header area and gone on to a second line but this does not happen.  I 
have been on the wiki looking at the command reference  syntax for 
\setupheader and \setuphead and \setupheadertexts to try and solve this 
problem but I'm a bit stuck understanding the syntax.


Reducing the amount of text in the chapter name isn't an option.  Any 
other suggestions


Keith McKay
___
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] Header problem in project

2007-01-08 Thread Taco Hoekwater
David Arnold wrote:
 
 \placeanswers\kern0pt
 
 \stopcomponent
 
 When we compile section1exercises.tex with texmfstart texexec -- 
 mode=long section1exercises, all is well until the last page, where  
 the former header is used instead of the header defined in the  
 \placeanswers macro. But we want to finish out the document from the  
 point we put the \placeanswers with the second header.
 
 Any suggestions?

Does ending with \placeanswers\page help?

Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Header problem in project

2007-01-08 Thread David Arnold
Taco et all,

 From what I could deduce, our former macro for placeanswers was a  
group.

\def\placeanswers{
   \bgroup
   \doifmodeelse{short}
   {
  \keepblocks[shortsubanswer,longsubanswer]
   \answers{Answers}\vskip 1em\startcolumnset[answers]
   \selectblocks[shortanswer][criterium=section]
   \stopcolumnset
   }
   {
   \keepblocks[shortsubanswer,longsubanswer]
   \answers{Solutions}\vskip 1em
   \selectblocks[longanswer][criterium=section]
   }
   \egroup
}

It occurred at the end of an exercise set like this:

%%% ENDTESTBANK
%%%
\stopquestions

\placeanswers\kern0pt

\stopcomponent

So when the group was finished, the header for the component took  
over. Here is the fix I found. I just set new headers for the rest of  
the way.

\def\placeanswers{\doifmode{long}{%
\page[yes]
  \def\headermarkleft{{\sc Chapter \headnumber[chapter]}}
  \def\headermarkright{{\sc{}Section \headnumber[section]}}
  \setupheadertexts[][\headermarkright][\headermarkleft][]}
   \bgroup
   \doifmodeelse{short}
   {
  \keepblocks[shortsubanswer,longsubanswer]
   \answers{Answers}\vskip 1em\startcolumnset[answers]
   \selectblocks[shortanswer][criterium=section]
   \stopcolumnset
   }
   {
   \keepblocks[shortsubanswer,longsubanswer]
   \answers{Solutions}\vskip 1em
   \selectblocks[longanswer][criterium=section]
   }
   \egroup
}

So now when we compile with:

texmfstart texexec --mode=long,paging section1exercise

We get what we want, which is no page numbers in the headers once the  
solutions start. You can see the result at:

http://msenux.redwoods.edu/IntAlgText2/chapter2/section1solutions.pdf

We have a paging mode and a perl script that syncs the page numbers  
at the beginning of this document with the chapter page numbers.

Thanks.



On Jan 8, 2007, at 11:04 AM, Taco Hoekwater wrote:

 David Arnold wrote:

 \placeanswers\kern0pt

 \stopcomponent

 When we compile section1exercises.tex with texmfstart texexec --
 mode=long section1exercises, all is well until the last page, where
 the former header is used instead of the header defined in the
 \placeanswers macro. But we want to finish out the document from the
 point we put the \placeanswers with the second header.

 Any suggestions?

 Does ending with \placeanswers\page help?

 Taco
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Header problem in project

2007-01-07 Thread David Arnold
Hans et all,

We have a project call book.tex, a product in that called  
chapter1.tex, and a component in that called section1exercises.tex.

We have blocks that we save and then place at the end of  
section1exercises.tex with a macro defined in our environment file:

\def\placeanswers{%
   \bgroup
   \doifmodeelse{short}
   {
  \keepblocks[shortsubanswer,longsubanswer]
   \answers{Answers}\vskip 1em\startcolumnset[answers]
   \selectblocks[shortanswer][criterium=section]
   \stopcolumnset
   }
   {
  \def\headermarkleft{{\sc Chapter \headnumber[chapter]}}
  \def\headermarkright{{\sc{}Section \headnumber[section]}}
  \setupheadertexts[][\headermarkright][\headermarkleft][]
   \keepblocks[shortsubanswer,longsubanswer]
   \answers{Solutions}\vskip 1em
   \selectblocks[longanswer][criterium=section]
   }
   \egroup
}

The else part of the do above is an attempt to define a different  
header when we compile with --mode=long, but just for the pages on  
which we use \placeanswers. The other pages have a different header  
defined in the environment file. Those headers have page numbers as  
well with:

\def\headermarkleft{\bold{\pagenumber}\headerskip{\sc\headerskip  
Chapter \headnumber[chapter]\headerskip\getmarking[chapter][current]}}

\def\headermarkright{{\sc{}Section \headnumber[section]\headerskip 
\getmarking[section][current]}\headerskip\bold{\pagenumber}}


The file section1exercises ends like this:

%%% ENDTESTBANK
%%%
\stopquestions

\placeanswers\kern0pt

\stopcomponent

When we compile section1exercises.tex with texmfstart texexec -- 
mode=long section1exercises, all is well until the last page, where  
the former header is used instead of the header defined in the  
\placeanswers macro. But we want to finish out the document from the  
point we put the \placeanswers with the second header.

Any suggestions?

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context