From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29837 Path: news.gmane.org!not-for-mail From: Duncan Hothersall Newsgroups: gmane.comp.tex.context Subject: Rule under length of last line Date: Mon, 31 Jul 2006 17:59:59 +0100 Message-ID: <44CE370F.8030202@capdm.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154365347 9988 80.91.229.2 (31 Jul 2006 17:02:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jul 2006 17:02:27 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Mon Jul 31 19:02:24 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1G7b8E-0000lY-RD for gctc-ntg-context-518@m.gmane.org; Mon, 31 Jul 2006 19:00:42 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 29B091FDCC; Mon, 31 Jul 2006 19:00:41 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16300-05; Mon, 31 Jul 2006 19:00:35 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 24EB51FD75; Mon, 31 Jul 2006 19:00:35 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9C0991FD75 for ; Mon, 31 Jul 2006 19:00:32 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 16323-02 for ; Mon, 31 Jul 2006 19:00:28 +0200 (CEST) Original-Received: from nbg01-smtpauth-04.lumison.net (nbg01-smtpauth-04.lumison.net [87.246.68.12]) by ronja.ntg.nl (Postfix) with SMTP id 77FC51FD09 for ; Mon, 31 Jul 2006 19:00:27 +0200 (CEST) Original-Received: (qmail 20890 invoked from network); 31 Jul 2006 17:00:26 -0000 Original-Received: from unknown (HELO liszt-12.ednet.co.uk) (212.20.226.36) by smtp-auth.lumison.net with SMTP; 31 Jul 2006 17:00:26 -0000 Original-Received: from [192.168.254.41] (lynx.capdm.com [212.20.255.162]) by liszt-12.ednet.co.uk (Postfix) with ESMTP id 61EC71BE491 for ; Mon, 31 Jul 2006 18:00:26 +0100 (BST) User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) Original-To: ConTeXt List X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:29837 Archived-At: I've had a last-minute impossible request for a typesetting style, and having already told the person it can't be done in the time available, wondered whether it can actually be done at all. The request is for a subsection heading to have a continuous horizontal rule under both its number and title, at a distance of about 6pt from the baseline (i.e. not underlining), extending just the length of the heading. I can do that by setting both number and title in a TABLE, setting the offsets and specifying the bottom frame to be on - no problem. However, the tricky part is that where a longer title runs beyond one line, the line should only appear under the last line, and only to the length of the last line of text. In other words, for viewers with fixed width fonts: 1.1.1 Short title ----------------- 1.1.2 Longer title which wraps onto a second line like this --------------------------- We generate the ConTeXt code from XML, so ideally a solution wouldn't require the last line to be set separately, but would just work whether the heading was single or multiple line. What I'm really looking for is a subsection setup that will automatically do this whatever length of title. I have to say I think it's quite ugly, but can anyone give me a pointer as to how it could be done? Is there a box left at the end of a par which shows the width of the last line? As I say, I've already said no, so this is just out of interest, no urgency. Thanks, Duncan