From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/10758 Path: main.gmane.org!not-for-mail From: "Willi Egger" Newsgroups: gmane.comp.tex.context Subject: Using variables in relation to the TOC Date: Wed, 5 Feb 2003 10:49:51 +0100 Organization: BOEDE Sender: ntg-context-admin@ntg.nl Message-ID: <002401c2ccfb$eea8e960$0100a8c0@vademecum> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0021_01C2CD04.4F541930" X-Trace: main.gmane.org 1044438533 30926 80.91.224.249 (5 Feb 2003 09:48:53 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 5 Feb 2003 09:48:53 +0000 (UTC) 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 18gMAl-00082Z-00 for ; Wed, 05 Feb 2003 10:48:51 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id B031010B6A; Wed, 5 Feb 2003 10:50:49 +0100 (MET) Original-Received: from smtpzilla3.xs4all.nl (smtpzilla3.xs4all.nl [194.109.127.139]) by ref.ntg.nl (Postfix) with ESMTP id 015FE10B6A for ; Wed, 5 Feb 2003 10:49:35 +0100 (MET) Original-Received: from vademecum (a80-126-172-1.adsl.xs4all.nl [80.126.172.1]) by smtpzilla3.xs4all.nl (8.12.0/8.12.0) with SMTP id h159nXiw089127 for ; Wed, 5 Feb 2003 10:49:34 +0100 (CET) Original-To: "ConTeXt" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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:10758 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:10758 This is a multi-part message in MIME format. ------=_NextPart_000_0021_01C2CD04.4F541930 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi all, While developing a manual I encounter the following problem. Each document of the manual carries a header, where a version number is placed. In this case the version number is a date. The manual table of contents requires, that the name of the document (chapter name) is placed followed by the version number which Ii mentioned above. I spent some hours to try to tweak things to get the desired result. - Unfortunately unsuccesfully. May be that I want to achieve something which is impossible due to the way TeX is generating the table of contents. - If you compile hte attached file you get a table of contents which looks in first instance as it is required. The 'only' problem is, that all documents get the version number defined in the setuparea (Compare the presentation of the version number to the versionnumbers as they appear in the header) Any suggestions? Thanks Willi ------=_NextPart_000_0021_01C2CD04.4F541930 Content-Type: application/octet-stream; name="header.tex" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="header.tex" % header setup \setupoutput[pdftex] \setupinteraction[state=3Dstart] \setupbodyfont[ss,10pt] \setuplayout [header=3D6\bodyfontsize, headerdistance=3D\bodyfontsize, topspace=3D0.75cm] \setuppagenumbering[location=3D,way=3Dbychapter] \setupsubpagenumber[state=3Dstart,way=3Dbychapter] \definehead[Mychapter][chapter] \definecombinedlist[Mycontent][part,Mychapter] \setuplist[Mychapter][pagenumber=3Dno,maxwidth=3D\textwidth,margin=3D1cm]= \define[1]\SetUpHeaderText{% \setupheadertexts[][% {\hbox {\switchtobodyfont[small]% {\bTABLE \setupTABLE[x][1][frame=3Don,width=3D.5\textwidth] \setupTABLE[x][2][frame=3Don,width=3D.35\textwidth] \bTR \bTD Document: = \hfill\headnumber[part]~\getmarking[part][last] \eTD \bTD Version: \hfill{#1} \eTD\eTR \eTABLE}}}]} \ifx\Version\undefined\def\Version{\currentdate[day,-,month,-,year]}\fi \starttext %\showframe \completeMycontent \part{General} \chapter{Introduction} \def\Version{03-02-2003} \SetUpHeaderText{\Version} \writetolist[Mychapter]{Introduction}{\hfill \Version} \subject{Idea} \input tufte \chapter{Troubleshooting} \def\Version{12-12-2002} \SetUpHeaderText{\Version} \writetolist[Mychapter]{Troubleshooting}{\hfill \Version} \subject{Introduction} \input tufte \part{Organisation} \chapter{Diagrams} \SetUpHeaderText{05-02-2003} \subject{Holding} \input tufte \subject{Local site} \input tufte \stoptext ------=_NextPart_000_0021_01C2CD04.4F541930--