From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: computing the size of a tikz to png image during export Date: Wed, 24 Jan 2018 08:54:49 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeTkH-0007nA-9J for emacs-orgmode@gnu.org; Wed, 24 Jan 2018 17:42:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeTkE-0003r3-5H for emacs-orgmode@gnu.org; Wed, 24 Jan 2018 17:42:17 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:24955) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eeTkD-0003pd-P4 for emacs-orgmode@gnu.org; Wed, 24 Jan 2018 17:42:14 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, I use this great trick to have both a pdf and html export of tikz images: #+header: :file (by-backend (latex "tp6-tree.tikz") (t "tp6-tree.png")) #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometr= y 800 #+header: :results file raw #+header: :fit yes #+header: :headers '("\\usepackage{tikz}") #+begin_src latex \begin{tikzpicture} =E2=80=A6 \end{tikzpicture} #+end_src If I understand how it works in the png case, a standalone latex file is first generated, then it is compiled to pdf and converted to png using imagemagick. Instead of specifying the geometry of the image (width of 800 pixels above), I would like to compute it using its original size. Is it possible? Thanks a lot, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2017-12: 406.82, 2016-12: = 404.42 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEzBAEBCgAdFiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAlpoO8sACgkQBA0KO07S 5ccT6Af+JUUIN6Y2awFsre6KU/XpIObIV5+wzL+Tjh+0BnAZnJLMQ+hqbJ9TW6AI EL8lhzfWCMi+G7CoqC7GnYo8qyyQ6ulARu9n9ycNGZ+2mhcHlTWv+IKaX5myen9/ hIPDB8+FZiubsZm3yzH7qtTnZwOg+I/tyA+kwWQZiptP5P+nhfz8izX9l1hgCzY+ VtKXVTkQVIy0jB1IRs0A0VUrWKTvANcZ3uhnVnrf8EMBWVdEFlq5BzyI/OEoSAGO QKsX3bYJsDxQxj1wkmZsj2/c6arTQggAozba61IAZMEROVGjRcB49WKz7pDRDGFZ Vv6T0bAnsF/O0S0SQnvLdlce3xJDqQ== =yysv -----END PGP SIGNATURE----- --=-=-=--