From: karl@freefriends.org (Karl Berry)
To: timh@insightful.com
Cc: bug-gnu-emacs@gnu.org
Subject: Re: latex mode, nexted subscripts are unreadable
Date: Thu, 13 Sep 2007 19:24:10 -0500 [thread overview]
Message-ID: <200709140024.l8E0OAe04468@f7.net> (raw)
In-Reply-To: <ulkbbmp0k.fsf@insightful.com>
I tried evaluating a modified defface definition (in a temporary file,
not by changing tex-mode.el) but this had no effect.
I believe that defface is like defvar et al; if the symbol is already
defined, it won't do anything. You can call modify-face or
set-face-attribute from Elisp to change existing faces.
$a_{b^c}$ makes $c$ elevated at the same level as the $c$ in $a^c$;
the raising is done relative to $a$ rather than to $b$.
Maybe this is a separate bug?
Maybe. I believe this is the code in tex-mode.el that does the raising
and lowering. I don't see any reason offhand for the different face to
affect it, but unfortunately I really can't say for sure.
(defun tex-font-lock-suscript (pos)
(unless (or (memq (get-text-property pos 'face)
'(font-lock-constant-face font-lock-builtin-face
font-lock-comment-face tex-verbatim))
;; Check for backslash quoting
(let ((odd nil)
(pos pos))
(while (eq (char-before pos) ?\\)
(setq pos (1- pos) odd (not odd)))
odd))
(if (eq (char-after pos) ?_)
'(face subscript display (raise -0.3))
'(face superscript display (raise +0.3)))))
Sorry I can't help more.
Best,
Karl
next prev parent reply other threads:[~2007-09-14 0:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-12 18:12 latex mode, nexted subscripts are unreadable Karl Berry
2007-09-12 22:34 ` Jason Rumney
2007-09-13 0:48 ` Tim Hesterberg
2007-09-13 15:03 ` Drew Adams
2007-09-26 7:41 ` Glenn Morris
2007-09-12 23:40 ` Tim Hesterberg
2007-09-14 0:24 ` Karl Berry [this message]
2007-09-14 16:47 ` Tim Hesterberg
-- strict thread matches above, loose matches on Subject: below --
2007-09-06 23:21 Tim Hesterberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200709140024.l8E0OAe04468@f7.net \
--to=karl@freefriends.org \
--cc=bug-gnu-emacs@gnu.org \
--cc=timh@insightful.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.