From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78604 Path: news.gmane.org!not-for-mail From: Arne Runge Newsgroups: gmane.comp.tex.context Subject: Re: Header-Footer-Layout Date: Sun, 07 Oct 2012 18:37:37 +0200 Message-ID: <5071AFD1.60505@gmx.de> References: <505F17BF.70509@gmx.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0032028064==" X-Trace: ger.gmane.org 1349763208 24135 80.91.229.3 (9 Oct 2012 06:13:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2012 06:13:28 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Tue Oct 09 08:13:34 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TLT4P-00023h-Nw for gctc-ntg-context-518@m.gmane.org; Tue, 09 Oct 2012 08:13:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 192FB10217; Tue, 9 Oct 2012 08:13:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id oGrP05D7JYmc; Tue, 9 Oct 2012 08:13:24 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 1C81C101E8; Tue, 9 Oct 2012 08:13:24 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1273E10219 for ; Sun, 7 Oct 2012 18:28:00 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Q2z7dXpf-tV7 for ; Sun, 7 Oct 2012 18:27:58 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 2197610218 for ; Sun, 7 Oct 2012 18:27:58 +0200 (CEST) Original-Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with SMTP id q97GRu4q012355 for ; Sun, 7 Oct 2012 18:27:56 +0200 Original-Received: (qmail invoked by alias); 07 Oct 2012 16:27:56 -0000 Original-Received: from e180115123.adsl.alicedsl.de (EHLO [85.180.115.123]) [85.180.115.123] by mail.gmx.net (mp030) with SMTP; 07 Oct 2012 18:27:56 +0200 X-Authenticated: #3232339 X-Provags-ID: V01U2FsdGVkX18y6P0Y26sywNLF1xrnDYd6FBOjcQa4qnNo96pBBz Vrstx2z9TLGvlP User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7 In-Reply-To: <505F17BF.70509@gmx.de> X-Y-GMX-Trusted: 0 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.165.64.22; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QI8grU4N - 8bdf8b77d33b - 20121007 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-Mailman-Approved-At: Tue, 09 Oct 2012 08:13:22 +0200 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78604 Archived-At: This is a multi-part message in MIME format. --===============0032028064== Content-Type: multipart/alternative; boundary="------------000802090108010809010309" This is a multi-part message in MIME format. --------------000802090108010809010309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > Am 23.09.2012 um 16:07 schrieb Arne Runge>: > > >/ Hi, > />/ > />/ I would like to have a doublesided layout with: > />/ > />/ - a titlepage with neither header nor footer, > />/ - a frontpart with pagesnumbers(left/right) in roman > />/ - a bodypart with pagesnumbers(left/right) in arabic > />/ - an appendix with pagesnumbers(left/right) in arabic > />/ > />/ - first page of a chapter should not have a header + underline > />/ - next page header(CHAPTER #: chapter) underlined > />/ - next page header(section) underlined > />/ > />/ - if there is no section then only the line. > />/ - if the next page is empty than only the pagenumber should be printed. > />/ > />/ Seems to be a common layout and I apologize for asking. > />/ > />/ Thanks in advance for any help. > />/ > />/ Regards, > />/ > />/ Arne > / > > Put the makeup environment in the front matter environment and remove the sectionblock settings. > > When you don't want to start chapter at a right page you can add \setupsectionblock[page=yes] to your document. > > \setuppagenumbering[alternative=doublesided] > > \setupheadertexts[] > \setupheadertexts[\setups{text a}][][][\setups{text b}] > > \startsetups[text a] > CHAPTER \getmarking[chapternumber]: \WORD{\getmarking[chapter]} > \stopsetups > > \startsetups[text b] > \getmarking[section] > \stopsetups > > \setupheader[text][after=\hrule] > > \setuphead[chapter][page={header,right},header=empty] > > \setupfootertexts[][pagenumber] > > \defineconversionset[frontpart:pagenumber][romannumerals][] > > \startsectionblockenvironment[bodypart] > \setcounter[userpage][1] > \stopsectionblockenvironment > > \starttext > > \startfrontmatter > > \startstandardmakeup[align=middle] > {\tfd TITLE} > \stopstandardmakeup > > \completecontent > > \stopfrontmatter > > \startbodymatter > > \chapter{Knuth} > > \dorecurse{12}{\input knuth\par} > > \stopbodymatter > > \startappendices > > \chapter{Zapf} > > \dorecurse{12}{\input zapf\par} > > \stopappendices > > \stoptext > > Wolfgang Thank you Wolfgang for the reply. If I compile your code then I get ! Undefined control sequence. l.20 \defineconversionset [frontpart:pagenumber][romannumerals][] and if I comment this line, I get ! Missing number, treated as zero. and if I comment \setcounter[userpage][1] then - page 4 has a header line, which I don't like - page 7 or 11 has not the marking Knuth respectively Zapf - useless page 13 at the end of the document I guess that's because I don't use the latest version. I use context_2012.05.30.2012061, TeXExec | version 6.2.1 - 1997-2009 - PRAGMA ADE/POD I finally came up with the following code, which does it for me. \setuppagenumbering[alternative=doublesided,location=] \setupheadertexts[] \setupheadertexts[\setups{text a}][][][\setups{text b}] \startsetups[text a] CHAPTER \getmarking[chapternumber]: \expanded{\uppercase{\fetchmark[chapter][first]}} \stopsetups \startsetups[text b] \getmarking[section] \stopsetups \setupfootertexts[][pagenumber] \setupheader[text][after=\hrule] \setuphead[chapter][header=empty] \setupsectionblock[frontpart][ before={\setuppagenumbering[conversion=romannumerals]}, after={\page[yes,header,right]}] \setupsectionblock[bodypart][after={\page[yes,header,right]}] \setupsectionblock[appendix][after={\page[yes,header,right]}] \setupsectionblock[backpart][after={\page[yes,header,right]}] \starttext \startfrontmatter \startstandardmakeup \title{title} \stopstandardmakeup \completecontent \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \chapter{body} \dorecurse{10}{\input knuth} \stopbodymatter \startappendices \chapter{appendix} code \input knuth \stopappendices \page[stop] \stoptext Arne --------------000802090108010809010309 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Am 23.09.2012 um 16:07 schrieb Arne Runge <arne_runge at gmx.de>:

> Hi,
> 
> I would like to have a doublesided layout with:
> 
> - a titlepage with neither header nor footer,
> - a frontpart with pagesnumbers(left/right) in roman
> - a bodypart with pagesnumbers(left/right) in arabic
> - an appendix with pagesnumbers(left/right) in arabic
> 
> - first page of a chapter should not have a header + underline
> - next page header(CHAPTER #: chapter) underlined
> - next page header(section) underlined
> 
> - if there is no section then only the line.
> - if the next page is empty than only the pagenumber should be printed.
> 
> Seems to be a common layout and I apologize for asking.
> 
> Thanks in advance for any help.
> 
> Regards,
> 
> Arne


Put the makeup environment in the front matter environment and remove the sectionblock settings.

When you don’t want to start chapter at a right page you can add \setupsectionblock[page=yes] to your document.

\setuppagenumbering[alternative=doublesided]

\setupheadertexts[]
\setupheadertexts[\setups{text a}][][][\setups{text b}]

\startsetups[text a]
  CHAPTER \getmarking[chapternumber]: \WORD{\getmarking[chapter]}
\stopsetups

\startsetups[text b]
  \getmarking[section]
\stopsetups

\setupheader[text][after=\hrule]

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

\setupfootertexts[][pagenumber]

\defineconversionset[frontpart:pagenumber][romannumerals][]

\startsectionblockenvironment[bodypart]
  \setcounter[userpage][1]
\stopsectionblockenvironment

\starttext

\startfrontmatter

\startstandardmakeup[align=middle]
{\tfd TITLE}
\stopstandardmakeup

\completecontent

\stopfrontmatter

\startbodymatter

\chapter{Knuth}

\dorecurse{12}{\input knuth\par}

\stopbodymatter

\startappendices

\chapter{Zapf}

\dorecurse{12}{\input zapf\par}

\stopappendices

\stoptext

Wolfgang
Thank you Wolfgang for the reply. If I compile your code then I get

! Undefined control sequence.
l.20 \defineconversionset
                         [frontpart:pagenumber][romannumerals][]

and if I comment this line, I get

! Missing number, treated as zero.

and if I comment   \setcounter[userpage][1]

then
- page 4 has a header line, which I don't like
- page 7 or 11 has not the marking Knuth respectively Zapf
- useless page 13 at the end of the document

I guess that's because I don't use the latest version. I use context_2012.05.30.2012061,
TeXExec | version 6.2.1 - 1997-2009 - PRAGMA ADE/POD


I finally came up with the following code, which does it for me.

\setuppagenumbering[alternative=doublesided,location=]

\setupheadertexts[]
\setupheadertexts[\setups{text a}][][][\setups{text b}]

\startsetups[text a]
    CHAPTER \getmarking[chapternumber]:
\expanded{\uppercase{\fetchmark[chapter][first]}}
  \stopsetups
\startsetups[text b]
    \getmarking[section]
  \stopsetups


\setupfootertexts[][pagenumber]

\setupheader[text][after=\hrule]

\setuphead[chapter][header=empty]

\setupsectionblock[frontpart][
before={\setuppagenumbering[conversion=romannumerals]},
after={\page[yes,header,right]}]
\setupsectionblock[bodypart][after={\page[yes,header,right]}]
\setupsectionblock[appendix][after={\page[yes,header,right]}]
\setupsectionblock[backpart][after={\page[yes,header,right]}]

\starttext

\startfrontmatter
\startstandardmakeup
\title{title}
\stopstandardmakeup
\completecontent
\stopfrontmatter

\startbodymatter
\setuppagenumber[number=1]
\chapter{body}
\dorecurse{10}{\input knuth}

\stopbodymatter

\startappendices
\chapter{appendix}
code
\input knuth
\stopappendices
\page[stop]
\stoptext

Arne

 

--------------000802090108010809010309-- --===============0032028064== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0032028064==--