* sub and superscripts: without «_» and «^»
@ 2015-09-02 16:38 Uwe Brauer
2015-09-02 18:58 ` Eli Zaretskii
2015-09-02 20:20 ` Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: Uwe Brauer @ 2015-09-02 16:38 UTC (permalink / raw)
To: emacs-devel
Hello
I asked this on auctex-dev but it might be question concerning core
functionality of GNU emacs:
It is possible to display super and sub indices lowered and rised, but
the «_» and «^» are still visible.
(Xemacs can display, based on very different implementation indeed sub
and super scripts without the «_» and «^», however relies on a orphaned
package)
Are there any plans to implement such a feature?
Thanks
Uwe Brauer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sub and superscripts: without «_» and «^»
2015-09-02 16:38 sub and superscripts: without «_» and «^» Uwe Brauer
@ 2015-09-02 18:58 ` Eli Zaretskii
2015-09-02 20:20 ` Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2015-09-02 18:58 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> From: Uwe Brauer <oub@mat.ucm.es>
> Date: Wed, 02 Sep 2015 16:38:22 +0000
>
> I asked this on auctex-dev but it might be question concerning core
> functionality of GNU emacs:
>
> It is possible to display super and sub indices lowered and rised, but
> the «_» and «^» are still visible.
>
> (Xemacs can display, based on very different implementation indeed sub
> and super scripts without the «_» and «^», however relies on a orphaned
> package)
>
> Are there any plans to implement such a feature?
You are asking about a core feature on a list dedicated to core Emacs,
but barely describe it in core-feature terms. I don't use AUCTeX (can
you imagine that?), so I cannot know what kind of feature is
requested. For all I know, the feature might already exist, but
AUCTeX might not be using it, for some reason.
So please assume that your audience knows nothing about how AUCTeX
displays super- and sub-scripts, and please explain what is available
and what would you like in addition.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sub and superscripts: without «_» and «^»
2015-09-02 16:38 sub and superscripts: without «_» and «^» Uwe Brauer
2015-09-02 18:58 ` Eli Zaretskii
@ 2015-09-02 20:20 ` Stefan Monnier
2015-09-03 7:02 ` Tassilo Horn
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2015-09-02 20:20 UTC (permalink / raw)
To: Uwe Brauer; +Cc: emacs-devel
> I asked this on auctex-dev but it might be question concerning core
> functionality of GNU emacs:
The necessary core functionality has been present for a long time: just
add the proper `invisible' property to the chars you don't want to see.
> Are there any plans to implement such a feature?
Where? In tex-mode's font-lock rules? No, I tend to think of it as
a misfeature (prettification vs WYSIWYG-ification).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sub and superscripts: without «_» and «^»
2015-09-02 20:20 ` Stefan Monnier
@ 2015-09-03 7:02 ` Tassilo Horn
2015-09-03 9:41 ` Uwe Brauer
0 siblings, 1 reply; 5+ messages in thread
From: Tassilo Horn @ 2015-09-03 7:02 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Uwe Brauer, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I asked this on auctex-dev but it might be question concerning core
>> functionality of GNU emacs:
>
> The necessary core functionality has been present for a long time:
> just add the proper `invisible' property to the chars you don't want
> to see.
I guess what Uwe wants is that `prettify-symbols-mode' in a (La)TeX
buffer (with stock latex-mode or AUCTeX; doesn't really matter) could
have the option to make the ^ and _ invisible, too.
I already told him that this is not what p-s-m is meant for. But it's
easy enough to write a custom font-lock rule for that:
--8<---------------cut here---------------start------------->8---
(defun th/invisible-super-sub-scripts ()
(interactive)
(cl-pushnew 'invisible font-lock-extra-managed-props)
(font-lock-add-keywords
nil
'(("[^\\\\]\\([_^]\\)" (1 '(face nil invisible t) t))))
(font-lock-flush))
--8<---------------cut here---------------end--------------->8---
Uwe, if you want you could do something like that:
--8<---------------cut here---------------start------------->8---
(add-hook 'prettify-symbols-mode-hook
(lambda ()
(when (eq major-mode 'latex-mode)
(th/invisible-super-sub-scripts))))
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sub and superscripts: without «_» and «^»
2015-09-03 7:02 ` Tassilo Horn
@ 2015-09-03 9:41 ` Uwe Brauer
0 siblings, 0 replies; 5+ messages in thread
From: Uwe Brauer @ 2015-09-03 9:41 UTC (permalink / raw)
To: emacs-devel
>>>>> "Tassilo" == Tassilo Horn <tsdh@gnu.org> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> I asked this on auctex-dev but it might be question concerning core
>>> functionality of GNU emacs:
>>
>> The necessary core functionality has been present for a long time:
>> just add the proper `invisible' property to the chars you don't want
>> to see.
> I guess what Uwe wants is that `prettify-symbols-mode' in a (La)TeX
> buffer (with stock latex-mode or AUCTeX; doesn't really matter) could
> have the option to make the ^ and _ invisible, too.
> I already told him that this is not what p-s-m is meant for. But it's
> easy enough to write a custom font-lock rule for that:
> (defun th/invisible-super-sub-scripts ()
> (interactive)
> (cl-pushnew 'invisible font-lock-extra-managed-props)
> (font-lock-add-keywords
> nil
> '(("[^\\\\]\\([_^]\\)" (1 '(face nil invisible t) t))))
> (font-lock-flush))
> Uwe, if you want you could do something like that:
> (add-hook 'prettify-symbols-mode-hook
> (lambda ()
> (when (eq major-mode 'latex-mode)
> (th/invisible-super-sub-scripts))))
Cool!! Precisely what I wanted thanks very much!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-03 9:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02 16:38 sub and superscripts: without «_» and «^» Uwe Brauer
2015-09-02 18:58 ` Eli Zaretskii
2015-09-02 20:20 ` Stefan Monnier
2015-09-03 7:02 ` Tassilo Horn
2015-09-03 9:41 ` Uwe Brauer
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.