emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* An org-latex face
@ 2021-06-01  6:04 Léo Ackermann
  2021-06-01  6:44 ` Sébastien Miquel
  2021-06-01  8:42 ` Timothy
  0 siblings, 2 replies; 5+ messages in thread
From: Léo Ackermann @ 2021-06-01  6:04 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 826 bytes --]

Hi,

When it comes to preview inline LaTeX fragments within org-mode, the org
package applies the `org-block` face. It would be nice to *treat inline
latex block specially*, to make integration of the those preview-block
easier when surrounded by plaintext. This feature would allow to have a
theme that highlight blocks (source code, examples) without the background
artifact you can see in attachment when previewing latex fragments.
It seems that a way to adress this is to add another `org-latex` face, as
we already have with `org-quote`. One could also change the
`org-src-font-lock-fontify-block` function to include a subroutine for
inline latex blocks. Nevertheless, the later seems to be harder to
customize...
What do you think of this ?

Thank you for your job on this amazing program!
Have a nice day!

Best,
Leo

[-- Attachment #1.2: Type: text/html, Size: 962 bytes --]

[-- Attachment #2: artifact.png --]
[-- Type: image/png, Size: 13433 bytes --]

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

* Re: An org-latex face
  2021-06-01  6:04 An org-latex face Léo Ackermann
@ 2021-06-01  6:44 ` Sébastien Miquel
  2021-06-01  8:21   ` Sébastien Miquel
  2021-06-01  8:42 ` Timothy
  1 sibling, 1 reply; 5+ messages in thread
From: Sébastien Miquel @ 2021-06-01  6:44 UTC (permalink / raw)
  To: Léo Ackermann, emacs-orgmode

Hi Léo,

Léo Ackermann writes:

> When it comes to preview inline LaTeX fragments within org-mode, the 
> org package applies the `org-block` face. It would be nice to *treat 
> inline latex block specially*, to make integration of the those 
> preview-block easier when surrounded by plaintext. This feature would 
> allow to have a theme that highlight blocks (source code, examples) 
> without the background artifact you can see in attachment when 
> previewing latex fragments.
There's already an `org-latex-and-relatex` regexp, that will be used
if you set `org-highlight-latex-and-related` to `'(latex)` instead of
`'(native)`. The org-block face won't be applied anymore.

Regards,

-- 
Sébastien Miquel



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

* Re: An org-latex face
  2021-06-01  6:44 ` Sébastien Miquel
@ 2021-06-01  8:21   ` Sébastien Miquel
  0 siblings, 0 replies; 5+ messages in thread
From: Sébastien Miquel @ 2021-06-01  8:21 UTC (permalink / raw)
  To: Léo Ackermann, emacs-orgmode

Sébastien Miquel writes:
> There's already an `org-latex-and-relatex` regexp

I meant the `org-latex-and-related` face.

-- 
Sébastien Miquel



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

* Re: An org-latex face
  2021-06-01  6:04 An org-latex face Léo Ackermann
  2021-06-01  6:44 ` Sébastien Miquel
@ 2021-06-01  8:42 ` Timothy
  2021-06-07 12:05   ` Léo Ackermann
  1 sibling, 1 reply; 5+ messages in thread
From: Timothy @ 2021-06-01  8:42 UTC (permalink / raw)
  To: Léo Ackermann; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

Hi Léo,

For what it’s worth, I currently make do with:
┌────
│ (setq org-highlight-latex-and-related '(native script entities))
│ (add-to-list 'org-src-block-faces '("latex" (:inherit default :extend t)))
└────

All the best,
*Timothy*

[-- Attachment #2: Type: text/html, Size: 4999 bytes --]

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

* Re: An org-latex face
  2021-06-01  8:42 ` Timothy
@ 2021-06-07 12:05   ` Léo Ackermann
  0 siblings, 0 replies; 5+ messages in thread
From: Léo Ackermann @ 2021-06-07 12:05 UTC (permalink / raw)
  To: Timothy; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]

Hi both!
Thanks a lot for your answers, it looks pretty now :)

Best,
Leo

Le mar. 1 juin 2021 à 10:43, Timothy <tecosaur@gmail.com> a écrit :

> Hi Léo,
>
> For what it’s worth, I currently make do with:
>
> (setq org-highlight-latex-and-related '(native script entities))(add-to-list 'org-src-block-faces '("latex" (:inherit default :extend t)))
>
> All the best,
> *Timothy*
>
> * From*: Léo Ackermann <%22Léo+Ackermann%22+%3Cleo.komba@gmail.com%3E>
> * Subject*: An org-latex face
> * To*: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
> * Date*: Tue, 01 Jun 2021 14:04:47 +0800
> Hi,
>
> When it comes to preview inline LaTeX fragments within org-mode, the org
> package applies the `org-block` face. It would be nice to *treat inline
> latex block specially*, to make integration of the those preview-block
> easier when surrounded by plaintext. This feature would allow to have a
> theme that highlight blocks (source code, examples) without the background
> artifact you can see in attachment when previewing latex fragments.
> It seems that a way to adress this is to add another `org-latex` face, as
> we already have with `org-quote`. One could also change the
> `org-src-font-lock-fontify-block` function to include a subroutine for
> inline latex blocks. Nevertheless, the later seems to be harder to
> customize...
> What do you think of this ?
>
> Thank you for your job on this amazing program!
> Have a nice day!
>
> Best,
> Leo
>

[-- Attachment #2: Type: text/html, Size: 5329 bytes --]

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

end of thread, other threads:[~2021-06-07 12:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  6:04 An org-latex face Léo Ackermann
2021-06-01  6:44 ` Sébastien Miquel
2021-06-01  8:21   ` Sébastien Miquel
2021-06-01  8:42 ` Timothy
2021-06-07 12:05   ` Léo Ackermann

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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