From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34368 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Vertical alignment of framed text Date: Thu, 19 Apr 2007 14:24:12 -0400 (EDT) Message-ID: 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 1177007069 8424 80.91.229.12 (19 Apr 2007 18:24:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Apr 2007 18:24:29 +0000 (UTC) To: Yatskovsky , mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 19 20:24:21 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 1HebIr-0003Vo-C0 for gctc-ntg-context-518@m.gmane.org; Thu, 19 Apr 2007 20:24:21 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5D7872002C; Thu, 19 Apr 2007 20:24:19 +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-6; Thu, 19 Apr 2007 20:24:13 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2CFEF1FD55; Thu, 19 Apr 2007 20:24:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3DD901FD55 for ; Thu, 19 Apr 2007 20:24:11 +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-5 for ; Thu, 19 Apr 2007 20:24:08 +0200 (CEST) Original-Received: from hellskitchen.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.14.82]) by ronja.ntg.nl (Postfix) with ESMTP id D83051FA63 for ; Thu, 19 Apr 2007 20:24:07 +0200 (CEST) Original-Received: FROM aditya.engin.umich.edu (udhcp-wlan72.public.engin.umich.edu [141.213.120.82]) BY hellskitchen.mr.itd.umich.edu ID 4627B3C5.DD4A0.12083 ; 19 Apr 2007 14:24:05 -0400 In-Reply-To: <158268150.20070419204258@gmail.com> 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:34368 Archived-At: On Thu, 19 Apr 2007, Vyatcheslav Yatskovsky wrote: > Hello Mojca, > > Is there need for \strut at all? The definitions > > \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 insures that all frames are of a minimimum height equal the height of parenthesis. Try \hotkey{A} \hotkey{a} Aditya > 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 > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > > -- Aditya Mahajan | EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam | Ph: 734.262.4008