ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: Yatskovsky <yatskovsky@gmail.com>,
	 mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Vertical alignment of framed text
Date: Thu, 19 Apr 2007 14:24:12 -0400 (EDT)	[thread overview]
Message-ID: <alpine.WNT.0.98.0704191422450.2968@nqvgln> (raw)
In-Reply-To: <158268150.20070419204258@gmail.com>

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 <mojca.miklavec.lists@gmail.com> 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

  parent reply	other threads:[~2007-04-19 18:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5106.1176811855.17432.ntg-context@ntg.nl>
2007-04-17 13:27 ` Vyatcheslav Yatskovsky
2007-04-17 19:49   ` Wolfgang Schuster
2007-04-17 22:46     ` Vyatcheslav Yatskovsky
2007-04-19 12:05       ` Peter Rolf
2007-04-18 17:29   ` Mojca Miklavec
     [not found]     ` <6faad9f00704190819t559de7afgce3ae41e8b5f9815@mail.gmail.com>
     [not found]       ` <6faad9f00704190838h1d11d3c3q1e29d10a46f859ed@mail.gmail.com>
2007-04-19 17:42         ` Vyatcheslav Yatskovsky
2007-04-19 18:23           ` Mojca Miklavec
2007-04-19 18:24           ` Aditya Mahajan [this message]
     [not found] <mailman.5172.1176934612.17432.ntg-context@ntg.nl>
2007-04-19 12:46 ` Vyatcheslav Yatskovsky
2007-04-29 10:52   ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.WNT.0.98.0704191422450.2968@nqvgln \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    --cc=yatskovsky@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).