From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +H1YMUGI8GHd+gAAgWs5BA (envelope-from ) for ; Wed, 26 Jan 2022 00:31:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UJIhKUGI8GHTUgEAG6o9tA (envelope-from ) for ; Wed, 26 Jan 2022 00:31:13 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3E88E21150 for ; Wed, 26 Jan 2022 00:31:13 +0100 (CET) Received: from localhost ([::1]:51988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCVHM-0000Rw-7J for larch@yhetil.org; Tue, 25 Jan 2022 18:31:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCVGP-0000Ri-ML for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 18:30:14 -0500 Received: from [2a00:1450:4864:20::12d] (port=42578 helo=mail-lf1-x12d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCVGG-0008Lz-Rx for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 18:30:06 -0500 Received: by mail-lf1-x12d.google.com with SMTP id y15so51460443lfa.9 for ; Tue, 25 Jan 2022 15:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=fyAF51jKd/m/4u2a5+02NEBXhJq3oQxXsvZVQcvt8Mg=; b=jFyg8JazYsMMryV3m0WieIOkXgRhhqtcaPENwkG0ftDE7eR89O6vAgoD2WIsxjV0yT i3UhmvD6oRzjQ/pagq8W+ji1ravsI7l2l9rvMW16PFd28IUDByj2QTIYSns8qzqRF20S FQGOjq5VtyYDX1rH6sH/sJ2WYmCZlRM9X2cDF65tIdZw6QpKybZW5zYCOsOTJqRvZgVR 46xbVEqX1OHbV67c1PzNXDdANpBJFXRxjCGbB/1VQV2KiVhCacxykjzTwaQkYNP46u2i SJQIN0Wdamguok6D9GF3UAj5NGrCiOheaA79rXhYAsa+U0QisoIS8oIrbo9V56PatoM5 zhxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=fyAF51jKd/m/4u2a5+02NEBXhJq3oQxXsvZVQcvt8Mg=; b=YGptjU+j3CKf1ZzXqCbnvMczOruiB9MCpuwNh8I0ahu6vJVuouQ0VM4EtjNl596u76 1Xa/5cgw9UbUqa8oyUSoOLerUTad1uFvCVst5hhpHoR6d9IPtccdEVRaQ3i35Tqfm30X fo6FieBCGcxBzU7s13sgDP0V0LZWRLNheN54u+MR3UtN4U4M9+7i0apfEbedDs38A217 byNs0vQCISHoq97yti/7ojM7FuHvc5r0NxL8/MK15nFtNLxUUIkT8RPuDQxc0lQ0FlhW MdFbhNCUYhYiZpulZKDgh5xfD3lTO20pZh8Nzah7kaKMDB4RysGhGPJ7Vbcbox29jq/u V/2A== X-Gm-Message-State: AOAM532qll3X8gbVuUp6Ynk+Zkb7zeQuEwKA8nIZR9VNga7wJ4Z8m2p1 mQQJi6BhE9vRkePihKziW2OzyTg4NqU= X-Google-Smtp-Source: ABdhPJyqD6TyMbBYkC8lSMC+wXCWL5hsGCT+1t6LR38CksRD5LZq5H6QAXmoWmNG69ZimN5XiJB16A== X-Received: by 2002:a17:906:2590:: with SMTP id m16mr17670812ejb.653.1643153067625; Tue, 25 Jan 2022 15:24:27 -0800 (PST) Received: from paquerette ([2001:861:4284:db70:9453:cce2:8142:a01b]) by smtp.gmail.com with ESMTPSA id l3sm8784097edr.61.2022.01.25.15.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jan 2022 15:24:27 -0800 (PST) From: Edouard Debry To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: latex block tikz to svg References: <86r196motz.fsf@gmail.com> <871r164aia.fsf@posteo.net> Date: Wed, 26 Jan 2022 00:24:27 +0100 In-Reply-To: <871r164aia.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Mon, 17 Jan 2022 16:01:17 +0000") Message-ID: <86r18vz9ec.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::12d (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=edouard.debry@gmail.com; helo=mail-lf1-x12d.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643153473; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fyAF51jKd/m/4u2a5+02NEBXhJq3oQxXsvZVQcvt8Mg=; b=qBOACi9AY5kpRDRres4QEWhWrGAgM2KbthqrSD5Wk5jSocLY9wVOAkPkIO693WMoJgvTPR P6GY5RYHLNKW8m0S5L9LILtaIPJ6V2ORNDDa8CZyI1gXLzbBNpFLeTyQHWVmBjZtFVhHJK Wd/doWpl7H03HiL97Nf2sC0XGFdY4J3qKBFpOrv0qHbLR+uo0y78qk1k67dth8yY1FKbd7 IceSlMemZBSAJeoqHi5esxfg2xPubbrjI2Ulev6wjr0SOPphnkiVoFLkVIoWQW/SygY5+D 0k1Zi2KdFrSQj3BoJkPjdR9aw/0oIbVSmninb92g2CP+l4I9VmSBcH/jqVtfXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643153473; a=rsa-sha256; cv=none; b=WfUTCVeLj9gJXxydR7BtTxBbqDnumEpfaZvG7JtAmuYvfGuQXIOlGwkim7R3aSnjB6Vxsa Ry5N/BAqT8OjZlNdtmQZEaf+Nn5VpwEnWx1Qhc9HZVtlmFqWz6UVdEWbWcXfzyuHiNwaZJ ucoW1sauqoLkLWDmp9pmUBLE403HCwXCaiUK8NyPPaPmK3djigNpT2WA1i5YeX55quAqHc CH+v+RfYo6IMf0u0BNs7DNv8wNMbt65zL9K7O1OJuOzou1UmKEiLiZQaUx1Fd1TZewB0PE xjKuMcpY2dMf8QFSEimr01RpxV2R88gUV0fzDKqcJjW3EhCMu4RCELnBDn+URw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jFyg8Jaz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jFyg8Jaz; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 3E88E21150 X-Spam-Score: -4.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: EUWqtp7/i0le Hi Juan, Thanks for your answeer. Indeed, the generated tex files are different whether you use the png or svg extension. It seems that for svg, a distinct build system is used from the usual one for other image types (png, jpg). This build system seems based on tex4ht, given the latex file preamble. I tried to compile manually this temporary latex file (the one for svg) with "pdflatex" which fails. Then, I tried with "htlatex" and guess what ... it works ! A svg file is created, which unfortunately does not contain everything, but this was only manual compiling, probably some missing options. I think at first there may be a bug in my own configuration of the variable "org-latex-pdf-process" which should be passed the correct build system. Regards Juan Manuel Mac=C3=ADas writes: > Hi Edouard, > > Edouard Debry writes: > >> I would like to find a way to generate svg images from latex src blocks >> (using tikz) which works and is compatible with default orgmode settings >> for latex export (at least does not break it) >> >> Did you experience such issues ? do you have some workings settings and >> examples ? I googled several times "org latex block tikz svg", but it is >> difficult to guess how relevant are the elements found, some of them >> seems quiet outdated. Hence my question on this mailing list > > I've done some quick tests with your example block. I don't know if I'm > wrong, but I think the problem is on line 27 of `org-babel-execute:latex': > > ((string=3D "svg" extension) > > I don't know if this should be considered an Org bug, but it's clear > that if the svg extension is detected in :file, the ':imagemagick yes' > option is ignored, and a type of preamble is generated that fails in > pgfsysdriver when compiling the temp tex document: > > \documentclass[preview]{standalone} > \def\pgfsysdriver{pgfsys-tex4ht.def} > > If I replace the above line with this conditional: > > ((and (string=3D "svg" extension) (not imagemagick)) > > then the imagemagick option is taken into account: it creates correctly > the pdf and then converts it to svg with 'convert' imagemagick program. > I did have to remove this line though: > > #+HEADER: :imoutoptions -geometry 400 :iminoptions -density 600 > > otherwise, the conversion produced a dark image. > > Best regards, > > Juan Manuel=20