2010-09-17

让 pstree 的 圆圈节点 Tcircle 保持一样大小 | Make all Tcircle nodes in pstree a fixed size

最近要用latex画树,决定学习pstricks,pstree还是蛮好用的,但是用Tcircle画节点时发现一个问题,每个圆圈的大小是与内容有关的,比如字母a和f的圆圈就不一样大,很难看。

在pstrick的文档里看了半天也没弄出个所以然,然后又搜了半天,才发现可以用makebox,原来这么简单,但是我对latex还是不熟练。

解法为:

\Tcircle{\makebox[\somefixedsize][c]{content}}



I need to draw some trees in latex, so I learned some pstricks, I found pstree is rather easy to use, but there's somethings with the Tcircle, the size of the circles is related to its content, for example for circles for 'a' and 'f' are not of the same size, which makes the tree very ugly.

I didn't found anything useful in the pstrick's document, after rather some time searching on the web, I realized that I can take advantage of makebox, that's a easy but great idea, however I was still not familiar enough with latex...

The solution is:

\Tcircle{\makebox[\somefixedsize][c]{content}}

No comments: