From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id qPcKD+0/D2YP4wAAe85BDQ:P1 (envelope-from ) for ; Fri, 05 Apr 2024 02:03:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id qPcKD+0/D2YP4wAAe85BDQ (envelope-from ) for ; Fri, 05 Apr 2024 02:03:57 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=runbox.com header.s=selector1 header.b="QF/mhmPD"; 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"; dmarc=pass (policy=quarantine) header.from=runbox.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712275437; h=from:from:sender:sender:reply-to: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=pZOyn4bpcXeUU3pi7L91NkXIIpN/ejFG7plDlHMuSe4=; b=FZjgERu+5xRdjMJqSXDsCjH5y26NukBUHEGIY0+cvZHqwu6MWzTV21sN3Uib/7VmcytBiY kijAZurDswm9CU39mH/Rz+pDduH8xQag9BBvbnimDP5bakLSP3qtr9H5wvqMyNoGCsRhFk sWl+qM2LqdXUTr9Lvjh5Uewb8olzFWHunC6DgIAWhuD5/Ta9yOjPWugj5MeAG1pabV6Vfm uzk4khqVKHfr1R+Fq2fpLsg0/8t5Xl7fye8RlMBYWnBPWV2aNkKEG93DMnVo8LlGq9mH0M jHfo7+6Ln8S40rxk0HndGoAvEBoVSYvEx4UcdEUTAHzxA/HnZjH45apj8zcwEw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712275437; a=rsa-sha256; cv=none; b=Ho5BpSQK795mOZ47ma9QuYFZCBbGYtUhWOa7sUKWygy3cvwW2gQePeQIBTwDZlmFmOOcZS 4ttQVOByos5FRXaPnE13IVkr5qAHPXxwW2zrElhftEwa2yNXZHs+6bE3UUNVqXQYbwPnmj L16u/XXk9LWPcPpq9hmq78RFYZ7qhcxXLuQDXrkgkaaK+5Hg6MtFpgBl17BHK3KmHI2Znu rj/gh31fhTMUaaG3RZ/ABoXXyXjUSAkwwkQn2J5PmRpxdW5R+7wOH4kyw4k2abhDVTc2XS OxAtxK7dMmyMK2/I/jvXyjNqd+BOehMgcXoChpP9KQQtLg8W5XKmNZtcQTC2PA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=runbox.com header.s=selector1 header.b="QF/mhmPD"; 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"; dmarc=pass (policy=quarantine) header.from=runbox.com 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 4C2A41F1A1 for ; Fri, 5 Apr 2024 02:03:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsX2g-0004Ke-Io; Thu, 04 Apr 2024 20:02:50 -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 1rsX2e-0004KP-Hx for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 20:02:48 -0400 Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsX2c-0000wQ-7H for emacs-orgmode@gnu.org; Thu, 04 Apr 2024 20:02:48 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1rsX2X-001obQ-EJ for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 02:02:41 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Type:MIME-Version:Message-ID:Reply-To:In-reply-to: Date:Subject:Cc:To:From:References; bh=pZOyn4bpcXeUU3pi7L91NkXIIpN/ejFG7plDlHMuSe4=; b=QF/mhmPDpzteuENcuxab57GcwL 0TVW6E1v+fSN5ter2p57fMc2vzoRG67EK2LnJW7W626IWnsfVx+T/NWKEJ5f1oXm51x4ZQkx5rdbf FCGJHvXVi8howh7lQGDoptF1XSwVynBULd9ll0f9Eb4KWIymicHkCsY3lh6mxA3Xg/8KidFn1rH9P x459aNX27ftYTwqXLKQzErXjiuF6liX0cRyfOsHsGTH7bLjyYUjz/hyCMoMWXsMcdvDib1WF4oKHb AV5bvbsqfSQr71T0pd5C652lWLkKAn8e8v1z1aZG3UZ3r3Kv9en/cbOwoX9+sNqGXHUJCx2e6W6nV L9wc+fMA==; Received: from [10.9.9.74] (helo=submission03.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1rsX2W-0007eU-U5; Fri, 05 Apr 2024 02:02:41 +0200 Received: by submission03.runbox with esmtpsa [Authenticated ID (942723)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1rsX2I-002HbS-6G; Fri, 05 Apr 2024 02:02:26 +0200 References: <868r2bw5qh.fsf@runbox.com> <886756d2-1428-4117-8ab4-3f4e6b01326b@gmail.com> <87msqof1kh.fsf@localhost> <2fc939a6-3211-4627-b4e9-274d7b6179c0@gmail.com> <86msqjv588.fsf@runbox.com> <87cyretut7.fsf@localhost> User-agent: mu4e 1.6.10; emacs 30.0.50 From: Michael To: Ihor Radchenko Cc: Max Nikulin , Timothy , Karthik Chikmagalur , emacs-orgmode@gnu.org Subject: Re: [PATCH] Run latex more than once for LaTeX src block evaluation Date: Thu, 04 Apr 2024 17:00:38 -0700 In-reply-to: <87cyretut7.fsf@localhost> Message-ID: <861q7kwub6.fsf@runbox.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2a0c:5a00:149::25; envelope-from=sp1ff@runbox.com; helo=mailtransmit04.runbox.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, 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: , Reply-To: mherstine@pobox.com Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.40 X-Spam-Score: -8.40 X-Migadu-Queue-Id: 4C2A41F1A1 X-Migadu-Scanner: mx12.migadu.com X-TUID: yrnPtFdVi6+v Ihor Radchenko writes: > Michael writes: > >> Should we perhaps have different variables for preview & Org >> source block evaluation? > > Likely yes. > > In fact, ob-latex is making use of > `org-preview-latex-process-alist' > only in a single cond branch in `org-babel-execute:latex' - when > we have > :file foo.png > > However, that branch assumes that > `org-preview-latex-default-process' is > 'dvipng (the default value). If one changes it to, say dvisvgm, > the > generated image will not be a .png image: > > (setq org-preview-latex-default-process 'dvisvgm) > > #+begin_src latex :results file link :file test.png > x^2 > #+end_src > > #+RESULTS: > [[attachment:test.png]] > > ^ This is actually an svg image, renamed to "test.png". > > So, it makes sense for `org-babel-execute:latex' to override > `org-preview-latex-default-process' temporarily, to something > actually > generating .png file. Sorry-- got sidetracked by something else. I see what you mean. OK, so the proposal is: change the ".png" branch in `org-babel-execute:latex' to override `org-preview-process-alist' with something that will: - actually produce a PNG formatted file - by default, run latex more than once, tho this could of - course be customized -- Michael