Marcin Borkowski <[email protected]> writes:

Hi Marcin,

> BTW, here is a snippet from my init.el which removes one of these
> rough edges:
>
> (add-to-list 'tex--prettify-symbols-alist '("\\mathbb{R}" . 8477) t)
> (add-to-list 'tex--prettify-symbols-alist '("\\mathbb{N}" . 8469) t)
> (add-to-list 'tex--prettify-symbols-alist '("\\mathbb{P}" . 8473) t)
> (add-to-list 'tex--prettify-symbols-alist '("\\mathbb{Q}" . 8474) t)
> (add-to-list 'tex--prettify-symbols-alist '("\\mathbb{Z}" . 8484) t)
>
> I guess adding these (and probably a few others, like \mathbb{C} - or
> maybe just the alphabet wholesale) might be a good idea.  If there is
> a need for a someone™ to prepare a patch, I may volunteer to be the
> someone - just let me know.

Yes, those seem like good additions.  There are already definitions for
\Bbb{N} and friends.  But new definitions should be added directly to
Emacs' tex-mode.el.  That's where `tex--prettify-symbols-alist' is
defined.  AUCTeX simply reuses that.  I don't think it would be sensible
if AUCTeX adds to that list.  Why should tex-mode users not benefit from
those new definitions, too?

> Another (minor) issue is connected with the fact that spaces don't
> disappear when prettifying:
>
> \alpha\beta looks like αβ, but
>
> \alpha x looks like α x.
>
> I don't complain much, though, since I'm a bit afraid that the whole
> prettifying infrastructure can't help that.  Also, due to how TeX
> parsing works, it might actually be undesirable not to show those
> spaces (however strange they look).

Prettify always prettifies symbols and does nothing to the spaces in
between.  It cannot know that in some cases like TeX they won't appear
in the output.

Bye,
Tassilo

_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to