emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* babel latex headers and image generation commands
@ 2020-02-04  7:39 Matt Huszagh
  2020-02-04 21:19 ` Matt Huszagh
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Huszagh @ 2020-02-04  7:39 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

I spent some time today trying to get latex babel source blocks to work
for me and discovered that calling `org-babel-execute:latex` ignores the
:headers header if the output file is a png without setting imagemagick
to t. It's easy to see this in the source code: the conditions mentioned
above leads to calling org-create-formula-image without passing in the
headers. I think this is a bug, although maybe I missed it somewhere in
the documentation? Here's a MWE if you want it

#+header: :file "test.png"
#+header: :headers '("\\def\\hello{hello}")
#+begin_src latex :results output file link
\hello
#+end_src

doesn't work, but

#+header: :file "test.png"
#+header: :imagemagick t
#+header: :headers '("\\def\\hello{hello}")
#+begin_src latex :results output file link
\hello
#+end_src

does.

However, this got me thinking that I wish executing latex blocks behaved
a bit more like latex fragment previews. Particularly, the ability to
customize `image-converter`. So, I'm thinking about adding a
customization option that allows a user to use the image-converter
portion of an existing org-preview-latex-process-alist entry (I guess
the most obvious choice would be
org-preview-latex-default-process). Although I guess I could just add a
new variable like what we have with org-latex-pdf-process. Maybe that's
better since we'd only be using one part of the
latex-process-alist. What are people's thoughts on this?

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

end of thread, other threads:[~2020-12-14  8:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04  7:39 babel latex headers and image generation commands Matt Huszagh
2020-02-04 21:19 ` Matt Huszagh
2020-02-04 23:38   ` Matt Huszagh
2020-02-10  7:21     ` Bastien
     [not found]       ` <87y2lynft3.fsf@gmail.com>
2020-08-29  7:02         ` Matt Huszagh
2020-09-02 17:32           ` [PATCH] " Matt Huszagh
2020-09-02 18:53             ` Matt Huszagh
2020-09-06  6:18               ` Bastien
2020-09-09 19:43                 ` Matt Huszagh
2020-10-24 12:30                   ` Bastien
2020-10-24 16:39                     ` Matt Huszagh
2020-12-14  8:19                       ` Bastien
2020-09-06  5:59             ` Bastien

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