[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Re: Fontifying of titles...

From: Ralf Angeli
Subject: [AUCTeX-devel] Re: Fontifying of titles...
Date: Sat, 09 Apr 2005 10:12:36 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux)

* Reiner Steib (2005-04-08) writes:

> On Fri, Apr 08 2005, Ralf Angeli wrote:
>> * Reiner Steib (2005-04-07) writes:
>>> - When the number of characters in the line (macro plus title) is
>>>   close to my window width.  I.e. with `color', it would fit, but with
>>>   `height' it is wrapped.
>> In such cases I tend to format the lines in concern manually.
> This would result in a document which looks nice only with AUCTeX and
> specific font settings.  I think we had a discussion about this (WRT
> filling with tex-fold or preview-latex) and IIRC we agreed that this
> is not a good idea.

David explained this point quite good.  I am thinking as well that the
effect of smaller fill columns for headings is a minor issue.

Regarding the implementation: Currently I don't know how to do this in
AUCTeX because I could not find a way to calculate an appropriate
column for breaking a line in headings fontified with a larger,
proportional font.  `current-column', `move-to-column', `string-width'
... nothing seems to support this.  So if we don't want to guess and
decrease the value of `fill-column' or similar by an arbitrary amount
for headings, we will probably have to wait until Emacs supports this.

> Probably we cannot completely avoid that `font-latex-title-N-face' and
> `font-latex-title-(N+1)-face' is the same font on some systems unless
> we use a large scale factor resulting in too huge fonts for \part or
> \chapter.  But my point was that sectioning font stands out enough
> compared to the rest of the text.  This is the aim of
> `font-latex-title-fontify', isn't it?


>> The 18 and 20 pixel sizes of the font look nearly identically.  
> Maybe because of the different dpi values (20-x-100-100
> vs. 18-180-75-75)?

Hm, maybe.  The function choosing the font does not really seem to be
interested in dpi values.

>> Oh well, I guess I could live with that (or customize it if I need
>> the difference) in case people find this more appealing.
> Maybe we get better results for more font constellations if we
> introduce more levels: 0 ... 7 for \part ... \subsubparagraph (one
> level for each LaTeX section macro), like in the attached patch.  With
> a scale factor of 1.05-1.1 this gives acceptable results.  I'd propose
> to install it and let cvs/snapshot users experiment with different
> values for `font-latex-title-fontify', ask for feedback and change the
> default scaling based on it.  I could imagine that some of the users
> who complained and switched back to `color', could live or even would
> like a small factor.  Therefore, I would recommend to use quite small
> factor as default value, e.g. 1.07.

I could imagine that we will rather get complaints that users who
dislike the 'height fontification now have to change eight faces
instead of four, i.e. it will make matters worse with people who don't
read the documentation.  And if you only have a limited amount of font
sizes available this will not improve the situation because it does
not change the limiting factor.

So I'd prefer to stay with the current set of faces/levels and simply
decrease the scale factor a bit.  What we could try as well is to
scale linearly (considering the dpi value of the display device if
possible) instead of exponentially.  Maybe this will give better

>>> +(defcustom font-latex-title-fontify 'height
>>> +  "Whether to fontify LaTeX titles with varying height faces or a color 
>>> face.
>>> +
>>> +If it is a number, use varying height faces scaled with this number.
>>> +Setting this variable does not take effect unless you call
>>> +\\[font-lock-fontify-buffer]."
> BTW, calling `font-lock-fontify-buffer' (and
> `font-latex-make-title-faces') is not sufficient to change the
> scaling.

You mean with your patch applied, right?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]