From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11708 Path: main.gmane.org!not-for-mail From: Guy Worthington Newsgroups: gmane.comp.tex.context Subject: Re: header/footer suppression Date: 29 Mar 2003 20:54:13 +0800 Sender: ntg-context-admin@ntg.nl Message-ID: References: <87brzvk5xe.fsf@gundla.ch> <8765q2le8c.fsf@gundla.ch> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048942228 2042 80.91.224.249 (29 Mar 2003 12:50:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 29 Mar 2003 12:50:28 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sat Mar 29 13:50:14 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18zFmo-0000VK-00 for ; Sat, 29 Mar 2003 13:50:14 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id C7C5910B1B; Sat, 29 Mar 2003 13:50:16 +0100 (MET) Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by ref.ntg.nl (Postfix) with ESMTP id 32FB310AE7 for ; Sat, 29 Mar 2003 13:47:05 +0100 (MET) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18zFje-0000LG-00 for ; Sat, 29 Mar 2003 13:46:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ntg-context@ref.ntg.nl Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 18zFjc-0000Kg-00 for ; Sat, 29 Mar 2003 13:46:56 +0100 Original-Lines: 199 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11708 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11708 Patrick, I'm posting my environment (on the offchance it might help you read my mind). It's still very rough. ----- %% environment file EnvironmentISOLayout.tex \startenvironment EnvironmentISOLayout \autoloadmapfilestrue %% pagelayout lucida-brightISOLayout (double page) \usetypescript [serif] [hanging] [thanh] \setupencoding [default=texnansi] \setupbodyfont [cmr,14.4pt] \setupalign [hanging] \def\GoldenRatio{1.61803} \setbox0\hbox{\dorecurse{26}{\character\recurselevel}} \setuplayout [width=2.5\wd0, header=\lineheight, footer=\lineheight, height=\GoldenRatio\makeupwidth, headerdistance=\dimexpr( (\makeupheight - 35\lineheight - \headerheight - \footerheight) /2), footerdistance=\headerdistance, backspace=\dimexpr(\makeupwidth/7), topspace=\dimexpr(\makeupwidth/7)] %% global stuff \setupcolors[state=start] \setuppagenumbering[alternative=doublesided, option=doublesided, location={header,marginedge}] \setupbackgrounds [header][text] % header line spans just the text block [frame=on,topframe=off,leftframe=off,rightframe=off] %% chapter head layout \setuplist [section] [style=boldslanted, align=right, interaction=all, symbol=1, width=1em, pagenumber=no, before=, after=] \definetext[chapter][footer][pagenumber] % page on which chapters begin \setuphead [chapter] [page=, header=empty, % suppress header at start of chapter footer=chapter, % footer at start of chapter numberstyle=ChapterTitleNumberFont, textstyle=ChapterTitleTextFont alternative=command, command=\ContentsHead, prefix=+, before={\page\ifodd\realpageno\else\page[empty]\fi\page[right]}, after={\blank[2*big]}] \definefont [ChapterTitleTextFont][Serif at 24.9pt] \definefont [ChapterTitleNumberFont][SerifBold at 40pt] \def\ContentsHead#1#2% {\setupframed [frame=off]% \framed [width=\hsize,offset=overlay] {\placesidebyside {\doifmodeelse{*sectionnumber} {\framed [width=.6\hsize,offset=1em,strut=no,align=right, background=screen] {\vi In this chapter: \blank \placelist [section][criterium=chapter]}} {\framed [width=.6\hsize]{}}} % dummy {\framed [width=.4\hsize,strut=no,align=left] %% Typeset Chapter Number {\hbox{\vbox to 24.9pt{% height ChapterTitleTextFont \vss #1}}} \vfilll} }% %% Typeset Chapter Title \llap{\lower24.9pt\hbox{#2\hskip0.5em}}} %% sectionblocks \startsectionblockenvironment[frontpart] \setupheadertexts [{\getmarking[chapter][first]}] [] % an optional second arg let you specify what specific mark you want [] % \getmarking[section][first last previous both all] [{\getmarking[chapter][first]}] \setuppagenumbering [conversion=romannumerals] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setupheadertexts [Chapter {\getmarking[chapternumber][first]}. {\getmarking[chapter][first]}] [] [] [{\getmarking[section][first]}] \setuppagenumber [number=1] \stopsectionblockenvironment \setuphead [section] [number=no, style=\tfa] \setuphead [subsection] [style=bold] \setuphead [subsubsection] [style=italic] %% paragraph layout \setupwhitespace [medium] \setupindenting [medium] %% pretty printing \definetype [typeXML] [option=XML,palet=graypretty,style=\ix] \definetype [typeJV] [option=JV,palet=graypretty,style=\ix] \setuptyping [XML] [palet=graypretty,style=\ix] \setuptyping [typing] [palet=graypretty, style=\ix] %% urls \setupurl [style=smalltype] % Bug in ConTeXt \unprotect \def\preparethenumber#1#2#3% {\??id#1} \number \result {\doifelsevaluenothing{#1\c!scheider} {\let\numberseparator\empty \let#3#2} {\edef\numberseparator{\getvalue{#1\c!scheider}}% \edef#3{\@EA\separatednumber\@EA{#2}}}} % hm, etex \protect \definesymbol[MySep][--] \defineenumeration [example] [location=serried, text=Example, before=\blank, after=\blank, way=bychapter, style=italic, separator={\symbol[MySep]}] \setupcaptions [style=italic, separator={\symbol[MySep]}, align=right] % visual debuggers \showframe \version[temporary] \stopenvironment %%% Local Variables: %%% mode:context %%% End: ----- You can run it with a fairly simple test file ----- \environment EnvironmentISOLayout \starttext \startbodymatter \chapter {test} \section {test} \dorecurse{10}{\input tufte } \section {test} \dorecurse{12}{\input tufte } \chapter {test} \section {test} \dorecurse{10}{\input tufte } \stopbodymatter \stoptext ----- If you compile this, you'll notice that on the very first page I have a header, I don't want the header, I want a footer with the page number.