emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: DPI error when HTML publish latex block images [9.4.4 (release_9.4.4 @ /Applications/emacs/lisp/org/)]
@ 2022-01-24  7:46 Daniel Guimaraes
  0 siblings, 0 replies; only message in thread
From: Daniel Guimaraes @ 2022-01-24  7:46 UTC (permalink / raw)
  To: emacs-orgmode

  I am trying to export a latex tikzpicture, like the following to html:
```
#+begin_src latex :exports results :results raw file :file ex.png 
:output-dir ../img/
\begin{tikzpicture}
\draw node[circle, draw] (a) {$a$}
node[circle, draw, right of = a] (b) {$b$}
node[circle, draw, below of = a] (c) {$c$}
node[circle, draw, below of = b] (d) {$d$};
\end{tikzpicture}
#+end_src
```
If I export with `org-export-dispatch` to HTML file, I flawlessly obtain 
the desired html. If I however, `org-html-publish-to-html` with:

```
emacs -Q --script build-site.el
```
Then I obtain the following error:
```
Debugger entered--Lisp error: (error "Attempt to calculate the dpi of a 
non-graphic disp...")
signal(error ("Attempt to calculate the dpi of a non-graphic disp..."))
error("Attempt to calculate the dpi of a non-graphic disp...")
org--get-display-dpi()
org-create-formula-image("\\begin{tikzpicture}\n \\draw node[circle, 
draw] (a)..." "../img/ex.png" (:foreground default :background default 
:scale 1.0 :html-foreground "Black" :html-background "Transparent" 
:html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) t)
```
My `build-site.el` configuration is the following:
https://github.com/dcguim/dgpage/blob/main/build-site.el

This could potentially be a bug in `org--get-display-dpi`.

Emacs : GNU Emacs 28.0.50 (build 1, aarch64-apple-darwin20.3.0, NS 
appkit-2022.30 Version 11.2.2 (Build 20D80))
of 2021-04-16
Package: Org mode version 9.4.4 (release_9.4.4 @ 
/Applications/emacs/lisp/org/)




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-24  8:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24  7:46 Bug: DPI error when HTML publish latex block images [9.4.4 (release_9.4.4 @ /Applications/emacs/lisp/org/)] Daniel Guimaraes

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