From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36640 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?J=F6rg_Hagmann?= Newsgroups: gmane.comp.tex.context Subject: section title: alignment Date: Mon, 17 Sep 2007 11:55:46 +0200 Message-ID: <46EE4F22.5050301@unibas.ch> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1190022901 371 80.91.229.12 (17 Sep 2007 09:55:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 Sep 2007 09:55:01 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Sep 17 11:54:59 2007 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 lo.gmane.org with esmtp (Exim 4.50) id 1IXDJh-0001ZI-Mu for gctc-ntg-context-518@m.gmane.org; Mon, 17 Sep 2007 11:54:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4FDC51FCE3; Mon, 17 Sep 2007 11:54:51 +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 08416-04; Mon, 17 Sep 2007 11:54:38 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E7CF51FB89; Mon, 17 Sep 2007 11:54:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9BA7F1FB89 for ; Mon, 17 Sep 2007 11:54:33 +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 08423-04-3 for ; Mon, 17 Sep 2007 11:54:25 +0200 (CEST) Original-Received: from balu3.urz.unibas.ch (balu3.urz.unibas.ch [131.152.1.57]) by ronja.ntg.nl (Postfix) with ESMTP id 9C8551FADB for ; Mon, 17 Sep 2007 11:54:25 +0200 (CEST) Original-Received: from bonasa.local ([131.152.79.98]) by balu3.urz.unibas.ch (8.13.1/8.13.1) with ESMTP id l8H9sOMZ025483 for ; Mon, 17 Sep 2007 11:54:25 +0200 User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) X-SMTP-Vilter-Version: 1.3.2 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:36640 Archived-At: Dear list members, My section titles have a gray background of textwidth, as follows: \def\SectionCommand#1#2{\framed[frame=3Doff,width=3D\textwidth,% align=3Dright,background=3Dcolor,backgroundcolor=3Dlightgray]{#1\quad#2}} \setuphead[section][command=3D\SectionCommand,numbercolor=3Dred] That works, except when section titles are longer than textwidth: in = that case, the second line is aligned with the number, not the text. How = can I get correct alignment? I tried to include \starttabulate \NC #1 = \NC #2 \NC\NR \stoptabulate in SectionCommand, but then the background = extends too much above and below. I'm sure there is an easy solution? Thanks a lot, J=F6rg Minimal example: \setupcolors[state=3Dstart] \def\SectionCommand#1#2{\framed[frame=3Doff,width=3D\textwidth,% align=3Dright,background=3Dcolor,backgroundcolor=3Dlightgray]{#1\quad#2}} \setuphead[section][command=3D\SectionCommand,numbercolor=3Dred] \starttext \section{A very long title, longer than the width of the text and = therefore needing a second line} \stoptext ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________