unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* tex-mode prettify-symbols-alist  for ("\\cos" . ?cos)
@ 2021-02-13 23:31 pietru
  2021-02-13 23:38 ` Tassilo Horn
  0 siblings, 1 reply; 3+ messages in thread
From: pietru @ 2021-02-13 23:31 UTC (permalink / raw)
  To: Help Gnu Emacs

I want to prettify "\cos" to be "cos".  Have used ("\\cos" . ?cos)
but this gives

Invalid read syntax: ?



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

* Re: tex-mode prettify-symbols-alist  for ("\\cos" . ?cos)
  2021-02-13 23:31 tex-mode prettify-symbols-alist for ("\\cos" . ?cos) pietru
@ 2021-02-13 23:38 ` Tassilo Horn
  2021-02-13 23:51   ` pietru
  0 siblings, 1 reply; 3+ messages in thread
From: Tassilo Horn @ 2021-02-13 23:38 UTC (permalink / raw)
  To: help-gnu-emacs

pietru@caramail.com writes:

> I want to prettify "\cos" to be "cos".  Have used ("\\cos" . ?cos)
> but this gives
>
> Invalid read syntax: ?

That's because ?cos is no character.  ?c would be.  The replacements of
`prettify-symbols-alist' must be characters (or something being valid
input for `compose-region's 3rd parameter).

Bye,
Tassilo



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

* Re: tex-mode prettify-symbols-alist  for ("\\cos" . ?cos)
  2021-02-13 23:38 ` Tassilo Horn
@ 2021-02-13 23:51   ` pietru
  0 siblings, 0 replies; 3+ messages in thread
From: pietru @ 2021-02-13 23:51 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: help-gnu-emacs

For delimeters do I need to escape using "\"

("\\lbrace" . ?\{) ("\\rbrace" . ?\}) ("\\lbrack" . ?\[)
("\\rbrack" . ?\]) ("\\langle" . ?\⟨) ("\\rangle" . ?\⟩)
("\\lceil" . ?⌈) ("\\rceil" . ?⌉) ("\\lfloor" . ?⌊)
("\\rfloor" . ?⌋)


> Sent: Sunday, February 14, 2021 at 11:38 AM
> From: "Tassilo Horn" <tsdh@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: tex-mode prettify-symbols-alist  for ("\\cos" . ?cos)
>
> pietru@caramail.com writes:
> 
> > I want to prettify "\cos" to be "cos".  Have used ("\\cos" . ?cos)
> > but this gives
> >
> > Invalid read syntax: ?
> 
> That's because ?cos is no character.  ?c would be.  The replacements of
> `prettify-symbols-alist' must be characters (or something being valid
> input for `compose-region's 3rd parameter).
> 
> Bye,
> Tassilo
> 
>



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

end of thread, other threads:[~2021-02-13 23:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-13 23:31 tex-mode prettify-symbols-alist for ("\\cos" . ?cos) pietru
2021-02-13 23:38 ` Tassilo Horn
2021-02-13 23:51   ` pietru

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).