From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KHvxBheSc2Q4oQAASxT56A (envelope-from ) for ; Sun, 28 May 2023 19:40:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WDwPBxeSc2R2UQAAauVa8A (envelope-from ) for ; Sun, 28 May 2023 19:40:39 +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 01CFB9638 for ; Sun, 28 May 2023 19:40:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3KMk-0007Qy-0L; Sun, 28 May 2023 13:39:38 -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 1q3KMg-0007QT-DP for emacs-orgmode@gnu.org; Sun, 28 May 2023 13:39:35 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3KMa-00010i-1f for emacs-orgmode@gnu.org; Sun, 28 May 2023 13:39:29 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 544E232003D3; Sun, 28 May 2023 13:39:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 28 May 2023 13:39:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tecosaur.net; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1685295561; x=1685381961; bh=Ws qZY5LPytzGA9qlc/HHzX+JGYNOdBFB7HO/EwVXFn8=; b=hu6GdC3f+fnSNHMdJN Ds5brmd41LhkJwzvIKQBnF7Oe9QabmEbqPUPRr088WLMJrtIE7wbe75/tsi7ajkS SNGw6NqVLAUBgmBDI9UNWrUpbMJCd6WAqDwiXa/AK0nRb04aVhY1nx3NFKbOgSud +W97xDehPZI1Ul6yw+ky2R729NFD1UGe9+GdWMF6n5XYGn/Jrrve15csRHEtR7DJ NtLB+e2UbyNXUJWIsUJV2rMBwcYoILEKno4GvqZ0v4zlQ9v1ecmudvMCbCR63R5w MK91Bn4n40Pzff/A8MEryOGm5z9pYJ5tMN1X7AW55zBOB+IpDNM5Hqff3IuB2pEm DVAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685295561; x=1685381961; bh=WsqZY5LPytzGA 9qlc/HHzX+JGYNOdBFB7HO/EwVXFn8=; b=rCvm6ZbXFWRqCDDUzqD1yASzXsiEm pkDYMef3l8LvIb3pGOZGuW4JfjjIDcJMrfbnEDO7cHM2v5b+a2YXTQh3MTfkBZ22 y2Zsd4JUBo2CUsEbetW+kUr0QPBaiG2h5PCE4Br3a4izuorzNIgOp3twLLMiQpWG 3fzafE0UB6FTqY8ezfAs0OaJkdPK7GhtUw/eH11EijFbJQQx/sgzNDPvwVlDu8re 3ZUuc0Jk5ZAOkSo/7Igj/qTrmvQCSnYDRQox4bp5IzWRn+otB46e5QwNLG/7VXAb pgZEq/L7oegBDFs0uKhwZPljkz5NdVVcVvESwUK2jMy8F3XTO1p79KMvg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeekfedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefuffhffggjkfggtgesmh dtreertderjeenucfhrhhomhepvfhimhhothhhhicuoehorhhgmhhouggvsehtvggtrdht vggtohhsrghurhdrnhgvtheqnecuggftrfgrthhtvghrnhephedtfeduieeifeetleelud fgteekueekgefgfffftefggfdtteeilefhieejtddvnecuffhomhgrihhnpehgnhhurdho rhhgpddtgidtrdhsthdpohhrghhmohguvgdrohhrghdplhhisggvrhgrphgrhidrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehorhhg mhhouggvsehtvggtrdhtvggtohhsrghurhdrnhgvth X-ME-Proxy: Feedback-ID: iecf94634:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 28 May 2023 13:39:20 -0400 (EDT) From: Timothy To: Rudolf =?utf-8?Q?Adamkovi=C4=8D?= Cc: emacs-orgmode@gnu.org Subject: Re: [Pre-PATCH] Overhaul of the LaTeX preview system Date: Mon, 29 May 2023 01:31:59 +0800 References: <87lek2up0w.fsf@tec.tecosaur.net> User-agent: mu4e 1.10.3; emacs 28.2.50 In-reply-to: Message-ID: <87edn0tkxn.fsf@tec.tecosaur.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: none client-ip=64.147.123.24; envelope-from=orgmode@tec.tecosaur.net; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685295638; a=rsa-sha256; cv=none; b=EzasfC1Bn5LUqXcAB/HA6ArYP5dt1d0zP9ZBmSji7eNaeoJvE5wlPfaHdo/IYFmz+R1ywz G8rDDoNleLoKZhcrGKxLIMuUKLcsEURm3HB4AioUlXOuo2Cp2h11hHq37GTeOgNv7jcS2B Sl9Y57RIJdIfvAGCm0XedQcN06HsUvoEWcjEDZv4M8hWrYH9wlCJvkRHxi4qIrNLJdcK2q nd6dF7wx32ezfio9Pc8E90Zmtoi2J+67HJEaYpAdgXkqtCid8TlpTbk186F2Oj1NHj3eWp Tj4fzYCqCWorZIxN5ep8kU6bSeywllZtQWNPbl523q8lemzCgaMqrKum/SLQ1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tecosaur.net header.s=fm3 header.b=hu6GdC3f; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=rCvm6ZbX; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685295638; 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=WsqZY5LPytzGA9qlc/HHzX+JGYNOdBFB7HO/EwVXFn8=; b=Ce8WadzeYziOt4+1VbPzimDYJ/y8LIoktYtV8H4jDqdihT8oU6eUGfu3mIkUlOSR5uXdzf XpeIn6xLI8jSGUSgw5f87K60QC7BOkwfEINTK1+fsXjcON2AuLLehE9rBuVUPEN6cqmA2Q TTjy16G0KgcF1v68t1lkbJTJ2gRAl7eJNu/Zg/pcdWRFU3jf/EpBlchvq/RYJKOpAgWG6E VD8SfxEdovr5ZZOxJ/BwCS3QhUv0e+ow8TrV6J9h5UcbJow07fNlVAdZyM3OA4tjVxt3oB uCe0sOxzWtDau+cdvdhkbaEwn88Gqaucx0ND+MZu/eEn2Zn9A7LFJWAB/u2uLg== X-Migadu-Spam-Score: -0.05 X-Spam-Score: -0.05 X-Migadu-Queue-Id: 01CFB9638 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tecosaur.net header.s=fm3 header.b=hu6GdC3f; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=rCvm6ZbX; dmarc=none; 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-TUID: 8ElKYl2D7lcZ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Rudolf, Thanks for testing the branch :) > ISSUE 1: CLIPPING > > On my HiDPI screen, the new previews are clipped slightly at the edges. > I had this issue before and fixed it in [1][2]. Has the same bug crept > back? > > [1] > [2] We=E2=80=99re thinking of adding `--exact-bbox' to the default `dvisvgm' fl= ags, which it seems has a good chance of resolving this. It was originally swapped for `--bbox=3Dpreview' (when using `dvisvgm' to get dimension info), but now we= do this via the LaTeX compilation stdout, and so we can go back to `--exact-bbox'. > ISSUE 2: TIKZ > > I use LaTeX Babel blocks for TikZ, and these stopped working. From the > *Messages* buffer: > > Executing Latex unknown at position 846=E2=80=A6 > Processing LaTeX file /var/folders/ky/8r5j3qz55hb94lpg1jr9vl1c0000gn/T/ba= bel-ntjCLq/latex-aGIYEN.tex=E2=80=A6 > Compiling /var/folders/ky/8r5j3qz55hb94lpg1jr9vl1c0000gn/T/babel-ntjCLq/l= atex-aGIYEN.tex=E2=80=A6 > org-compile-file: File =E2=80=9C/var/folders/ky/8r5j3qz55hb94lpg1jr9vl1c0= 000gn/T/babel-ntjCLq/latex-aGIYEN.svg=E2=80=9D wasn=E2=80=99t producedorg b= abel latex failed > PDF file produced. > > The linked LaTeX file compiles without errors, and a PDF file with > correct content sits next to it. Perhaps the preview system needs to > wait longer? Hmmm, not sure what=E2=80=99s going on. Care to provide a MWE? > [Also notice the missing space in =E2=80=9Cproducedorg=E2=80=9D.] > > It would be *FABULOUS* if this patch-set could also make =E2=80=99ob-babe= l=E2=80=99 use > the same mechanism as the new previews, =E2=80=99dvisvgm=E2=80=99 (TeX to= DVI to SVG) > instead of Inkscape (TeX to PDF to SVG). It would fix, for example, > scaling. On my system, LaTeX Babel outputs everything at half of the > correct size, and I cannot convince Inkscape to scale up to save my > life. The previews and =E2=80=99dvisvgm=E2=80=99 work as expected, conve= rsely. The hard part was the overhauled machinery, hooking up the new system to ob-babel should be possible without too much hassle. It might need to wait = for another patch-set though (this one is already at ~100 commits and a few tho= usand lines changed). > It would be *SUPER-FABULOUS* if the new previews worked with TikZ out of > the box, as per the Org manual saying =E2=80=9Cany LaTeX environment is h= andled=E2=80=9D > [1] when not using MathJax. Currently, PGF plots show as =E2=80=9Cblobs = of > letters=E2=80=9D and the simplest TikZ pictures, such as > > \begin{tikzpicture} > \filldraw (0, 0) circle[radius =3D 1cm]; > \end{tikzpicture} > > make the preview system choke with > > error in process filter: org-latex-preview=E2=80=93svg-make-fg-currentCol= or: Wrong type argument: stringp, nil > error in process filter: Wrong type argument: stringp, nil I tried this example on my computer, and it worked flawlessly (see ). If you could give me a stacktrace, that might h= elp. All the best, Timothy --=20 Timothy (=E2=80=98tecosaur=E2=80=99/=E2=80=98TEC=E2=80=99), Org mode contri= butor. Learn more about Org mode at . Support Org development at , or support my work at . --=-=-=--