diff options
| -rw-r--r-- | etc/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 34 |
3 files changed, 47 insertions, 2 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog index d8ba4fb60db..7024efa1967 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2007-09-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * PROBLEMS: Mention Tex superscript font issue. | ||
| 4 | |||
| 1 | 2007-09-25 Johannes Weiner <hannes@saeurebad.de> | 5 | 2007-09-25 Johannes Weiner <hannes@saeurebad.de> |
| 2 | 6 | ||
| 3 | * NEWS: Fix typo. | 7 | * NEWS: Fix typo. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index babc7ac209d..2023fa93c4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2007-09-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * mail/supercite.el (sc-attribs-filter-namelist): Use mapc rather | ||
| 4 | than mapcar. | ||
| 5 | |||
| 6 | * textmodes/tex-mode.el (tex-suscript-height-ratio) | ||
| 7 | (tex-suscript-height-minimum): New customizable variables. | ||
| 8 | (tex-suscript-height): New function. | ||
| 9 | (superscript, subscript): Set height using tex-suscript-height | ||
| 10 | rather than fixing at 0.8. | ||
| 11 | |||
| 1 | 2007-09-27 Juanma Barranquero <lekktu@gmail.com> | 12 | 2007-09-27 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 13 | ||
| 3 | * progmodes/python.el (python-eldoc-function): Doc fix. | 14 | * progmodes/python.el (python-eldoc-function): Doc fix. |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 110351a6a60..8b1538e8ec3 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -676,12 +676,42 @@ An alternative value is \" . \", if you use a font with a narrow period." | |||
| 676 | (put-text-property beg next 'display nil)) | 676 | (put-text-property beg next 'display nil)) |
| 677 | (setq beg next)))) | 677 | (setq beg next)))) |
| 678 | 678 | ||
| 679 | (defcustom tex-suscript-height-ratio 0.8 | ||
| 680 | "Ratio of subscript/superscript height to that of the preceding text. | ||
| 681 | In nested subscript/superscript, this factor is applied repeatedly, | ||
| 682 | subject to the limit set by `tex-suscript-height-minimum'." | ||
| 683 | :type 'float | ||
| 684 | :group 'tex | ||
| 685 | :version "23.1") | ||
| 686 | |||
| 687 | (defcustom tex-suscript-height-minimum 0.0 | ||
| 688 | "Integer or float limiting the minimum size of subscript/superscript text. | ||
| 689 | An integer is an absolute height in units of 1/10 point, a float | ||
| 690 | is a height relative to that of the default font. Zero means no minimum." | ||
| 691 | :type '(choice (integer :tag "Integer height in 1/10 point units") | ||
| 692 | (float :tag "Fraction of default font height")) | ||
| 693 | :group 'tex | ||
| 694 | :version "23.1") | ||
| 695 | |||
| 696 | (defun tex-suscript-height (height) | ||
| 697 | "Return the integer height of subscript/superscript font in 1/10 points. | ||
| 698 | Not smaller than the value set by `tex-suscript-height-minimum'." | ||
| 699 | (ceiling (max (if (integerp tex-suscript-height-minimum) | ||
| 700 | tex-suscript-height-minimum | ||
| 701 | ;; For bootstrapping. | ||
| 702 | (condition-case nil | ||
| 703 | (* tex-suscript-height-minimum | ||
| 704 | (face-attribute 'default :height)) | ||
| 705 | (error 0))) | ||
| 706 | ;; NB assumes height is integer. | ||
| 707 | (* height tex-suscript-height-ratio)))) | ||
| 708 | |||
| 679 | (defface superscript | 709 | (defface superscript |
| 680 | '((t :height 0.8)) ;; :raise 0.2 | 710 | '((t :height tex-suscript-height)) ;; :raise 0.2 |
| 681 | "Face used for superscripts." | 711 | "Face used for superscripts." |
| 682 | :group 'tex) | 712 | :group 'tex) |
| 683 | (defface subscript | 713 | (defface subscript |
| 684 | '((t :height 0.8)) ;; :raise -0.2 | 714 | '((t :height tex-suscript-height)) ;; :raise -0.2 |
| 685 | "Face used for subscripts." | 715 | "Face used for subscripts." |
| 686 | :group 'tex) | 716 | :group 'tex) |
| 687 | 717 | ||