From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yEYYM731WGPXjwAAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 10:54:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2EQKM731WGOwBwAA9RJhRA (envelope-from ) for ; Wed, 26 Oct 2022 10:54:21 +0200 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 6EBFD38FC3 for ; Wed, 26 Oct 2022 10:54:21 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onc9m-0004Lw-VK; Wed, 26 Oct 2022 04:53:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onc9l-0004GT-WB for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 04:53:02 -0400 Received: from latitanza.investici.org ([82.94.249.234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1onc9a-0008Fv-IV for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 04:53:00 -0400 Received: from 2.mail-backend.investici.org (unknown [10.0.0.12]) by latitanza.investici.org (Postfix) with ESMTP id 4My2cz5tGSzGnxt for ; Wed, 26 Oct 2022 08:52:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptolab.net; s=stigmate; t=1666774355; bh=P6H4MLE8V2S+Wm8uYPZjKGw1wtZ4EmbmFlIBwAUrcZk=; h=Date:From:To:Subject:From; b=bz2gmo5hca+z12Gpj0QOkwSY2HJd2jmP0kyWszZOKNGblTi+vg72e/9HrqgS2ItwB 5eiy3eIgW6Q7nEy8Mg08ADQcfZQ5RxwUnN3xOhB2+dUlgH44OBI1r4eCXlN6GuVmOA s3W2MFyL8cBbjL9mK2El9xYYJ7WpSwOJCf+85VGE= Received: from 2.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: edgar@inventati.org) by 2.mail-backend.investici.org (Postfix) with ESMTPA id 4My2cz4k7Xz2xFT for ; Wed, 26 Oct 2022 08:52:35 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 26 Oct 2022 08:52:35 +0000 From: edgar To: emacs-orgmode@gnu.org Subject: Tikz ugly hack User-Agent: Roundcube Webmail Message-ID: <2f3d4e17ac5e246f355ab9039943c269@cryptolab.net> X-Sender: edgarlux@cryptolab.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=82.94.249.234; envelope-from=edgarlux@cryptolab.net; helo=latitanza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1666774461; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=P6H4MLE8V2S+Wm8uYPZjKGw1wtZ4EmbmFlIBwAUrcZk=; b=nJ2Rm4hY0PnVGGXJXT+Zceq7bJs/F2Qn3ogU3e2Y9OrZP/9lYVuMWjUn4dC6GlTe8I63b1 bJuMiUYAEGRVU8pxqQ4PiH1Kh4wCLvwH6gnzUf/5fKjLmBX1wAmr/3EzZBwh1YpGr8V+/S Vx7pwKNqZctqF4GtMJ5JwTWfjlNO3Di0YPSRMD4lGblgE1/hegHZ3dJ5gsaGBMswn63p+I EbD3cw8lfPIXxM5z9mbZYP903tKXRY8vD6KKoFwVwdU07PDvkBhMcLBqD48ebZa4oK5B0h hpuVqnoXHKCgGq55Ff3r0ZqMe6Hy27vqFbl7IUjommjUL1GWlw5TS9h5gfA9cw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666774461; a=rsa-sha256; cv=none; b=TPnJWUuxQBamDiELL0m6xH4u8I3NY5/gFF0ILxAbKB639ACkVsdj6IVm+iTx3sGfJjspiD jOt0f2Jqfm7hH5bZhfCiGoe1VH8YS/er5HU8kaEc3S+AwFX8FXW5JnS5UNR//NwTTjF5hL jb/p+J4iezoXRz/IxOWH0KSW7Uqnc442sWNo56QFgbFTG3mRgCRyK56/622dadu3MZ5/94 CuvuU6JMXKvIT6h+HkMi8VlOvQGhNWvnA+tFC8Y7MMYjdoDKFyLlYBQxx9lj/pkXcwufbd BhaziwH3prRXvciIyA/Eu6apK+vRDbQaEbycRyG9v/2rb6T0ZdALZNrbfBzyxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=cryptolab.net header.s=stigmate header.b=bz2gmo5h; dmarc=pass (policy=reject) header.from=cryptolab.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: -2.40 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cryptolab.net header.s=stigmate header.b=bz2gmo5h; dmarc=pass (policy=reject) header.from=cryptolab.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: 6EBFD38FC3 X-Spam-Score: -2.40 X-Migadu-Scanner: scn1.migadu.com X-TUID: JjzWmSpsWr4m Dear Org users, I just want to share a way to combine Tikz (LaTeX) with figures (svg, png...). This may be needed to add elements (e.g. annotations) to your figure. The figure may still be exported with other back-ends (without annotations). If you know of a better way of doing this, please, let me know. Thanks. #+latex_header: \usepackage{adjustbox,tikz} #+latex_header: \newcommand*{\DrawGrid}{\draw[step=.2cm,help lines] (current bounding box.south west) grid (current bounding box.north east);} #+latex_header: \newcommand*{\DrawBoundingBox}[2]{% https://tex.stackexchange.com/a/542819 #+latex_header: \draw [red, very thick, rounded corners] #+latex_header: ([shift={(#1)}]current bounding box.south west) #+latex_header: rectangle #+latex_header: ([shift={(#2)}]current bounding box.north east);} #+begin_export latex \begin{tikzpicture} % left bottom right top \node {\adjustbox{height=0.7\textheight,trim=45.6mm 0mm 155mm 20mm, clip=true}{ #+end_export #+attr_latex: :height "" :width "" :options "" :center nil [[file:../diagram.svg]] #+begin_export latex }}; \DrawBoundingBox{5.7cm,0.71cm}{-0.1cm,-3.6cm} % \DrawGrid \end{tikzpicture} #+end_export