auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: \mathbb and \mathcal prettify does not accept multiple characters


From: Tassilo Horn
Subject: Re: \mathbb and \mathcal prettify does not accept multiple characters
Date: Thu, 09 Jun 2022 20:50:00 +0200
User-agent: mu4e 1.7.26; emacs 29.0.50

Hendrik Rommeswinkel <rommeswi@protonmail.com> writes:

Hi Hendrik,

> Thank you I will look into this! Would it perhaps be possible to use
> some other method for multiple characters? For example, {\em bla} and
> \emph{bla} get replaced by italics.

The bla in your example is displayed in italics by AUCTeX already.  Do
you want it written in italics but without the \emph{ and the closing }
be displayed?  That could probably be accomplished with a custom
font-lock rule or overlays.

> Could I perhaps use something similar to replace \mathscr{ABC} as long
> as I can find the right font?

Sure, you can write some code which searches the buffer for any \mathbb
and puts an overlay on it displaying only the double-struck unicode
variants of its contents (but not the \mathbb{ and the closing }).

Oh, and a much easier way would be to do:

  \DeclareUnicodeCharacter{211D}{\mathbb{R}}
  \DeclareUnicodeCharacter{2115}{\mathbb{N}}
  ...

and then just use ℝ and ℕ literally in your LaTeX document.  You can
insert them quite easily using: C-x 8 RET double-struck capital<TAB>.

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]