From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/43534 Path: news.gmane.org!not-for-mail From: Peter Rolf Newsgroups: gmane.comp.tex.context Subject: Re: vertical position of framed sucks! Date: Fri, 29 Aug 2008 11:18:17 +0200 Message-ID: <48B7BED9.90404@gmx.net> References: <19AACB4E-D682-49AF-B32C-4194AF04FC72@st.estfiles.de> <48B7ACFB.2020700@gmx.net> <0C71A21F-AFC8-45E0-8195-7B1960B3AF3E@st.estfiles.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220001622 11439 80.91.229.12 (29 Aug 2008 09:20:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Aug 2008 09:20:22 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 29 11:21:16 2008 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 1KZ0AD-0000a0-2J for gctc-ntg-context-518@m.gmane.org; Fri, 29 Aug 2008 11:21:05 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 87FF91FD88; Fri, 29 Aug 2008 11:20:01 +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 02453-01-2; Fri, 29 Aug 2008 11:19:08 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AA73B1FCD7; Fri, 29 Aug 2008 11:19:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 357A71FB1D for ; Fri, 29 Aug 2008 11:19:01 +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 02468-01 for ; Fri, 29 Aug 2008 11:18:19 +0200 (CEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ronja.ntg.nl (Postfix) with SMTP id A1CE81FCE4 for ; Fri, 29 Aug 2008 11:18:18 +0200 (CEST) Original-Received: (qmail invoked by alias); 29 Aug 2008 09:18:18 -0000 Original-Received: from i5387DE5B.versanet.de (EHLO [192.168.1.3]) [83.135.222.91] by mail.gmx.net (mp002) with SMTP; 29 Aug 2008 11:18:18 +0200 X-Authenticated: #24293357 X-Provags-ID: V01U2FsdGVkX1+I8ecPATCIMWFsvJaZN+/Fux+Gif8SOSksFQQeVq T9SdYJWLWMd5RI User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <0C71A21F-AFC8-45E0-8195-7B1960B3AF3E@st.estfiles.de> X-Enigmail-Version: 0.95.7 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.58 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:43534 Steffen Wolfrum schrieb: > Hi, > > sorry for my foggy post last night (02:50h ...) > > Hopefully this example makes it clearer: > -- > > \starttext > \showframe > > \definehead[EbeneFuenf] [subsubsubsection] > \setupsection[section-6][conversion=characters,previousnumber=yes] > \def\FuenfCommand#1{#1.} > > \def\CurrentEbeneFuenfNumber#1#2% > {\hbox to \hsize\bgroup% > \tbox{\midaligned\framed[offset=-0.5pt,frame=on,align=middle,width=0.85\textwidth]{{\FuenfCommand{\convertnumber{characters}{\countervalue{@@sesection-6}}}}{\kern0.75em}#2}}% > > \egroup} > > \setuphead[EbeneFuenf][command=\CurrentEbeneFuenfNumber]% using this > command moves the line 2mm down?! > % insert here \showboxes % see differences between \tbox and \hbox > \EbeneFuenf{Test} > > \stoptext > > -- > I wanted to define a command with a fixed width in order to determine a > maximum width for a section. > But using this command (i.e. the "framed") also moves the section down > about 2mm! > > How can this be avoided? > have you tried my solution? same answer :) the \tbox does exactly what it should do (see p.85, context manual). use a \hbox instead and the text is (nearly, exactly?) on the same vertical position as plain text. but this highly depends on the offset of \framed. btw: you need the outer \hbox for the right total width and the inner \framed for the frame and alignment. why the \tbox or any additional box? best wishes, peter > Steffen > ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________