From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id ODjwF1TcyGWpdAEAqHPOHw:P1 (envelope-from ) for ; Sun, 11 Feb 2024 15:40:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id ODjwF1TcyGWpdAEAqHPOHw (envelope-from ) for ; Sun, 11 Feb 2024 15:40:20 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JZsViDkM; 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=1707662420; a=rsa-sha256; cv=none; b=gFpyn4vQHhNguhoRdhSQoX7LNAe2bWH4/l1ksdC6L44RysNslDXd8oWeZl2Vvtl8HD7/9z 5vN5ef9Tom7PT3Wf+ZGl3cqLhfdiM9yK9zN4W2Rbkgh9676KNfRq+BC+8bw2bAS8t3K5lx GI9+IpWV1xfX54Biupt0bQfUkQTNASWkrwZczwHzcnh2ip7TrxY843q19sg/ZHQp3xx6kq dnnr14JGbUyHjf/y/DM4sW2nmHvXrAIsi5qgCi7nJcwvIcmocTRMpl9W8enjumwk3ToIjZ DpfaEpsf/tifTwzQ/LrFtjsVEapXfwJVkH3/HDQLCti5C/D5LzTCDxkFdSkV5g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=JZsViDkM; 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=1707662420; 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=LmpwPCnlhlx7y9pmc0TAb12+BB33G1DjhBla0Cij+j8=; b=cDbwQt3TP/bU065L6AZOgd7mr994sizx8+hN/2Tzwuar9VW9HlWYa9YOkiN/5+Hu+J+ybo RHpDC8/hEDTK6opgdlTfjg4p+q/X2yx8hQso5eluHmUpVghwi8ecOyokRxF/XXmaMC88Qz CB5AgryVmNibHydSeWV0nItk+Xmmc3DLiyvnMzg1XFgv2xcr+MuEzDW9BK8n0pK8N9Jzoh HoUJVJ/WW5AXSHdgQIsTXIBuTYoh5Y6MX5chMcVYSpBsqr2VhJcy4woq04NVE33+cE8xR6 Kic5U9abavMO074vMJ1tV9LfaMHRrYDT+HkzX1u9dnCUwDUJ/cmXqpcpj23AVA== 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 49A7F686E4 for ; Sun, 11 Feb 2024 15:40:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZAzS-0004tG-P2; Sun, 11 Feb 2024 09:39:30 -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 1rZAzR-0004ss-35 for emacs-orgmode@gnu.org; Sun, 11 Feb 2024 09:39:29 -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 1rZAzP-0005Sc-5N for emacs-orgmode@gnu.org; Sun, 11 Feb 2024 09:39:28 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B8189240105 for ; Sun, 11 Feb 2024 15:39:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707662365; bh=eJ4veefPNHLanKcXzVtK8SiAGSIWJgfpMsmtiL70DQ4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding:From; b=JZsViDkMgO5d74+BZHF0gP16IVMWdLCHur+8JjVcZk3mY42K/fX61h9yd0yBqDQ8V Hpwa5CTQii5wDQxVZO7ymu4mtZF4OZOJb7IUCi4feL7DmprTlQWPoZroLRQ7Ty/V9h hST95845S7VyUIyjELT3oJoVPy4nX4bNOl2jDyNw+PLuoikOlQi+ESDsKF7mRHdDEf OENG1shdk9fd5cq3n7vPYZP+FnewNMvHwwPz52xkR3xGTd56IhGa399z/QsXbAgd9E BPn2h07tRy0PA0pkLS1BgayHrsYs4a4q8OdoF9XUHsjvr20zivnPatEX/nqKkfU1M4 /EzOpjTtJUdNA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TXqws0br4z6tvx; Sun, 11 Feb 2024 15:39:24 +0100 (CET) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode Subject: Re: [patch] Add two new header args to LaTeX block In-Reply-To: <87mss799lw.fsf@posteo.net> 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> Date: Sun, 11 Feb 2024 14:43:00 +0000 Message-ID: <87il2v9i4r.fsf@localhost> 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=yantar92@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.01, RCVD_IN_MSPIKE_WL=-0.01, 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-Scanner: mx10.migadu.com X-Spam-Score: -7.89 X-Migadu-Queue-Id: 49A7F686E4 X-Migadu-Spam-Score: -7.89 X-TUID: QZQqJ5Oufnda Juan Manuel Mac=C3=ADas writes: >> Considering that 'imagemagick is one of the variants in >> `org-preview-latex-process-alist', it might be reasonable to allow >> :process imagemagick =3D=3D :imagemagick yes > > I wouldn't equate it. ':imagemagic yes' uses 'org-latex-convert-pdf'. > Instead, =C2=AB:process 'imagemagick=C2=BB depends on: > > (imagemagick :programs > ... Agree. >> Also, it feels incomplete to be able to define latex command for :file >> foo.pdf, but be limited to a pre-defined list of symbols for :file .png. > > The ".png" method without ":imagemagick" does not depend on > 'org-latex-pdf-process' but on 'org-create-formula-image', and this in tu= rn > depends on the value of 'org-preview-latex-default-process': > ... > If you put :file foo.png without :imagemagick, and want to control the > process or change the compiler, you can do it with: > > :process '(foo :latex-compiler ("some LaTeX command"))=20 > > since this syntax is what org-preview-latex-default-process expects. > > In all other cases, including :imagemagick, the compilation process > depends on the value of org-latex-pdf-process. Got it. Although, it is confusing to have different formats of :process value depending on :file extension. It would make things easier for users if :results file :file foo.png :process '("lualatex -interaction nonstopmo= de -output-directory %o %f") worked as expected, automatically overriding :latex-compiler value in let-bound `org-preview-latex-process-alist'. > Anyway, I don't understand why that feature option (convert to an image > without :imagemagick method) is limited to .png, when other graphic files= are > possible. I can define something like this: > > (setq org-preview-latex-default-process > '(my-process > :programs ("lualatex" "convert") > :description "pdf > jpg" > :image-input-type "pdf" > :image-output-type "jpg" > :latex-compiler ("lualatex -interaction nonstopmode -output-directory %o= %f") > :image-converter ("convert -density %D -trim -antialias %f -quality 100 = %O"))) > > But if I put :file foo.jpg nothing happens. Maybe that part should be > corrected... Something like (string-match-p "\\.png\\|\\.jpg\\|..." out-f= ile)? I agree that it should be corrected. Moreover, it would be nice to unify handling .png and imagemagick branches of the code. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at