From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15179 Path: main.gmane.org!not-for-mail From: "Mikael Persson" Newsgroups: gmane.comp.tex.context Subject: Re: The name of the current section? Date: Thu, 20 May 2004 17:15:20 +0200 (MEST) Sender: ntg-context-admin@ntg.nl Message-ID: <34567.82.182.100.57.1085066120.squirrel@mail.medic.chalmers.se> References: <40AB4DD1.5020000@econ.muni.cz> <40ABB503.4060304@boede.nl> <40ACE122.1050605@econ.muni.cz> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1085066241 17054 80.91.224.253 (20 May 2004 15:17:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 May 2004 15:17:21 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu May 20 17:17:11 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BQpIF-0002fD-00 for ; Thu, 20 May 2004 17:17:11 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 6122510B37; Thu, 20 May 2004 17:12:37 +0200 (MEST) Original-Received: from anubis.medic.chalmers.se (anubis.medic.chalmers.se [129.16.30.218]) by ref.ntg.nl (Postfix) with ESMTP id 80A0110B2A for ; Thu, 20 May 2004 17:10:50 +0200 (MEST) Original-Received: from mail.medic.chalmers.se (localhost [127.0.0.1]) by anubis.medic.chalmers.se (Postfix) with SMTP id 1B90D1791 for ; Thu, 20 May 2004 17:15:20 +0200 (MEST) Original-Received: from 82.182.100.57 (SquirrelMail authenticated user mickep) by mail.medic.chalmers.se with HTTP; Thu, 20 May 2004 17:15:20 +0200 (MEST) In-Reply-To: <40ACE122.1050605@econ.muni.cz> Original-To: ntg-context@ntg.nl User-Agent: SquirrelMail/1.4.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:15179 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15179 > Hi. > > Many thanks for your kind answer. > >> \setuppagenumbering[alternative=doublesided, >> location={header,marginedge}] >> \setupheadertexts >> [section][{\headnumber[section]}][chapter][{\headnumber[chapter]}] > > Your code is rather nice (I have learned one nice trick from it), but it > doesn't what I need. I want all the header stuff to go just separated by > spaces, not on different sides of the header. Something like this > > 117_This_is_an_chapter_name_(chap._5)___________________________________________________________________ > where "_" stands for a space. > > Well, with your trick I could possibly to it with some \hfill, but it's > a rather tricky solution. Moreover, I may need the name of a current > chapter and section in the document itself. I guess there must be some > system solution for such a case in the ConTeXt (I think there is almost > everything in it.) :-) > > Of course, as the last instance I can redefine \chapter and \section in > a way like this > \let\OriChapter=\chapter > \def\chapter#1{\def\currentchaptername{#1}\chapter{#1}} > but I don't want to do it -- it is dirty and involves more programming > to cover crossreferences. > > Any more hint how to get the name of current chapter/section? > > With best regards > Michal Kvasnicka > I found this in one of my old docs. Is that what you want? \setupheadertexts [{\headnumber[section]\quad\getmarking[section][current]}] [] [] [{Chapter \headnumber[chapter]:\quad\getmarking[chapter][current]}] Regards, Micke P