emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] (v2) New LaTeX code export option: engraved


From: Timothy
Subject: Re: [PATCH] (v2) New LaTeX code export option: engraved
Date: Sun, 08 May 2022 22:30:55 +0800
User-agent: mu4e 1.6.10; emacs 28.0.92

Hi Daniel & co.,

I have a new set of patches (attached), which make use of a major new feature in
engrave-faces v0.3: engraved themes.

Now, the theme used for source blocks can be set by the document keyword
`#+latex_engraved_theme: THEME-NAME'. Furthermore, the theme can be customised 
on
a per-code-block basis with `#+attr_latex: :engraved-theme THEME-NAME'.

If you try this out, make sure you have the most recent commit of engrave-faces
(531ea687e, soon to be released in v0.3.1).

I’ve also fixed the “Bug: Percentage in caption (even escaped) does not work in
LaTeX export” that Max raised
(<https://list.orgmode.org/YT2PR01MB45101E27DC6251D8F8B7B366F6EC9@YT2PR01MB4510.CANPRD01.PROD.OUTLOOK.COM>).

Daniel Fleischer <danflscr@gmail.com> writes:

> Very nice set of patches, it looks good.

Glad to hear you’ve been able to have a look over the patches. With the feedback
I’ve received here so far, if no issues come up in the next few days I’m
inclined to merge this, add documentation, and see what feedback pops up.

> I must admit it’s not clear how to customize faces since engrave is a bridge
> between major modes choices and latex but maybe show one or two examples (say
> elisp and python) of how to change/override some face.

Sure. The result should be visually identical to what you’d see in elisp/python
buffer, but possibly with a different theme.

Say you wanted to use a tweaked version of the default theme, this could be
accomplished like so:
┌────
│ (setq default2 (alist-get 'default engrave-faces-themes))
│ ;; Make comments hot pink
│ (plist-put (alist-get 'font-lock-comment-face default2) :foreground "#ff69b4")
│ ;; Any other customisations...
│ (add-to-list 'engrave-faces-themes (cons 'default2 default2))
└────

Then in the Org file you can use the “default2” engraved theme with
`#+latex_engraved_theme: default2'.

Let me know if there are any other examples you’d like to see.

> I think next we should apply these patches and be open to feedback
> about source code latex export using these new changes. I also wish
> there was a bit more documentation, but we can add more with time.
> Maybe some feedback from Nicolas G.?

👍 see my earlier comment on merging.

All the best,
Timothy

Attachment: 0001-ox-latex-Refactor-org-latex-src-block.patch
Description: Text Data

Attachment: 0002-ox-latex-Refactor-org-latex-inline-src-block.patch
Description: Text Data

Attachment: 0003-ox-latex-More-versitile-option-construction.patch
Description: Text Data

Attachment: 0004-ox-latex-Introduce-engraved-code-highlighting.patch
Description: Text Data

Attachment: 0005-ox-latex-Don-t-use-length-to-get-string-width.patch
Description: Text Data

Attachment: 0006-ox-latex-Refactor-source-block-transcode-fun-sigs.patch
Description: Text Data

Attachment: 0007-ox-latex-Replace-org-latex-listings.patch
Description: Text Data

Attachment: 0008-ox-latex-Support-setting-the-engraved-theme.patch
Description: Text Data

Attachment: 0009-ox-latex-Support-setting-engraved-theme-per-block.patch
Description: Text Data

Attachment: 0010-ox-latex-Fix-captions-in-minted-engraved-code.patch
Description: Text Data


reply via email to

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