* 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
2022-10-16 12:51 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* Re: 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 Bug: DPI error when HTML publish latex block images [9.4.4 (release_9.4.4 @ /Applications/emacs/lisp/org/)] Daniel Guimaraes
@ 2022-10-16 12:51 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2022-10-16 12:51 UTC (permalink / raw)
To: Daniel Guimaraes; +Cc: emacs-orgmode
Daniel Guimaraes <dcguim@gmail.com> writes:
> 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...")
Thanks for reporting!
Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d972cfac89ccb9003a91636701625bb142f1b6cf
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-16 13:02 UTC | newest]
Thread overview: 2+ messages (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
2022-10-16 12:51 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.