From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11185 Path: main.gmane.org!not-for-mail From: =?iso-8859-1?Q?Martin_Kolar=EDk?= Newsgroups: gmane.comp.tex.context Subject: RE: Re: Using command in section Date: Wed, 5 Mar 2003 08:40:51 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <000d01c2e2ea$8bc67920$2197fac3@mii.cz> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1046850118 20972 80.91.224.249 (5 Mar 2003 07:41:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 5 Mar 2003 07:41:58 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed Mar 05 08:41:56 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 18qTXH-0005S6-00 for ; Wed, 05 Mar 2003 08:41:55 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 8D13A10B17; Wed, 5 Mar 2003 08:42:22 +0100 (MET) Original-Received: from belinda.mii.cz (rhea.mii.cz [212.27.214.13]) by ref.ntg.nl (Postfix) with SMTP id 0AA3E10AF9 for ; Wed, 5 Mar 2003 08:40:51 +0100 (MET) Original-Received: (qmail 14313 invoked from network); 5 Mar 2003 07:40:51 -0000 Original-Received: from enceladus.mii.cz (HELO enceladus) (195.250.151.33) by belinda.mii.cz with SMTP; 5 Mar 2003 07:40:51 -0000 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk X-Reply-To: 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:11185 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11185 Thank you, I will test it and I suppose your solution will work. But I think that simple TeX-only solution should work too. Maybe I am a bit foolish :-) if I try to do things as simple as possible and if I try to use thing with understanding them... The behaviour surprised me and as I did not expect it, I discussed it here. And sure, if it is a feature, I really should use \tbox :-) Have a nice day, Martin > -----Original Message----- > From: ntg-context-admin@ntg.nl [mailto:ntg-context-admin@ntg.nl]On > Behalf Of Guy Worthington > Sent: Wednesday, March 05, 2003 8:29 AM > To: ntg-context@ref.ntg.nl > Subject: [NTG-context] Re: Using command in section > > > Martin Kolarík wrote: > > > I'm using private macro for title of section: > > Sometimes I get so cross with ConTeXt, and that's because, like you, > when stuck, I run to "The TeXbook" and not to "ConTeXt the manual". > > Only a fortnight ago, I was facing your exact problem and wasted > several hours making a solution for a non-existant problem. So, in > the hope that you can profit from my bitter experience, here's what I > advice: > > 1) Go to the ConTeXt manual, > > 2) Look up '\setuphead' in the index, > > 3) Encapsulated within the handful of pages, following the index > reference, is the solution to your exact problem laid out, step > by step. (It's also a good introduction into the methodology > used in the ConTeXt interface.) > > I'm only guessing that you want your section header looking like: > > X The Quick Brown > Fox Jumped Over > The Lazy Dog > > and using that assumption, I had a go at translating that into ConTeXt > > ----- > > \setuphead[section] > [command=\doTitle] > > %% \def\doTitle#1#2{% > %% \vbox to 0pt{ > %% \hsize=3cm > %% \hbox{\vtop{#1}\raise\lineheight\vtop{#2}} > %% \vss}} > > \def\doTitle#1#2{% > \hbox to 3cm \bgroup > \hfill > \setupframed [offset=.5em, frame=off] > \tbox{\framed [width=1.5cm, align=right]{#1}}% > \tbox{\framed [width=3cm, align=right]{#2}}% > \egroup} > > \starttext > > \section A Day in the Life of the Quick Brown Fox > > \stoptext > > ------ > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context >