emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Patch] Do not ignore headers argument in ob-latex


From: Yuri Lensky
Subject: Re: [Patch] Do not ignore headers argument in ob-latex
Date: Sat, 9 May 2020 13:12:57 -0700

Hi,

I have updated the attached patch to use `mapconcat' as requested. `org-format-latex-header' is already declared earlier in ob-latex.el.

I am not sure what kind of test you have in mind, since this feature isn't completely internal to org-mode. For example, the preview compiles but the produced PDF is incorrect before this fix, and I believe the org preview machinery ignores errors from the latex compiler.

Best,

YL

On Thu, May 7, 2020 at 1:37 PM Nicolas Goaziou <address@hidden> wrote:
Hello,

Yuri Lensky <address@hidden> writes:

> Subject: [PATCH] lisp/ob-latex.el: Stop ignoring headers argument

Thank you.

> During default "png" export, the "headers" argument is no longer
> explicitly ignored.

According to the TODO in that function, this is not the first time it
happens. Would you mind writing a test for it?

> +          (let ((org-format-latex-header
> +              (concat org-format-latex-header "\n"
> +                      (string-join headers "\n"))))
> +        (org-create-formula-image
> +            body out-file org-format-latex-options in-buffer)))

This looks hackish but I don't know how to do it otherwise. However
could you use `mapconcat' instead of `string-join'?

Also, you need to declare `org-format-latex-header' in order to silence
byte-compiler.

Regards,

--
Nicolas Goaziou

Attachment: 0001-lisp-ob-latex.el-Stop-ignoring-headers-argument.patch
Description: Binary data


reply via email to

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