emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Guimaraes <dcguim@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: DPI error when HTML publish latex block images [9.4.4 (release_9.4.4 @ /Applications/emacs/lisp/org/)]
Date: Mon, 24 Jan 2022 08:46:41 +0100	[thread overview]
Message-ID: <e22e7cac-03c1-ddee-1b1d-09981a384bfc@gmail.com> (raw)

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




             reply	other threads:[~2022-01-24  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-24  7:46 Daniel Guimaraes [this message]
2022-10-16 12:51 ` Bug: DPI error when HTML publish latex block images [9.4.4 (release_9.4.4 @ /Applications/emacs/lisp/org/)] Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e22e7cac-03c1-ddee-1b1d-09981a384bfc@gmail.com \
    --to=dcguim@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).