From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79128 Path: news.gmane.org!not-for-mail From: Andrew Dowell Newsgroups: gmane.comp.tex.context Subject: Re: Beginner question. Chapter heading in words Date: Sun, 11 Nov 2012 12:24:04 +0000 Message-ID: <509F98E4.8040304@yahoo.co.uk> References: <509E4AC9.4030503@yahoo.co.uk> <509E50A8.7090600@wxs.nl> <20121110143732.664f8814@homerow> <20121110144352.49903bde@homerow> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060102080704000301000609" X-Trace: ger.gmane.org 1352636650 15178 80.91.229.3 (11 Nov 2012 12:24:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Nov 2012 12:24:10 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 11 13:24:21 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 1TXWaK-0003yH-N8 for gctc-ntg-context-518@m.gmane.org; Sun, 11 Nov 2012 13:24:20 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DAFC4101EB; Sun, 11 Nov 2012 13:24:10 +0100 (CET) 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 BMpJpVVLN-ZA; Sun, 11 Nov 2012 13:24:07 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id A8931101F0; Sun, 11 Nov 2012 13:24:07 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 39E6B101F0 for ; Sun, 11 Nov 2012 13:24:07 +0100 (CET) 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 bLxv04Zf44i9 for ; Sun, 11 Nov 2012 13:24:05 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id AF59E101EB for ; Sun, 11 Nov 2012 13:24:05 +0100 (CET) Original-Received: from nm2-vm0.bullet.mail.ukl.yahoo.com (nm2-vm0.bullet.mail.ukl.yahoo.com [217.146.183.226]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qABCO486018095 for ; Sun, 11 Nov 2012 13:24:04 +0100 Original-Received: from [217.146.183.183] by nm2.bullet.mail.ukl.yahoo.com with NNFMP; 11 Nov 2012 12:24:04 -0000 Original-Received: from [77.238.184.58] by tm14.bullet.mail.ukl.yahoo.com with NNFMP; 11 Nov 2012 12:24:04 -0000 Original-Received: from [127.0.0.1] by smtp127.mail.ukl.yahoo.com with NNFMP; 11 Nov 2012 12:24:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1352636644; bh=+2xy4lE+2MFBl3SaMO6doJ2o+gGNj/6Es82OHHj3aTI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type; b=GetIJXmA0A394xrgJg/z+WMQARSJWPv8oMF/MiPzRPwNEm/mjUxt+3hN8E9970H4s7GhiQ2+zOCOklnLz0mHr9D8Ijn1MwLn+Lji8jT+ycEHaM8yqmLj7X27isy4Vl0jBVsp5QOpAQLpKDetNfLfZItoQLevB13xx72aZn8rDB0= X-Yahoo-Newman-Id: 416848.36854.bm@smtp127.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XKIE67kVM1mVxAEwE3bR39ABebttR4eB_qtdDy4D10NzifU jMTgqy2FykDDW4rDZKFwjA1dXINbrPTVhGyCkwf8KcSVzPYU2OxnheWPzp5. eobXJkAustITcez9l.mUkcvDT.eN.LOetd2q2LWodnYJ7J4h_jrgnVKcyhNB k8E1RNH8Bt62Fn5km_A0_Kt9DgkySi1lUMhRmdEFWwtRgRa7TVtsC8D2Kl_E qvTbYYxGEClTir.YYbbHAbomGDOIaDBFKM6zpw4X5v3gNB_ADZwMSeiH0Is. txliY89IN.Ty9RIy_5uCmH4jN49yaWRmIOne4h50AZvUoyY2263z2Qa6PMSK n4bGC3uwTUG1MnrQRsElfDDDpj.M5zGt3e8dWpG1Q5QgkGqe4cQRdk24FzWO _udAA5OS2i6QLSNNrzN9O4rx3zBcytPKIvnhuaol6SJXBXaxBXa4wdrTKb94 xPbvivV52yR8SmILj3Wd1nA4T3snlIJQl0wPlFkfH.7KaaZ_Q.wgCt7K3DhL VVZ_0nbDnio3_GfIgA1cjVkpgUD52TuZwiVuyQjMB_G4803GDJThOcp80Q9n hdLVkLtMpOomNFwQOb_BnuWnavZe4QuGuAFuYijWBUDBFm5lFeWD4b0Atq.T jRONFGZxVEBDSOJKwJAsEf946Z6NMhgB8weqVf33bnWemxVIAiA-- X-Yahoo-SMTP: Oy3fvdaswBB8dkAt7PTA.2aaOMvoxQ-- Original-Received: from [192.168.1.2] (and715244@78.150.123.169 with plain) by smtp127.mail.ukl.yahoo.com with SMTP; 11 Nov 2012 12:24:04 +0000 GMT User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 In-Reply-To: <20121110144352.49903bde@homerow> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=217.146.183.226; country=GB; latitude=54.0000; longitude=-2.0000; http://maps.google.com/maps?q=54.0000,-2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06Imco4ui - 00c747f58a65 - 20121111 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 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:79128 Archived-At: This is a multi-part message in MIME format. --------------060102080704000301000609 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/11/12 13:43, Marco Patzer wrote: > 2012-11-10 Marco Patzer: > >> 2012-11-10 Hans Hagen: >> >>> On 11/10/2012 1:38 PM, Andrew Dowell wrote: >>>> Chapter One >>>> >>>> This is the Name of the First Chapter >> I assume the OP was looking for a way to convert a counter to the >> corresponding English word: >> >> \defineconversion >> [words] >> [One, Two, Three, Four, Five] > I forgot to add how to hook this into Hans' example: > > \defineconversion > [words] > [One, Two, Three, Four, Five] > > \setuphead > [chapter] > [header=high, > command=\MyChapterTitle, > style=\bfc, > conversion=words, > numberstyle=\bfb] Thanks for your quick and helpful replies Marco and Hans. I've not quite managed to get it working yet. I also forgot to mention that I wanted it A5 2up on A4. I thought I'd got that sorted using \setuppapersize [A5][A4] \setuparranging [2UP,rotated,doublesided] \setuppagenumbering [alternative=doublesided] \setuplayout [margin=0pt,width=fit] \setupbodyfont [lbr,12pt] from the manual (page 55), but on closer inspection of the output seems to scramble the chapters. My test setup has four chapters. The output labels the first chapter 'Chapter 1', the second chapter 'Chapter 4', the third chapter 'Chapter 2' and the forth chapter 'Chapter 3'. Yes I did want the chapters to be numbered as words but I can't get Marco's modification to work. It would be useful if there was a build in conversion without having to write out the words as Jamie's book has 21 chapters! I've tried various permutations including \incrementcounter [mycount] \convertedcounter [mycount] in each chapter but none of the ones I tried work. (I also tried including the dorecurse, but presume that was for testing) I'm not sure if Han's example was supposed to be a stand alone or some sort of style file. I tried running ConteXt on it but it stopped half way through. I was using the the set up suggested in the manual of having a project file, and environment file, a product file and components. That may be unnecessary complication but I thought I'd just follow the instructions till I understand it better. I put your formatting suggestions into my environment file (attached). Thanks for the suggestion of punknova Hans, it might come in sometime but Jamie wants it to look as much like a proper book as possible. He's also telling me he wants the pages arranged as sheet one side one page4 p1 side two p2 p3 sheet two side one p8 p5 side two p6 p7 etc so that the folded A4's bind next to each other, rather than in each other as the format I'm using at the moment gives. I've also attached my product, project and test component files Thanks again Andrew > > Marco > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ --------------060102080704000301000609 Content-Type: text/x-tex; name="envbookk.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="envbookk.tex" \startenvironment env2bookk \setuppapersize [A5][A4] \setuparranging [2UP,rotated,doublesided] \setuppagenumbering [alternative=doublesided] \setuplayout [margin=0pt,width=fit] \setupbodyfont [lbr,12pt] \setupheadertexts [][chapter] [\getvariable{document}{title}][] \setuppagenumbering [alternative=doublesided, location=footer] \unexpanded\def\MyChapterTitle#1#2% {\framed [offset=overlay, frame=off, width=\textwidth, align={middle,lohi}] {#1\blank#2}} \setuphead [chapter] [header=high, command=\MyChapterTitle, style=\bfc, numberstyle=\bfb] \setuplabeltext [chapter=Chapter~] \defineconversion [words] [One, Two, Three, Four, Five] \definecounter [mycount] \setupcounter [mycount] [numberconversion=words] \setuphead [chapter] [header=high, command=\MyChapterTitle, style=\bfc, conversion=words, numberstyle=\bfb] \stopenvironment --------------060102080704000301000609 Content-Type: text/x-tex; name="prds2.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="prds2.tex" \startproduct prds2 \project projbook %\component pt1 \component test4 %\component c_article_by_me % ... \stopproduct --------------060102080704000301000609 Content-Type: text/x-tex; name="projbook.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="projbook.tex" \startproject projbook %\environment envbook % only mentioned here! \environment envbookkk \product prds2 %\product prd_year2004-02 %\product prd_year2004-03 %\product prd_year2004-04 %\product tableofcontent \stopproject --------------060102080704000301000609 Content-Type: text/x-tex; name="test4.tex" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="test4.tex" \startcomponent pt1 \product prds2 % but you can use it in other products anyway \project projbook %\title{Editorial} %Jamie and Dad and the Teddy Train. % Chapter One \startchapter[title=First] one \dorecurse{10}{\input ward\par} \stopchapter \startchapter[title=Second] two \dorecurse{10}{\input ward\par} \stopchapter \startchapter[title=third] three \dorecurse{10}{\input ward\par} \stopchapter \startchapter[title=fourth] four \dorecurse{10}{\input ward\par} \stopchapter \stopcomponent pt1 --------------060102080704000301000609 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 ___________________________________________________________________________________ --------------060102080704000301000609--