[NTG-context] Re: Headertext

2024-03-27 Thread Henning Hraban Ramm

Am 26.03.24 um 17:12 schrieb Wolfgang Schuster:

 begin example
\showframe

\definetext
   [chapterheader] % identifier
   [header]    % vertical position (header/footer)
% [text]  % horizontal position (text/margin)
   [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]


Thank you, I added that to https://wiki.contextgarden.net/Command/definetext

Hraban

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Headertext

2024-03-27 Thread Thomas Meyer

Thank you, Wolfgang,

that's exactly what I wanted.

Greetings
Thomas

Am 26.03.24 um 17:12 schrieb Wolfgang Schuster:
When you use "header=high" you can't have a header because the block 
for it no longer exists, compare the results for "header=high" and 
"header=empty" in the following example.


 begin example
\showframe

\starttext

\setuphead[chapter][header=high]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\setuphead[chapter][header=empty]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
 end example

As you have guessed \definetext is the way to create a custom header 
for the first page of your \chapter, the command has like 
\setupheadertexts a variable number of arguments.


The third argument with the horizontal position can only be used when 
you use two or four arguments to set texts on the left and right side 
but isn't in my example because a) the text position is the default 
and b) I pass only one argument for the content because I wan't the 
text in the middle.


%%%% begin example
\showframe

\definetext
  [chapterheader] % identifier
  [header]    % vertical position (header/footer)
% [text]  % horizontal position (text/margin)
  [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]

\starttext

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] start/end pages in ToC

2024-03-26 Thread Alan Bowen
Our journal is currently in the process of moving to continuous publication
of items in a given volume as they are ready. This entails re-jigging the
ToC so that it now includes the start and end page numbers of each item. So
far, I have everything pretty much in the right place, but for the page
numbers I am getting only “??”. I am not sure why this is happening and
would be grateful if someone could tell me why or point me to
documentation that explains the problem and how to solve it.

Many thanks in advance.

My minimalish working example:

\definehead[SourceTitle][chapter]
\setuphead[SourceTitle][page=yes,
footer={ItemData}]

\definehead[StudyTitle][chapter]
\setuphead[StudyTitle][page=yes,
footer={ItemData}]

\definetext[ItemData][footer][
{\at[\Reference]–
\at[\namedstructureuservariable{}{authorInitials}endPage]}
]
\setuplist[SourceTitle][
state=start,
textcolor=black,
alternative=startendpages,
criterium=all,
headnumber=no,
interaction=page,
numberalign=flushright,
before={\blank[2.2ex, fixed]},
inbetween=\endgraf,
]

\setuplist[StudyTitle][
state=start,
textcolor=black,
alternative=startendpages,
criterium=all,
headnumber=no,
interaction=all,
numberalign=flushright,
before={\blank[2.2ex, fixed]},
inbetween=\endgraf,
]

\define\ToCEntry{%
\structurelistuservariable{author}\crlf
\structurelistuservariable{title}\hfill%
\at[\structurelistuservariable{reference}]–%
\at[\structurelistuservariable{authorInitials}endPage]
}

\definelistalternative[startendpages]
[renderingsetup=list:startendpages]

\startsetups[list:startendpages]
{\ToCEntry}
\vglue1pc
\stopsetups

\starttext

{\tfa\bf Contents}

\blank[line, fixed]
\WORD{Sources}
\blank[halfline, fixed]
\placelist[SourceTitle][criterium=all]

\blank[line, fixed]
\WORD{Studies}
\blank[halfline, fixed]
\placelist[StudyTitle][criterium=all]

\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSo01}
\startSourceTitle[reference={\Reference},
bookmark=Source01,
title={}][
title=Source01,
author=Author01,
authorInitials=ABC,
reference={\Reference},
]
\input knuth
\page
\dorecurse{25}{\input ward\par}
\reference[ABCendPage]{}
\stopSourceTitle
\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSo02}
\startSourceTitle[reference={\Reference},
bookmark=Source02,
title={}][
author=Author02,
title=Source02,
authorInitials=PQR,
reference={\Reference},
]

\input knuth
\page
\dorecurse{10}{\input ward\par}
\reference[PQRendPage]{}
\stopSourceTitle
\page[makeup]

\setnumber[userpage][1]
\def\Reference{RefSt01}
\startStudyTitle[reference={\Reference},
bookmark=Study01,
title={}][
author=Author03,
title=Study01,
authorInitials=XYZ,
reference={\Reference},
]
\input knuth
\blank[big]
\page
\dorecurse{15}{\input ward\par}
\reference[XYZendPage]{}
\stopStudyTitle
\page[makeup]
\stoptext

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Headertext

2024-03-26 Thread Wolfgang Schuster

Thomas Meyer schrieb am 26.03.2024 um 16:28:

Hi folks,

I know, with

\setuphead[chapter][header=high]

I can suppress the header text on the first page. But what can I do if I 
still want to have part of the header text on the first page?

Is there something I can do with \definetext and if so, how?


When you use "header=high" you can't have a header because the block for 
it no longer exists, compare the results for "header=high" and 
"header=empty" in the following example.


 begin example
\showframe

\starttext

\setuphead[chapter][header=high]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\setuphead[chapter][header=empty]

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
 end example

As you have guessed \definetext is the way to create a custom header for 
the first page of your \chapter, the command has like \setupheadertexts 
a variable number of arguments.


The third argument with the horizontal position can only be used when 
you use two or four arguments to set texts on the left and right side 
but isn't in my example because a) the text position is the default and 
b) I pass only one argument for the content because I wan't the text in 
the middle.


%%%% begin example
\showframe

\definetext
  [chapterheader] % identifier
  [header]% vertical position (header/footer)
% [text]  % horizontal position (text/margin)
  [This is a custom header for \tex{chapter}] % content

\setuphead[chapter][header=chapterheader]

\starttext

\chapter{Lorem Ipsum}

\dorecurse{10}{\samplefile{lorem}}

\stoptext
 end example

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Headertext

2024-03-26 Thread Thomas Meyer

Hi folks,

I know, with

\setuphead[chapter][header=high]

I can suppress the header text on the first page. But what can I do if I 
still want to have part of the header text on the first page?

Is there something I can do with \definetext and if so, how?

Thanks for any help
Greetings Thomas___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Solved: Book setup with LHS-side quotes before chapters/parts, header/footer issues, TOC, etc.

2021-10-26 Thread Gerben Wierda via ntg-context
Thanks to Wolfgang Schuster and Bruce Horrocks I have now a working solution. I 
ended up following Bruce’s suggestion of doing a left hand side (LHS) page 
opposite the first (RHS) chapter or part page differently than using 
after/before modifications of the \chapter and \part setups as I had been doing 
years ago (but that book did not have parts and was done in mkii)

The modification of \chapter and \part setups with before= and after= never 
worked in the \component setup in LMTX. Creating a separate command to run 
immediately before a \chapter or \part, as suggested by Bruce, was simpler and 
and turned out to be more robust. So, this single file example also works when 
\components are used.

The only issues I have now left are very minimal. In the table of contents, the 
abstract for a part has some extra whitespace above, which the chapter 
abstracts don’t have. But that is not really a problem. And getting the part 
title somewhere more centred on its page is also left as an issue for later.

Example file. In a project/component setup: everything before the \starttext 
goes into the environment file, the rest in the product file.

%%%
%%% Sections that have a LHS preface with a quote
%%%

\startsetups SectionLHSPageSetup
 \page[left]
 \setupheader[state=empty]
 \start
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\tf\it
\stopsetups

\definestartstop [SectionLHSPage]
 [ before={\setups{SectionLHSPageSetup}},
   after={\stopnarrower
\stopalignment\stop}]

\define[1]\SectionPrequote{\startSectionLHSPage #1\stopSectionLHSPage}

%%%
%%% part is managed here
%%%
\defineconversionset [part] [Romannumerals] [numbers]
\setuplabeltext[en][partlabel=Part~]

\setuphead [part]
  [sectionsegments=part,
   bodypartlabel=partlabel,
   appendixlabel=,
   sectionconversionset=part,
   page=yes,
   header=empty,
   footer=empty,
   placehead=yes]

\definelist[parttext]
\setuplist[parttext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\PartAbstract{\writetolist[parttext]{}{\start\itx#1\stop}}

%%%
%%% chapter is managed here
%%%
\definetext
  [chapterfooter] % name
  [footer]% vertical location
  [pagenumber]% content

\setuplabeltext[en][appendixchapterlabel=Appendix~]
\setuphead
  [chapter]
  [page=yes,
   header=empty,
   bodypartlabel=,
   appendixlabel=appendixchapterlabel,
   footer=chapterfooter,
   sectionsegments=chapter,
   before={\blank[force,2*big]},
   after={\blank[3*big]}]

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\defineresetset [default] [0,0] [1]
\setupcombinedlist [content] [list={part,parttext,chapter,chaptertext}]

\starttext

\startfrontmatter
\completecontent
\SectionPrequote{If you think good architecture is expensive, try bad 
architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\startchapter[title={One}]
\dorecurse{7}{\input tufte \par \input knuth}
\stopchapter
\stopfrontmatter

\startbodymatter
\dorecurse{3}{
  \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben 
Wierda}}
  \part{Title title title}
  \PartAbstract{This is a part abstract.}
  \dorecurse{2}{
\SectionPrequote{If you think good architecture is expensive, try
bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\startchapter[title={Two}]
\ChapterAbstract{This is a chapter abstract.}
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter
  }
}
\stopbodymatter
\startappendices
  \defineresetset[default][0,1][1] %% reset , chapter, but not part
  \setuphead[part][number=no]
  \SectionPrequote{The world is not \rationals, it is \reals\crlf {\tf Gerben 
Wierda}}
  \part{Title title title}
  \PartAbstract{This is a part abstract.}
  \dorecurse{2}{
\SectionPrequote{If you think good architecture is expensive, try
bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\startchapter[title={Two}]
\ChapterAbstract{This is a chapter abstract.}
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter
  }
\stopappendices
\stoptext

In a component setup, a part component may look like this:

\startcomponent p_partone
\product prd_book
\project project_book

\SectionPrequote{The world is not \rationals, it is \reals\crlf
{\tf Gerben Wierda}}
\part{Title title title}
\PartAbstract{This is a part abstract for a normal part.}
\component c_chapter
\component c_chapter
\stopcomponent

and a chapter component like this:

\startcomponent c_chapter
\product prd_book
\project project_book

\starttext

\SectionPrequote{If you think good architecture is expensive, try bad 
architecture\crlf
{\tf Brian Foote and Joseph Yoder}}
\chapter{An Inconvenient Truth}
\ChapterAbstract{This is a chapter abstract.}

\setupindenting[next]
\placeinitial I{\kap{\bf n the half}} century or so that human kind has had IT,
the IT sector has increasingly wrestled with the fact that IT projects often
fail in one

Re: [NTG-context] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-25 Thread Bruce Horrocks via ntg-context
Hi Gerben,

See below...

> On 24 Oct 2021, at 17:04, Gerben Wierda via ntg-context  
> wrote:
> 
> On 24 Oct 2021, at 16:38, Wolfgang Schuster 
>  wrote:
>> 
>> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>>> My double-sided layout starts each chapter on a right page with a quote on 
>>> the opposing left page. I’d like to move the page number of that right page 
>>> to the footer, but haven’t been able to find how to do this is the 
>>> documentation. How can I do this?
>> 
>> \definetext
>>   [chapterfooter] % name
>>   [footer]% vertical location
>>   [pagenumber]% content
>> 
>> \setuphead
>>   [chapter]
>>   [header=empty,
>>footer=chapterfooter]
>> 
>> \starttext
>> 
>> \dorecurse{4}
>>   {\expanded{\chapter{Chapter \recurselevel}}
>>\dorecurse{10}{\samplefile{lorem}}}
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Yes, this works in a simple setup. But it doesn’t work in mine with my 
> LHS-quote/RHS-chapterstart setup using before and after on setup head.
> 
> Try this:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided]
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead[chapter]
>   [page=,
>header=empty,
>footer=chpaterfooter,
>sectionsegments=chapter,
>before={\setups[chapter:before]},
>after={\setups[chapter:after]}]
> 
> \startsetups chapter:before
> \page[left]
> \noheaderandfooterlines
> \startalignment[left,nothyphenated]
> \startnarrower[4*left]
> \em \getbuffer[chapter:quote]
> \stopnarrower
> \stopalignment
> \resetsetups[quote:text]
> \page[right]
> \blank[force,2*big]
> \stopsetups

Change chapter:before to be as follows (changes marked with %%)

\startsetups chapter:before
\page[left]
%noheaderandfooterlines %%
\setupheader[state=empty] %%
\setupfootertexts [] [pagenumber] [pagenumber] [] %%
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\blank[force,2*big]   
\setupfootertexts [] [] [] []  %%
\stopsetups

Is that what you were after?

> 
> \startsetups chapter:after
> \blank[3*big]
> \stopsetups
> 
> \definelist[chaptertext]
> \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
> \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
> 
> \starttext
> \startbuffer [chapter:quote]
> If you think good architecture is expensive, try bad architecture\crlf
> {\tf Brian Foote and Joseph Yoder}
> \stopbuffer
> 
> \chapter[h:one]{One}
> \ChapterAbstract{This is chapter abstract 1.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \chapter[h:two]{Two}
> \ChapterAbstract{This is chapter abstract 2.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \stoptext

—
Bruce Horrocks
Hampshire, UK

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Move the page number from header to footer on the current page only?

2021-10-25 Thread Wolfgang Schuster via ntg-context

Gerben Wierda schrieb am 25.10.2021 um 08:41:
I have a problem with getting the page number on the ‘first’ page of a 
chapter (in my setup, it is actually the second page as there is a LHS 
page before it with a quote. The bare minimum example:


When you switch to the chapter-environment get an additional hook at the 
start of each chapter. The advantage of this hook is that its values are 
inserted before the actual chapter code even starts.


\setuppagenumbering[alternative=doublesided]

\definetext
  [chapterfooter] % name
  [footer]    % vertical location
  [pagenumber]    % content

\setuphead
  [chapter]
  [page=yes,
   header=empty,
   footer=chapterfooter,
   sectionsegments=chapter,
   before={\blank[force,2*big]},
   after={\blank[3*big]},
   beforesection=\directsetup{chapter:before}]

\startsetups [chapter:before]
    \page[left]
    \noheaderandfooterlines
    \startalignment[flushright,nothyphenated]
    \startnarrower[4*left]
    \em \getbuffer[chapter:quote]
    \stopnarrower
    \stopalignment
    \page[right]
\stopsetups

\starttext

\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\startchapter[title={One}]
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter

\startchapter[title={Two}]
\dorecurse{5}{\input tufte \par \input knuth}
\stopchapter

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Move the page number from header to footer on the current page only?

2021-10-25 Thread Gerben Wierda via ntg-context
I have a problem with getting the page number on the ‘first’ page of a chapter 
(in my setup, it is actually the second page as there is a LHS page before it 
with a quote. The bare minimum example:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]

\setuphead[chapter]
  [page=,
   header=empty,
   footer=chpaterfooter,
   sectionsegments=chapter,
   before={\setups[chapter:before]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\page[right]
\stopsetups

\starttext
\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\chapter[h:one]{One}
\dorecurse{5}{\input tufte \par \input knuth}

\chapter[h:two]{Two}
\dorecurse{5}{\input tufte \par \input knuth}

\stoptext

What I think I need is a way to move the page number from header to footer for 
just the current page (immediately after \page[right]) in this setup. 

Or a way to move the page number from header to footer on any current page.

Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>

> On 24 Oct 2021, at 18:04, Gerben Wierda via ntg-context  
> wrote:
> 
> On 24 Oct 2021, at 16:38, Wolfgang Schuster 
>  <mailto:wolfgang.schuster.li...@gmail.com>> wrote:
>> 
>> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>>> My double-sided layout starts each chapter on a right page with a quote on 
>>> the opposing left page. I’d like to move the page number of that right page 
>>> to the footer, but haven’t been able to find how to do this is the 
>>> documentation. How can I do this?
>> 
>> \definetext
>>   [chapterfooter] % name
>>   [footer]% vertical location
>>   [pagenumber]% content
>> 
>> \setuphead
>>   [chapter]
>>   [header=empty,
>>footer=chapterfooter]
>> 
>> \starttext
>> 
>> \dorecurse{4}
>>   {\expanded{\chapter{Chapter \recurselevel}}
>>\dorecurse{10}{\samplefile{lorem}}}
>> 
>> \stoptext
>> 
>> Wolfgang
> 
> Yes, this works in a simple setup. But it doesn’t work in mine with my 
> LHS-quote/RHS-chapterstart setup using before and after on setup head.
> 
> Try this:
> 
> \setuplayout[location=doublesided]
> \setuppagenumbering[alternative=doublesided]
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead[chapter]
>   [page=,
>header=empty,
>footer=chpaterfooter,
>sectionsegments=chapter,
>before={\setups[chapter:before]},
>after={\setups[chapter:after]}]
> 
> \startsetups chapter:before
> \page[left]
> \noheaderandfooterlines
> \startalignment[left,nothyphenated]
> \startnarrower[4*left]
> \em \getbuffer[chapter:quote]
> \stopnarrower
> \stopalignment
> \resetsetups[quote:text]
> \page[right]
> \blank[force,2*big]
> \stopsetups
> 
> \startsetups chapter:after
> \blank[3*big]
> \stopsetups
> 
> \definelist[chaptertext]
> \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
> \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}
> 
> \starttext
> \startbuffer [chapter:quote]
> If you think good architecture is expensive, try bad architecture\crlf
> {\tf Brian Foote and Joseph Yoder}
> \stopbuffer
> 
> \chapter[h:one]{One}
> \ChapterAbstract{This is chapter abstract 1.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \chapter[h:two]{Two}
> \ChapterAbstract{This is chapter abstract 2.}
> 
> \dorecurse{5}{\input tufte \par \input knuth}
> 
> \stoptext
> 
> 
> 
> Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
> R Enterprise Architecture <https://ea.rna.nl/> (main site)
> Book: Chess and the Art of Enterprise Architecture 
> <https://ea.rna.nl/the-book/>
> Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>
> 
> 
> ___
> 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://con

Re: [NTG-context] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-24 Thread Gerben Wierda via ntg-context
On 24 Oct 2021, at 16:38, Wolfgang Schuster  
wrote:
> 
> Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
>> My double-sided layout starts each chapter on a right page with a quote on 
>> the opposing left page. I’d like to move the page number of that right page 
>> to the footer, but haven’t been able to find how to do this is the 
>> documentation. How can I do this?
> 
> \definetext
>   [chapterfooter] % name
>   [footer]% vertical location
>   [pagenumber]% content
> 
> \setuphead
>   [chapter]
>   [header=empty,
>footer=chapterfooter]
> 
> \starttext
> 
> \dorecurse{4}
>   {\expanded{\chapter{Chapter \recurselevel}}
>\dorecurse{10}{\samplefile{lorem}}}
> 
> \stoptext
> 
> Wolfgang

Yes, this works in a simple setup. But it doesn’t work in mine with my 
LHS-quote/RHS-chapterstart setup using before and after on setup head.

Try this:

\setuplayout[location=doublesided]
\setuppagenumbering[alternative=doublesided]

\definetext
  [chapterfooter] % name
  [footer]% vertical location
  [pagenumber]% content

\setuphead[chapter]
  [page=,
   header=empty,
   footer=chpaterfooter,
   sectionsegments=chapter,
   before={\setups[chapter:before]},
   after={\setups[chapter:after]}]

\startsetups chapter:before
\page[left]
\noheaderandfooterlines
\startalignment[left,nothyphenated]
\startnarrower[4*left]
\em \getbuffer[chapter:quote]
\stopnarrower
\stopalignment
\resetsetups[quote:text]
\page[right]
\blank[force,2*big]
\stopsetups

\startsetups chapter:after
\blank[3*big]
\stopsetups

\definelist[chaptertext]
\setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument]
\define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}}

\starttext
\startbuffer [chapter:quote]
If you think good architecture is expensive, try bad architecture\crlf
{\tf Brian Foote and Joseph Yoder}
\stopbuffer

\chapter[h:one]{One}
\ChapterAbstract{This is chapter abstract 1.}

\dorecurse{5}{\input tufte \par \input knuth}

\chapter[h:two]{Two}
\ChapterAbstract{This is chapter abstract 2.}

\dorecurse{5}{\input tufte \par \input knuth}

\stoptext



Gerben Wierda (LinkedIn <https://www.linkedin.com/in/gerbenwierda>)
R Enterprise Architecture <https://ea.rna.nl/> (main site)
Book: Chess and the Art of Enterprise Architecture <https://ea.rna.nl/the-book/>
Book: Mastering ArchiMate <https://ea.rna.nl/the-book-edition-iii/>


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How do I get the first page of the chapter to display the page number in the footer in this setup?

2021-10-24 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 24.10.2021 um 15:42:
My double-sided layout starts each chapter on a right page with a 
quote on the opposing left page. I’d like to move the page number of 
that right page to the footer, but haven’t been able to find how to do 
this is the documentation. How can I do this?


\definetext
  [chapterfooter] % name
  [footer]    % vertical location
  [pagenumber]    % content

\setuphead
  [chapter]
  [header=empty,
   footer=chapterfooter]

\starttext

\dorecurse{4}
  {\expanded{\chapter{Chapter \recurselevel}}
   \dorecurse{10}{\samplefile{lorem}}}

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] custom header/footer for 1st/other pages of section

2020-08-11 Thread Wolfgang Schuster


Mike Cooper schrieb am 10.08.2020 um 23:40:




-Original Message-
From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang
Schuster
Sent: Thursday, August 06, 2020 2:58 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section

Mike Cooper schrieb am 06.08.2020 um 17:15:

Hola,

I imagine this is probably simple but I can’t find it…

I want the first page only of each section to have particular content in
header/footer, then all the following pages to different specific
content.Right now, I am manually entering it in each section.I’m hoping
there’s a way to automate this; put it into the environment file for all
sections.


Of course you can set different header/footer layouts for chapter pages.

With  \setupheadertexts and \setupfootertexts you set first the text
which should appear on regular pages.

To have a different text on a chapter page you can use the \definetext
command to set them (third first argument is the name of the setup and
the second argument the location). These setups than can applied to the
chapter with the header and footer key in \setuphead.

 begin example
\setupheadertexts
[Page \userpagenumber\ of \lastuserpagenumber]

\definetext
[chapterheader] % name
[header] % vertical position
[This is a chapter page] % content

\definetext
[chapterfooter]
[footer]
[pagenumber]

\setuphead
[chapter]
[header=chapterheader,
 footer=chapterfooter]

\starttext

\dorecurse{10}
{\expanded{\chapter{Chapter \recurselevel}}
 \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}}

\stoptext
 end example

Wolfgang



Thank you Wolfgang!

I tried to change your code from chapters to sections (since that's what I was 
already using) but it didn't work.  So, I switched my sections to chapters and 
it works great!  But it also caused me to run into other things I'd set up 
manually that I'm having to figure out---good way to learn!  Haha!


You can only set header or footer settings when the section starts on a 
new page. Permitting these two values for every section without this 
restrictions can lead to problems because there can be cases where you 
have different section levels on the same page and the setting from the 
last command on the page counts.



One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in a 
blank/empty page at the end of a section (if needed) so that new sections 
always start on an odd page.  This is still working with the change to chapters 
from sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with 
that one...


Let me guess you divide your document into section blocks (frontmatter, 
bodymatter etc.).


When this is the case you have to first disable the page setting for 
these blocks because they interfere with the header/footer setting. To 
disable the page breaks add


  \setupsectionblock
[frontpart,bodypart]
[page=no]

to your document setups.

No you can change the settings for the page break at the begin of each 
chapter to


  \setuphead
[chapter]
[page={yes,header,footer,right}]

which

  1. Finishes the last page of the previous chapter
  2. Disables the header and footer for the next (empty) page
  3. Adds a empty page when necessary to start the new chapter on a 
right page


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] custom header/footer for 1st/other pages of section

2020-08-10 Thread Mike Cooper


> -Original Message-
> From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang
> Schuster
> Sent: Thursday, August 06, 2020 2:58 PM
> To: mailing list for ConTeXt users
> Subject: Re: [NTG-context] custom header/footer for 1st/other pages of section
> 
> Mike Cooper schrieb am 06.08.2020 um 17:15:
> > Hola,
> >
> > I imagine this is probably simple but I can’t find it…
> >
> > I want the first page only of each section to have particular content in
> > header/footer, then all the following pages to different specific
> > content.Right now, I am manually entering it in each section.I’m hoping
> > there’s a way to automate this; put it into the environment file for all
> > sections.
> 
> Of course you can set different header/footer layouts for chapter pages.
> 
> With  \setupheadertexts and \setupfootertexts you set first the text
> which should appear on regular pages.
> 
> To have a different text on a chapter page you can use the \definetext
> command to set them (third first argument is the name of the setup and
> the second argument the location). These setups than can applied to the
> chapter with the header and footer key in \setuphead.
> 
>  begin example
> \setupheadertexts
>[Page \userpagenumber\ of \lastuserpagenumber]
> 
> \definetext
>    [chapterheader] % name
>[header] % vertical position
>[This is a chapter page] % content
> 
> \definetext
>[chapterfooter]
>[footer]
>[pagenumber]
> 
> \setuphead
>[chapter]
>[header=chapterheader,
> footer=chapterfooter]
> 
> \starttext
> 
> \dorecurse{10}
>{\expanded{\chapter{Chapter \recurselevel}}
> \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}}
> 
> \stoptext
>  end example
> 
> Wolfgang


Thank you Wolfgang!

I tried to change your code from chapters to sections (since that's what I was 
already using) but it didn't work.  So, I switched my sections to chapters and 
it works great!  But it also caused me to run into other things I'd set up 
manually that I'm having to figure out---good way to learn!  Haha!

One thing I *CANNOT* figure out:  I've been using \doifoddpageelse to put in a 
blank/empty page at the end of a section (if needed) so that new sections 
always start on an odd page.  This is still working with the change to chapters 
from sections, EXCEPT for the first chapter (after TOC)!  Totally stuck with 
that one...

Thanks again!

hasta,
Mike

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] custom header/footer for 1st/other pages of section

2020-08-06 Thread Wolfgang Schuster

Mike Cooper schrieb am 06.08.2020 um 17:15:

Hola,

I imagine this is probably simple but I can’t find it…

I want the first page only of each section to have particular content in 
header/footer, then all the following pages to different specific 
content.Right now, I am manually entering it in each section.I’m hoping 
there’s a way to automate this; put it into the environment file for all 
sections.


Of course you can set different header/footer layouts for chapter pages.

With  \setupheadertexts and \setupfootertexts you set first the text 
which should appear on regular pages.


To have a different text on a chapter page you can use the \definetext 
command to set them (third first argument is the name of the setup and 
the second argument the location). These setups than can applied to the 
chapter with the header and footer key in \setuphead.


 begin example
\setupheadertexts
  [Page \userpagenumber\ of \lastuserpagenumber]

\definetext
  [chapterheader] % name
  [header] % vertical position
  [This is a chapter page] % content

\definetext
  [chapterfooter]
  [footer]
  [pagenumber]

\setuphead
  [chapter]
  [header=chapterheader,
   footer=chapterfooter]

\starttext

\dorecurse{10}
  {\expanded{\chapter{Chapter \recurselevel}}
   \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}}

\stoptext
 end example

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter in header, but not on title page

2020-02-16 Thread Henning Hraban Ramm

> Am 2020-02-15 um 23:20 schrieb Pablo Rodriguez :
> 
> 
> On 2/15/20 9:16 PM, Henning Hraban Ramm wrote:
>> I guess I’m stupid.
>> I’d like to have my chapter title in the header on right pages, but
>> not on the first page of a chapter, that always is a right page.
>> Since I’d like to keep the page number in the header on these pages,
>> I can’t use header=empty.
>> What’s the right setup for me?
> 
> Hi Hraban,
> 
> I think this is what you intend:
>\definetext[chapter-first][header][][pagenumber]
> 
>\setuphead[chapter][%
>  page={yes, header, right},
>  header=chapter-first,
>]
> 
> Just in case it helps,

Thank you, that works in the example, but not in my actual project, and I 
didn’t find why.
But I found a workaround (used \setupheadertexts before and in the middle of 
the chapter).
In the end there was just one chapter left where the problem arose, since the 
other chapters use a different setup (double page intro).

Best, Hraban
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter in header, but not on title page

2020-02-15 Thread Pablo Rodriguez

On 2/15/20 9:16 PM, Henning Hraban Ramm wrote:
> I guess I’m stupid.
> I’d like to have my chapter title in the header on right pages, but
> not on the first page of a chapter, that always is a right page.
> Since I’d like to keep the page number in the header on these pages,
> I can’t use header=empty.
> What’s the right setup for me?

Hi Hraban,

I think this is what you intend:

\usemodule[visual]

\setuppagenumbering[alternative=doublesided, location=]
\setupheadertexts[chapter][pagenumber][pagenumber][chapter]
\definetext[chapter-first][header][][pagenumber]

\setuphead[chapter][%
  page={yes, header, right},
  header=chapter-first,
]

\starttext

\dorecurse{5}{
  \startchapter[title={\fakewords{2}{5}}]
  \dorecurse{5}{
\fakewords{100}{400}\par
  }
  \stopchapter
}
\stoptext

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Custom Footertext

2019-09-29 Thread Jeroen
I have condensed it into a single document. The footer has in the right
side the page numbering and at the left the "section". Both only start at
the second page, which is good. I was wondering if the "section" could have
the "title" in front of it. The title always stays the same, and the
section changes.
Many Thanks
Jeroen

\setuppapersize[A4,portrait]
   [A4,portrait]
\setuplayout[backspace=20mm,
 width=175mm,
 topspace=20mm,
 header=0mm,
 footer=2mm,
 height=263mm,
 bottomheight=1mm,
 footerdistance=10mm]
\usetypescript[pagella]
\setupbodyfont[pagella,12pt]
\setupcolors[state=start]
\setupfootertexts[section][]
\setupfooter[alternative=,style=\bf\em]
\setuppagenumbering[alternative=,location={footer,right},style=\bf\em]
\setcounter[userpage][0]
\setupcombinedlist[content][level=1]
\setupexternalfigures[directory={images}]
\startdocument[
  metadata:title={MkIV Context Notes},
  metadata:subtitle={},
  metadata:subject={MkIV Context},
  affiliation=Context]
\starttext
\startfrontmatter
\title{MkIV \CONTEXT\ Notes.}
\startcolumns[n=2]
\input zapf
\stopcolumns
\vfill
\placecontent
\stopfrontmatter
\startbodymatter
\section{Introduction}
\dorecurse{5}{\input knuth}
\section{Closure}
\dorecurse{5}{\input bryson}
\stopbodymatter
\startappendices
\setupcombinedlist[content][level=1]
\section{Appendix A}
\dorecurse{5}{\input tufte}
\stopappendices
\stoptext

Op zo 29 sep. 2019 om 21:36 schreef Wolfgang Schuster <
wolfgang.schuster.li...@gmail.com>:

> Jeroen schrieb am 29.09.2019 um 20:36:
> > This is the main file.
> Neither minimal nor complete and \stopdocument is also missing.
> > \environment mkivcnotesenv
> > \startdocument
> >  [metadata:subject={MkIV Context},
> >affiliation=Context]
> > \starttext
> > \startfrontmatter
> > \input{frontpage.tex}
> > \stopfrontmatter
> > \startbodymatter
> > \section{Introduction}
> > \dorecurse{10}{input knuth}
> > \stopbodymatter
> > \startappendices
> > %\input{a1.tex}
> > \stopappendices
> > \stoptext
>
> Are you looking for something like this (I need more information for a
> better answer):
>
> \definetext [sectionfooter] [footer] [section]
> %\definetext [sectionfooter] [footer] [text] [section] []
>
> \setupfootertexts [I'm a footer text!] [pagenumber]
>
> \setuppagenumbering
>[location=,
> style=bolditalic]
>
> \setuphead
>[section]
>[page=yes, % needed for the footer setting
> footer=sectionfooter]
>
> \starttext
>
> \section{Introduction}
>
> \dorecurse{10}{\input knuth}
>
> \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Custom Footertext

2019-09-29 Thread Wolfgang Schuster

Jeroen schrieb am 29.09.2019 um 20:36:

This is the main file.

Neither minimal nor complete and \stopdocument is also missing.

\environment mkivcnotesenv
\startdocument
 [metadata:subject={MkIV Context},
   affiliation=Context]
\starttext
\startfrontmatter
\input{frontpage.tex}
\stopfrontmatter
\startbodymatter
\section{Introduction}
\dorecurse{10}{input knuth}
\stopbodymatter
\startappendices
%\input{a1.tex}
\stopappendices
\stoptext


Are you looking for something like this (I need more information for a 
better answer):


\definetext [sectionfooter] [footer] [section]
%\definetext [sectionfooter] [footer] [text] [section] []

\setupfootertexts [I'm a footer text!] [pagenumber]

\setuppagenumbering
  [location=,
   style=bolditalic]

\setuphead
  [section]
  [page=yes, % needed for the footer setting
   footer=sectionfooter]

\starttext

\section{Introduction}

\dorecurse{10}{\input knuth}

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] show header text only on first page of chapter

2018-02-20 Thread Henning Hraban Ramm
Thank you, but I don’t know how to use that in my setup.
Since my rubric has to be in a defined place and I didn’t manage to achieve 
that with header setups, I used \setlayer with \getmarking[part]

Would that defined text behave differently than the part "marker"? And how do I 
get at that?

Since I must complete that damned layout tonight, I’ll resolve to setting the 
rubric manually. :(

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

Am 2018-02-20 um 17:56 schrieb Wolfgang Schuster <schuster.wolfg...@gmail.com>:

> 
>> Henning Hraban Ramm 20. Februar 2018 um 17:35
>> Hi Wolfgang,
>> thank you very much - does that mean it’s not possible to use the part title?
> 
> \definetext[henning][header][part]
> 
> \setuphead[part][placehead=empty]
> 
> \setuphead[chapter][header=henning]
> 
> \starttext
> 
> \dorecurse{3}
>   {\expanded{\part{Rubrik \recurselevel}}
>\dorecurse{5}
>  {\expanded{\chapter{Kapitel \recurselevel}}
>   \dorecurse{10}{\input{lorem}\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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] show header text only on first page of chapter

2018-02-20 Thread Wolfgang Schuster



Henning Hraban Ramm <mailto:te...@fiee.net>
20. Februar 2018 um 17:35
Hi Wolfgang,
thank you very much - does that mean it’s not possible to use the part 
title?


\definetext[henning][header][part]

\setuphead[part][placehead=empty]

\setuphead[chapter][header=henning]

\starttext

\dorecurse{3}
  {\expanded{\part{Rubrik \recurselevel}}
   \dorecurse{5}
 {\expanded{\chapter{Kapitel \recurselevel}}
  \dorecurse{10}{\input{lorem}\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] show header text only on first page of chapter

2018-02-20 Thread Henning Hraban Ramm
Hi Wolfgang,
thank you very much - does that mean it’s not possible to use the part title?

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

Am 2018-02-20 um 17:17 schrieb Wolfgang Schuster <schuster.wolfg...@gmail.com>:

> \definetext[henning][header][chapter]
> 
> \setuphead[chapter][header=henning]
> 
> \starttext
> 
> \dorecurse{5}
>   {\expanded{\chapter{Kapitel \recurselevel}}
>\dorecurse{10}{\input{lorem}\par}}
> 
> \stoptext
> 
> Wolfgang
> 
>> Henning Hraban Ramm 20. Februar 2018 um 15:30
>> 
>> I tried something like:
>> 
>> \def\SetPart{%
>> \setlayerframed[background]%
>> [y=10mm,x=20mm,]%
>> {\getmarking[part]}
>> }
>> \setuphead[chapter][after={\SetPart}]
>> 
>> But I always get the name of the previous part. :(
>> 
>> 
>> Greetlings, Hraban
>> ---
>> http://www.fiee.net
>> http://wiki.contextgarden.net
>> GPG Key ID 1C9B22FD
>> 
>> ___
>> 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://context.aanhet.net
>> archive : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] show header text only on first page of chapter

2018-02-20 Thread Wolfgang Schuster

\definetext[henning][header][chapter]

\setuphead[chapter][header=henning]

\starttext

\dorecurse{5}
  {\expanded{\chapter{Kapitel \recurselevel}}
   \dorecurse{10}{\input{lorem}\par}}

\stoptext

Wolfgang


Henning Hraban Ramm <mailto:te...@fiee.net>
20. Februar 2018 um 15:30

I tried something like:

\def\SetPart{%
\setlayerframed[background]%
[y=10mm,x=20mm,]%
{\getmarking[part]}
}
\setuphead[chapter][after={\SetPart}]

But I always get the name of the previous part. :(


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] interaction in a chapter footer

2016-03-03 Thread Hans Hagen

On 3/3/2016 11:45 PM, Alan BRASLAU wrote:

On Thu, 3 Mar 2016 22:42:22 +0100
Hans Hagen <pra...@wxs.nl> wrote:


\startsetups chapter:footer
  {\goto{\CONTEXT\
garden}[url(http://http://wiki.contextgarden.net)]} \stopsetups

\definetext
[chapterfooter]
[footer]
[\setups{chapter:footer}]


Thanks,

I believe that the use of setups is the most simple and elegant
solution, rather than nesting additional grouping {} that leads to
messy source style.


btw, you don't need the extra {} in the setup


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] interaction in a chapter footer

2016-03-03 Thread Alan BRASLAU
On Thu, 3 Mar 2016 22:42:22 +0100
Hans Hagen <pra...@wxs.nl> wrote:

> \startsetups chapter:footer
>  {\goto{\CONTEXT\
> garden}[url(http://http://wiki.contextgarden.net)]} \stopsetups
> 
> \definetext
>[chapterfooter]
>[footer]
>[\setups{chapter:footer}]

Thanks,

I believe that the use of setups is the most simple and elegant
solution, rather than nesting additional grouping {} that leads to
messy source style.

Alan
___
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] interaction in a chapter footer

2016-03-03 Thread Hans Hagen

On 3/3/2016 10:12 PM, Alan BRASLAU wrote:

Hello,

Is it possible (without being too cleaver) to include interaction (a
hyperlink) in a chapter footer?

Alan

M(non-)WE:

\setupinteraction [state=start]

\definetext
   [chapterfooter]
   [footer]
   [{\goto{\CONTEXT\ garden}[url(http://http://wiki.contextgarden.net)]}]

\setuphead [chapter]
   [footer=chapterfooter]

\starttext

\startchapter [title=A chapter]

\input knuth

\stopchapter

\stoptext


(also-)MWE

  [{{\goto{\CONTEXT\ garden}[url(http://http://wiki.contextgarden.net)]}}]



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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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] interaction in a chapter footer

2016-03-03 Thread Hans Hagen

On 3/3/2016 10:12 PM, Alan BRASLAU wrote:

Hello,

Is it possible (without being too cleaver) to include interaction (a
hyperlink) in a chapter footer?

Alan

M(non-)WE:

\setupinteraction [state=start]

\definetext
   [chapterfooter]
   [footer]
   [{\goto{\CONTEXT\ garden}[url(http://http://wiki.contextgarden.net)]}]

\setuphead [chapter]
   [footer=chapterfooter]

\starttext

\startchapter [title=A chapter]

\input knuth

\stopchapter

\stoptext


(partly-)MWE

\startsetups chapter:footer
{\goto{\CONTEXT\ garden}[url(http://http://wiki.contextgarden.net)]}
\stopsetups

\definetext
  [chapterfooter]
  [footer]
  [\setups{chapter:footer}]



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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

[NTG-context] interaction in a chapter footer

2016-03-03 Thread Alan BRASLAU
Hello,

Is it possible (without being too cleaver) to include interaction (a
hyperlink) in a chapter footer?

Alan

M(non-)WE:

\setupinteraction [state=start]

\definetext
  [chapterfooter]
  [footer]
  [{\goto{\CONTEXT\ garden}[url(http://http://wiki.contextgarden.net)]}]

\setuphead [chapter]
  [footer=chapterfooter]

\starttext

\startchapter [title=A chapter]

\input knuth

\stopchapter

\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] only page number in the header of the chapter title page

2015-11-10 Thread Wolfgang Schuster

mass...@fastwebnet.it <mailto:mass...@fastwebnet.it>
10. November 2015 um 12:50

I mean something like this:

On the top of a chapter title page:

+---

| 34
|

On the top of a page without chapter title:

+---

| 36 - Chapter title
|

Or (odd page):

--+

Chapter title - 35 |
|

Thanks, Massi


You can use the \definetext command to set a different header (or 
footer) for chapter pages.


\setuppagenumbering[alternative=doublesided,location=]

\setupheadertexts
  [][{\getmarking[chapter] – \convertedcounter[userpage]}]
  [{\convertedcounter[userpage] – \getmarking[chapter]}][]

\definetext[chapterheader][header][][pagenumber]

\setuphead[chapter][header=chapterheader]

\starttext

\dorecurse{4}
  {\expanded{\chapter{Chapter \recurselevel}}
   \dorecurse{10}{\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
___

Re: [NTG-context] only page number in the header of the chapter title page

2015-11-10 Thread massifr
Thanks a lot, Wolfgang
just now I was posting a solution of mine, 
but yours is more elegant and concise.

Best regards,
Massi

PS: here's my solution (but I'll use yours):

\definemarking[headertitle]

\setupheadertexts[]
\setupheadertexts[\setups{oddpages}][][][\setups{evenpages}]

\startsetups[evenpages]
  \pagenumber
  \emspace
  \getmarking[headertitle][top]
  \hfill
\stopsetups

\startsetups[oddpages]
  \hfill
  \getmarking[headertitle][top]
  \emspace
  \pagenumber
\stopsetups

\starttext

\startchapter[title=Trial chapter]

\marking[headertitle]{\space}
\marking[headertitle]{Trial chapter}

\dorecurse{11}{\input knuth\par}

\stopchapter

\stoptext

In data martedì 10 novembre 2015 18:35:55, hai scritto:
> > mass...@fastwebnet.it <mailto:mass...@fastwebnet.it>
> > 10. November 2015 um 12:50
> >
> > I mean something like this:
> >
> > On the top of a chapter title page:
> >
> > +---
> >
> > | 34
> > |
> >
> > On the top of a page without chapter title:
> >
> > +---
> >
> > | 36 - Chapter title
> > |
> >
> > Or (odd page):
> >
> > --+
> >
> > Chapter title - 35 |
> > |
> >
> > Thanks, Massi
> >
> >
> You can use the \definetext command to set a different header (or 
> footer) for chapter pages.
> 
> \setuppagenumbering[alternative=doublesided,location=]
> 
> \setupheadertexts
>[][{\getmarking[chapter] – \convertedcounter[userpage]}]
>[{\convertedcounter[userpage] – \getmarking[chapter]}][]
> 
> \definetext[chapterheader][header][][pagenumber]
> 
> \setuphead[chapter][header=chapterheader]
> 
> \starttext
> 
> \dorecurse{4}
>{\expanded{\chapter{Chapter \recurselevel}}
> \dorecurse{10}{\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] chapter title does not show on header.

2014-06-29 Thread john Culleton
I copied \setupheadertexts etc. straight from the
wiki with one change. For the fourth parameter
instead of chapter I substituted \Titlea, which
contains the title of the book. That part works,
But the word chapter as a parameter doesn't.

Here is my pertinent code:

\def\Titlea{Scribus Index Feature }
...
\setuppagenumbering[alternative=doublesided,location=]
\setupheader[leftstyle=bold,rightstyle=bold]
\setupheadertexts
   [{\getmarking[chapter]}] 
   [{page \pagenumber}] 
   [{page \pagenumber}]
   [{\Titlea}] 
\setuppagenumbering[location=]
...
\setuppagenumbering[command=\bf]
\definetext[chapter][footer][pagenumber]
\setupmakeup[standard][page=yes, doublesided=no]
\definepagebreak
  [mychapterpagebreak]
  [yes,header,right]
...
\chapter{Summary}
etc.

-- 
John Culleton
Wexford Press
Free list of books for self-publishers:
http://wexfordpress.net/shortlist.html
PDF e-book: Create Book Covers with Scribus
available at
http://www.booklocker.com/books/4055.html
___
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] footer page number on first page of section: doesn't appear

2013-12-05 Thread Lars Huttar
On 12/4/2013 4:00 PM, Aditya Mahajan wrote:
 On Wed, 4 Dec 2013, Lars Huttar wrote:

 On Dec 4, 2013 12:16:12 pm Wolfgang Schuster wrote:
 ...
 This works only when your heading forces a page break with the
 “page=yes”
 setting in \setuphead.

 Thanks for this response.
 Actually, we were able to get it to work as follows.

 First, we used
 \definehead[section][chapter]
 to get section to inherit some settings from chapter.
 This included the page=yes setting you mentioned (which we don't want,
 because we handle page breaks with some separate special logic); but it
 also apparently includes some unknown magic that enables page numbers in
 footers.

 Then we add page=no to the \setuphead[section] command, to override
 the inherited page=yes.
 Apparently, it works:

 \definetext[footerpagenumber][footer][pagenumber]

 \definehead[section][chapter]

 \setuphead[section][page=no,header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]


 \starttext

 \section{My Own Section}

 \dorecurse{15}{ \input knuth \par }

 \stoptext


 I would love to know what the default properties of the \chapter head
 are, so we could know what we're inheriting, or how to set up section to
 do what we want without inheriting unknown properties from chapter.

 (Untested): Looking at the code, it looks that any value other than
 page=, (i.e, page=empty) should work. Did you try the above example
 without the \definehead[section][chapter] line?

 Aditya

Uggh... I just tried it without the \definehead[section][chapter] line,
and it works! (I.e. there is a page number in the footer, only on the
first page of the section.) It wasn't working yesterday ... which makes
me wonder what else I changed since then.

Thanks,
Lars

___
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] footer page number on first page of section: doesn't appear

2013-12-04 Thread Lars Huttar
Hi,
Based on our reading of
http://wiki.contextgarden.net/FO_Page_Layout#First_Page
we have the following MWE, which we want to put a page number in the
footer on the first page only:

\definetext[footerpagenumber][footer][pagenumber]

\setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

\starttext

\section{My Own Section}

\dorecurse{15}{ \input knuth \par }

\stoptext


Unfortunately, no page number shows up.

If we add
  \setuppagenumbering[location=footer]
before the \starttext, we get the page numbering we want, but it's on
every page, not just the first.


Is there something wrong with our setuphead?


Thanks,
Lars


___
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] footer page number on first page of section: doesn't appear

2013-12-04 Thread Wolfgang Schuster

Am 04.12.2013 um 18:37 schrieb Lars Huttar lars_hut...@sil.org:

 Hi,
 Based on our reading of
 http://wiki.contextgarden.net/FO_Page_Layout#First_Page
 we have the following MWE, which we want to put a page number in the
 footer on the first page only:
 
 \definetext[footerpagenumber][footer][pagenumber]
 
 \setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]
 
 \starttext
 
 \section{My Own Section}
 
 \dorecurse{15}{ \input knuth \par }
 
 \stoptext
 
 
 Unfortunately, no page number shows up.
 
 If we add
  \setuppagenumbering[location=footer]
 before the \starttext, we get the page numbering we want, but it's on
 every page, not just the first.
 
 
 Is there something wrong with our setup head?

This works only when your heading forces a page break with the “page=yes” 
setting in \setuphead.

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
___


Re: [NTG-context] footer page number on first page of section: doesn't appear

2013-12-04 Thread Lars Huttar
On Dec 4, 2013 12:16:12 pm Wolfgang Schuster wrote:

 On 12/4/2013 12:37 PM, Lars Huttar wrote:
 Hi,
 Based on our reading of
 http://wiki.contextgarden.net/FO_Page_Layout#First_Page
 we have the following MWE, which we want to put a page number in the
 footer on the first page only:

 \definetext[footerpagenumber][footer][pagenumber]

 \setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

 \starttext

 \section{My Own Section}

 \dorecurse{15}{ \input knuth \par }

 \stoptext


 Unfortunately, no page number shows up.

 If we add
   \setuppagenumbering[location=footer]
 before the \starttext, we get the page numbering we want, but it's on
 every page, not just the first.


 Is there something wrong with our setuphead?


 This works only when your heading forces a page break with the “page=yes”
 setting in \setuphead.

Thanks for this response.
Actually, we were able to get it to work as follows.

First, we used
\definehead[section][chapter]
to get section to inherit some settings from chapter.
This included the page=yes setting you mentioned (which we don't want,
because we handle page breaks with some separate special logic); but it
also apparently includes some unknown magic that enables page numbers in
footers.

Then we add page=no to the \setuphead[section] command, to override
the inherited page=yes.
Apparently, it works:

\definetext[footerpagenumber][footer][pagenumber]

\definehead[section][chapter]

\setuphead[section][page=no,header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

\starttext

\section{My Own Section}

\dorecurse{15}{ \input knuth \par }

\stoptext


I would love to know what the default properties of the \chapter head
are, so we could know what we're inheriting, or how to set up section to
do what we want without inheriting unknown properties from chapter.

Thanks again,
Lars

___
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] footer page number on first page of section: doesn't appear

2013-12-04 Thread Aditya Mahajan

On Wed, 4 Dec 2013, Lars Huttar wrote:


On Dec 4, 2013 12:16:12 pm Wolfgang Schuster wrote:


On 12/4/2013 12:37 PM, Lars Huttar wrote:

Hi,
Based on our reading of
http://wiki.contextgarden.net/FO_Page_Layout#First_Page
we have the following MWE, which we want to put a page number in the
footer on the first page only:

\definetext[footerpagenumber][footer][pagenumber]

\setuphead[section][header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

\starttext

\section{My Own Section}

\dorecurse{15}{ \input knuth \par }

\stoptext


Unfortunately, no page number shows up.

If we add
  \setuppagenumbering[location=footer]
before the \starttext, we get the page numbering we want, but it's on
every page, not just the first.


Is there something wrong with our setuphead?



This works only when your heading forces a page break with the “page=yes”
setting in \setuphead.


Thanks for this response.
Actually, we were able to get it to work as follows.

First, we used
\definehead[section][chapter]
to get section to inherit some settings from chapter.
This included the page=yes setting you mentioned (which we don't want,
because we handle page breaks with some separate special logic); but it
also apparently includes some unknown magic that enables page numbers in
footers.

Then we add page=no to the \setuphead[section] command, to override
the inherited page=yes.
Apparently, it works:

\definetext[footerpagenumber][footer][pagenumber]

\definehead[section][chapter]

\setuphead[section][page=no,header=empty,footer=footerpagenumber,number=no,align={middle,nothyphenated,verytolerant},style=ssbf]

\starttext

\section{My Own Section}

\dorecurse{15}{ \input knuth \par }

\stoptext


I would love to know what the default properties of the \chapter head
are, so we could know what we're inheriting, or how to set up section to
do what we want without inheriting unknown properties from chapter.


(Untested): Looking at the code, it looks that any value other than page=, 
(i.e, page=empty) should work. Did you try the above example without the 
\definehead[section][chapter] line?


Aditya___
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] Set layout for the first page of Chapters

2013-05-09 Thread Wolfgang Schuster

Am 10.05.2013 um 03:42 schrieb Tim Li timli2...@outlook.com:

 Hi, Wolfgang,
 
 I am reading a book desinged by Springer-Verlag, whose size if 152mm X 226mm. 
 Its backspace is 25mm, width 107mm, topspace 20mm, height 181 mm, this is the 
 global layout. And the page number lies in the header, but no footers.
 
 The chapter page in this book has a different layout, whose footer in not 
 empty and the page number of the chapter page is in the footer. the height is 
 191mm, footer \lineheight(=\baselineskip?), footerdistance \lineheight. Other 
 keys are the same with the global layout.
 
 If I want to achieve the layouts like this book, do I need the two layouts in 
 my codes? In my view, I need them, but I don't know if there is a better 
 method.

\definetext
  [chapter]% name, used for \setuphead[...][footer=name]
  [footer] % location of the text, can be “header” or “footer”
  [pagenumber] % takes the same arguments as \setupheadertexts

\setuphead
  [chapter]
  [header=empty, % don’t show any text in the header on chapter pages
   footer=chapter]

\starttext

\dorecurse{4}
  {\expanded{\chapter{Chapter \recurselevel}}
   \dorecurse{12}{\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] Draw a line below the header texts

2013-04-27 Thread Tim Li
Hi, now I need a line below the header text to seperate the header texts from 
the text area. I have't soloved this problem, have to ask for help (the method 
from google doesn't work any more. This new one is from Aditya, but still has 
some problem that I don't know how to deal with) \setuplayout
  [header=\lineheight,
   headerdistance=\lineheight,
   footer=\lineheight,
   footerdistance=\lineheight] \setuppagenumbering
  [location=,
   alternative=doublesided] \definepagebreak
  [chapterpagebreak]
  [yes,header,footer,right] \definetext
  [chapterstart]
  [footer]
  [{\hfill\it\pagenumber}] \setuphead
  [chapter]
  [style=\bfc,
   header=empty,   footer=chapterstart,
   page=chapterpagebreak] \setupheader
  [style=\it]
\setupheadertexts
  [{\getmarking[sectionnumber]\hskip1em\getmarking[section][first]}]
  [pagenumber]
  [{Chapter~\getmarking[chapternumber]\hskip1em\getmarking[chapter]}]
  [pagenumber] \setupbackgrounds  [header][text]  [bottomframe=on] \starttext
\chapter{First Chapter}
this is the first chapter
\section{section 1}
\page   
\section{section 2}
the second page of the first chapter
\page
\section{section 3}
the third page of the first chapter
\chapter{Second Chapter}
this is the second chapter
\section{section 1}
\page
\section{section 2}
the second page of the second chapter
\stoptext The rule shouldn't be above the chapter head ``1 First Chapter at 
page 1 and page 4 should be true empty, since it is just before Chapter 2 and 
has no contents. Of course, I hope that I can solve these two problems by 
myself, but ... I really need some help from you. Best regards, Tim
  ___
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] How to know I am in frontmatter or bodymatter?

2013-04-26 Thread Tim Li
Sometimes, it is convenient if I know I am in frontmatter or bodymatter.  when 
desinging a book, we make a new chapter open at a right page and design the 
header to show the chapter title and pagenumber. We have to set the pagenumber 
at the page where a chapter title is located. \definetext  [chapterstart]  
[footer]  [{\hfill\bf\pagenumber\hfill}]\setuphead  [chapter]  
[footer=chapterstart] if this book consists of a frontmatter and a backmatter, 
I have to set the text for the titles in frontmatter and chapters in bodymatter 
like this, for roman pagenumber in frontmatter. 
\startsectionblockenvironment[frontpart]  \definetext[titlestart]
[footer][{\hfill\bf\romannumerals\pagenumber\hfill}]  \setuphead[title] 
   [footer=titlestart]\stopsectionblockenvironment 
\startsectionblockenvironment[bodypart]  \definetext[chapterstart]
[footer][{\hfill\bf\pagenumber\hfill}]  \setuphead[chapter] 
[footer=chapterstart]\stopsectionblockenvironment  so, is there a command to 
make me know if I am in frontmatter or bodymatter? if so, I can use only one 
command to achieve that setup \definetext  [chapterstart]  [footer]  
[{\hfill\bf\ifinfrontmatter ... \else ... \fi\hfill}]  regards, Tim 
  ___
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] How to know I am in frontmatter or bodymatter?

2013-04-26 Thread Hans Hagen

On 4/26/2013 4:55 PM, Tim Li wrote:

Sometimes, it is convenient if I know I am in frontmatter or bodymatter.  when 
desinging a book, we make a new chapter open at a right page and design the 
header to show the chapter title and pagenumber. We have to set the pagenumber 
at the page where a chapter title is located. \definetext  [chapterstart]  
[footer]  [{\hfill\bf\pagenumber\hfill}]\setuphead  [chapter]  
[footer=chapterstart] if this book consists of a frontmatter and a backmatter, 
I have to set the text for the titles in frontmatter and chapters in bodymatter 
like this, for roman pagenumber in frontmatter. 
\startsectionblockenvironment[frontpart]  \definetext[titlestart]
[footer][{\hfill\bf\romannumerals\pagenumber\hfill}]  \setuphead[title] 
   [footer=titlestart]\stopsectionblockenvironment 
\startsectionblockenvironment[bodypart]  \definetext[chapterstart]
[footer][{\hfill\bf\pagenumber\hfill}]  \setuphead[chapter] 
[footer=chapterstart]\stopsectionblockenvironment  so, is !
there a 
command to make me know if I am in frontmatter or bodymatter? if so, I can use only one command to achieve that setup \definetext  [chapterstart]  [footer]  [{\hfill\bf\ifinfrontmatter ... \else ... \fi\hfill}]  regards, Tim  		 	   		


\startbodymatter

\doifmodeelse{*bodypart}{YES}{NOP}

\stopbodymatter


if check on \currentsectionblock

-
  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] Changing page number location for chapters

2012-08-10 Thread Willi Egger
Hi John,


from the manual cont-enp.pdf p 81:

\definetext[chapter][footer][pagenumber]
with:
\setuphead[chapter][header=high,footer=chapter,page=right]

Hope this still works!

Willi

On Aug 10, 2012, at 8:34 PM, john Culleton wrote:

 I have set up page numbering in the header thus:
 \setuppagenumbering[alternative=doublesided,location={header,margin}]
 I have suppressed this page number for chapters thus:
 \setuphead[chapter][page=right,header=empty]
 
 But what I really want is the page number for chapters in the
 footer, and centered. This is a common convention. What parameter
 should I use in the \setuphead command to accomplish this? 
 -- 
 John Culleton
 Free list of books for self-publishers:
 http://wexfordpress.net/shortlist.html
 Police Procedural and Expose: Death Wore Black
 Create Book Covers with Scribus
 http://www.booklocker.com/books/4055.html
 ___
 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
 ___

___
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] Changing page number location for chapters

2012-08-10 Thread john Culleton
On Fri, 10 Aug 2012 20:47:33 +0200
Willi Egger cont...@boede.nl wrote:

 Hi John,
 
 
 from the manual cont-enp.pdf p 81:
 
 \definetext[chapter][footer][pagenumber]
 with:
 \setuphead[chapter][header=high,footer=chapter,page=right]
 
 Hope this still works!
 
 Willi
 
Yes!!

Thanks! I used header=empty but it still works. Couldn't find
the exact manual reference on page 81 but your code worked fine.  
-- 
John Culleton

___
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] \definetext problem?

2012-07-17 Thread Wolfgang Schuster

Am 17.07.2012 um 18:08 schrieb Alan Bowen:

 This used to work in earlier versions of MKIV, but does no longer—the page 
 sets without complaint but the footer does not appear.
 
 A minimal example:
 
   \definehead[BookTitle][title]
   \setuphead[BookTitle][header=high,footer=BookTitlePage]
   \definetext[BookTitlePage][footer]
   [\vbox{\tfx
   \centerline{Some text}\par
   }
   ]
 
 
 \starttext
 \BookTitle{Title}
 \input knuth\footnote{\input ward}
 \stoptext
 
 Is there a problem with \definetext?

strc-sec.mkiv:

\def\strc_sectioning_check_layout_yes
  {\page[\p_page]%
   \expandcheckedcsname\??headmarkyes{\headparameter\c!marking}\s!unknown
   \edef\p_header{\headparameter\c!header}%
   \ifx\p_header\empty \else
 
\doifelselayouttextline\v!header{\normalexpanded{\setuplayouttext[\v!header][\c!state=\p_header]}}\donothing
   \fi
   \edef\p_text{\headparameter\c!text}%
   \ifx\p_text\empty \else
 \doifelselayouttextline\v!text  {\normalexpanded{\setuplayouttext[\v!text  
][\c!state=\p_text  ]}}\donothing
   \fi
-  \edef\p_header{\headparameter\c!footer}%
-  \ifx\p_header\empty \else
+  \edef\p_footer{\headparameter\c!footer}%
+  \ifx\p_footer\empty \else
 
\doifelselayouttextline\v!footer{\normalexpanded{\setuplayouttext[\v!footer][\c!state=\p_footer]}}\donothing
   \fi}

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
___


Re: [NTG-context] \definetext problem?

2012-07-17 Thread Alan Bowen
Thanks, Wolfgang. I replaced the lines in strc-sec.mkiv with the one that
you supplied and regenerated the formats. Now, I get the error message

ConTeXt  ver: 2012.07.17 16:42 MKIV  fmt: 2012.7.17  int: english/english


system   cont-new.mkiv loaded

(/Applications/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv

system   beware: some patches loaded from cont-new.mkiv

)

fontslatin modern fonts are not preloaded

languageslanguage en is active

(Test.tex{/Applications/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}

fontspreloading latin modern fonts (second stage)

fontstypescripts  unknown: library 'loc'

{/Applications/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/Applications/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}

fontsvirtual math  unable to resolve name mapsfromchar

fontsfallback modern rm 12pt is loaded

structuresectioning  BookTitle @ level 2 : 0.0 - Title

! Extra \else.


system   tex  error on line 11 in file Test.tex: Extra  ...


 1 \definehead[BookTitle][title]

 2 \setuphead[BookTitle][header=high,footer=BookTitlePage]

 3 \definetext[BookTitlePage][footer]

 4 [\vbox{\tfx

 5 \centerline{Some text}\par

 6 }

 7 ]

 8

 9

10 \starttext

11   \BookTitle{Title}

12 \input knuth\footnote{\input ward}

13 \stoptext

14

15



\strc_sectioning_handle ...ioning_after_yes \else

  \ifconditional
\c_strc_sec...

l.11 \BookTitle{Title}



?
Alan

On Tue, Jul 17, 2012 at 12:23 PM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 17.07.2012 um 18:08 schrieb Alan Bowen:

  This used to work in earlier versions of MKIV, but does no longer—the
 page sets without complaint but the footer does not appear.
 
  A minimal example:
 
\definehead[BookTitle][title]
\setuphead[BookTitle][header=high,footer=BookTitlePage]
\definetext[BookTitlePage][footer]
[\vbox{\tfx
\centerline{Some text}\par
}
]
 
 
  \starttext
  \BookTitle{Title}
  \input knuth\footnote{\input ward}
  \stoptext
 
  Is there a problem with \definetext?

 strc-sec.mkiv:

 \def\strc_sectioning_check_layout_yes
   {\page[\p_page]%
\expandcheckedcsname\??headmarkyes{\headparameter\c!marking}\s!unknown
\edef\p_header{\headparameter\c!header}%
\ifx\p_header\empty \else

  
 \doifelselayouttextline\v!header{\normalexpanded{\setuplayouttext[\v!header][\c!state=\p_header]}}\donothing
\fi
\edef\p_text{\headparameter\c!text}%
\ifx\p_text\empty \else
  \doifelselayouttextline\v!text
  {\normalexpanded{\setuplayouttext[\v!text  ][\c!state=\p_text
  ]}}\donothing
\fi
 -  \edef\p_header{\headparameter\c!footer}%
 -  \ifx\p_header\empty \else
 +  \edef\p_footer{\headparameter\c!footer}%
 +  \ifx\p_footer\empty \else

  
 \doifelselayouttextline\v!footer{\normalexpanded{\setuplayouttext[\v!footer][\c!state=\p_footer]}}\donothing
\fi}

 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

 ___

___
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] \definetext problem?

2012-07-17 Thread Wolfgang Schuster

Am 17.07.2012 um 18:55 schrieb Alan Bowen:

 Thanks, Wolfgang. I replaced the lines in strc-sec.mkiv with the one that you 
 supplied and regenerated the formats. Now, I get the error message

I guess you did something wrong when you changed the command, the new 
definition of the command should be

\def\strc_sectioning_check_layout_yes
  {\page[\p_page]%
   \expandcheckedcsname\??headmarkyes{\headparameter\c!marking}\s!unknown
   \edef\p_header{\headparameter\c!header}%
   \ifx\p_header\empty \else
 
\doifelselayouttextline\v!header{\normalexpanded{\setuplayouttext[\v!header][\c!state=\p_header]}}\donothing
   \fi
   \edef\p_text{\headparameter\c!text}%
   \ifx\p_text\empty \else
 \doifelselayouttextline\v!text  {\normalexpanded{\setuplayouttext[\v!text  
][\c!state=\p_text  ]}}\donothing
   \fi
   \edef\p_footer{\headparameter\c!footer}%
   \ifx\p_footer\empty \else
 
\doifelselayouttextline\v!footer{\normalexpanded{\setuplayouttext[\v!footer][\c!state=\p_footer]}}\donothing
   \fi}

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
___


Re: [NTG-context] \definetext problem?

2012-07-17 Thread Alan Bowen
My apologies. XCode slipped (or left in) some +'s  and -'s that I failed to
catch. Anyway, it is working now.

Many thanks!

Alan


On Tue, Jul 17, 2012 at 12:59 PM, Wolfgang Schuster 
schuster.wolfg...@gmail.com wrote:


 Am 17.07.2012 um 18:55 schrieb Alan Bowen:

  Thanks, Wolfgang. I replaced the lines in strc-sec.mkiv with the one
 that you supplied and regenerated the formats. Now, I get the error message

 I guess you did something wrong when you changed the command, the new
 definition of the command should be

 \def\strc_sectioning_check_layout_yes
   {\page[\p_page]%
\expandcheckedcsname\??headmarkyes{\headparameter\c!marking}\s!unknown
\edef\p_header{\headparameter\c!header}%
\ifx\p_header\empty \else

  
 \doifelselayouttextline\v!header{\normalexpanded{\setuplayouttext[\v!header][\c!state=\p_header]}}\donothing
\fi
\edef\p_text{\headparameter\c!text}%
\ifx\p_text\empty \else
  \doifelselayouttextline\v!text
  {\normalexpanded{\setuplayouttext[\v!text  ][\c!state=\p_text
  ]}}\donothing
\fi
\edef\p_footer{\headparameter\c!footer}%
\ifx\p_footer\empty \else

  
 \doifelselayouttextline\v!footer{\normalexpanded{\setuplayouttext[\v!footer][\c!state=\p_footer]}}\donothing
\fi}

 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

 ___

___
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] beta

2012-07-09 Thread Philipp Gesang
···date: 2012-07-09, Monday···from: Hans Hagen···

 On 9-7-2012 20:59, Meer, H. van der wrote:
 This new beta crashed here immidiately:
 
 how new? keep in mind that the garden needs to sync as well

I can confirm this for 2012.07.09 20:28. Minimal example:

···
\setuphead [section] [ page=yes, header=sectiontext, ]
\definetext [sectiontext] [header] [foo] [bar]

\starttext
\startsection[title=Foo] \input dawkins \stopsection
\stoptext \endinput
···

But I can’t tell if this code requires a rewrite with the new
functionality.

Regards
Philipp





-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpaK2jiM6LpB.pgp
Description: PGP signature
___
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] beta

2012-07-09 Thread Hans Hagen

On 9-7-2012 21:44, Philipp Gesang wrote:

···date: 2012-07-09, Monday···from: Hans Hagen···


On 9-7-2012 20:59, Meer, H. van der wrote:

This new beta crashed here immidiately:


how new? keep in mind that the garden needs to sync as well


I can confirm this for 2012.07.09 20:28. Minimal example:

···
\setuphead [section] [ page=yes, header=sectiontext, ]
\definetext [sectiontext] [header] [foo] [bar]

\starttext
\startsection[title=Foo] \input dawkins \stopsection
\stoptext \endinput
···

But I can’t tell if this code requires a rewrite with the new
functionality.


fixed in next upload

-
  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] latest beta problem?

2012-07-01 Thread Wolfgang Schuster

Am 30.06.2012 um 22:34 schrieb Alan Bowen:

 A file that used to process without complaint now fails because \definetext 
 is  not recognized . 
 Do I need to revise my macros or is there a problem in the latest beta?

It’s a bug regarding commands with seven arguments.

syst-aux.mkiv:

% missing “_yes” at the end of the commands

%\def\syst_helpers_seventuple_empty_one#1[#2]%
\def\syst_helpers_seventuple_empty_one_yes#1[#2]%
  {\firstargumenttrue
   \doifnextoptionalelse
 {\syst_helpers_seventuple_empty_two_yes#1{#2}}%
 {\syst_helpers_seventuple_empty_two_nop#1{#2}}}

%\def\syst_helpers_seventuple_empty_two#1#2[#3]%
\def\syst_helpers_seventuple_empty_two_yes#1#2[#3]%
  {\secondargumenttrue
   \doifnextoptionalelse
 {\syst_helpers_seventuple_empty_three_yes#1{#2}{#3}}%
 {\syst_helpers_seventuple_empty_three_nop#1{#2}{#3}}}

%\def\syst_helpers_seventuple_empty_three#1#2#3[#4]%
\def\syst_helpers_seventuple_empty_three_yes#1#2#3[#4]%
  {\thirdargumenttrue
   \doifnextoptionalelse
 {\syst_helpers_seventuple_empty_four_yes#1{#2}{#3}{#4}}%
 {\syst_helpers_seventuple_empty_four_nop#1{#2}{#3}{#4}}}

%\def\syst_helpers_seventupleempty_four#1#2#3#4[#5]%
\def\syst_helpers_seventupleempty_four_yes#1#2#3#4[#5]%
  {\fourthargumenttrue
   \doifnextoptionalelse
 {\syst_helpers_seventuple_empty_five_yes#1{#2}{#3}{#4}{#5}}%
 {\syst_helpers_seventuple_empty_five_nop#1{#2}{#3}{#4}{#5}}}

%\def\syst_helpers_seventuple_empty_five#1#2#3#4#5[#6]%
\def\syst_helpers_seventuple_empty_five_yes#1#2#3#4#5[#6]%
  {\fifthargumenttrue
   \doifnextoptionalelse
 {\syst_helpers_seventuple_empty_six_yes#1{#2}{#3}{#4}{#5}{#6}}%
 {\syst_helpers_seventuple_empty_six_nop#1{#2}{#3}{#4}{#5}{#6}}}

%\def\syst_helpers_seventuple_empty_six#1#2#3#4#5#6[#7]%
\def\syst_helpers_seventuple_empty_six_yes#1#2#3#4#5#6[#7]%
  {\sixthargumenttrue
   \doifnextoptionalelse
 {\seventhargumenttrue#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}]}%
 {\syst_helpers_seventuple_empty_seven_nop#1{#2}{#3}{#4}{#5}{#6}{#7}}}


% the “spaced” and “normal” string should be at the end of the command name

%\def\syst_helpers_seventuple_empty_spaced_two
#1#2{#1[{#2}][][][][][][] }
%\def\syst_helpers_seventuple_empty_normal_two
#1#2{#1[{#2}][][][][][][]}
%\def\syst_helpers_seventuple_empty_spaced_three
#1#2#3{#1[{#2}][{#3}][][][][][] }
%\def\syst_helpers_seventuple_empty_normal_three
#1#2#3{#1[{#2}][{#3}][][][][][]}
%\def\syst_helpers_seventuple_empty_spaced_four   
#1#2#3#4{#1[{#2}][{#3}][{#4}][][][][] }
%\def\syst_helpers_seventuple_empty_normal_four   
#1#2#3#4{#1[{#2}][{#3}][{#4}][][][][]}
%\def\syst_helpers_seventuple_empty_spaced_five 
#1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][] }
%\def\syst_helpers_seventuple_empty_normal_five 
#1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][]}
%\def\syst_helpers_seventuple_empty_spaced_six
#1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][] }
%\def\syst_helpers_seventuple_empty_normal_six
#1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][]}
%\def\syst_helpers_seventuple_empty_spaced_seven#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]
 }
%\def\syst_helpers_seventuple_empty_normal_seven#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]}
\def\syst_helpers_seventuple_empty_two_spaced
#1#2{#1[{#2}][][][][][][] }
\def\syst_helpers_seventuple_empty_two_normal
#1#2{#1[{#2}][][][][][][]}
\def\syst_helpers_seventuple_empty_three_spaced
#1#2#3{#1[{#2}][{#3}][][][][][] }
\def\syst_helpers_seventuple_empty_three_normal
#1#2#3{#1[{#2}][{#3}][][][][][]}
\def\syst_helpers_seventuple_empty_four_spaced   
#1#2#3#4{#1[{#2}][{#3}][{#4}][][][][] }
\def\syst_helpers_seventuple_empty_four_normal   
#1#2#3#4{#1[{#2}][{#3}][{#4}][][][][]}
\def\syst_helpers_seventuple_empty_five_spaced 
#1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][] }
\def\syst_helpers_seventuple_empty_five_normal 
#1#2#3#4#5{#1[{#2}][{#3}][{#4}][{#5}][][][]}
\def\syst_helpers_seventuple_empty_six_spaced
#1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][] }
\def\syst_helpers_seventuple_empty_six_normal
#1#2#3#4#5#6{#1[{#2}][{#3}][{#4}][{#5}][{#6}][][]}
\def\syst_helpers_seventuple_empty_seven_spaced#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]
 }
\def\syst_helpers_seventuple_empty_seven_normal#1#2#3#4#5#6#7{#1[{#2}][{#3}][{#4}][{#5}][{#6}][{#7}][]}

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
___


Re: [NTG-context] latest beta problem?

2012-07-01 Thread Hans Hagen

On 1-7-2012 09:47, Wolfgang Schuster wrote:


Am 30.06.2012 um 22:34 schrieb Alan Bowen:


A file that used to process without complaint now fails because \definetext is  
not recognized .
Do I need to revise my macros or is there a problem in the latest beta?


It’s a bug regarding commands with seven arguments.


ah .. indeed ... after six such renaming sets at seven my brain got 
overheated .. fixed in next (not yet done) upload


Hans

-
  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] latest beta problem?

2012-07-01 Thread Alan Bowen
Wolfgang, Hans—many thanks.

Alan


On Sun, Jul 1, 2012 at 9:53 AM, Hans Hagen pra...@wxs.nl wrote:

 On 1-7-2012 09:47, Wolfgang Schuster wrote:


 Am 30.06.2012 um 22:34 schrieb Alan Bowen:

  A file that used to process without complaint now fails because
 \definetext is  not recognized .
 Do I need to revise my macros or is there a problem in the latest beta?


 It’s a bug regarding commands with seven arguments.


 ah .. indeed ... after six such renaming sets at seven my brain got
 overheated .. fixed in next (not yet done) upload

 Hans

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

___
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] Custom chapter footer

2012-01-01 Thread Andreas Harder
Hi Hans,

the following used to work. Has the syntax changed?

\definetext[chapter][footer][pagenumber]
\setuphead [chapter][footer=chapter]

\starttext
  \chapter{test}
\stoptext

! Undefined control sequence.

Regards
Andreas
___
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] Header bottomframe on first page of document

2011-12-21 Thread Peter Park Nelson
Hello,

If I have a bottom frame under my page headers, is it possible to have
NO bottom frame under the header on ONLY the first page of a document?

I am using:
\setupbackgrounds[header][text][bottomframe=on]
to put a border line underneath all my page headers. I want to have a
header on the first page of my document but no line under it (the
first page header will be unique). I want to keep the vertical space
for the header, so \setupheader[text][state=high] is not what I need.

The reason for this is to have the option of placing a banner over
the document title using the header. Some documents will need this,
and some will not. So, if the extra banner is needed, I will put it in
the first page header, and if not I will leave that header blank. The
unique header will be set using:

\definetext[firsthead][header][First Page Header Banner Text] % or
leave it blank...
\setuphead[title][header=firsthead,...]

Thanks,
PPN

-- 
Peter Park Nelson
peter.park.nel...@gmail.com
___
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] change affecting MPgraphic?

2010-09-24 Thread Marko Schütz Schmuck
Dear All,

I only very recently updated from

ConTeXt  ver: 2005.01.31

to 

ConTeXt  ver: 2009.08.19 17:10 MKII 

Previously, using env-assign.tex as described in a 2006 PracTeX
article worked fine. With the new version the drop shadow box is not
rendered. 

This is the version of env-assign.tex I use:


\startenvironment env-assign

%D This is the environment file to prepare homework assignments in \CONTEXT.
%D See accompanying Prac\TEX\ article for an introduction on how to use it.

%D I use US letter paper and resonable margins.

\setuppapersize[letter][letter]

\setuplayout[
 width=middle,
height=middle,
  location=middle,
  topspace=1in,
   bottomspace=1in,
 backspace=1in,
  cutspace=1in,
leftmargin=0in,
   rightmargin=0in,
leftmargindistance=0in,
   rightmargindistance=0in,
header=0.5in,
footer=0.5in,
 headerdistace=0in,
footerdistance=0in
  ]

\setupwhitespace  [small]
\setupblank   [medium]

%\startMPenvironment[global]
%\definetypeface
%  [MyFace] [rm] [serif] [palatino] [default] [encoding=ec]
%\definetypeface
%  [MyFace] [tt] [mono]  [modern]   [default] [encoding=ec,rscale=1.1]
%\definetypeface
%  [MyFace] [mm] [math]  [euler][euler]   [encoding=ec,rscale=1.03]

%\usetypescript[adobekb][\defaultencoding]
%\setupbodyfont  [MyFace, 11pt]
%\stopMPenvironment

\definefont [BigFontOne]  [RegularSlanted sa 2.5]
\definefont [BigFontTwo]  [Regular sa 1.5]


\setupcolors  [state=start]
\definecolor  [colorone][r=0.625,g=0,b=0] %dark red
\definecolor  [colortwo][b=0.625,g=0,r=0] %dark blue

\startuniqueMPgraphic{shadow}
fill OverlayBox shifted (3pt,-3pt) withcolor .8white ;
fill OverlayBox withcolor white ;
draw OverlayBox withcolor blue ;
setbounds currentpicture to OverlayBox ;
\stopuniqueMPgraphic

\defineoverlay  [shadow]  [\uniqueMPgraphic{shadow}]

\def\assignmenttitle#1#2%
  {\framed[
  width=broad,
  frame=off,
  align=right,
foregroundcolor=colortwo,
 % I want a shadow around the title frame
 background=shadow]
  {#2\\{\colorone\BigFontTwo\Assigncourse}}}

\setuphead[title]
 [  style=\BigFontOne,
   command=\assignmenttitle,
   before={\resetnumber[PROBLEM]\setuppagenumber[number=1]},
after={\blank[big] \bgroup \colortwo
Assigned on:
 \expanded{\date[\Assignassigned]}
\hfill
Due on:
 \expanded{\date[\Assigndue]}
   \egroup\blank}
 ]

\setupheadertexts [title]

%D say \quotation{Solutions} while generating solutions

\startmode[solution]
  \setupheadertexts [Solutions] []
\stopmode

\setupfootertexts [pagenumber]

\setupfootertexts
  [Assigned: \expanded{\date[\Assignassigned]}]
  [Due: \expanded{\date[\Assigndue]}]

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

\setuplabeltext [problem=Problem,solution=Solution ]
\setuplabeltext [point=point,points=points]

\def\assignment[#1]
  {\getrawparameters
[Assign]
[title=,
  course=,
  assigned=,
  due=,
  #1]%
\title{\Assigntitle}
}

\defineenumeration
  [PROBLEM]
  [ text={\labeltext{problem}},
location=hanging,
   headstyle=\sc,
   headcolor=colorone,
  before={\resetnumber[formula]\page[desirable]},
   after=\blank,
  ]

\def\startproblem%
  {\dosingleempty\dostartproblem}

\def\dostartproblem[#1]%
  {\startPROBLEM[#1]\dosinglegroupempty\dodostartproblem}

\def\dodostartproblem#1%
  {\iffirstargument
  % Check if #1 = 1, use point, else use points
\bgroup \colortwo (#1 \dopoints{#1}) \egroup
   \fi}

\def\dopoints#1%
  {\doifelse{#1}{1}{\labeltext{point}}{\labeltext{points}}}

\def\stopproblem%
  {\stopPROBLEM}


\setupheader  [text]  [color=colortwo]
\setupfooter  [text]  [color=colortwo]

\setupitemize [each]  [left=(,right=),stopper=,color=colorone]
\setupitemize [1] [intro]
\setupitemize [joinedup,packed]

%D Use characters (a,b,\unknown) at the first level and roman numberals (i, ii,
%D \unknown) at the second level.

\setupitemize [1] [a]
\setupitemize [2] [r]

%D \macros{startsolution}
%D In the default mode, the solution evironment should gobble its contents.
%D I copy the definition of \tex{starthiding} to {\em hide} the solutions.

\definebuffer [solution]
\setupbuffer  [solution]  [local=yes]

%D In solution mode, I redefine solution environment as an
%D enumeration without a number. There are probably better ways to define this
%D environment, but why reinvent the wheel?

\startmode[solution]
\defineenumeration
[solution]
[  text=\labeltext{solution},
 number=no,
  headstyle=bold,
  headcolor=colortwo,
   location=serried,
  width=fit,
 before=\startsolutionbackground,
  after=\stopsolutionbackground
]

%D The \filename{exam.cls} class in \LATEX\ allows you to put a frame around
%D the solution and the frame

Re: [NTG-context] varying headers, footers, page numbers

2010-08-24 Thread Michael Goerz
On Tue, Aug 24, 2010 at 6:01 PM, Michael Goerz
go...@physik.fu-berlin.de wrote:
 I'm trying to create a book where the front matter has no
 headers/footers, except roman numeral page numbers at the top outside of the
 page. The main matter should have Arabic numeral page numbers
 (restarting with '1') at the top outside of each page, plus the name of
 the book in the header of each even page and the name of the chapter in
 the header of each odd page, with no footer. However, on the pages
 where a new chapter starts (which is set to always be an odd page),
 there should be no header, and the page number should appear centered
 at the bottom of the page.

 I'm quite confused about how to achieve this in ConTeXt.

 An excerpt from the project structure is
   ./env.tex
   ./project.tex
   ./book/book.tex
   ./book/chapters/chapter1.tex

 The following is a shortened excerpt from book.tex:
   \startfrontmatter
   \setuppagenumbering[state=stop] % nothing for now, should be roman page
                                   % numbers later
   \component book/frontmatter
   % ToC ...
   \stopfrontmatter

   \startbodymatter
   \setuppagenumber[number=1]
   \setupheadertexts
       [{Name of Chapter}]           [{}]
       [{}]                          [{Name of Book}]
   \setuppagenumbering[
   alternative=doublesided,   % mirrored even/odd pages
   location={header,margin},
   style=small]
   \component vol04_1/articles/azimov
   \stopbodymatter
 This leads to my first question: I generally try to keep all formatting
 definitions in env.tex. However, it seems to me that since I want to have
 different settings in the frontmatter compared to the mainmatter, I need to 
 put
 the \setuppagenumbering and \setupheadertexts in book.tex, which slightly
 bothers me. The way I intuitively feel it should work is that I would define
 various headertexts and pagenumberings under some label in env.tex, and then
 activate the different configurations in book.tex via that label. Is there
 anything in ConTeXt that I may have overlooked that makes something like that
 (centrally defining several alternative header/footer/pagenumber
 configurations) possible?

 Next, the problem of having a different header/footer/pagenumber on pages 
 where
 a new chapter starts. In env.tex, I have

   \setuphead[chapter][
       page=mychapterpagebreak,
       number=no,
       alternative=c,
       align={center, nothyphenated, verytolerant},
       style={\switchtobodyfont[16pt]},
       header=high,
       footer=none,
   ]

 This causes the chapter pages to have no header/footer/pagenumber at all, 
 which
 is halfway what I want. But actually, I don't really understands why that 
 works
 either. My understanding is that header=high means there should be no header
 on the first page and the normal header on all subsequent pages. The way I've
 set it up though, the page number is not really part of the header (it's
 separately set up through \setuppagenumbering). So why does the page number
 disappear as well? And, of course, the main question: How do I get the page
 number centered in the bottom of that page? Again, I feel if there was some 
 way
 to define different configurations for the header/footer/pagenumbers under
 different labels, e.g. a label 'chapterfooter', it would then make sense to do
 something like 'footer=chapterfooter', instead of 'footer=none'. But I guess
 that's not the way it works -- so how *does* it work?
Digging deeper in the reference manual, it seems that
\definetext[chapter][footer][pagenumber]
together with
\setuphead[chapter][
page=mychapterpagebreak,
number=no,
alternative=c,
align={center, nothyphenated, verytolerant},
style={\switchtobodyfont[16pt]},
header=high,
footer=chapter,
]
is the answer.

Do I understand it correctly that
\definetext[chapter][footer]...
is exactly the same as
\setupfootertext...
but with the extra label chapter? So that would be exactly what my
intuition said should exist.

Can I only use the chapter label inside of \setuphead, like in the
above example, or could I also somehow use \definetext to setup
different headers/footers for the frontmatter/mainmatter, for example?

Thanks,
Michael
___
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] Page headers drop capitals not working but pagenumbering is

2010-04-20 Thread Tom
The following code numbers the pages as I desired and the TOC lists those
page numbers. However, it is not doing two things as I desire and would
appreciate it if someone could indicate precisely which lines of code need
to be corrected.

In the front matter, page headers should be on the recto of the TOC (page
vi) and pages 2 and 3 of the introduction. Page headers seem to be operating
correctly in the body of the book.

\placeinitial is not creating drop capitals on the first page of each
chapter in the body of the text.

Example code follows:


%figure on left - chapter number and title on right
\def\MyChapterCommandM#1#2% #1 is number, #2 is text
   {\startfiguretext[left]{none}
 {\externalfigure[flowers][width=.2\textwidth]}
 {\framed[frame=off,align=middle,width=broad]
 {\switchtobodyfont[15pt] #1\\\blank[small] #2}}
\stopfiguretext}

%no figure on left - chapter number and title on right
\def\MyFrontMatterCommand#1#2% #1 is number, #2 is text
 {\framed[frame=off,align=middle,width=broad]
 {\switchtobodyfont[15pt] #1\\\blank[small] #2}}

%eliminate headers on blank page at end of chapter
\definepagebreak[mychapterpagebreak][yes,header,right]

%put pagenumber on bottom of first page of chapter
\definetext[chapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=chapter,page=mychapterpagebreak]
\setuphead[title][header=high,footer=chapter,page=mychapterpagebreak]

%turn off putting naked page numbers on pages
\setuppagenumbering[location=]

\setupsectionblock[bodypart][page=chapter]
\setupsectionblock[frontpart][page=chapter]

\startsectionblockenvironment[frontpart]

\setuphead[title]
 [command=\MyFrontMatterCommand,textstyle=\ss\bf,number=no,
  header=empty,footer=chapter,page=mychapterpagebreak,
  after=\vskip 0.5in]
 
\setuphead[chapter]
 [command=\MyFrontMatterCommand,textstyle=\ss\bf,number=no,
  header=empty,footer=chapter,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in
 \placeinitial  %comment out this line to eliminate drop capitals
] 

\setupheadertexts[chapter]
[chapter][pagenumber][pagenumber][chapter Example]

\setupheadertexts[title]
[title][pagenumber][pagenumber][title]

\setuppagenumbering[alternative=doublesided]

%\setupheader[state=stop]

\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setuppagenumbering[alternative=doublesided]
\setupheadertexts
[chapter][pagenumber][pagenumber][Content Example]

\setuphead[chapter]
 [command=\MyChapterCommandM,textstyle=\ss\bf,
  header=empty,footer=chapter,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip
1.0in\placeinitial]  

%comment out this line to eliminate drop capitals
 

\stopsectionblockenvironment

\startsectionblockenvironment[appendix]

\setupsectionblock[appendix][page=appendicespagebreak] 

\stopsectionblockenvironment

\starttext 

\startfrontmatter

Some random text to occupy front matter pages.

\blank[medium]

\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\page[right]

\setuppagenumbering[state=start,alternative=doublesided,conversion=romannume
rals,location=]
\setupheader[state=start]

\title{Contents}

\placecontent[alternative=c,criterium=all]

\blank[medium]
Random text added to push TOC onto a second page to test page headers.
\blank[medium]

\input knuth
\input knuth
\input knuth
\input knuth

\chapter{Preface}
\input knuth
\page[right]

%switch from lower case Roman numerals to Arabic numbers
\setuppagenumbering[state=start,alternative=doublesided,conversion=numbers]
\setuppagenumber[state=start,number=1]

\setuphead[chapter]
 [command=\MyChapterCommandM,textstyle=\ss\bf,number=no,
  header=empty,footer=chapter,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in
 \placeinitial  %comment out this line to eliminate drop capitals
] 

\chapter{Introduction}
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth


\stopfrontmatter

\startbodymatter

\chapter{Chapter One}
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth

\chapter{Chapter Two}
\input knuth

\chapter{Chapter Three}
\input knuth

\page
\stopbodymatter

\startappendices

\stopappendices
\page[stop]

\stoptext







Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey






___
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] (no subject)

2010-04-18 Thread Tom
The following example computes page numbers correctly, places the correct
entries into the TOC, and produces the desired page headers on the first
pages of chapters. However, there are some things it doesn't do properly:

1. It puts headers on blank pages at the ends of chapters even after I
inserted the code that takes care of that problem.

2. It seems to ignore some commands or wait until the next chapter to
implement them. An example is the header on page vi. It's supposed to read
viContents

3. It seems that commands in the \startsectionenvironment  frontmatter block
are ignored or overridden by commands that are for the body part. That is
why I have so many setup commands ib the \starttext section.



%figure on left - chapter number and title on right
\def\MyChapterCommandM#1#2% #1 is number, #2 is text
   {\startfiguretext[left]{none}
 {\externalfigure[cow][width=.2\textwidth]}
 {\framed[frame=off,align=middle,width=broad]
 {\switchtobodyfont[15pt] #1\\\blank[small] #2}}
\stopfiguretext}

%no figure on left - chapter number and title on right
\def\MyFrontMatterCommandM#1#2% #1 is number, #2 is text
 {\framed[frame=off,align=middle,width=broad]
 {\switchtobodyfont[15pt] #1\\\blank[small] #2}}

%eliminate headers on blank page at end of chapter
\definepagebreak[mychapterpagebreak][yes,header,next]

%put pagenumber on bottom of first page of chapter
\definetext[chapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=chapter,page=right]
\setuppagenumbering[location=]


\startsectionblockenvironment[frontpart]

\definehead[mycontenttitle][chapter]
\setuphead[mycontenttitle]
 [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf,
header=empty,footer=empty,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in
\placeinitial  %comment out this line to eliminate drop capitals
] 

\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setupheadertexts
[chapter][pagenumber][pagenumber][Content Example]

\setuphead[chapter][page=mychapterpagebreak]

\setuphead[chapter]
 [command=\MyChapterCommandM,textstyle=\ss\bf,  
  header=empty,footer=empty,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in
\placeinitial  %comment out this line to eliminate drop capitals
] 

\stopsectionblockenvironment

\startsectionblockenvironment[appendix]

\setupsectionblock[appendix][page=appendicespagebreak] 

\stopsectionblockenvironment

\starttext 

\startfrontmatter

\setuppagenumbering[state=start,alternative=doublesided,conversion=romannume
rals]

Some random text to occupy front matter pages.
\blank[medium]
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\page[right]


%\starthiding
\setuphead[title]
 [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf,
header=empty,footer=pagenumber,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in
\placeinitial  %comment out this line to eliminate drop capitals
] 
\setupheadertexts
[Contents][pagenumber][pagenumber][Contents]

\title{Content}

%\stophiding

%\mycontenttitle{Content}  %displays Contents but drops the TOC

\placecontent[alternative=c]

\blank[medium]
Random text added to push TOC onto a second page to test page headers.
\blank[medium]

\input knuth
\input knuth
\input knuth
\input knuth

\setupheadertexts
[chapter][pagenumber][pagenumber][Content Example]

\setuphead[chapter]
 [command=\MyFrontMatterCommandM, number=no,textstyle=\ss\bf,
header=empty,footer=pagenumber,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in
\placeinitial  %comment out this line to eliminate drop capitals
] 

\chapter{Preface}
\input knuth
\page[right]

%switch from lower case Roman numberals to Arabic numbers
\setuppagenumbering[state=start,alternative=doublesided,conversion=numbers]
\setuppagenumber[state=start,number=1]

\setuphead[chapter]
 [command=\MyChapterCommandM,textstyle=\ss\bf,
  header=empty,footer=pagenumber,page=mychapterpagebreak,
  numbercommand=\ss\bf\em\tfd,after=\vskip 0.5in,before=\vskip 1.0in
 \placeinitial  %comment out this line to eliminate drop capitals
] 

\chapter{Introduction}
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth

\stopfrontmatter

\startbodymatter

\chapter{Chapter One}
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth
\input knuth

\chapter{Chapter Two}
\input knuth
\stopbodymatter

\startappendices

\page[stop]

\stopappendices

\stoptext

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey






___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context

Re: [NTG-context] First page of chapter

2010-02-02 Thread Andreas Harder
 I am struggling with getting the first pages of my chapters laid out as
 desired. What I want on the top third of the page is a roughly 2 inch square
 graphic on the left with the chapter number and chapter title on the right
 in large print. The following chunk errors out as shown but works when
 hard-coded.  Am I headed off in the wrong direction by trying to use columns
 in this way? Previously, I tried treating the chapter number and title as
 text with startfiguretext. It works but I can't format the chapter titles to
 fit properly. Any suggestions for a ConTeXt beginner?
  
  
 \def\ChapterTop#1#2{
 \startcolumns[n=2]
 \placefigure[left]{none}{\externalfigure[chief]}
 \column
  \switchtobodyfont[26pt] {\ss\bf\sl #1}
  \blank[large]\blank[large] 
   {\ss\bf #2}
  \stopcolumns}
  
 \setuphead[chapter]
  [command=\ChapterTop, header=high,footer=pagenumber,page=center] 
  
 \input c:. %chapter used to test the code

Hi!

I think you search for something like this:

\def\ChapterTop#1#2% bottom-aligned
  {\framed[width=broad,offset=overlay]
{\framed[width=2in,height=2in]{GRAPHIC}\hfill
 \framed[align=right]{#1\blank[2*big]#2}}}

\definetext[ChapterFoot][footer][pagenumber]

\setuphead
  [chapter]
  [command=\ChapterTop,
   header=high,
   footer=ChapterFoot,
   numberstyle=\ssbid,
   textstyle=\ssbfd]

\starttext  \showframe
\dorecurse{3}{\chapter{First Chapter}\dorecurse{5}{\input tufte}}
\stoptext

Greetings
Andreas___
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] First page of chapter

2010-02-02 Thread Tom
That works. Now I have to figure out how to insert the picture in the place
marked GRAPHIC, get rid of all the boxes and get the page number to print on
the bottom of the first page of the chapter.

Tom Benjey
717-258-9733 voice
717-243-0074 fax
Twitter: @TomBenjey



From: ntg-context-boun...@ntg.nl [mailto:ntg-context-boun...@ntg.nl] On
Behalf Of Andreas Harder
Sent: Tuesday, February 02, 2010 5:04 PM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] First page of chapter

I am struggling with getting the first pages of my chapters laid out as
desired. What I want on the top third of the page is a roughly 2 inch square
graphic on the left with the chapter number and chapter title on the right
in large print. The following chunk errors out as shown but works when
hard-coded.  Am I headed off in the wrong direction by trying to use columns
in this way? Previously, I tried treating the chapter number and title as
text with startfiguretext. It works but I can't format the chapter titles to
fit properly. Any suggestions for a ConTeXt beginner?
 
 
\def\ChapterTop#1#2{
    \startcolumns[n=2]
        \placefigure[left]{none}{\externalfigure[chief]}
    \column
         \switchtobodyfont[26pt] {\ss\bf\sl #1}
         \blank[large]\blank[large] 
          {\ss\bf #2}
     \stopcolumns}
 
\setuphead[chapter]
 [command=\ChapterTop, header=high,footer=pagenumber,page=center] 
 
\input c:. %chapter used to test the code

Hi!

I think you search for something like this:

\def\ChapterTop#1#2% bottom-aligned
  {\framed[width=broad,offset=overlay]
    {\framed[width=2in,height=2in]{GRAPHIC}\hfill
     \framed[align=right]{#1\blank[2*big]#2}}}

\definetext[ChapterFoot][footer][pagenumber]

\setuphead
  [chapter]
  [command=\ChapterTop,
   header=high,
   footer=ChapterFoot,
   numberstyle=\ssbid,
   textstyle=\ssbfd]

\starttext  \showframe
\dorecurse{3}{\chapter{First Chapter}\dorecurse{5}{\input tufte}}
\stoptext

Greetings
Andreas


___
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] Call for papers (pracjourn mkiv)

2009-12-15 Thread Aditya Mahajan
}
\stoplocalsetups

\startlocalsetups [titlefooter]
  \framed[frame=off,width=\textwidth,align=flushright,location=low]
  {\small\setupinterlinespace
  \getvariable{pracjourn}{copyright}\endgraf}
\stoplocalsetups

\definetext [titleheader] [header]  [\setups{titleheader}][]
\definetext [titlefooter] [footer]  [\setups{titlefooter}]
\setuphead  [title]   [header=titleheader,footer=titlefooter]

%D For rest of the pages, page number is printed on the middle of the footer.

\setuppagenumbering [location={footer,middle}, style=mediaeval]

%D Next we setup the formating for the sections.  \TPJ\ wants font sizes of
%D 17pt, 14pt, and 12pt respectively for section, subsection, and
%D subsubsection. By default, \tex{tfa} is 1.2, \tex{tfb} is 1.4, so the sizes
%D come out close to what is required. The section number is typset in
%D oldstyle fonts.

\setuphead
  [section,subject]
  [  style=\tfb,
   numberstyle=mediaeval,
before={\blank[2*big]},
 after={\blank[big]},
  ]

\setuphead
  [subsection,subsubject]
  [  style=\tfa,
   numberstyle=mediaeval,
before={\blank[big]},
 after={\blank[medium]},
  ]

\setuphead
  [subsubsection,subsubsubject]
  [  style=\tf,
   numberstyle=mediaeval,
before={\blank[medium]},
 after={\blank},
  ]

%D Now we setup the captions. The captions head are set in normal font, and
%D the caption number is set in oldstlyle.

\setupcaptions  [headstyle=normal,stopper=:,conversion=mediaeval]

%D Footnotes are placed in a box with a width of 1.5em. The footnote numeral
%D are set in oldstyle font.

\setupnote
  [footnote]
  [margindistance=0em,
   conversion=mediaeval,
  command=\pracjournfootnote,
  ]

\setupnotedefinition  [footnote]  [location=left,hang=1]

\def\pracjournfootnote#1{\hbox to 1.5em{#1.}}

%D \TPJ\ uses dash as the first level of itemize and text period as the second
%D level. The third level is left unspecified.

\definesymbol [1] [{\symbol[dash]}]
\definesymbol [2] [\periodcentered]

\setupitemize [each]  [packed]
\setupitemize [1] [packed,autointro]  [margin=1em]

%D We change \type|\type| so that the argument inside \type|\type| is pretty
%D printed using \TEX's patterns. Another command \type|\normaltype| can be
%D used if you do not want the original \type|\type|.

\setuptype[option=TEX]
\definetype   [normaltype]  [option=none]

%D We enable colors, interaction and bookmarks.

\setupinteraction [state=start,color=darkred,style=normal]
\setupurl [color=darkred]
\setupcolors  [state=start]
\placebookmarks   [section,subsection]  [section]

%D We setup medium indenting, whitespace and blanks.

\setupindenting   [medium,yes]
\setupwhitespace  [medium]
\setupblank   [medium]

%D We define logos for \PRACTEX\ and \TPJ. These definitions are copied from
%D \filename{pracjourn.cls} and can be accessed by \type|\PracTeX|,
%D \type|\PRACTEX| and \type|\TPJ|.

\def\PracTeX{Prac\kern-0.07em\TeX}
\def\PRACTEX{\PracTeX}
\def\TPJ{The \PRACTEX\ Journal}

%D \filename{pracjourn.cls} provides two macros \type|\ctanfile| and
%D \type|\ctanloc|. I am not sure what is the advantage of these macors. If
%D you want to use these macros, you can use the \type|\useURL| mechanism of
%D \CONTEXT. For example
%D \starttyping
%D \useURL[pracjourn][http://ctan.org/get?fn=/macros/contrib/latex/pracjourn][][\mono{CTAN:macros/contrib/latex/pracjourn}]
%D The \LATEX\ style files for \TPJ\ is localed at \from[pracjourn]
%D \stoptyping

%D For the final version of the paper, the string \quotation{The PracTeX
%D Journal year, No x} is written on the header. This only happens when the
%D current directory contains a file \filename{_iss.tex} which contains string
%D like \quotation{TPJ 2006 No 04, 2006-11-15}. This step is usually taken in
%D the final production of the article. If this file is absent, \quotation{For
%D submission to the PracTeX Journal} is written instead. The next macros are
%D used to parse this file.

\let\TPJissue\empty

\def\pa...@iss TPJ #1 No #2, #3-#4-...@nil%
  {\!!counta#2\relax
  \edef\TPJissue{\TPJ, #1, No.\,\the\!!counta}}

%D Read the \filename{_iss.tex} file, if present to determine the current
%D issue.

\immediate\openin\scratchread _iss.tex
\ifeof\scratchread\else
  \read \scratchread to \!!stringa
  \expandafter\pa...@iss\!!stringa\@nil
\fi
\immediate\closein\scratchread

\protect

\stopmodule

\doifnotmode{demo}{\endinput}

\usemodule[pracjourn]

\setvariables
  [pracjourn]
  [title=\PRACTEX\ Article in \CONTEXT,
  author=Aditya Mahajan,
 address={Ann Arbor,\\ Michigan, USA.},
revision={y=2006,m=11,d=14},
   copyright={Copyright \copyright\ 2006 Aditya Mahajan.}
  ]

\useURL[website][http://www.eecs.umich.edu/~adityam]
\useURL[email][mailto:adit...@umich.edu][][adityam@umich.edu]

%D If any of the above information is not provided, the corresponding entry
%D will not apprear in the title.

\startbuffer[abstract]
Write abstract here
\stopbuffer

\starttext

Re: [NTG-context] How to show footer only with chapter head

2009-11-25 Thread Willi Egger

Hi Elliot,

Please look into the big ConTeXt manual on page 81:

Suppose that a default setup looks like this:
   \setupheadertexts[pagenumber]
   \setupfootertexts[chapter][paragraph]
At the first page of new chapters this may look not too good.  
Therefore we could state:

   \setuphead[chapter][header=empty,footer=empty]
However if we use it in this way we loose the pagenumber. A more  
adequate solution is:

   \definetext[chapter][footer][pagenumber]
with:
   \setuphead[chapter][header=high,footer=chapter,page=right]

Kind regards

Willi
On Nov 24, 2009, at 9:09 PM, Elliot Clifton wrote:


Hi,

I have page numbers and chapter headings displayed in my document's
header. The header  is suppressed on a page with a chapter head i.e.

\setuphead[chapter][header=high]

 therefore I want a footer on these pages to display the page number.
The footer should disabled on all other pages.

I've tried,

\setuphead[chapter][footer=normal]

but it overrides

\setupfooter[state=none]

everywhere, not only on chapter pages.

Any ideas?

TIA,

Elliot
__ 
_
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
__ 
_


___
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] chapter page question

2009-02-15 Thread Wolfgang Schuster


Am 14.02.2009 um 20:26 schrieb Alan Stone:

I also would like to be able to choose a different font and/or  
fontsize (\switchtobodyfont[...]), style and/or color (\color[...])  
for chapter pages' header area (margin/edge/text) and non-chapter  
pages.



You can format the text in \definetext.

\startsetups header:chapter:middle
  \startcolor[red]
  \it Chapter page
  \stopcolor
\stopsetups

\definetext[chapter][header][\setups{chapter:header:middle}]

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] chapter page question

2009-02-15 Thread Alan Stone
On Sun, Feb 15, 2009 at 11:04 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 You can format the text in \definetext.

 \startsetups header:chapter:middle
  \startcolor[red]
  \it Chapter page
  \stopcolor
 \stopsetups

 \definetext[chapter][header][\setups{chapter:header:middle}]


 Das ist ubersupercool !  :O)

Thanks,
Alan


  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] chapter page question

2009-02-14 Thread Wolfgang Schuster


Am 14.02.2009 um 12:57 schrieb Alan Stone:

What's the way to test whether a page is a (start of a new)  
chapter page ?

Didn't find it onoffline.


Why and for what do you need this information?


To put different text in the margin/edge top/header/... whether a  
page is a

chapter page or not.


\setupheadertexts[\doifoddpageelse{right page}{left page}]

\definetext[chapter][header][chapter page]

% The \definetext command works like \setup(header/footer/...)texts and
% has 3–7 arguments, the first argument is a keyword (you can use  
whatever
% you want, the second is the location of the text and all other  
arguments

% are reseved for the content.

\setuphead
  [chapter]
  [header=chapter]

\starttext
\dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] chapter page question

2009-02-14 Thread Wolfgang Schuster


Am 14.02.2009 um 14:14 schrieb Alan Stone:


\setupheadertexts[\doifoddpageelse{right page}{left page}]

\definetext[chapter][header][chapter page]

% The \definetext command works like \setup(header/footer/...)texts  
and
% has 3–7 arguments, the first argument is a keyword (you can use  
whatever
% you want, the second is the location of the text and all other  
arguments

% are reseved for the content.



from what I understand...

- the location is limited to the text header/footer = what about
margin/edge top/header/footer/bottom ?


You can place text in the header, footer and text area:

\definetext[text for header area][header][...]
\definetext[text for text area]  [text]  [...]
\definetext[text for footer area][footer][...]

\setuphead
  [...]
  [header=text for header area,
   text=text for text area,
   fotter=text for header area]

You can also control where the text in this area should appear:

\definetext[text for header area][header][...]  % centered  
text in the text column
\definetext[text for header area][header][...][...] % left and  
right text in the text column
\definetext[text for header area][header][text]  [...][...] % left and  
right text in the text column
\definetext[text for header area][header][margin][...][...] % left and  
right margin in the text column
\definetext[text for header area][header][edge]  [...][...] % left and  
right edge in the text column


- all other arguments are reserved for content = for which content  
and

where ? if i put
\definetext[chapter][header][chapter page][x1][x2][x3][x4] the  
chapter

page header is replaced by right page !?


Your setting is ignored because with all seven argument the third one
has to be either text, margin or edge.

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] chapter page question

2009-02-14 Thread Alan Stone
Ahaaa... thanks for clearing up the mist. So that makes...

\definetext[text for header/text/footer
area][header/text/footer][edge/margin/text][left][right]

What are arguments 6 and 7 for ?

Alan


On Sat, Feb 14, 2009 at 2:40 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 14.02.2009 um 14:14 schrieb Alan Stone:

  \setupheadertexts[\doifoddpageelse{right page}{left page}]

 \definetext[chapter][header][chapter page]

 % The \definetext command works like \setup(header/footer/...)texts and
 % has 3–7 arguments, the first argument is a keyword (you can use
 whatever
 % you want, the second is the location of the text and all other
 arguments
 % are reseved for the content.



 from what I understand...

 - the location is limited to the text header/footer = what about
 margin/edge top/header/footer/bottom ?


 You can place text in the header, footer and text area:

 \definetext[text for header area][header][...]
 \definetext[text for text area]  [text]  [...]
 \definetext[text for footer area][footer][...]

 \setuphead
  [...]
  [header=text for header area,
   text=text for text area,
   fotter=text for header area]

 You can also control where the text in this area should appear:

 \definetext[text for header area][header][...]  % centered text
 in the text column
 \definetext[text for header area][header][...][...] % left and
 right text in the text column
 \definetext[text for header area][header][text]  [...][...] % left and
 right text in the text column
 \definetext[text for header area][header][margin][...][...] % left and
 right margin in the text column
 \definetext[text for header area][header][edge]  [...][...] % left and
 right edge in the text column

 - all other arguments are reserved for content = for which content and
 where ? if i put
 \definetext[chapter][header][chapter page][x1][x2][x3][x4] the chapter
 page header is replaced by right page !?


 Your setting is ignored because with all seven argument the third one
 has to be either text, margin or edge.


 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] chapter page question

2009-02-14 Thread Alan Stone
So it seems, although there's also \setuptop and \setupbottom, that
definetext doesn't accept top and bottom. Any idea why that's so (samewise
for setuphead which doesn't accept top and bottom arguments either,
according to the manual) ?

Alan


On Sat, Feb 14, 2009 at 3:47 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 14.02.2009 um 15:33 schrieb Alan Stone:

 Ahaaa... thanks for clearing up the mist. So that makes...

 \definetext[text for header/text/footer
 area][header/text/footer][edge/margin/text][left][right]

 What are arguments 6 and 7 for ?


 To set different texts for left pages. Seldom needed because in
 a doublesided document a chapter start normally at a right page.


 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] chapter page question

2009-02-14 Thread Alan Stone
The underneath example works with
\def\myHeader{\iftuut chapter\else high\fi}

How do you make it work with\def\myHeader{\doifmodelse{a}{chapter}{high}} ?
( without resorting to \doifmodeelse{a}{\tuuttrue}{\tuutfalse} )

\showframe

\newif\iftuut
%\tuuttrue
\tuutfalse

\setuppagenumbering[location=footer]

\setupheadertexts[\doifoddpageelse{right page}{left page}]

\definetext[chapter][header][chapter page]

\def\myHeader{\doifmodelse{a}{chapter}{high}}
%\def\myHeader{\iftuut chapter\else high\fi}

\setuphead
 [chapter]
% [header=chapter]
% [header=high]
 [header=\myHeader]

\starttext
\dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\input knuth\par}}
\stoptext

---

 ! Undefined control sequence.
\myHeader -\doifmodelse
 {a}{chapter}{high}
\doifvaluesomething ...inga {\csname #1\endcsname
  }\ifx \!!stringa \empty
\e...
argument ...ething {\??ko \v!chapter \c!header }
   {\setuplayouttext
[\v!hea...
\firstoftwoarguments #1#2-#1

argument ...BB {\v!chapter }\v!header \c!header
  \dohandlepagebreakBB
{\v!c...
\firstofoneargument #1-#1

...
l.23 ...apter #1}\dorecurse{20}{\input knuth\par}}

---

Alan
___
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] chapter page question

2009-02-14 Thread Alan Stone
I also would like to be able to choose a different font and/or fontsize
(\switchtobodyfont[...]), style and/or color (\color[...]) for chapter
pages' header area (margin/edge/text) and non-chapter pages.

Hence, I guess... back to my initial question.

Alan

On Sat, Feb 14, 2009 at 1:23 PM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 14.02.2009 um 12:57 schrieb Alan Stone:

  What's the way to test whether a page is a (start of a new) chapter page
 ?
 Didn't find it onoffline.


 Why and for what do you need this information?


 To put different text in the margin/edge top/header/... whether a page is
 a
 chapter page or not.


 \setupheadertexts[\doifoddpageelse{right page}{left page}]

 \definetext[chapter][header][chapter page]

 % The \definetext command works like \setup(header/footer/...)texts and
 % has 3–7 arguments, the first argument is a keyword (you can use whatever
 % you want, the second is the location of the text and all other arguments
 % are reseved for the content.

 \setuphead
  [chapter]
  [header=chapter]

 \starttext
 \dorecurse{2}{\chapter{Chapter #1}\dorecurse{20}{\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] columnset running into footer when using \setupheader[state=high]

2008-11-26 Thread Jelle Huisman
Jelle Huisman wrote:
 % columnset running into footer area
 \definelayout[1][]
 \setupheader[state=high]
 \definetext[footerpagenumber][footer][pagenumber]
 \setuphead[chapter][page=yes,header=high,footer=footerpagenumber,number=no,align=middle]
 \definecolumnset[columnl][n=2]
 \showgrid \showframe
 \starttext
 \chapter{One}
 \startcolumnset[column]
 \dorecurse{10}{\input knuth}
 \stopcolumnset
 \stoptext

 Looking in the mail archive it looks like this is an old problem (see: 
 http://archive.contextgarden.net/message/20060516.092742.d455b795.en.html 
 ) but I'm wondering about a solution. Any thoughts?

One way around this is to use \setupcolumnsetlines[][][] to balance the 
columns. With a 1200 page publication: no fun.

Jelle
___
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
___


[NTG-context] columnset running into footer when using \setupheader[state=high]

2008-11-25 Thread Jelle Huisman
Hi all,

I have a fairly standard setup with the usual code to move the 
pagenumber to the footer on the first page of the chapter. This works 
fine, except when I place the text in a columnset, in which case the 
columnset on page 2 (and all following pages) runs into the footer area. 
I'm fairly certain that \setupheader[state=high] interferes with way 
columnset counts the number of lines it can fit into each column, 
resulting in columns that run into the footer area. This code shows the 
problem:

% columnset running into footer area
\definelayout[1][]
\setupheader[state=high]
\definetext[footerpagenumber][footer][pagenumber]
\setuphead[chapter][page=yes,header=high,footer=footerpagenumber,number=no,align=middle]
\definecolumnset[columnl][n=2]
\showgrid \showframe
\starttext
\chapter{One}
\startcolumnset[column]
\dorecurse{10}{\input knuth}
\stopcolumnset
\stoptext

Looking in the mail archive it looks like this is an old problem (see: 
http://archive.contextgarden.net/message/20060516.092742.d455b795.en.html 
) but I'm wondering about a solution. Any thoughts?

Thanks.

Jelle
___
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
___


[NTG-context] picture before \chapter breaking \header \footer setup

2008-10-23 Thread Jelle Huisman
Hi all,

Another question, this time about \headers and \footers. On the first 
page of the chapter I have the page number in the footer and on all 
other pages they are in the header. This works fine, as expected. 
However I have to include an \externalfigure *before* the \chapter 
command and I discovered that I have to use \startcombination because 
otherwise the \chapter moves to the next page. However, when I use 
\startcombination ... etc \chapter is not longer the first thing on the 
page and the special header/footer setup is not triggered (apparently 
\chapter has to come first for that to happen). See sample code:

% sample
\definetext[mychapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=mychapter]
\showframe
\starttext

%\startcombination[1*1]{\externalfigure}{ % uncomment to see problem
\chapter{first}
%}\stopcombination % uncomment to see problem

\dorecurse{20}{\input tufte \relax}
\chapter{second} \dorecurse{20}{\input tufte \relax} % this works as 
expected
\stoptext
% sample

Is it possible to make this work? (maybe an extra \chapter command 
before the combination that triggers the header-footer setup, but that 
is not printed after all?)

Thanks for any help.

Jelle
___
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] picture before \chapter breaking \header \footer setup

2008-10-23 Thread Aditya Mahajan
On Thu, 23 Oct 2008, Jelle Huisman wrote:

 Hi all,

 Another question, this time about \headers and \footers. On the first
 page of the chapter I have the page number in the footer and on all
 other pages they are in the header. This works fine, as expected.
 However I have to include an \externalfigure *before* the \chapter
 command and I discovered that I have to use \startcombination because
 otherwise the \chapter moves to the next page. However, when I use
 \startcombination ... etc \chapter is not longer the first thing on the
 page and the special header/footer setup is not triggered (apparently
 \chapter has to come first for that to happen). See sample code:

You can try to play around with \setuphead[chapter][command=\something] 
and make sure that \something puts a figure where you want. You will need 
to specify the figure by other mechanism (define a command, pass two 
arguments trough one argument, etc).

Aditya

 % sample
 \definetext[mychapter][footer][pagenumber]
 \setuphead[chapter][header=high,footer=mychapter]
 \showframe
 \starttext

 %\startcombination[1*1]{\externalfigure}{ % uncomment to see problem
 \chapter{first}
 %}\stopcombination % uncomment to see problem

 \dorecurse{20}{\input tufte \relax}
 \chapter{second} \dorecurse{20}{\input tufte \relax} % this works as
 expected
 \stoptext
 % sample

 Is it possible to make this work? (maybe an extra \chapter command
 before the combination that triggers the header-footer setup, but that
 is not printed after all?)

 Thanks for any help.

 Jelle
 ___
 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
 ___



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


[NTG-context] error message

2008-09-03 Thread Alan Bowen
I am trying to process a file using the ConTeXt minimals and MK II  
that now complains:

.
.
.
{/Users/alancbowen/Library/texmf/fonts/map/pdftex/context/tasgreek.map}
! Argument of \next has an extra }.
inserted text
\par
to be read again
   }
argument ...{,\CCC:4:124 \CCC:4:126 \CCC:4:124 }
  \hskip \datesignal  
\def \b...


\p!compareprocessaction ...commalistelement {#3}#2
  \fi \fi
\next2 #1,-\p!doprocessaction {#1}
   \doprocesscommaitem
\processnextcommalist ...odoprocesscommaitem #4#5,
  ]\relax \global  
\advance \...

...
l.29 F
  inally, I have supplied extensive footnotes and comments  
explicating t...


I have tried various things to locate the error but without success.  
Can anyone tell me what this error message means and where I should  
look to solve the problem?


I do have

\definetext[ArticleTitlePage][footer]
[\tfx\AuthorName\hfill\currentdate\hfill{\tf 1}]

in my environment file, but this seems to be OK.

Many thanks in  advance.

Alan___
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] headers and pagenumbering

2008-05-02 Thread Wolfgang Schuster
On Wed, 30 Apr 2008 17:28:09 +0200
Henning Hraban Ramm [EMAIL PROTECTED] wrote:

 Hello again,
 just trying to understand some remaining issues with my latest project.

[long example]

 (1) % or 0? ;-)
 I struggled how to leave out the pagina on the ToC page, no setups  
 seemed to work.
 I just reckognized that I need the \page inside of the braced area.

I will use a simple example ti explain where you need to insert a
pagebreak to get the desired output.

You have short document with two pages and the header on the first page
should be empty, let's us try the following code.

\starttext
\setupheader[state=stop]
\input knuth
\setupheader[state=start]
\page
\input knuth
\stoptext

The first \setupheader disables the header for the document, to enable
it for the second page we write another \setupheader before our \page
the command. If you take a look at the output this is not what we
wanted because there is also a pagenumber on the first.

Let's try us again with a slightly modified example.

\starttext
\setupheader[state=stop]
\input knuth
\page
\setupheader[state=start]
\input knuth
\stoptext

We moved now the \page command before the second \setupheader settings
and voila, there is no pagenumber on the first page, but why is it
important to move the \page command before the \setupheader setting.

THis is very simple, TeX makes the decision to put a header/ footer on
the when it shippes out a page which will happen either with a full
page or with a manual \page command. In our first example the last
value for the header was to enable it because the headervalue was start
before the page was shipped out while in the second example the value
was stop and we enable the header *after* the page was shipped out.

 (3)
 One can hide the page number with location=, but the header on  
 the first page of a chapter with header=high. Is there any logic  
 behind that?

I will give you a answer to this questions before the second one
because it makes more sense to answer both in this order.

The pagenumber could be hidden with the location keyon all pages in the
document, it is a global value whereas the header value for
\setupheader disables it only on the current page, it is a local value.

You could use the header key to format the header on footer lines on
part/chapter/... pages than the rest of your document, e.g. the
complete document has the pagenumber at the right side in the header
but you want it on the chapter page in the middle of the bottom etc.

 (2)
 How can I leave out the chapter header on the first page of a  
 chapter, but keep the page number? (Probably simple?)

You could define individual headers for part/chapter/... pages with
\definetext, I will show here Hans example from page-txt.

The command has nearly the same syntax as \setupheadertexts and
\setupfootertexts but the first argument is a identifier you use in
\setupheader for the header or footer key and the second argument is
for the position of the text.

 \starttyping
\definetext[chapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=chapter]
\setupheadertexts[pagenumber]
\setupfootertexts[left][right]
\chapter{eerste} \dorecurse{20}{\input tufte \relax}
\chapter{tweede} \dorecurse{20}{\input tufte \relax}
\stoptyping

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] ConTeXt-ifying Kile

2008-01-02 Thread Matija Šuklje
]
\definetabulate[name][name][text]
\definetext[name][position][text][text][text]
# \definetextbackground
\definetextposition[name][settings]
# \definetextvariable[settings][???][???]
\definetype[name][settings]
# \definetypeface
\definetyping[file|typing|name][settings]
\defineversion[name][numbers]
# \defineXMLargument
# \defineXMLcommand
# \defineXMLenvironment
# \defineXMLenvironmentsave
# \defineXMLgrouped
# \defineXMLgsave
# \defineXMLgstore
# \defineXMLignore
# \defineXMLnested
# \defineXMLpickup
# \defineXMLprocess
# \defineXMLsave
# \defineXMLsavecontent
# \defineXMLsingular
# \defineXMLstore
# \defXMLstring
\description{text}text
\determineheadnumber[section]
\determinelistcharacteristics[names][settings]
# \digits
\disableinteractionmenu[position|name][references]
# \disablemode
# \doglobal
# \dogotopar
# \doif
# \doifcommon
# \doifcommonelse
# \doifdefined
# \doifdefinedelse
# \doifelse
# \doifelsenothing
# \doifelsevalue
# \doiffieldelse
# \doifflagged
# \doifinset
# \doifinsetelse
# \doifmode
# \doifmodeelse
# \doifnextcharelse
# \doifnot
# \doifnotcommon
# \doifnotflagged
# \doifnothing
# \doifnotinsetelse
# \doifnotmode
# \doifnotvalue
# \doifsomething
# \doiftext
# \doiftextelse
# \doifundefined
# \doifundefinedelse
# \doifvalue
# \doifXMLdata
# \doifXMLdataelse
# \doifXMLop
# \doifXMLparelse
# \doloop
# \donothing
# \dontleavehmode
\donttest
# \dorecurse
# \dostepwiserecurse
# \dowithnextbox
# \dowithnextboxcontent
# \empty
\emptylines[number]
# \emptytoks
# \enablemode
# \endstrut
\enumeration
# \environment
# \EQ
# \eTABLE
# \eTABLEbody
# \eTABLEfoot
# \eTABLEhead
# \eTABLEnext
# \eTD
# \eTH
# \eTR
# \exitloop
# \expanded
\externalfigure[file][settings]
\field[name]
\fieldstack[name][names][settings]
\fillinfield[text]{text}
\fillinline[settings]
\fillinrules[settings]{text}{text}
\fillintext[settings]{text}{text}
\fitfield[name]
\fixedspaces
# \FLOWchart
# \flushcollector
# \flushlayer
# \flushXMLelement
\followprofile{text}[text]
\followprofileversion{text}[text][text]
\followversion{text}[text]
\footnote[reference]{text}
\footnotetext[reference]{text}
\forceblocks[names][names]
# \forgetall
# \FR
\fraction{text}{text}
\framed[settings]{text}
\framedtext[settings]
\from[reference]
\getbuffer[name]
# \getfiguredimensionsonly
# \getmarking[name][options]
# \getvalue
# \getvariable
# \globalletvalue
\godown[dimension]
\goto{text}{text}[references]
\gotobox{text}[references]
\graycolor[text]
\grid[options]
# \gsaveXMLasdata
\hairline
\head[references]
\headnumber[section]
\headtext{text}
# \hfilll
\hideblocks[names][names]
\high{text}
# \HL
\hl[number]
# \hpos
# \hspace
# \ifconditional
# \ifdefined
# \iftrialtypesetting
# \ifundefined
\in{text}{text}[reference]
# \includeFLOWchart
# \includemenu
# \increment
\indentation
\indenting[options]
\inframed[settings]{text}
\ininner[+|-|low][reference]{text}
\inleft[+|-|low][reference]{text}
\inline[reference]
\inmargin[+|-|low][reference]{text}
\inothermargin[+|-|low][reference]{text}
\inouter[+|-|low][reference]{text}
\inright[+|-|low][reference]{text}
\installlanguage[name][options]
\interactionbar[settings]
\interactionbuttons[settings][names]
\item[references]
\items[settings]{text}
\its[references]
\keepblocks[names][all|names]
\labeling[reference]
\labels[name]
\labeltext{text}
\language[language code]
\leftaligned{text}
# \letgvalue
# \letvalue
\listsymbol[name]{text}
# \loadmapfile
\loadsorts
\loadsynonyms
# \localhsize
\logfields
\lohi[low]{text}{text}
\low{text}
# \LR
\mainlanguage[language code]
\mar[references]{text}
\marginrule[number]{text}
\margintext[+|-|low][reference]{text}
\marking[name]{text}
\markversion
\mathematics{text}
\mediaeval{text}
\midaligned{text}
\mirror{text}
\MONTH{text}
\month{text}
\moveongrid[options]
# \MR
\name{text}
# \NC
# \newcounter
# \nextbox
\nextsection
\nocap{text}
\noheaderandfooterlines
\noindenting
\nolist{text}
\nomarking{text}
\nomoreblocks
\nomorefiles
\nop
\nospace
\note[reference]
\notopandbottomlines
\nowhitespace
# \NR
\numbers{text}
\overbar{text}
\overbars{text text}
# \overlaybutton
# \overlayfigure
\overstrike{text}
\overstrikes{text text}
\packed
\page[options]
\pagereference[reference]
\pagetype[name]
\paragraph
\part[references]{text}
\periods[number]
\placebookmarks[names][names|all]
\placecombinedlist[name][settings]
\placecombinedlist[name][settings]
# \placefigure
\placefloat[options][references]{text}{text}
\placefootnotes[settings]
\placeformula[references]{text}$$ $$
# \placelayer
\placelegend{text}{text}
\placelist[names][settings]
\placelistoffloats
\placelistofsorts
\placelistofsynonyms
\placelocalfootnotes[settings]
\placelogos[names]
\placeongrid[settings{text}
\placeontopofeachother{text}{text}
\placereferencelist[names]
\placeregister[name][settings]
\placeregister[settings]
\placerule[name]
\placesidebyside{text}{text}
\placesubformula[references]{text}$$ $$
\placetextvariable[name]
# \plusone
# \plustwo
\position(numbers){text}
\positiontext[name]{text}
# \prependtoks

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


[NTG-context] Problem with setuphead and textstyle or numberstyle

2007-05-27 Thread Tim Stone
I'm trying out the chapter heading method used in In the Details in  
chapter 7.  I'm using exactly (I think) the code from the booklet  
(except that instead of \BigText and \BigNumber I'm using  
{\definedfont[Sans sa x]}.
The style parameter to \setuphead works but neither textstyle nor  
numberstyle has any effect on the result.
I've included the code I'm using below and would be most grateful to  
know what daft error I've made and can't spot.

Many thanks,
Tim Stone

=Code snippet below 

\setuphead
[chapter]
[placehead=empty,
header=chapter,
style={\definedfont[SansText sa 3]}, %% This is the only one that is  
working - if removed, reverts to normal sized Serif
textstyle={\definedfont[SansText sa 4]}, %% This isn't working - FIX ME
numberstyle={\definedfont[SansText sa 5]}] %% This isn't working -  
FIX ME
\definetext
[chapter]
[header]
[\setups{chapter}]
[]
\startsetups chapter
\setups[chapter:title]
\setups[chapter:number]
\setups[chapter:finish]
\stopsetups
\definelayer
[chapter]
[width=\dimexpr(\makeupwidth+\cutspace),
height=\headerheight]
\startsetups chapter:title
\setlayerframed
[chapter]
[x=\dimexpr(\makeupwidth+\cutspace), location={left,bottom}]
[height=\headerheight,
foregroundcolor=white,
background=color,
backgroundcolor=darkblue,
frame=off,
offset=none,
align={right,lohi}]
{\hbox spread 0.5\cutspace
{\hss
\doiftextelse{\placeheadtext[chapter]}%
{\placeheadtext[chapter]}%
{\placeheadtext[title]}%
\hss} \space
\vskip .5cm}
\stopsetups
\startsetups chapter:number
\setlayerframed
[chapter]
[x=\dimexpr(\makeupwidth+\cutspace),
y=\vsize,
location={left,bottom}]
[width=\dimexpr(\cutspace-\rightmargindistance),
height=\dimexpr(\cutspace-\rightmargindistance),
foregroundcolor=blue,
background=color,
backgroundcolor=yellow,
frame=off,
offset=none,
align={middle,lohi}]
{\hbox to \hsize
{\hss
\doifmode{*bodypart}{
\placeheadnumber[chapter]
}%
\hss}
}
\stopsetups
\startsetups chapter:finish
\framed
[width=\makeupwidth,
height=\headerheight,
background=chapter,
frame=off]
{}
\stopsetups

___
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] Header height multipage Text.

2007-05-25 Thread Hans Hagen
iscope GmbH // Oliver Siegemund wrote:
 hi,

 we have a dokument with a multipage Text. For this dokument we set a
 firstpage Header and a header for all following Pages. This Headers had
 different heights.

 The problem is, the height off the text. It is at all pages the same, so
 on the second Page and all following the Text is placed higher but it
 does not fill the Page till footerheight. We've tried setting the
 textheight in the second Header bigger but without effects.

 An Example ist attached.

 Can someone help us?
   

cleaned up code (not the design, which need some cleanup too)

\enableregime[utf]

\mainlanguage[de]

\setupencoding
  [default=texnansi]

\setuplayout[
  width=16.5cm,
  header=3.6cm,
  height=middle,
  topspace=2cm,
  footer=0mm,
  bottomspace=2.63cm]

\setuppagenumbering
  [state=stop]

\definecolor[myblack][s=.4]

\startuseMPgraphic{mycircle}
  draw fullcircle scaled 20.2mm withcolor \MPcolor{myblack} ;
  draw fullcircle scaled  8.6mm withcolor \MPcolor{myblack} ;
\stopuseMPgraphic

\startsetups[commonpage]
\framed
  [height=\headerheight,
   width=6.22cm,
   frame=off,
   offset=none,
   frameoffset=0mm]
  {}
\framed
  [height=\headerheight,
   width=21.4mm,
   frame=off,
   foregroundcolor=myblack,
   offset=none,
   frameoffset=0mm,
   align=right]
   {\useMPgraphic{mycircle}}
\stopsetups

\startsetups[firstpage]

\hbox \bgroup
\setups{commonpage}
\framed
  [height=\headerheight,
   width=68mm,
   frame=off,
   foregroundcolor=myblack,
   offset=0pt,
   align=left]
  {\starttabulate[|l w(3.2cm) |  r  w(3.3cm) |]
   \NC Teststreet 50 \NC 12345 Testcity  \NR
   \NC telefon 12345 \NC telefax 12345-12 \NC \NR
   \stoptabulate
   \starttabulate[|l w(2cm)| r w(4.5cm) |]
   \NC mail: \hfill \NC [EMAIL PROTECTED] \NC \NR
   \NC netz: \hfill \NC www.test-test-test.de \NC \NR
   \stoptabulate
   \startalignment[right]
Ausdruck des Webseitenbereiches:
   \stopalignment
   \starttabulate[| l w(2cm) | r w(4.5cm) |]
   \NC 1.Eingelogged: \NC Testperson \NC \NR
   \NC Ausgabedatum: \NC 14.06.2007 \NC \NR
   \stoptabulate
   Seite {\pagenumber} von {\lastpagenumber}}
\egroup

\stopsetups

\startsetups allpage

\hbox \bgroup
   \setups{commonpage}
   \framed
 [height=\headerheight,
  width=6.8cm,
  frame=off,
  foregroundcolor=myblack,
  offset=0pt,
  align=left]
 {\starttabulate[|l w(2cm) | r w(4.5cm) |]
\NC \NC{\bf geographische Verteilung}\NR
\NC \NC Testperson\NR
\NC \NC 14.06.2007\NR
\NC \NC Seite {\pagenumber} von {\lastpagenumber}\NR
  \stoptabulate}%
   \egroup

\stopsetups

\definelayout [1] [header=6.16cm]
\definelayout [2] [header=3.6cm]

\definetext
  [1]
  [header]
  [\setups{firstpage}][]
  [][\setups{allpage}]

\setupheadertexts
  [\setups{allpage}][]
  [][\setups{allpage}]

\setupheader[state=1]

\showframe

\starttext

\dorecurse{20}{\input tufte \relax}

\stoptext


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


[NTG-context] Underline the headertext with a thinrule

2007-05-13 Thread Bert Trüger

Hi again,

luigi, thanks for your tips. I simply want to put a \thinrule
underneath the headertext in textwidth. My setup is:

\setupheadertexts[chapter][\pagenumber][section][\pagenumber]
\setupheader[after=\thinrule]
\setuphead[subsubsection][number=no,alternative=text,indenttext=yes,textstyle=bold]
\definetext[chapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=chapter,page=yes]
\setuphead[blank][state=empty]

This way I get a \thinrule starting in the left margin in textwidth
under an odd page. I would like the headertext with chapter and
pagenumber underlined with \thinrule on every odd page, except it
is blank or the beginning of a new chapter, and the same with
section and pagenumber in the header for every even page, except it
is blank or the beginning of a new chapter -- a simple underlined
headtext like in many books.

Thanks for your help

Bert
___
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] Some questions about context

2007-03-05 Thread Wolfgang Schuster
\definetext
%  {\doseventupleempty\dodefinetext}

\def\presettext
  {\doquintupleempty\dopresettext}

%\def\dodefinetext[#1][#2][#3][#4][#5][#6][#7]%
%  {\ifseventhargument
% \setvalue{\??tk#2#3#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4][#5][#6][#7]}%
%   \else\ifsixthargument
% \setvalue{\??tk  #2#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4][#5][#6]}%
%   \else\iffifthargument
% \setvalue{\??tk#2#3#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4][#5]}%
%   \else\iffourthargument
% \setvalue{\??tk  #2#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4]}%
%   \else
% \setvalue{\??tk  #2#1}{\dosixtupleempty\dosetuptexts[#2][#3]}%
%   \fi\fi\fi\fi}

\def\dopresettext[#1][#2][#3][#4][#5]%
  {\iffifthargument
 \setvalue{\??tk#2#3#1}{\doquadrupleempty\dosetextendedtexts[#2][#3][#4][#5]}%
   \else\iffourthargument
 \setvalue{\??tk  #2#1}{\doquadrupleempty\dosetextendedtexts[#2][#3][#4]}%
   \else
 \setvalue{\??tk  #2#1}{\doquadrupleempty\dosetextendedtexts[#2][#3]}%
   \fi\fi}

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


Re: [NTG-context] Some questions about context

2007-03-05 Thread Xan
%
 {\placetextlinestrut{#1}% here !
  \doifelsemarking\ascii
{\dolimitatetexts{#1#2#5}{\getmarking[\ascii][\v!first]}}
{\doifelse\v!pagenumber{#6}
\@@plaatspaginanummer
   {\doifelse\v!date{#6}
  {\currentdate}
  {\opeenregel\dolimitatetexts{#1#2#5}{#6{}{}{}}}%
   \egroup}
 
 %\def\dodoubletexts#1#2#3#4#5#6%
 %  {\doifoddpageelse
 % {\dosingletexts{#1}{#2}#3{#4}}  % #3 = provides three arguments
 % {\dosingletexts{#1}{#2}#5{#6}}} % #5 = provides three arguments
 
 [EMAIL PROTECTED]
   {\doifoddpageelse
  [EMAIL PROTECTED]  % #3 = provides three arguments
  [EMAIL PROTECTED] % #5 = provides three arguments
 
 %D \macros{presettext}
 %D
 %D The next example demonstrates how we can use this
 %D mechanism to provide page (event) dependent text lines.
 %D
 %D \starttyping
 %D \presettext[chapter][footer][middle=pagenumber]
 %D \setuphead[chapter][header=high,footer=chapter]
 %D \setheadertexts[middle=pagenumber]
 %D \setfootertexts[left=left,right=right]
 %D \chapter{eerste} \dorecurse{20}{\input tufte \relax}
 %D \chapter{tweede} \dorecurse{20}{\input tufte \relax}
 %D \stoptyping
 
 %\def\definetext
 %  {\doseventupleempty\dodefinetext}
 
 \def\presettext
   {\doquintupleempty\dopresettext}
 
 %\def\dodefinetext[#1][#2][#3][#4][#5][#6][#7]%
 %  {\ifseventhargument
 % 
 \setvalue{\??tk#2#3#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4][#5][#6][#7]}%
 %   \else\ifsixthargument
 % \setvalue{\??tk  
 #2#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4][#5][#6]}%
 %   \else\iffifthargument
 % \setvalue{\??tk#2#3#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4][#5]}%
 %   \else\iffourthargument
 % \setvalue{\??tk  #2#1}{\dosixtupleempty\dosetuptexts[#2][#3][#4]}%
 %   \else
 % \setvalue{\??tk  #2#1}{\dosixtupleempty\dosetuptexts[#2][#3]}%
 %   \fi\fi\fi\fi}
 
 \def\dopresettext[#1][#2][#3][#4][#5]%
   {\iffifthargument
  
 \setvalue{\??tk#2#3#1}{\doquadrupleempty\dosetextendedtexts[#2][#3][#4][#5]}%
\else\iffourthargument
  \setvalue{\??tk  #2#1}{\doquadrupleempty\dosetextendedtexts[#2][#3][#4]}%
\else
  \setvalue{\??tk  #2#1}{\doquadrupleempty\dosetextendedtexts[#2][#3]}%
\fi\fi}
 
 \protect \endinput
 
 
 
 
 ___
 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] Page number on 'chapter' pages

2007-02-01 Thread Confused Scientist

Hi all,
I'm using ConTeXt to layout my phd thesis and I need to follow some rather
strict rules.  One of these is that every page must be numbered.  I'm having
some trouble adding numbers to the page where the chapter starts and the
preceding page (where I place a famous quotation).  Below are the
definitions in my environment.

Any ideas on how to add page numbers to these pages?

Thanks,
Dave

%%% cut

\setuppagenumbering[
 alternative=doublesided,
 style={\sc},
 location={footer, marginedge},
 partnumber=no,
 way=bytext]

%%% Formal title, Chapter #: Title
\definetext[chapter][footer][pagenumber]

\setuphead
 [chapter]
 [command=\MyChapterText,
  style={\switchtobodyfont[UtopiaTitling, 16pt]\sc},
  placehead=yes,
  color=black,
  number=yes,
  continue=no,
  distance=0pt,
  page=,
  header=nomarking,
  footer=chapter,
  distance=0pt,
  before=\setups{chapter:before}]

\def\MyChapterText#1#2%
 {\vbox to 35mm
   \bgroup{\leftaligned{\vbox{\headtext{chapter} #1\blank#2}}}\vss\egroup}
\setupheadtext[chapter=Chapter]

\startsetups [chapter:before]
 \page[left]
 \noheaderandfooterlines
 \vbox to 35mm{}
 \vbox{\blank
 \startalignment[left,nothyphenated]
   \noindent \setups[chapter:quote]
 \stopalignment}
 \resetsetups[quote:text]
 \page[right]
 \noheaderandfooterlines
\stopsetups

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


[NTG-context] Empty last page, broken markings ??

2006-08-23 Thread WN




Hello,

The last page in my documents is always empty. The document is
setup as singlesided via

\setuppagenumbering[location=,alternative=singlesided,way=bytext,partnumber=no]

On http://wiki.contextgarden.net/Empty_page_at_the_end
a workaround is
given, by using
\setupsectionblock[frontpart][page=no]
\setupsectionblock[bodypart][page=no]
\setupsectionblock[appendix][page=no]
\setupsectionblock[backpart][page=no]

In my environment I only use :
\setupsectionblock[bodypart][page=no] 

This eliminates the empty page at the end of my document, however the
chapter and section markers in the page headers/footers for the last couple of pages are not working anymore.
I use the following setup

% reset footer texts
\setupfootertexts[]

%
% First page of chapter has a footer, no header
%
\definetext[chapterfooter][footer][{{\blue\pagenumber} \hfill Hoofdstuk \getmarking[chapternumber]} ]
\setuphead[chapter][footer=chapterfooter,header=empty]

%
% All other pages have a header, no footer
%
\setupheadertexts[\setups{texta}][][][\setups{textb}]
\startsetups[texta]
 \inframed[frame=off,framecolor=black,rulethickness=0.8pt,bottomframe=on,width=\textwidth]{ {\blue\pagenumber}
  \hfill
  \getmarking[chapter]
  \hfill
  Hoofdstuk \getmarking[chapternumber]}
\stopsetups
\startsetups[textb]
\inframed[frame=off,framecolor=black,rulethickness=0.8pt,bottomframe=on,width=\textwidth]{ {\blue\getmarking[sectionnumber]}
  \hfill
  \getmarking[section]
  \hfill
  {\blue\pagenumber}}
\stopsetups

I use a couple of environment files which all define several things, title page, Table of contents,
Table of Figures, page layout, page numbering, headers/footers etc. I could attach all of them,
but I think the above settings are the one's that matter. I am not sure how to proceed to provide
the correct but minimal information. I tried to put everything in a test file, but I was not successful.

I tried to attach the last three pages of my document, which demostrates the problem
but I exceeded the 40 KB. Is there another way of uploading documents 
which are more than 40 KB in size ?

Any help is appreciated

Kind regards
Wim Neimeijer








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


[NTG-context] Extra pages

2006-08-06 Thread David Arnold
All,

Can anyone explain why the output of this source has two blank pages  
at the end?

\setupwhitespace[medium]
\setupindenting[medium,yes]

\setupcolors[state=start]

\setuppagenumbering
[state=start,
   alternative=doublesided,
   location=,
   way=bytext]

\definetext[chapter][footer][pagenumber]

\setuphead
[chapter]
[alternative=inmargin,
   header=high,
   footer=chapter,
   page=right]

\setuphead
[section]
[style=\tfc,
   page=right,
   continue=no,
   alternative=inmargin]

\setuphead
[subsection]
[style=\tfb\sl,
   number=no]

\definehead
[TocHead]
[section]
\setuphead
[TocHead]
[number=no,
   incrementnumber=no,
   page=no]
\definehead
[IndexHead]
[section]
\setuphead
[IndexHead]
[number=no,
   incrementnumber=no,
   page=yes]

\def\Tindex#1{\index{#1}#1}

\def\OddPageHeader{\bold{\pagenumber}\hskip 1em Chapter \headnumber 
[chapter] \getmarking[chapter][current]}

\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}}
\def\headerskip{\hskip 1em}

\setupheadertexts
[][\headermarkright]%odd page on right
[\headermarkleft][]%even page on left
\setuplist
[section]
[style=bold,
   color=red,
   alternative=c]
\setuplist
[subsection]
[alternative=b]


\starttext

\startbodymatter

\chapter{A Practice Chapter}

\input knuth

\TocHead{Table of Contents}

\placecontent

\section{First Section}

Now is the \Tindex{time} for all good men to come to the aid of their  
country. Now is the time for all good men to come to the aid of their  
country. Now is the time for all good men to come to the aid of their  
country. Now is the time for all good men to come to the aid of their  
country. Now is the time for all good men to come to the aid of their  
country. Now is the time for all good men to come to the aid of their  
country. Now is the time for all good men to come to the aid of their  
country.

Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.

Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.  
Now is the time for all good men to come to the aid of their country.

\subsection{First Subsection}

\dorecurse{3}{\input knuth \par}



\section{Second Section}

\dorecurse{3}{\input knuth \par}

\subsection{Second Subection}

\dorecurse{3}{\input knuth \par}


\section{Third Section}

\dorecurse{3}{\input knuth \par}

\subsection{Third Subection}

\dorecurse{3}{\input knuth \par}

\stopbodymatter

\startbackmatter

\completeindex

\stopbackmatter

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


[NTG-context] How to get rid of header

2006-08-05 Thread David Arnold
All, how do I get rid of the header on the second page of output?

\setupwhitespace[medium]
\setupindenting[medium,yes]

\setupcolors[state=start]

\setuppagenumbering
[state=start,
   alternative=doublesided,
   location=,
   way=bytext]

\definetext[chapter][footer][pagenumber]

\setuphead
[chapter]
[alternative=inmargin,
   header=high,
   footer=chapter,
   page=right]

\setuphead
[section]
[style=\tfc,
   page=right,
   continue=no,
   alternative=inmargin]

\setuphead
[subsection]
[style=\tfb\sl,
   number=no]

\definehead
[toc]
[section]
\setuphead
[toc]
[number=no,
   incrementnumber=no,
   page=no]
\def\OddPageHeader{\bold{\pagenumber}\hskip 1em Chapter \headnumber 
[chapter] \getmarking[chapter][current]}

\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}}
\def\headerskip{\hskip 1em}

\setupheadertexts
[][\headermarkright]%odd page on right
[\headermarkleft][]%even page on left
\setuplist
[section]
[style=bold,
   color=red,
   alternative=c]
\setuplist
[subsection]
[alternative=b]
\starttext

\chapter{A Practice Chapter}

\input knuth

\toc{Table of Contents}

\placecontent

\section{First Section}

\dorecurse{3}{\input knuth \par}

\subsection{First Subsection}

\dorecurse{3}{\input knuth \par}



\section{Second Section}

\dorecurse{3}{\input knuth \par}

\subsection{Second Subection}

\dorecurse{3}{\input knuth \par}


\section{Third Section}

\dorecurse{3}{\input knuth \par}

\subsection{Third Subection}

\dorecurse{3}{\input knuth \par}


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


Re: [NTG-context] Conflict with chapter definition and header

2006-08-03 Thread Confused Scientist
Thanks Taco.This is certainly closer to what I'm trying to do, but I still have a problem with the chapter names missing from the header of every odd/left page. Below is how I setup the headers:\setupheadertexts

 [] % even left
 [section] % even right
 [chapter] % odd left
 [] % odd rightAny ideas?Thanks,James-- example --%%% Layout\setuppagenumbering[ alternative=doublesided, style={\sc}, location={footer, marginedge}, partnumber=no,
 way=bytext]\setuppapersize[a4][a4] % paper size (210 x 297 mm)\definelayout[even] % Even = Left [topspace=14mm, % at the very top of the page bottomspace=14mm, % at the very bottom of the page
 header=6mm, % for header headerdistance=4mm, % between body and header footer=6mm, % for footer footerdistance=4mm, % between body and footer
 backspace=38mm, % binding edge space cutspace=32mm, % opposite to binding edge leftmargin=25mm, % space for margin notes rightmargin=25mm, % space for right margin notes
 width=fit, height=fit]\definelayout[odd] % Odd = Right [topspace=14mm, % at the very top of the page bottomspace=14mm, % at the very bottom of the page
 header=6mm, % for header headerdistance=4mm, % between body and header footer=6mm, % for footer footerdistance=4mm, % between body and footer
 backspace=38mm, % binding edge cutspace=32mm, % opposite to binding edge leftmargin=25mm, % the space for margin notes rightmargin=25mm, % the space for right margin notes
 width=fit, height=fit]\setuplayout [location=doublesided] % double-sided pages\setupheader[style={\it}]\setupheadertexts [] % even left [section] % even right
 [chapter] % odd left [] % odd right\definetext[chapter][footer][pagenumber]\setupheadtext [chapter=Chapter]\setuphead [chapter] [command=\MyChapterText, style={\sc\tfc},
 placehead=yes, color=black, number=yes, continue=no, page=, header=high, footer=chapter, distance=0pt, before=\setups{chapter:before}, after=\setups{chapter:after}]
\def\MyChapterText#1#2{\vbox{\sc\tfc\headtext{chapter}~#1\blank[small]#2}}\startsetups [chapter:before] \page[left] \noheaderandfooterlines \vbox to 35mm{} \vbox{\blank \startalignment[left,nothyphenated]
 \noindent \setups[chapter:quote] \stopalignment} \resetsetups[quote:text] \page[right] \noheaderandfooterlines \vbox to 35mm \bgroup\stopsetups\startsetups [chapter:after] \vss\egroup
\stopsetups\showframe%%% Text\starttext\startsetups[chapter:quote] \vbox{My quote goes here\par \it{---author from ``source'', 1900.}}\stopsetups\chapter{This is a split chapter title\blank[small]%
 On two lines}\input tufte\section{Section One}\dorecurse{3}{\input tufte \par \input knuth \par}\section{Section Two}\dorecurse{3}{\input tufte \par \input knuth \par}\startsetups[chapter:quote]
 \vbox{My quote goes here\par \it{---author from ``source'', 1900.}}\stopsetups\chapter{A short title}\input tufte\section{Section One}\dorecurse{3}{\input tufte \par \input knuth \par}
\section{Section Two}\dorecurse{3}{\input tufte \par \input knuth \par}\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Conflict with chapter definition and header

2006-07-19 Thread Confused Scientist
Hello,I'm trying to put together a couple of examples I found in the ConTeXt manual, the wiki and the maling list archive. Unfortunately, I've broken my headers/footers in the process. What I am trying to do is have a double-sided layout where (at the beginning of each chapter) a famous quote is given on the left page and the chapter begins on the right. I do not want any header/footer on the left, but I would like the footer (page number) on the right. 
My problem is that I cannot seem to control the page headers and footers for the left/right chapter page. Also, I cannot seem to get the section name to reliably appear after using setupheadertexts? I am using:

TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 tex : pdfeTeX, 
3.141592-1.30.4-2.2 (Web2C 7.5.5) context : ver: 2006.02.03 21:03 cont-en : ver: 2006.02.03 21:03 fmt: 2006.2.10 mes: english cont-nl : ver: 2006.02.03 21:03 fmt: 
2006.2.10
 mes: dutch total run time : 9 secondsand below is an example of what I have. Any ideas on what I've done wrong.Thanks,Dave%%% Layout\setuppagenumbering[ alternative=doublesided,
 style={\sc}, location={footer, marginedge}, partnumber=no, way=bytext]\setuppapersize[a4][a4] % paper size (210 x 297 mm)\definelayout[even] % Even = Left [topspace=14mm, % at the very top of the page
 bottomspace=14mm, % at the very bottom of the page header=6mm, % for header headerdistance=4mm, % between body and header footer=6mm, % for footer
 footerdistance=4mm, % between body and footer backspace=38mm, % binding edge space cutspace=32mm, % opposite to binding edge leftmargin=25mm, % space for margin notes
 rightmargin=25mm, % space for right margin notes width=fit, height=fit]\definelayout[odd] % Odd = Right [topspace=14mm, % at the very top of the page
 bottomspace=14mm, % at the very bottom of the page header=6mm, % for header headerdistance=4mm, % between body and header footer=6mm, % for footer
 footerdistance=4mm, % between body and footer backspace=38mm, % binding edge cutspace=32mm, % opposite to binding edge leftmargin=25mm, % the space for margin notes
 rightmargin=25mm, % the space for right margin notes width=fit, height=fit]\setuplayout [location=doublesided] % double-sided pages\setupheader[style={\it}]
\setupheadertexts [] % even left [section] % even right [chapter] % odd left [] % odd right\definetext[chapter][footer][pagenumber]\setupheadtext [chapter=Chapter]

\setuphead [chapter] [command=\MyChapterText, style={\sc\tfc}, placehead=yes, color=black, number=yes, continue=no, page=, header=high, footer=chapter, distance=0pt,
 before=\setups{chapter:before}, after=\setups{chapter:after}]\def\MyChapterText#1#2{\vbox{\sc\tfc\headtext{chapter}~#1\blank[small]#2}}\startsetups [chapter:before] \page[left] \vbox to 35mm{}\vbox{\blank
 \noheaderandfooterlines \startalignment[left,nothyphenated] \noindent \setups[chapter:quote] \stopalignment} \resetsetups[quote:text] \page[right] \vbox to 35mm\bgroup\stopsetups

\startsetups [chapter:after] \vss\egroup\stopsetups\showframe%%% Text\starttext\startsetups[chapter:quote] \vbox{My quote goes here\par \it{---author from ``source'', 1900.}}
\stopsetups\chapter{This is a split chapter title\blank[small]% On two lines}\input tufte\section{Section One}\dorecurse{3}{\input tufte \par \input knuth \par}\section{Section Two}
\dorecurse{3}{\input tufte \par \input knuth \par}\startsetups[chapter:quote] \vbox{My quote goes here\par \it{---author from ``source'', 1900.}}\stopsetups\chapter{A short title}

\input tufte\section{Section One}\dorecurse{3}{\input tufte \par \input knuth \par}\section{Section Two}\dorecurse{3}{\input tufte \par \input knuth \par}\stoptext

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


[NTG-context] blank chapter last page

2005-12-20 Thread M.guravage
Hi,

ConTeXt's default behavior is to insert a page, when necessary, to force a
new chapter to begin on a right hand page. One consequence when using
running headers is that they appear on these extra pages too. I use the
following code to control a chapter's opening page.

  % Define heads for chapter opening pages
  \definetext[chapterstart][footer][pagenumber]
  \setuphead[chapter][header=empty,footer=chapterstart]

I would like those inserted extra pages to be completely blank. Any
suggestions how  I can disable the running headers for those pages?
Thanks.

Cheers,

Michael A. Guravage


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


[NTG-context] Re: blank chapter last page

2005-12-20 Thread Patrick Gundlach
Hello Michael,

 ConTeXt's default behavior is to insert a page, when necessary, to force a
 new chapter to begin on a right hand page. One consequence when using
 running headers is that they appear on these extra pages too. I use the
 following code to control a chapter's opening page.

   % Define heads for chapter opening pages
   \definetext[chapterstart][footer][pagenumber]
   \setuphead[chapter][header=empty,footer=chapterstart]

 I would like those inserted extra pages to be completely blank. Any
 suggestions how  I can disable the running headers for those pages?
 Thanks.

Perhaps this helps you?

http://archive.contextgarden.net/message/20030329.110709.b9199ab7.en.html

Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] creating horizontal space

2005-03-06 Thread Paul Tremblay
I am trying to create horizontal space in a footer and am having not
luck. Here is what I have tried; 


\definetext[chapStart8Footer][footer][\vbox{ {\hspace{2em} skip} space

Interestingly, the \hfill command works here, but \hspace doesn't.

Paul


-- 


*Paul Tremblay *
[EMAIL PROTECTED]*

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


Re: [NTG-context] creating horizontal space

2005-03-06 Thread Paul Tremblay
Okay, dummy me, I figured it out:

\hskip2em

Paul

On Sun, Mar 06, 2005 at 07:08:05PM -0500, Paul Tremblay wrote:
 Date: Sun, 6 Mar 2005 19:08:05 -0500
 From: Paul Tremblay [EMAIL PROTECTED]
 To: context mailing list ntg-context@ntg.nl
 User-Agent: Mutt/1.4i
 Subject: [NTG-context] creating horizontal space
 
 I am trying to create horizontal space in a footer and am having not
 luck. Here is what I have tried; 
 
 
 \definetext[chapStart8Footer][footer][\vbox{ {\hspace{2em} skip} space
 
 Interestingly, the \hfill command works here, but \hspace doesn't.
 
 Paul
 
 
 -- 
 
 
 *Paul Tremblay *
 [EMAIL PROTECTED]*
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context

-- 


*Paul Tremblay *
[EMAIL PROTECTED]*

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


Re: [NTG-context] \definelayout question

2005-03-03 Thread Hans Hagen
Paul Tremblay wrote:
Thanks Adam for the suggestions on the wiki page.
You point out that I can use \definelayout for odd and even pages.
I assume I can use this command in place of \setuplayout?
I had a problem using \definelayout. I found that I had to use a
\setuplayout before my text, or the first page would not get formatted.
Is the ConTeXt code right below?
Also, is there any way to change the layout for the first page?
\definelayout[first] [
\definelayout[1][...]
\definetext[partStart1][header][\vbox{Chapter 1 \vskip5pt Author}]
\setuphead[part][header=partStart1]
for consistency i'd go for
\definetext
  [partStart1]
  [header]
  [\vbox{\strut Chapter 1 \vskip.25\bodyfontsize Author}]
scales nicer with changes in font and other specs
Hans
-
  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
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \definelayout question

2005-03-02 Thread Paul Tremblay
Thanks Adam for the suggestions on the wiki page.

You point out that I can use \definelayout for odd and even pages.
I assume I can use this command in place of \setuplayout?

I had a problem using \definelayout. I found that I had to use a
\setuplayout before my text, or the first page would not get formatted.
Is the ConTeXt code right below?

Also, is there any way to change the layout for the first page?

\definelayout[first] [

Thanks

Paul



\part{}

\definelayout[odd][
 topspace=.5in, % the space at the very top of the page
 backspace=3in,  % the space in the gutter 
 header=2in, % the space for headers
 footer=2in, % the space for footers
 leftmargin=1in, % the space for margin notes
 rightmargin=1.5in, % the space for right margin notes
 width=3in, % the width of the body text
 height=7in % the height of the body text
]

\definelayout[even][
 topspace=.5in, % the space at the very top of the page
 backspace=3in,  % the space in the gutter 
 header=2in, % the space for headers
 footer=2in, % the space for footers
 leftmargin=1in, % the space for margin notes
 rightmargin=1.5in, % the space for right margin notes
 width=3in, % the width of the body text
 height=4in % the height of the body text
]

\setuplayout
% the header for the first page of part 1
\definetext[partStart1][header][\vbox{Chapter 1 \vskip5pt Author}]
\setuphead[part][header=partStart1]

-- 


*Paul Tremblay *
[EMAIL PROTECTED]*

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


Re: [NTG-context] customizing headers/footers first page

2005-02-25 Thread Hans Hagen
Paul Tremblay wrote:
On Thu, Feb 24, 2005 at 11:48:32AM -0500, Steve Grathwohl wrote:
How about
\definetext[chapterstart][header][First Header]
\setuphead[chapter][header=chapterstart]
for starters?
Steve

Thanks. Are there any other location keywords besides chapterstart? 

%???
\definetext[chapterlast][footer][last footer]
\setuphead[chapter][footer=chapterlast]
you can have any keyword you want; it's just a reference to what you define and 
recall later

Hans
-
  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
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] customizing headers/footers first page

2005-02-24 Thread Steve Grathwohl
How about

\definetext[chapterstart][header][First Header]
\setuphead[chapter][header=chapterstart]

for starters?

Steve

On Thu, 24 Feb 2005 11:33:11 -0500, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I poured over the documentation last night, and I want to make sure I
 reached the right conclusion in thinking that there is no way to put a
 different header/footer on the first page in ConTeXt.
 
 I know that you can suppress the header/footer by various means, such as:
 
 \setupheaders[state=high]
 % or
 \setuphead[chapter][header=empty]
 \chapter
 
 But I don't believe you can acutally put a different header on the first
 page, such as:
 
 First Page Header
 ==
 
 Here is the body text for the first page.
 
 Rest Header
 =
 
 Here is the body text for the rest of the chapter
 
 Also, is there any way to do things with the last page in a section? By
 do things, I mean set different page dimmensions or set up different
 headers/footers.
 
 I am asking these questions because I am coming from fo, and I am
 looking for the closest ways to mimic its formatting.
 
 Thanks
 
 Paul
 
 ___
 ntg-context mailing list
 ntg-context@ntg.nl
 http://www.ntg.nl/mailman/listinfo/ntg-context
 


-- 
Steve Grathwohl || Digital Content Developer
Duke University Press Journals || +1 919 687 3634
905 W Main St || Durham, NC 27701 USA
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] customizing headers/footers first page

2005-02-24 Thread Paul Tremblay
On Thu, Feb 24, 2005 at 11:48:32AM -0500, Steve Grathwohl wrote:
 
 How about
 
 \definetext[chapterstart][header][First Header]
 \setuphead[chapter][header=chapterstart]
 
 for starters?
 
 Steve
 

Thanks. Are there any other location keywords besides chapterstart? 

%???

\definetext[chapterlast][footer][last footer]
\setuphead[chapter][footer=chapterlast]

Paul

-- 


*Paul Tremblay *
[EMAIL PROTECTED]*

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


[NTG-context] simple question: newline in chapter header?

2004-11-05 Thread Miek Gieben
Hello,

I'm trying to switch from latex to context and I'm trying to 
port the book class from latex to a context document.

Right now I'm working on the chapter def and I have:

\definetext[chapter][footer][pagenumber]
\setuphead[chapter][
header=empty, footer=chapter,
textstyle=bold,
numberstyle=bold,
numbercommand=Chapter ,
textcommand={\bfc},
after={\blank[4*big]}]

But this doesn't give a newline after the chapter number. If I change

textcommand={\bfc},
to
textcommand={\\ \bfc},

I do get a newline, but then the chapter title is not aligned to the
left side of the document? Even if I try to left aline this it does 
seem work. :(

What I'm I missing here?

Thanks a lot!

grtz,
  --Miek

--
today's fortune:
Chemist who falls in acid is absorbed in work.
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] simple question: newline in chapter header?

2004-11-05 Thread Hans Hagen
Miek Gieben wrote:
Hello,
I'm trying to switch from latex to context and I'm trying to 
port the book class from latex to a context document.

Right now I'm working on the chapter def and I have:
\definetext[chapter][footer][pagenumber]
\setuphead[chapter][
header=empty, footer=chapter,
textstyle=bold,
numberstyle=bold,
numbercommand=Chapter ,
textcommand={\bfc},
after={\blank[4*big]}]
But this doesn't give a newline after the chapter number. If I change
textcommand={\bfc},
to
textcommand={\\ \bfc},
I do get a newline, but then the chapter title is not aligned to the
left side of the document? Even if I try to left aline this it does 
seem work. :(

What I'm I missing here?
use
\def\MyHeadCommand#1#2%
  {\vbox{#1\par#2}}
with
command=\MyHeadCommand
Hans
-
  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
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Disappearing headers

2004-07-28 Thread Hans Hagen
Matt Gushee wrote:
Hello, all--
I am trying to format a book such that the book title appears in the
header of each left-hand page, and the chapter title appears in the
header of each right-hand page. I think (though I haven't decided for
sure) that I want each chapter to start on a right-hand page. It seems
that, when chapters are forced to begin on right-hand pages, the book
title fails to appear on the first blank page inserted to move the
chapter start, and on all subsequent pages.
Here are the commands I am using related to headers:
   \setuphead [title] 
   [align=left,textstyle={\switchtobodyfont[BernhardModern]\bf}]
   \setuphead [chapter] 
   [page=right,head=nomarking,after=\blank]
   \setuppagenumbering [alternative=doublesided,location=margin]
   \setupheader [style=\it]
   \setupheadertexts [] [chapter] [title] [] 
   % reverse order, as mentioned in my earlier post
 

i need a small doc with dummy text to see the effect -)
With all these commands enabled, I get the effect I want: chapters begin
on righthand pages, the title and chapter title appear, respectively, in
the left and right page headers (adjacent to the page numbers, with the
page numbers toward the outside edge of the page). But, as I said, the
book title stops appearing as soon as a blank page is inserted to move
the chapter start to the right.
 

those things are related to when marks are set/reset; tricky sync stuff
how about playing a bit with \definetext
\starttext
\setuphead [chapter] [page=right,header=chapter]
\setuphead [title]   [page=right,header=]
\setuppagenumbering [alternative=doublesided,location=margin]
\definetext[chapter][header][title][]
\setupheadertexts[title][chapter]
\title{title 1} test \page test \chapter{chapter 1} test \page test
\title{title 2} test \page test \chapter{chapter 2} test \page test
\title{title 3} test \page test \chapter{chapter 3} test \page test
\stoptext
If I comment out *both* the \setuphead [chapter] command and the
\setuppagenumbering command, the title continues to be displayed
throughout the text. If I enable either of the two, the title disappears
again. By the way, it appears that this \setuppagenumbering command has
a side-effect of forcing chapters to begin on the right. Is that really
a good idea? It's certainly surprising to me.
 

The default settings are: 

 \setuphead[chapter][page=right] 

when you change this to 

 \setuphead[chapter][page=yes] 

you get what you want
Hans 

-
 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
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


  1   2   >