unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* tex-mode.el code that decides what to do for superscripts and subsripts
@ 2021-01-13 19:41 michael-franzese
  2021-01-13 19:53 ` Stefan Möding
  0 siblings, 1 reply; 4+ messages in thread
From: michael-franzese @ 2021-01-13 19:41 UTC (permalink / raw)
  To: Help Gnu Emacs

I am trying to find the code that decides what to do for
superscripts "^", "^{}" and subsripts "_", "_{}" in tex-mode.el.

I copied over the following, but there has to be other stuff to
make the smaller font take effect.

(defun tex-font-lock-suscript (pos)
(defun tex-font-lock-match-suscript (limit)
(defun tex-font-lock-unfontify-region (beg end)
(defcustom tex-suscript-height-ratio 0.8
(defcustom tex-suscript-height-minimum 0.0
(defun tex-suscript-height (height)
(defface superscript
(defface subscript









^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tex-mode.el code that decides what to do for superscripts and subsripts
  2021-01-13 19:41 tex-mode.el code that decides what to do for superscripts and subsripts michael-franzese
@ 2021-01-13 19:53 ` Stefan Möding
  2021-01-13 20:12   ` michael-franzese
  2021-01-13 22:12   ` michael-franzese
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Möding @ 2021-01-13 19:53 UTC (permalink / raw)
  To: Help Gnu Emacs

michael-franzese@gmx.com writes:

> I am trying to find the code that decides what to do for
> superscripts "^", "^{}" and subsripts "_", "_{}" in tex-mode.el.

I'm setting `tex-fontify-script' to `nil' in my setup to prevent the special
formatting.  This variable is referenced in the function
`tex-font-lock-match-suscript'.  Maybe this is what you are looking for?

--
Stefan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tex-mode.el code that decides what to do for superscripts and subsripts
  2021-01-13 19:53 ` Stefan Möding
@ 2021-01-13 20:12   ` michael-franzese
  2021-01-13 22:12   ` michael-franzese
  1 sibling, 0 replies; 4+ messages in thread
From: michael-franzese @ 2021-01-13 20:12 UTC (permalink / raw)
  To: Stefan Möding; +Cc: Help Gnu Emacs

I think that I got to call some function for the superscripts and
subscripts functionality to take effect - smaller font with height
changed at higher and lower levels.


> Sent: Thursday, January 14, 2021 at 7:53 AM
> From: "Stefan Möding" <s.moeding@gmail.com>
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: tex-mode.el code that decides what to do for superscripts and subsripts
>
> michael-franzese@gmx.com writes:
> 
> > I am trying to find the code that decides what to do for
> > superscripts "^", "^{}" and subsripts "_", "_{}" in tex-mode.el.
> 
> I'm setting `tex-fontify-script' to `nil' in my setup to prevent the special
> formatting.  This variable is referenced in the function
> `tex-font-lock-match-suscript'.  Maybe this is what you are looking for?
> 
> --
> Stefan
> 
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tex-mode.el code that decides what to do for superscripts and subsripts
  2021-01-13 19:53 ` Stefan Möding
  2021-01-13 20:12   ` michael-franzese
@ 2021-01-13 22:12   ` michael-franzese
  1 sibling, 0 replies; 4+ messages in thread
From: michael-franzese @ 2021-01-13 22:12 UTC (permalink / raw)
  To: Stefan Möding; +Cc: Help Gnu Emacs


Am trying to find the part of the code I need to call from tex-mode.el
to put superscripts and subscripts at a different face font when it
recognizes "^{}" and "_{}".




> Sent: Thursday, January 14, 2021 at 7:53 AM
> From: "Stefan Möding" <s.moeding@gmail.com>
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: tex-mode.el code that decides what to do for superscripts and subsripts
>
> michael-franzese@gmx.com writes:
> 
> > I am trying to find the code that decides what to do for
> > superscripts "^", "^{}" and subsripts "_", "_{}" in tex-mode.el.
> 
> I'm setting `tex-fontify-script' to `nil' in my setup to prevent the special
> formatting.  This variable is referenced in the function
> `tex-font-lock-match-suscript'.  Maybe this is what you are looking for?
> 
> --
> Stefan
> 
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-13 22:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13 19:41 tex-mode.el code that decides what to do for superscripts and subsripts michael-franzese
2021-01-13 19:53 ` Stefan Möding
2021-01-13 20:12   ` michael-franzese
2021-01-13 22:12   ` michael-franzese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).