Am Samstag, 14. Oktober 2006 15:33 schrieb Abdelrazak Younes:

> That being, I really don't know why the fontMetrics is useful here 
> because we use a default font that we don't even know the shape. Maybe 
> the attached patch is good enough?

The first one is better IMO. In case you don't know what bibitemWidest() 
does: It is supposed to find the bibitem with the widest label in the 
output, because that is needed as an argument of the bibliography 
environment to dtermine the correct indentation. To be 100% correct we 
would need the metrics of the font that is used in the output, but usually 
we don't have access to these.
In practice, any proportional font is probably good enough, since we don't 
need to know the final with, we only need to know the which label is the 
widest.
Unless there is an easy way to get the metrics of the output font I suggest 
to use a hardcoded font like "Times" or so.

It is very important that the result of this function is the same both with 
and without GUI. After thinking about this it is clear that no LyXFont 
metrics should be used here, since these come from the gui. If we can't 
easily get the LaTeX font metrics we should make our own poor mans front 
metrics replacement, e.g. by hardcoding the metrics of the standard TeX 
font.


Georg

Reply via email to