The following message is a courtesy copy of an article
that has been posted to comp.emacs.xemacs as well.
xpost to xemacs-beta mailing list and comp.emacs.xemacs
when i edit latex sources, i'd like to have the running text in a
proportional font and everything else (macros, math, comments) in the
default, monospaced font
first i tried
(defun my-tex-font () (interactive)
(set-specifier (face-font (get-face 'default)) "Calibri-16"
(current-buffer)))
but executing my-tex-font in a latex buffer caused ALL faces to get a
proportional font
being smart, i told me: "all those faces can be forced to inherit from
a common ancestor face, that i can force to have a mono font"
so i wrote
;;; init.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defface font-latex-ancestor '((t)) "")
(defun my-tex-font ()
(set-specifier (face-font (get-face 'default)) "Calibri-16"
(current-buffer))
(set-specifier (face-font (get-face 'font-latex-ancestor))
"Consolas-16" (current-buffer)))
;;; custom.el ;;;;;;;;;;;;;;;;;;;;;;;;;; (one for each face)
;;; [...]
'(font-latex-math-face ((((class color) (background light))
(:foreground "SaddleBrown" :inherit font-latex-ancestor))))
;;; [...]
'(font-lock-comment-face ((((class color) (background light))
(:foreground "blue4" :inherit font-latex-ancestor))))
but now all my font-latex-* and font-lock-* faces have a black
foreground, in every buffer that is affected by font-lock
fontification
otoh, if i run the new my-tex-font in a latex buffer, the running text
is calibri and macros, comments, math etc is consolas, veery nice to
my eyes (i fear that your opinion may differ), but of course every
face is all black!
any help? thank you in advance,
g
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta