From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34367 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: Vertical alignment of framed text Date: Thu, 19 Apr 2007 20:23:04 +0200 Message-ID: <6faad9f00704191123i15f73011oc68559f9c1b17022@mail.gmail.com> References: <1843304103.20070417162703@gmail.com> <6faad9f00704181029j5851deddw3cb6f727a15f8e6e@mail.gmail.com> <6faad9f00704190819t559de7afgce3ae41e8b5f9815@mail.gmail.com> <6faad9f00704190838h1d11d3c3q1e29d10a46f859ed@mail.gmail.com> <158268150.20070419204258@gmail.com> 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: sea.gmane.org 1177007011 8237 80.91.229.12 (19 Apr 2007 18:23:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2007 18:23:31 +0000 (UTC) Cc: mailing list for ConTeXt users To: Yatskovsky Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 19 20:23:24 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 1HebHq-0003B5-IA for gctc-ntg-context-518@m.gmane.org; Thu, 19 Apr 2007 20:23:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B765A20013; Thu, 19 Apr 2007 20:23:17 +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 06402-03; Thu, 19 Apr 2007 20:23:11 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E6D2B1FD55; Thu, 19 Apr 2007 20:23:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E02F91FD55 for ; Thu, 19 Apr 2007 20:23:09 +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 05681-09 for ; Thu, 19 Apr 2007 20:23:07 +0200 (CEST) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.230]) by ronja.ntg.nl (Postfix) with ESMTP id B97DB1FA63 for ; Thu, 19 Apr 2007 20:23:06 +0200 (CEST) Original-Received: by wx-out-0506.google.com with SMTP id h29so617407wxd for ; Thu, 19 Apr 2007 11:23:05 -0700 (PDT) Original-Received: by 10.67.117.18 with SMTP id u18mr2229519ugm.1177006984194; Thu, 19 Apr 2007 11:23:04 -0700 (PDT) Original-Received: by 10.67.43.17 with HTTP; Thu, 19 Apr 2007 11:23:04 -0700 (PDT) In-Reply-To: <158268150.20070419204258@gmail.com> Content-Disposition: inline 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:34367 Archived-At: On 4/19/07, Vyatcheslav Yatskovsky wrote: > Hello Mojca, > > Is there need for \strut at all? The definitions No. You get it by default unless you explicitely disable it. I just didn't understand why you wanted to set the height explicitely. > \def\hotkey#1{\inframed[corner=00, offset=0pt]{\ #1\ }} > > and > > \def\hotkey#1{\inframed[corner=00,offset=0pt]{\strut\ #1\ }} > > work equally well and I can see no difference. > > I (wrongly) supposed that \strut version can prevent the frame from growing in height, but when I set offset more then zero, the height is increased too. Strut only prevents frame from shinking, not from growing. It's just an invisible placeholder. If you provide higher material, the box will grow. > In your original version, only the offset option was omitted, so that frames was bigger by default. With offset=0pt they look just pretty. > (Until there are possibility to control width/height or xoffset/yoffset separately). > > Thanks a lot. > > Best, > Vyatcheslav > > > > > On 4/19/07, Mojca Miklavec wrote: > >> Hello Hans, > > >> I've found the following sentence in core-rul.tex: > > >> %D The last conditional takes care of the special situation of > >> %D in||line \inframed[height=3cm]{framed} boxes. Such boxes have > >> %D to be \inframed{aligned} with the running text. > > >> But the behaviour seems either broken or perhaps I didn't understand > >> the concept. The text inside bigger \inframed command doesn't seem to > >> be aligned properly: > > >> The last conditional takes care of the special situation of in||line > >> \inframed[height=3cm]{framed} boxes. Such boxes have to be > >> \inframed{aligned} with the running text. > > >> Thanks a lot, > >> Mojca > > >> PS to Yatskovsky: I didn't realize that \inframed was indeed only a > >> synonym for "location=low". > > > The culprit most probably lies here: > > > \installframedlocator \v!low > > {} > > {\doprelocframedbox\strutdp > > \setbox\framebox\hbox{\lower\scratchdimen\box\framebox}% > > \ht\framebox\strutht > > \dp\framebox\strutdp > > \box\framebox} > > > The box is lowered for "strut depth" + line width + offset, without > > taking the extra parameter "height=..." into account. > > > > For Yatskovsky: you can still use something like > > \def\hotkey#1{\inframed[corner=00,offset=5pt]{\strut\ #1\ }} > > if you need to have bigger offset (offset=...) and if you want all > > your hotkeys to be equally heigh (\strut, although I believe that > > strut is already there by default). > > > But the "forgotten case" could or should still be solved ... > > > Mojca