From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iPVJMzOT5WHHqAAAgWs5BA (envelope-from ) for ; Mon, 17 Jan 2022 17:02:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 8MbcLzOT5WEkVQEAauVa8A (envelope-from ) for ; Mon, 17 Jan 2022 17:02:59 +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 E6AC63FD30 for ; Mon, 17 Jan 2022 17:02:58 +0100 (CET) Received: from localhost ([::1]:34816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9UTB-0001rW-Uc for larch@yhetil.org; Mon, 17 Jan 2022 11:02:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9URk-0001qQ-OH for emacs-orgmode@gnu.org; Mon, 17 Jan 2022 11:01:29 -0500 Received: from mout01.posteo.de ([185.67.36.65]:44487) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9URg-0004ki-Mc for emacs-orgmode@gnu.org; Mon, 17 Jan 2022 11:01:28 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 12621240026 for ; Mon, 17 Jan 2022 17:01:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1642435280; bh=n7gT9vByVVMEXcllpi2fRJDjRmagnr1LAVywtfQCw2Q=; h=From:To:Cc:Subject:Date:From; b=SvX7foAIluPjhPRcEeU+at0YYW1ZWR7bqD5KyGZohLJgcFaeCnopx427BeDpTJaX+ Xw5RDGbVFOOwP/vRg5ut6q4ew1/NWJNn+QLDPf/i/nuUggpQ2ni5xF9rmRWaSufrjP +pIcctK5YUyYJ7pFE+M2HX82kxxVmzjELQkLRunuNadZyOCy1nmblP/7u+XQd8FQh2 FXNG6d/MsK5kV1FfVAleugOa7FV32zyJKeZa0HZCzh2FlIIrbdMfc5l0vO0h1zzMRK WxjeTrlnLRczt5nbsIJRX8Jr+lu8MH/8LLTm7ZHZ8tFY82CJBZe8acAQAwig7EYPD1 nb4h02sTq0x3A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JcxTq3CvPz9rxd; Mon, 17 Jan 2022 17:01:19 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Edouard Debry Subject: Re: latex block tikz to svg References: <86r196motz.fsf@gmail.com> Date: Mon, 17 Jan 2022 16:01:17 +0000 In-Reply-To: <86r196motz.fsf@gmail.com> (Edouard Debry's message of "Mon, 17 Jan 2022 15:14:32 +0100") Message-ID: <871r164aia.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1642435379; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=5UGjwtxirYzbM0kSHvR8xpfGulPLUI9RzJGYUK/iehk=; b=ojx545IH91KxRMnxcw9hbSh2i4BjHsKTLBUBTgvcQxaHK1bKvQDMSy/JU64s3/Wb8U1eq7 xUO/YjOhc58920+ODFwKwICznOlXeVwlJ3JifZdV6s5Pu+cgmP3NKuClDcNJXwGVz5pWVu N49MgRPKSuXfbqtfttSd6AqPrf1Rc2dXLV0MkDZeUbBKBCk0RMG+V9BBwUTiCPjmCHCLV4 Hv8WxrKMQapCeqytsP/bQ6cUQEtIoTph25/j+lnP7IctqS5MpFaTQgm0ACK8Wb8tNb3J2m vWSClgxYNV3fLOyNbIlH9CQU34p0T0L4FnrOxfAyVgYWy4jFN5xR4nGAv2CSvQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642435379; a=rsa-sha256; cv=none; b=XrJy/sg2AtgR2naOeBumriTtLTvEcOH/LkQglXq66VhUnpe1aOKZ0QbJA3v6qZEBqAbe4r 6Lc62GeBmAfKZ8dSc+yRdAkoc1VOBhC5vFbKUpqQKXjPF3Xo/UHY5fRHXl340O4nt6B+oW TKsR/B9DLEyacIisXzUNJh2Q/bx+/DzDXlAe8xVOcR7jo1/I+CH7fBmL1gXBRtOFK3OemE /1YNxO9+jmvP7NuV8FBgjmnsQjVhfkqShDP0TKBarbAFfzD5CVOJFoCNxNunoOBwj4K2Cf FDiT9P+JlEbbp3UpxEbdbXD3Is97N4wcf5RN9SmlgZaN4Ou3MkLD0hW/wj0Ung== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SvX7foAI; dmarc=pass (policy=none) header.from=posteo.net; 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.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=SvX7foAI; dmarc=pass (policy=none) header.from=posteo.net; 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: E6AC63FD30 X-Spam-Score: -4.52 X-Migadu-Scanner: scn1.migadu.com X-TUID: We30x4ECYEB/ 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= "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= "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