From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wD7YCuCB5WH2dwEAgWs5BA (envelope-from ) for ; Mon, 17 Jan 2022 15:49:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id eFoXB+CB5WFWCwEAauVa8A (envelope-from ) for ; Mon, 17 Jan 2022 15:49:04 +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 9CDA84BA5F for ; Mon, 17 Jan 2022 15:48:59 +0100 (CET) Received: from localhost ([::1]:42182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9TJZ-0003MF-Qy for larch@yhetil.org; Mon, 17 Jan 2022 09:48:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9Sma-0000p2-6D for emacs-orgmode@gnu.org; Mon, 17 Jan 2022 09:14:53 -0500 Received: from [2a00:1450:4864:20::32e] (port=46892 helo=mail-wm1-x32e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n9SmY-0001p6-C4 for emacs-orgmode@gnu.org; Mon, 17 Jan 2022 09:14:51 -0500 Received: by mail-wm1-x32e.google.com with SMTP id d187-20020a1c1dc4000000b003474b4b7ebcso23016706wmd.5 for ; Mon, 17 Jan 2022 06:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version; bh=gZHtmSVgjdZhhRWJzBF+AkuPwLVvC+aHIkH7PbR6xvs=; b=QrcfqWg0hcdek3BgIe6UCtQr8LNSTEzl9cMQU0ezNJ+LXSZCNfnlvLi/jnKhf3hROa VF0fah8DAAb+1msL6O86s5VednBqquIlS4/cw5I66otdjNEQ9h+l3Ugof0+L/1wxEhxv 6s+hPcUJPDnBdqb1KZe8D+CGhZSSktVQRRitzPtZPP03ejWTK+SHjCJl01XcxulSS5i4 Bhr7uIymwuq84T/pi5DBO8AtjJcC9M340pH4HmEW3fh33K8Fpuf+fVmgHYgUgJEhFjGu D29vMw2YrJ/NAKqzH+iHMWpdNH1KBpB6jWtxgIblVNDJC9dJIJzNYlHr7X7FO43mI23X yw2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=gZHtmSVgjdZhhRWJzBF+AkuPwLVvC+aHIkH7PbR6xvs=; b=cJWTh6ACdmEiYYJg/BRhDx3ybvJV+7meqzNaLzsU/Mp7y5QGBYeV9bb6d59dTdQE/k i7/Q6dPxCxdynqPuGsDs0Prn0lWmctOAiOLMP/dMls8klpWv6J6HpcwcqSFpwlfeFfWT WkETefxSTqtupfiJ2ZACEvmB0+dtDQdWVh2pGVTFIMmt+i3tOEuPtp/TetuKGbEV6PNE 18d8M/uz7rwtKkiz7H1GeETEPohhFU453pBnc88L1Rvka/FgQBw7j5F5Y6ReeUlfYTk3 X9hO3lkIr1P7He6JnP/7Z+jRKh4OCMMdy1R3JfotZ0CxDfBzHbjnOXZdsvYPU/HuWGN7 nDCA== X-Gm-Message-State: AOAM533xZ44zOGKKs9H7ZCt/NWnTd1rzYbrmRstsFoAge1N3XKJj39rJ iNWLWQh0mop3pQ7XD+ssuv3IpYnh39M= X-Google-Smtp-Source: ABdhPJw+RIHpOhiatZcrn8U999wri/CS97AkP7v/UVV+1CJSuIWfhIv+laylD+lkZ5onEeoiPxEHPg== X-Received: by 2002:a05:600c:154e:: with SMTP id f14mr20324960wmg.112.1642428874229; Mon, 17 Jan 2022 06:14:34 -0800 (PST) Received: from paquerette ([2001:861:4284:db70:6ce4:fc00:3fbe:e000]) by smtp.gmail.com with ESMTPSA id a8sm13374386wrx.57.2022.01.17.06.14.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 06:14:33 -0800 (PST) From: Edouard Debry To: emacs-orgmode@gnu.org Subject: latex block tikz to svg Date: Mon, 17 Jan 2022 15:14:32 +0100 Message-ID: <86r196motz.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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32e (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=edouard.debry@gmail.com; helo=mail-wm1-x32e.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: , 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=1642430939; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gZHtmSVgjdZhhRWJzBF+AkuPwLVvC+aHIkH7PbR6xvs=; b=o70597Zj0vHANxMV7YqoEJ0YfLOWsDfOMFYB5DWnRElA6awc+/2wZMO1MqaIv5d3kgJRkH hM5G6UFMxlXbMzuV94iRzPAZdI4nfaylV8GTBAl3peFLctiBxgPCzo77j5F8cMe/gkgzSW mQAdy/lbvC4lbe/T2Qw3x1Cs2RZSJpJF2ANu0puzct88JZZFSKUhBkAaP99IAWMPkjfvoZ mUQwSB5LerX8xstRlXiAkyE5vuJ10tcN6b0eue65WMkHgg7cdE/ZfKq1lDNZO2J9l29TGg PyUqJ68DwnaWFqoFqvEl6/LQbaYsg3XH/NaZu0KauiY5Eq28JjBlrxwU+2LoqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642430939; a=rsa-sha256; cv=none; b=EVOQoDTGtxmaUT+/qoRX6PiKnvNFHGzgqAa5kT5NxBkJ8T6mm+yUR7dFUcCO9TqiCQ08GH Y7XYWpF9v6XwN3lYnvUjjLr4JkWrifr4CnCXXOgN8s5xDWzN+G7GQ+R6YL+8fe+TlM6pT5 FTtK9Hjw9lEr/+8I/E5OlADZsih/YhYH6eJcxHYU/3E4iR9xskiccMu9VoAPDbIiFzrtwv 1ylvg6TdFYEhiQCYSRwM9wkOzl53EEMi1o05Jv5nM6jycAz+JNM88TNbctHjw3eg/ZyMq7 9Pl4vhVbNE5SwEE0rxFOm5eko82smKeJ54b0ziI/Ghr9ZUQYSq3nPdfsZInURQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QrcfqWg0; 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.32 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=QrcfqWg0; 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: 9CDA84BA5F X-Spam-Score: -4.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1YbLVdKKS9B/ Hello, I experience some difficulties to export latex src block consisting of tikz code to svg. Here is for example the simple code I try to run with `C-c C-c` : <==================================================> #+HEADER: :file test1.png #+HEADER: :imagemagick yes #+HEADER: :exports results #+HEADER: :results output silent graphics file #+HEADER: :headers '("\\usepackage{tikz}") #+HEADER: :fit yes :imoutoptions -geometry 400 :iminoptions -density 600 #+begin_src latex \begin{tikzpicture} % \draw[->] (-3,0) -- (-2,0) arc[radius=0.5cm,start angle=-180,end angle=0] (-1,0) -- (1,0) arc[radius=0.5cm,start angle=180,end angle=0] (2,0) -- (3,0); \filldraw (-1.5,0) circle[radius=1mm]; \filldraw (1.5,0) circle[radius=1mm]; \end{tikzpicture} #+end_src <==================================================> First of all, for this to work I have to change `org-latex-pdf-process` to ("latexmk.exe -pdf -f %f -cd %o"), which unfortunately breaks the latex to pdf export of org files (C-c C-e l o/p). Then, it works when image file format is png. However, a close look of the pdflatex output shows this error : <====================================================================> === TeX engine is 'pdfTeX' Latexmk: All targets (latex-JEShjO.pdf) are up-to-date Rule 'pdflatex': File changes, etc: Changed files, or newly in use since previous run(s): 'd:/xxxx/Documents/utils/texlive/2021/texmf-dist/tex/latex/tools/.tex' ------------ Run number 1 of rule 'pdflatex' ------------ ------------ Running 'pdflatex -shell-escape -synctex=1 -interaction=nonstopmode -recorder "d:\xxxxxx\Documents\utils\texlive\2021\texmf-dist\tex\latex\tools\.tex"' ------------ Latexmk: applying rule 'pdflatex'... This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex) \write18 enabled. entering extended mode (d:/xxxxxx/Documents/utils/texlive/2021/texmf-dist/tex/latex/tools/.tex LaTeX2e <2021-11-15> patch level 1 L3 programming layer <2022-01-12> File ignored) ! Emergency stop. <*> ...exlive/2021/texmf-dist/tex/latex/tools/.tex ! ==> Fatal error occurred, no output PDF file produced! Transcript written on .log. Failure to make '.pdf' Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 1 Refer to '.log' for details Latexmk: Undoing directory change ------------ Latexmk: Some operations failed, for the following tex file(s) Latexmk: Examining '.log' === TeX engine is 'pdfTeX' Latexmk: Errors, in force_mode: so I tried finishing targets ...xxxx\Documents\utils\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 12: perl.exe d:\xxxxxx\Documents\utils\texlive\2021\texmf-dist\scripts\latexmk\latexmk.pl -pdf -f "c:/Users/xxxxxx/AppData/Local/Temp/babel-B1S4gp/latex-JEShjO.tex" -cd "c:/Users/xxxxxx/AppData/Local/Temp/babel-B1S4gp/" <=========================================================================================> I wonder why it tries every time to compile a ".tex" file although the temporary previous pdf file was correctly generated. Finally, if I change "test1.png" to "test1.svg", such a svg file is generated but with garbage in it. 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 Regards My configuration : - windows 11 - emacs 29.0.50 (compiled master from a few days) - orgmode (9.5.2) - mingw64 : imagemagick - texlive 2021 (installed from yesterday)