[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Controlling font styles in latex-mode
From: |
Steve Revilak |
Subject: |
Re: Controlling font styles in latex-mode |
Date: |
Sun, 18 Apr 2010 09:28:45 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
From: Ramesh Sridharan <ramesh.eecs@gmail.com>
I was wondering how to tell emacs not to allow style changes that
change font face. In particular, latex-mode causes a number of changes
I don't like:
- Text inside of a \section{} or \subsection{} block is bigger and
variable-width
- Superscripts and subscripts are shown in superscript or subscript,
making them smaller.
...
I'm using emacs 22.2.1 on Debian (lenny).
You should be able to make most of the changes with M-x
customize-face. For example, to change the appearance of text within
\section{...},
- put point in the \section{...} name (i.e. between the braces)
- M-x customize-face
Then change the face to suit your taste.
IIRC emacs-22 gives you the ability to change the face of superscript
and subscript characters, but the raise/lower amounts are hardwired
into tex-mode.el. For example, I have a copy of emacs-22.3 where
(defun tex-font-lock-suscript) in tex-mode.el ends with the following
code:
(if (eq (char-after pos) ?_)
'(face subscript display (raise -0.3))
'(face superscript display (raise +0.3))))
The only way I was able to prevent the raising (lowering) of
superscript (subscript) characters in emacs 22, was by changing the
`raise' amounts to 0.0, and then byte-recompiling tex-mode.el. The
process was something like this
- mv tex-mode.el.gz tex-mode.el.gz.ORIG
- mv tex-mode.elc tex-mode.elc.ORIG
- gunzip -c < tex-mode.el.gz.ORIG > tex-mode.el
- edit tex-mode.el. Change the raise amounts from -0.3 (or +0.3) to
0.0
- byte compile the modified tex-mode.el. dired's `B' command does
this (but there are other ways)
Emacs-23 adds a new variable, tex-font-script-display, which controls
the raise/lower amounts, and eliminates the need to modify
tex-mode.el.
Steve
pgpV9ASV3v67b.pgp
Description: PGP signature