From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id yLSJK5LQy2W2PQAAqHPOHw:P1 (envelope-from ) for ; Tue, 13 Feb 2024 21:26:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id yLSJK5LQy2W2PQAAqHPOHw (envelope-from ) for ; Tue, 13 Feb 2024 21:26:58 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k4peHk3k; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707856018; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=exWwf89wiaTLj6A96XbvR6JtG/5/ZduYhFyth/yqJYY=; b=EwmYfOhC0FHgtHKxqP2AMgQoo6yuzFJXKf3CrN3aydLoMnnfKbLZvv1Z6N1v2k9XS9ae4P HVi6iH2TKRv2wUK5qGsMu8Jcl8xvsFqExBjaXynDxWy9mJ+26WOI1JliTHogzmVqkbe2zJ IwbtcK2hYLscI+OCZ88qZ7WcrA3GO0H7uvCOZAsPX1gC1MqaawH5UOSuVxSa0RMJNHvfrQ YHuNrJLUHpEhI9qZwg5Q5sjPeyiImNvRfbpUeMzaHctIphHDnd4vrGN+nGHlWpDc2VjcxX k2pnpBoWkXLjS+8ulcrJafr493/q2YIi0xxNmrTBUimWKilT95e0/57OMTO7jw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=k4peHk3k; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707856018; a=rsa-sha256; cv=none; b=iT2/lcO7nlWtnXj8ie6VYJAyv5VAlL7qvcVJAuNwXUvkFQrr3twPBZSxIKUuBY95NexIu4 tInQOgSFeIQ2Su6SzePsuXVgNWTsn0AQ3lN7Wt+Hl10dbTOK7bf2Q+eDq32zix+sadcPJL dvEbHr0Nvg6J7xl2kv2hAe18gKQbHvWYCFNKB03xshF+dZFpllyHzl+UwK/69SegjpKpKM 5wCsj5Sv+XlYPpPIJE4H851UqnWcMk91suDLHHNqkyFVZZNADObIwobyFnqDGT+x8+mX/W JorHLiQmLKsLxqWrDWTlenohZ9lPpCliUheynupX5YsHNl04ZelNa+MCmrar/w== 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 9C2B32304D for ; Tue, 13 Feb 2024 21:26:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZzM0-00066d-Ks; Tue, 13 Feb 2024 15:26:08 -0500 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 1rZzLy-00066D-Db for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 15:26:06 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZzLr-0006er-LB for emacs-orgmode@gnu.org; Tue, 13 Feb 2024 15:26:06 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AB438240101 for ; Tue, 13 Feb 2024 21:25:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707855956; bh=exWwf89wiaTLj6A96XbvR6JtG/5/ZduYhFyth/yqJYY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=k4peHk3kVedS/yVjR82/IHbUKJzXe1VLjXjKAmJLe2vnCAbDiCsQlqVmRMSflyDCc 7rfXgvZDLRW2fjANwpot+QUgMO/mjhKw4HmlCukH4GHUIBLphScUcleEzYsYy3EaHW a7R84+Qh6uUCovVm5fkjRyD5yXV0UOamU+qZEu8svxU/iFIHbhi4MDvrIWyQz91DJ6 jr68rVb4r847ZkKWgtB+K0SL/b7qCFnNMM5ei8JbgCqCXnNremlC3oAdUBiuqA1Lis YrByCrFKRFZnzsV3E4/T7k9d+j3xIS/WzTk2zBYXTMapeEARluXDcUjoamxdOP2Tz/ OOGwu8IqfKMyw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TZCWm1Gp0z9rxQ; Tue, 13 Feb 2024 21:25:56 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode Subject: Re: [patch] Add two new header args to LaTeX block In-Reply-To: <87v86slbu4.fsf@localhost> (Ihor Radchenko's message of "Tue, 13 Feb 2024 13:42:43 +0000") References: <87zfw9yt9m.fsf@posteo.net> <87wmrcpepp.fsf@localhost> <875xyw9wic.fsf@posteo.net> <87le7se0qu.fsf@localhost> <87wmrc8b3e.fsf@posteo.net> <87r0hk863m.fsf@posteo.net> <87cyt4do4h.fsf@localhost> <87mss799lw.fsf@posteo.net> <87il2v9i4r.fsf@localhost> <87h6ie7otw.fsf@posteo.net> <87v86slbu4.fsf@localhost> Date: Tue, 13 Feb 2024 20:25:54 +0000 Message-ID: <87zfw45cx9.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -10.21 X-Spam-Score: -10.21 X-Migadu-Queue-Id: 9C2B32304D X-Migadu-Scanner: mx12.migadu.com X-TUID: g4Z9is1g5cRJ Ihor Radchenko writes: > Juan Manuel Mac=C3=ADas writes: > >>> Moreover, it would be nice to unify handling .png and imagemagick >>> branches of the code. >> >> I agree. In any case, I still think that the coexistence of two methods >> to convert to images, when one of the methods has a scheme so different >> from the rest, becomes difficult: for the user as well as for >> maintaining the code. >> >> The first solution that occurs to me (I'm afraid it's too radical) is to >> leave only the :imagemagick method, and maintain the possibility of >> using the other one through a variable. Something like >> org-babel-latex-default-image-conversion-method or something similar. >> But I suppose this could cause unwanted inconveniences. We should see >> what more users think. > > I am not sure. > Conceptually, .png method is more flexible than imagemagick - it uses > `org-create-formula-image' that is handling (1) preamble; (2) conversion > not only to png but to svg and other arbitrary formats. > ob-latex is duplicating org-create-formula-image code, layering custom > latex preamble and more commands on top. > So, ideally, I'd prefer to obsolete the custom code in ob-latex and make > use of `org-create-formula-image', possibly extending it to fit ob-latex > needs. It is true that the "org-create-formula-image" method is much more complete. But, IMHO, I think it's a method focused on the buffer (rather than the block) or previewing LaTeX code in the buffer. In the case of the LaTeX block, I think the :imagemagick method is simpler. It depends on two simple processes: imagemagick and org-latex-pdf-process and parameters such as the width or height of the generated image, the density in dpi, etc. can be easily applied, via arguments. In the case of the other method, in addition to the value of org-preview-latex-default-process, there is that of org-format-latex-options. There are, in short, many parameters that are perfect for a file or an Emacs session but for a simple block I find overhelming. In any case, if the org-create-formula-image method is going to stay, I think it is fine as it is (except for extending the allowed file formats to more extensions, and not only .png). I also believe that the :process argument is sufficient for the user to control the value of org-latex-pdf-process or org-preview-latex-default-process, as appropriate. Best regards, Juan Manuel=20 --=20 Juan Manuel Mac=C3=ADas -- Composici=C3=B3n tipogr=C3=A1fica, tratamiento d= e datos, dise=C3=B1o editorial y ortotipograf=C3=ADa