From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: karl@freefriends.org (Karl Berry) Newsgroups: gmane.emacs.bugs Subject: Re: latex mode, nexted subscripts are unreadable Date: Thu, 13 Sep 2007 19:24:10 -0500 Message-ID: <200709140024.l8E0OAe04468@f7.net> References: NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1189729483 17564 80.91.229.12 (14 Sep 2007 00:24:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Sep 2007 00:24:43 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: timh@insightful.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 14 02:24:36 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IVyz4-0003mx-9U for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Sep 2007 02:24:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVyz2-0005YT-4z for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Sep 2007 20:24:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVyyz-0005Ub-TW for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2007 20:24:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVyyy-0005SS-Du for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2007 20:24:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVyyy-0005SJ-6p for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2007 20:24:28 -0400 Original-Received: from server1.f7.net ([64.34.169.74] helo=f7.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IVyyx-0001i0-RE for bug-gnu-emacs@gnu.org; Thu, 13 Sep 2007 20:24:27 -0400 X-Envelope-From: karl@freefriends.org X-Envelope-To: bug-gnu-emacs@gnu.org Original-Received: (from karl@localhost) by f7.net (8.11.7-20030920/8.11.7) id l8E0OAe04468; Thu, 13 Sep 2007 19:24:10 -0500 In-Reply-To: X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16552 Archived-At: 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