engrave-faces icon indicating copy to clipboard operation
engrave-faces copied to clipboard

Support/add more special faces for exporting

Open lukeflo opened this issue 1 year ago • 0 comments

First of all: Thats more of a question than a real issue with the code. But since I couldn't find any concrete instruction how to add a theme or just some custom faces to engrave-faces and my elisp knowledge is still very limited (switched to emacs only few weeks ago), I hope to find a solution here from you guys who created the whole thing. If that's inappropriate here on a GitHub issue page, just close/remove my comment; I would understand.

I recently switched to engrave-faces because I like the style and approach of it. Since I'm using org-mode a lot to work on documentation on latex-programming and latex-based publishing, I've a lot of latex code inside my source blocks. Many of those code snippets contain latex3 macros which are not very well supported by emacs/AUCTeXs standard code highlighting.

The latex3 macros are highlighted with the font-latex-sedate-face. If I now export my org-file to latex through pdf, the respective code snippets are highlighted in the same color like in the emacs buffer since engrave-faces seems to copy the HTML color-code to the intermediate latex file. Unfortunately, this color doesn't fit well with the default colors for keywords, strings etc. wich are defined in engrave-faces-themes.

How is it possible to add a custom color processing to the engrave-faces-themes resp. engrave-faces-current-preset-style variable, e.g. (font-latex-sedate-face :short "fl-sedate" :slug "sed" :foreground "#ff8c00"), which makes it possible to define an own color for exporting? I tried adding a complete new theme (copied everything from 'default theme) to the engrave-faces-themes list with something like (add-to-list 'engrave-faces-themes '(test-ltx-face . [...] many lines of color processing values [...] (font-latex-sedate-face :short "fl-sedate" :slug "sed" :foreground "#ff8c00") [...] and load it with #+latex_engraved_theme: test-ltx-face from my org-file. But it doesn't work out. The result is the error message from engrave-faces-get-theme: Theme test-ltx-face is not found in `engrave-faces-current-preset-style' or availible Emacs themes.

lukeflo avatar Nov 06 '23 11:11 lukeflo