[Tioga-users] font size change using tex_preview_fontsize results in incorrect label positioning

Ivars Finvers ifinvers at ucalgary.ca
Wed Sep 6 14:56:32 EDT 2006


Hi,

I tried to use the command tex_preview_fontsize to change the font  
size of the axis labels on my plots. The result is that the axis  
labels are of the correct size, but are incorrectly placed. If the  
new font size is larger than 10pt, the labels can partially overlap  
the axes.

The problem is that the fontsize of the text is changed, but its  
location isn't. Looking into the .txt file which contains the text  
placement commands such as:

	\put(96,435){\scalebox{0.70}{\makebox(0,0)[cc]{\tiogasetfont{-0.10}}}}

the \makebox command uses a [cc] location option, meaning that the  
text is center both horizontally and vertical at the specified point.  
As the text size changes, the text will grow equally in all  
directions. Therefore the y-axis label eventually overlap the y-axis.

A quick fix is to change the location options to [rc] (horizontally  
right-aligned, vertically centered) for the left y-axis labels and  
[ct] for the bottom x-axis. In this way, the labels will grow in size  
away from the axis. Unfortunately the labels often collide with the  
axis title text. There is no easy fix for this other than manually  
changing the title's location in the \put command.

To me, it appears that fontsize changes must be accounted for by the  
routine that generates the \put commands for the .txt file. And this  
routine must know the true size of the text that is being placed  
(possibly by running tex  for each text fragment and reading  
extracting the box size -- ugly!).

The reason I'm using the fontsize command is that I want to generate  
a figure whose absolute size is controlled and whose fontsize is  
identical to the accompanying article text. For example, I want a  
final pdf whose bounding box is 3in wide and the text font is Times  
at 12pt. So far I haven't succeeded in doing this.

I'm using Tioga 1.14.

Ivars


More information about the Tioga-users mailing list