emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: `org-babel-latex-preamble' should not hardcode `pgfsysdriver' [9.4.4 (release_9.4.4 @ /home/n/.emacs.d/elpa/28.0/develop/org-mode/lisp/)]
@ 2021-09-06  7:02 Zhuohua Li
  2021-12-30  9:24 ` Timothy
  0 siblings, 1 reply; 2+ messages in thread
From: Zhuohua Li @ 2021-09-06  7:02 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

Hi, I tried to export LaTex code blocks into SVG images using the
development version org-mode (d70f280678) but failed with "PDF produced
with errors".

I found that in file `lisp/ob-latex.el', variable
`org-babel-latex-preamble' hardcodes the following:

\\def\\pgfsysdriver{pgfsys-tex4ht.def}

This only compiles if you use `htlatex', however, the default LaTex
compiler is `pdflatex`.

I deleted this line and everything works fine. I think this should be a bug
so I report it here. Hope it can be fixed.

Thank you very much!

Zhuohua


Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.29, cairo version 1.16.0)
 of 2021-08-28
Package: Org mode version 9.4.4 (release_9.4.4 @
/home/n/.emacs.d/elpa/28.0/develop/org-mode/lisp/)

[-- Attachment #2: Type: text/html, Size: 2340 bytes --]

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

* Re: Bug: `org-babel-latex-preamble' should not hardcode `pgfsysdriver' [9.4.4 (release_9.4.4 @ /home/n/.emacs.d/elpa/28.0/develop/org-mode/lisp/)]
  2021-09-06  7:02 Bug: `org-babel-latex-preamble' should not hardcode `pgfsysdriver' [9.4.4 (release_9.4.4 @ /home/n/.emacs.d/elpa/28.0/develop/org-mode/lisp/)] Zhuohua Li
@ 2021-12-30  9:24 ` Timothy
  0 siblings, 0 replies; 2+ messages in thread
From: Timothy @ 2021-12-30  9:24 UTC (permalink / raw)
  To: Zhuohua Li; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 948 bytes --]

Hi Zhuohua,

Thanks for the bug report, and sorry it’s taken so long for someone to look at
it (the maintainers have had a busy year).

I’ve just had a look, and indeed see `\\def\\pgfsysdriver{pgfsys-tex4ht.def}'
hardcoded at `ob-latex.el:185'. However, this is inside a `(string= "html"
extension)' check, so tex4ht seem like the right driver to use here. There is
also a TODO just before it though,

┌────
│ 	  ;; TODO: this is a very different way of generating the
│ 	  ;; frame latex document than in the pdf case.  Ideally, both
│ 	  ;; would be unified.  This would prevent bugs creeping in
│ 	  ;; such as the one fixed on Aug 16 2014 whereby :headers was
│ 	  ;; not included in the SVG/HTML case.
└────

I think a patch which implements this could also allow you to change this
hardcoded string, and would be most welcome if someone were to give it a shot.

All the best,
Timothy

[-- Attachment #1.2: Type: text/html, Size: 7040 bytes --]

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

end of thread, other threads:[~2021-12-30  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06  7:02 Bug: `org-babel-latex-preamble' should not hardcode `pgfsysdriver' [9.4.4 (release_9.4.4 @ /home/n/.emacs.d/elpa/28.0/develop/org-mode/lisp/)] Zhuohua Li
2021-12-30  9:24 ` Timothy

Code repositories for project(s) associated with this 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).