* How to align baselines?
@ 2007-03-13 7:08 Helin Gai
2007-03-13 9:23 ` Wolfgang Schuster
2007-03-13 14:19 ` Hans Hagen
0 siblings, 2 replies; 3+ messages in thread
From: Helin Gai @ 2007-03-13 7:08 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi all,
I have some difficulty lining up the baselines of two frames... Here's
what I did:
\hbox to\hsize{%
\setupframed[frame=off]%
\vtop{chapter \switchtobodyfont[20pt] 1}\quad%
\vtop{\framed[width=6cm,align=right]{Test}}
Any idea what's going wrong here?
Thanks a lot!
Helin
--
Helin (Colin) Gai
Class of 2009, Duke University
Box 96332
Durham, NC 27708
Phone: 919-943-6302
helin.gai at gmail.com
hg9 at duke.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to align baselines?
2007-03-13 7:08 How to align baselines? Helin Gai
@ 2007-03-13 9:23 ` Wolfgang Schuster
2007-03-13 14:19 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2007-03-13 9:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 791 bytes --]
2007/3/13, Helin Gai <helin.gai@gmail.com>:
>
> Hi all,
>
> I have some difficulty lining up the baselines of two frames... Here's
> what I did:
>
> \hbox to\hsize{%
> \setupframed[frame=off]%
> \vtop{chapter \switchtobodyfont[20pt] 1}\quad%
> \vtop{\framed[width=6cm,align=right]{Test}}
>
> Any idea what's going wrong here?
>
> Thanks a lot!
>
> Helin
>
> --
> Helin (Colin) Gai
Hi Helin,
if you want to make your own chapter layout, use the command option
in the \setuphead setup.
To get a frame that is lined up with the current baseline use the \inframed
command instead of the normal \framed command.
\showgrid
\starttext
\line
{\setupframed[frame=off]%
\vtop{chapter \switchtobodyfont[20pt] 1}\quad%
\llap{\inframed[width=6cm,align=right]{Test}}}
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 1255 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to align baselines?
2007-03-13 7:08 How to align baselines? Helin Gai
2007-03-13 9:23 ` Wolfgang Schuster
@ 2007-03-13 14:19 ` Hans Hagen
1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2007-03-13 14:19 UTC (permalink / raw)
To: mailing list for ConTeXt users
Helin Gai wrote:
> Hi all,
>
> I have some difficulty lining up the baselines of two frames... Here's
> what I did:
>
> \hbox to\hsize{%
> \setupframed[frame=off]%
> \vtop{chapter \switchtobodyfont[20pt] 1}\quad%
> \vtop{\framed[width=6cm,align=right]{Test}}
>
> Any idea what's going wrong here?
>
you need to make sure that the second box has the same height
\hbox to\hsize{
\setupframed[frame=off]%
\switchtobodyfont[20pt]%
\vtop{chapter \switchtobodyfont[20pt] 1}\quad
\vtop{\inframed[width=6cm,align=right]{Test}}
}
or
\hbox to\hsize{
\setupframed[frame=off]%
\setbox0=\vtop{chapter \switchtobodyfont[20pt] 1}
\setbox2=\vtop{\inframed[width=6cm,align=right]{Test}}
\ht2=\ht0
\box0\quad\box2
}
\inframed does the lowering
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-13 14:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-13 7:08 How to align baselines? Helin Gai
2007-03-13 9:23 ` Wolfgang Schuster
2007-03-13 14:19 ` Hans Hagen
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).