Malcolm Ross | 2 Feb 05:46
Picon
Picon

Horizontal alignment of texts in different nodes

I am attempting to draw a tree using the commands from the Trees  
library, but one small matter has defeated me. I have nodes  
containing 2-3 lines of text, and these nodes are horizontally  
aligned with each other. I would like, say,  the two lines of text in  
horizontally adjacent nodes also to be horizontally aligned, but this  
does not always happen. If the top line of one node contains a letter  
with an ascender (e.g. b, d, f) and the top line of the adjacent  
node  contains only letters without ascenders (e.g. c, e, g, s), then  
the top-line baselines are not aligned from node to node because the  
presence of the ascender in one changes its line height. Spacing  
between the lines of the label also seems to be altered by ascenders  
and descenders.

I have the feeling that \pgftext ought to offer a solution to this  
problem, but I am unable to make it work inside a tree node.

Any solutions would be very gratefully received.

Malcolm Ross
_____________________________________

Malcolm D. Ross
Professor, Department of Linguistics
Research School of Pacific and Asian Studies
Building No. 9, The Australian National University
CANBERRA A.C.T. 0200, Australia

http://rspas.anu.edu.au/people/personal/rossm_ling.php
http://rspas.anu.edu.au/linguistics/projects/biomdr.html

(Continue reading)

Till Tantau | 2 Feb 12:33
Picon
Favicon

Re: Horizontal alignment of texts in different nodes

Hello everyone,

in the CVS there is now a new option called "growth parent anchor"  
that was introduced exactly for such problems. Also, the current CVS  
contains lots of new stuff having to do with matrix alignments that  
can also help in this context.

For the time being, try adding a \strut at the beginning of nodes,  
although that is not really "the right solution".

Best regards,
Till

Am 02.02.2007 um 05:46 schrieb Malcolm Ross:

> I am attempting to draw a tree using the commands from the Trees
> library, but one small matter has defeated me. I have nodes
> containing 2-3 lines of text, and these nodes are horizontally
> aligned with each other. I would like, say,  the two lines of text in
> horizontally adjacent nodes also to be horizontally aligned, but this
> does not always happen. If the top line of one node contains a letter
> with an ascender (e.g. b, d, f) and the top line of the adjacent
> node  contains only letters without ascenders (e.g. c, e, g, s), then
> the top-line baselines are not aligned from node to node because the
> presence of the ascender in one changes its line height. Spacing
> between the lines of the label also seems to be altered by ascenders
> and descenders.
>
> I have the feeling that \pgftext ought to offer a solution to this
> problem, but I am unable to make it work inside a tree node.
(Continue reading)

Malcolm Ross | 3 Feb 03:32
Picon
Picon

Re: Horizontal alignment of texts in different nodes

My thanks to Mark and Till for their advice. A custom-made variant of  
\strut does indeed achieve what I wanted. And I look forward to the  
day when the CVS version becomes the next published version, as I  
have made extensive use of matrix alignments in linguistics diagrams  
made with other graphics applications.

All the best,

Malcolm

On 02/02/2007, at 10:33 PM, Till Tantau wrote:

> Hello everyone,
>
> in the CVS there is now a new option called "growth parent anchor"  
> that was introduced exactly for such problems. Also, the current  
> CVS contains lots of new stuff having to do with matrix alignments  
> that can also help in this context.
>
> For the time being, try adding a \strut at the beginning of nodes,  
> although that is not really "the right solution".
>
> Best regards,
> Till
>
> Am 02.02.2007 um 05:46 schrieb Malcolm Ross:
>
>> I am attempting to draw a tree using the commands from the Trees
>> library, but one small matter has defeated me. I have nodes
>> containing 2-3 lines of text, and these nodes are horizontally
(Continue reading)


Gmane