|
| From: | Timothy |
| Subject: | Re: [PATCH] New LaTeX code export option: engraved |
| Date: | Thu, 05 May 2022 23:17:44 +0800 |
| User-agent: | mu4e 1.6.10; emacs 28.0.92 |
Hi Ihor,
> Thanks!
> Implementing fontification using Emacs capabilities is certainly a step
> in the right direction. LaTeX support for fontification has always been
> tricky.
I’m glad to hear you’re of a similar mind to me with this.
> - I tried to test your patch, and it only works partially. There is some
> stray text caused by LaTeX errors:
>
> [2. application/vnd.lotus-organizer; test.org]…
> [3. application/pdf; test.pdf]…
Ah. I thought that hyperref loaded xcolor, but it seems my assumption was
incorrect. I’ve added `\usepackage{xcolor}' to the default
`org-latex-engraved-preamble', but maybe I should ask people to modify
`org-latex-packages-alist'. I’m not sure.
> - You did not add a NEWS entry and did not update the manual in your patch.
I’m waiting till the functional content of these packages is settled/accepted,
and then I’ll write NEWS and manual entries.
> - There are many compiler warnings emitted when compiling Org with your patch
Oops, I keep on forgetting to check byte compilation. These should all be fixed
now.
> The docstrings are missing in the above.
Docstrings have been added.
> I am not sure why, but the word fancy feels slightly annoying here.
Docsting rewritten.
> Since engraved is not entirely relying on LaTeX options, a lot of
> customisation is not mentioned in this docstring. AFAIU, color
> customisation is only possible by changing defcustoms from engrave-faces
> package.
>
> Another related note is what is going to happen in beamer export with
> dark background. The default face mapping in engrave-faces is using some
> kind of light theme, which may lose all the contrast on not-light
> background.
Modifying the style of engraved-faces-latex’s output is indeed done by
customising a engraved-faces variable. I don’t think we should attempt to do
anything further with this within Org.
To elaborate a bit, the generated LaTeX uses the styling information given in
`engrave-faces-preset-styles'. Changing this to use the current Emacs theme is
as
simple as `(setq engrave-faces-preset-styles (engrave-faces-generate-preset))'.
> It feels that codebackground, codeborder, and EFD should be customizable
> by org-latex-engraved-options.
Hmm. I don’t think so. They are entirely self-contained within the preamble
variable. Should there be a nice existing `org-latex-user-colors' variable or
such, it would make a lot of sense to shove this there, but since no such
variable exists I’m not sure we can really do much better than just asking users
to modify `org-latex-engraved-preamble'.
> Docstring?
Added.
>> + (message “Cannot engrave inline src block, `engrave-faces-latex’ is
>> unavailible.”)
>
> Why message instead of error?
User errors are now thrown.
Thanks for the feedback!
Timothy
0001-ox-latex-Refactor-org-latex-src-block.patch
Description: Text Data
0002-ox-latex-Refactor-org-latex-inline-src-block.patch
Description: Text Data
0003-ox-latex-More-versitile-option-construction.patch
Description: Text Data
0004-ox-latex-Introduce-engraved-code-highlighting.patch
Description: Text Data
| [Prev in Thread] | Current Thread | [Next in Thread] |