auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Font size of font-latex-title-*-face in XEmacs


From: Reiner Steib
Subject: [AUCTeX-devel] Font size of font-latex-title-*-face in XEmacs
Date: Thu, 14 Apr 2005 17:16:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Hi,

in AUCTeX, we have several faces (font-latex-title-N-face, N=1...4)
for chapter and section titles in LaTeX with increasing size from
\subparagraph upto \part.  The result is supposed to look like in this
screen shot from Emacs
<URL:http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/auctex/emacs-title-face-1-4.png>.

In XEmacs, the results depends very much on user settings and
XResources.  Here is the relevant `defface' part from `font-latex.el'
(from
<URL:http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/auctex/rs-title-face.el>,
a self-contained version which doesn't require AUCTeX):

,----
| (defvar font-latex-round 0.9)
| 
| (defun font-latex-make-title-faces ()
|   "Build the faces used to fontify sectioning commands."
|   (dotimes (i 3)
|     (let* ((num (1+ i))
|          (face-name (intern (concat "font-latex-title-" (number-to-string num)
|                                     "-face"))))
|       (if (featurep 'xemacs)
|         (let ((size (concat
|                      (number-to-string
|                       ;; Multiply with .9 because `face-height' returns a
|                       ;; value slightly larger than the actual font size.
|                       (round (* font-latex-round (face-height 'default)
|                                 (expt 1.2 (- 3 i)))))
|                      "pt")))
|           (eval `(defface ,face-name
|                    '([...]
|                      (((class color) (background light))
|                       (:bold t :foreground "blue4" :family "helvetica"
|                              :size ,size))
|                      [...]
|                      (t (:size ,size :family "helvetica")))
|                    ,(concat "Face for LaTeX titles at level "
|                             (number-to-string num) ".")
|                    :group 'font-latex-highlighting-faces)))
`----

Apparently this gives good results for some of the AUCTeX developers
(Ralf).  But for me, the results are bad:
http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/auctex/xemacs-title-face-03-CVS-2005-04-13.png
shows a screen shot in XEmacs 21.4.17 with all possible customizations
and XResourses disabled.  You can see, that only the title-4 face is
bold.  title-3 is larger than title-4 (correct).  title-2 and title-1
are as small as the default font and not in bold.

http://theotp1.physik.uni-ulm.de/~ste/comp/emacs/auctex/xemacs-title-face-01-CVS-2005-04-13.png
shows another screen shot in XEmacs without any customization, but
with my usual XResourses.  For some reason XEmacs failed to pick a
helvetica font.  Again, only one face (title-2) has increased size.
Below [1] is the output of `customize-face' on the title face.  The
numbers look correct, IMO.  Also `font-latex-verbatim-face' doesn't as
it is supposed to: much too large (17pt where it should be 14pt).

So either we are doing something completely wrong in the XEmacs parts
of AUCTeX' `font-latex.el' or XEmacs' font (size) selection is not
suitable for this task.  Could someone please give us an advice?

If we cannot get this to work reliably in XEmacs (without asking the
users to changes their XResourses and other settings), we should
probably change the default of `font-latex-title-fontify' to 'color in
XEmacs.

Bye, Reiner.

[1]
,----
| Font Latex Title 1 Face: (sample) *
|    [State]: this face is unchanged from its standard setting.
| Face for LaTeX titles at level 1.
| Attributes: * Foreground: blue4       (sample)
|             * Background:             (sample)
|             * Size: 22pt
|             * Font Family: helvetica
| 
| Font Latex Title 2 Face: (sample) *
|    [State]: this face is unchanged from its standard setting.
| Face for LaTeX titles at level 2.
| Attributes: * Foreground: blue4       (sample)
|             * Background:             (sample)
|             * Size: 18pt
|             * Font Family: helvetica
| 
| Font Latex Title 3 Face: (sample) *
|    [State]: this face is unchanged from its standard setting.
| Face for LaTeX titles at level 3.
| Attributes: * Foreground: blue4       (sample)
|             * Background:             (sample)
|             * Size: 15pt
|             * Font Family: helvetica
| 
| Font Latex Title 4 Face: (sample) *
|    [State]: this face is unchanged from its standard setting.
| Face for LaTeX titles at level 4.
| Attributes: * Foreground: blue4       (sample)
|             * Background:             (sample)
|             * Size: 
|             * Font Family: helvetica
`----
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/





reply via email to

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