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 GOH/H33A/WUuYwEAqHPOHw:P1 (envelope-from ) for ; Fri, 22 Mar 2024 18:31:41 +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 GOH/H33A/WUuYwEAqHPOHw (envelope-from ) for ; Fri, 22 Mar 2024 18:31:41 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=runbox.com header.s=selector1 header.b=eGcQ0P19; 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=1711128701; 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: 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=JrpSnCkM6/r2y+YItFQR+AM8yNeSEipQ2m6Sw5PRQpI=; b=KpHUaiWcFM2veXnFEtNWZLaPEHr14nf1BB8OdQCBHYQl3ZEX883hRSWVUR94kCGmdsA8+z gzrMgz8xfZTBDJbfLQZQD19F9nKu9EOlYpTTJThPOBpC6xL9CFvBhqpoo0GyLPs9bADCon 6Nd4DzyI3XdlFhUFJediF2k1IOywPBXQ442+eayQM+3w71lBeufb1NUDDGZlr0y7FAjeMX n0EJxPWhj9+od1cvT/UtzisMrdpAJAb2GfO8111XK3aBoRn/33h3pIkEABmVnmtCvvv5PC FCbNEWDYx33ctdQ2xu1xvLx+M9DVOv0jVy94KmCDtIKFf3z6qIBjwPya5VgL0Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=runbox.com header.s=selector1 header.b=eGcQ0P19; 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-Seal: i=1; s=key1; d=yhetil.org; t=1711128701; a=rsa-sha256; cv=none; b=CYdHSeiYjwzngs90zsTKkBA1ZLedDqp7NVz8JIilfxOScqDcjKOgrh2tXvAe2CbMockfAe iUhX7EcuCi4YwYPNFTd08jivzpO1keaPV//wJrwXy9OVRsX9PjvmVb4YIxsoJrT3dq5Fh8 eZiTK2XP0m8xBEynRJUuvvIpAMMblLdvj0xBMgKCKnKzY9w3qL7Oi91jJzN0B8D0Vf7fea uFWAC3brICK3drCkaSVGMlulz/+jYtCMzaL+qUL9sjPqw5anPRppclFMtLZw1xwYNtQbJ5 AQMPrLlciszGDiuke3pZ7ZVAdbXpxqpvYLcMDxmUGOl9YATP43ol6HntoiYl0g== 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 84FC326580 for ; Fri, 22 Mar 2024 18:31:40 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnij5-0002YJ-E5; Fri, 22 Mar 2024 13:30:43 -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 1rnij2-0002Xp-SW for emacs-orgmode@gnu.org; Fri, 22 Mar 2024 13:30:41 -0400 Received: from mailtransmit05.runbox.com ([2a0c:5a00:149::26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnij0-0006kM-7z for emacs-orgmode@gnu.org; Fri, 22 Mar 2024 13:30:40 -0400 Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit05.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1rniiv-006ax2-6V; Fri, 22 Mar 2024 18:30:33 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Reply-To:In-reply-to:Date:Subject:Cc:To:From:References; bh=JrpSnCkM6/r2y+YItFQR+AM8yNeSEipQ2m6Sw5PRQpI=; b=eGcQ0P19xZXS1XZ78OGQLROVxj ykxkMJHgINuPJiBRQIC9DQ9ljrkkiqsemdMLLRk0uuPKmBb4x5O4YBLXWo6BzoY2dCojusqgPYo0x ROzv08jiOugVBs6C8cgp2XNK0EBWOn7tDqzA8bLhxIp8rCpEFMm1wusEP78ar4rtoVGNVdraTerqX Acya9/MbKtWqVyvZtjKEY60vxJ5CI13GTH80yqQ6mVM5n/G0cWRunUlyfL6euD7XsIjANEiJeO8gj 0KgfIq671Vhl/c9O6Eq63To7mvRg+L4nrxf2FcmnM3/plDalqx+8TZRNkiYSAcZUr5NuTwye0ESlX b+S1FwqQ==; Received: from [10.9.9.73] (helo=submission02.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1rniiu-0002Hv-AE; Fri, 22 Mar 2024 18:30:32 +0100 Received: by submission02.runbox with esmtpsa [Authenticated ID (942723)] (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93) id 1rniim-00ENxG-H2; Fri, 22 Mar 2024 18:30:24 +0100 References: <868r2bw5qh.fsf@runbox.com> <87le6atofh.fsf@localhost> User-agent: mu4e 1.6.10; emacs 30.0.50 From: Michael To: Ihor Radchenko Cc: Timothy , Karthik Chikmagalur , emacs-orgmode@gnu.org Subject: Re: [PATCH] Run latex more than once for LaTeX src block evaluation Date: Fri, 22 Mar 2024 10:23:35 -0700 In-reply-to: <87le6atofh.fsf@localhost> Message-ID: <864jcyw4wj.fsf@runbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a0c:5a00:149::26; envelope-from=sp1ff@runbox.com; helo=mailtransmit05.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 84FC326580 X-Spam-Score: -7.88 X-Migadu-Spam-Score: -7.88 X-Migadu-Scanner: mx10.migadu.com X-TUID: AVagX0nlUYHI >> I have a small patch for `org-preview-latex-process-alist'=20 >> making >> the default setting for LaTeX source block evaluation be=20 >> running >> latex three times (instead of the current one). It is sometimes >> necessary to run latex more than once to produce the final >> document, a phenomenom described in the docstring for >> `org-latex-pdf-process' which itself runs latex three times by >> default. This patch just brings the former variable into parity >> with the latter. > > Thanks for the patch! > May you please describe a use case when it is necessary to run=20 > latex > multiple times for previews? Sure: it's required whenever you have LaTeX that refers to other document elements whose positions are only known after they've been typeset. This often comes up with bibliographies; to quote the docstring for `org-latex-pdf-process': "The reason why this is a list is that it usually takes several runs of =E2=80=98pdflatex=E2=80=99, maybe mixed with a call to =E2=80=98bibtex=E2= =80=99." I personally encountered it when using the tikzmark library from the tikzpicture package to draw annotations on a table (LaTeX needed to be run once to typeset the table & only then did it "know" where the arrows needed to be drawn). Oh-- and it's not just previews (sorry if I gave that impression)-- it's also required for "evaluating" LaTeX source blocks. > CCing Timothy and Kathik - I see that > https://code.tecosaur.net/tec/org-mode/src/branch/dev/lisp/org-latex-prev= iew.el#L102 > still uses a single compiler invocation. --=20 Michael