From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2CMHKiXxZl+PDgAA0tVLHw (envelope-from ) for ; Sun, 20 Sep 2020 06:05:25 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eLTLJSXxZl+kNQAAB5/wlQ (envelope-from ) for ; Sun, 20 Sep 2020 06:05:25 +0000 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 ABE329402B5 for ; Sun, 20 Sep 2020 06:05:24 +0000 (UTC) Received: from localhost ([::1]:45636 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJsTS-0004Oa-QF for larch@yhetil.org; Sun, 20 Sep 2020 02:05:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJsSm-0004OD-Ds for emacs-orgmode@gnu.org; Sun, 20 Sep 2020 02:04:44 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJsSj-0006zn-WB for emacs-orgmode@gnu.org; Sun, 20 Sep 2020 02:04:40 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 6A78D2400FB for ; Sun, 20 Sep 2020 08:04:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.eu; s=2017; t=1600581873; bh=7dTTymaQMMvhoBiP4D9gQHa7PO9czsExLZqOqC4ithg=; h=Subject:To:From:Date:From; b=elrmlGBObmgNiicAtNiiP7OxjcQVv4Gp/P0V3KUMHNxsMK1EgEW9fXnx0kItc0co/ 93xkJmyCHyOhJfImiVXkznvSszzy6nEUW5tNd7xTgAaJy40l0S42LoBWuWNJVPffb4 rxZgSnaoeziGEvJGTHeeLGaj06Q3o1AYn+UslMNRkvJD4nykjkHdrppbWOLKmpc50N o9JymjGYsfmhxcHsKoxe+hC4x1IDdMJpUOsJsOr0Hc+xQHppEqr41NwMlGq36/KHNd HC6BNocR5wCW8KPGhbL8S54o/KqgGk3MFIFDkHWtCLsbSr0ODHD/yqpHeYezCNwem7 PoiZjqeq/H0fQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4BvH8c5LtTz9rxK; Sun, 20 Sep 2020 08:04:32 +0200 (CEST) Subject: Re: [PATCH] org-preview-latex-fragment dvipng fix for packages in org-latex-packages-alist breaking 'latex' command To: flare , emacs-orgmode@gnu.org References: <87bli1gt25.fsf@gmail.com> From: =?UTF-8?Q?S=c3=a9bastien_Miquel?= Message-ID: Date: Sun, 20 Sep 2020 08:04:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <87bli1gt25.fsf@gmail.com> Content-Type: multipart/alternative; boundary="------------A3D17440333E8FDCBECA7EA5" Content-Language: fr Received-SPF: pass client-ip=185.67.36.66; envelope-from=sebastien.miquel@posteo.eu; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/20 02:04:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sebastien.miquel@posteo.eu Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.eu header.s=2017 header.b=elrmlGBO; dmarc=pass (policy=none) header.from=posteo.eu; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: zlJoqi5CVfmR This is a multi-part message in MIME format. --------------A3D17440333E8FDCBECA7EA5 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, If I've understood your problem correctly, simply using ("" "fontspec" nil) in org-latex-packages-alist should fix your issue. Per the documentation, this third argument stops the package from being used when compiling preview fragments. Regards, Sébastien Gabriel S. X. Smith writes: > This is where my fix starts to come in. When org mode does the small > > export of the latex fragment it would include the contents of > org-latex-packages-alist in the LaTex headers. Some packages (namely > 'fontspec,' used for xelatex) would lead to a failure to create the > dvi file when the .tex file was compiled with the necessary > 'latex' command. > > To alleviate this problem I designed this wrapper function which > sets org-latex-packages-alist to nil just before executing the > org-latex-preview function. > --------------A3D17440333E8FDCBECA7EA5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

Hi,

If I've understood your problem correctly, simply using ("" "fontspec" nil) in org-latex-packages-alist should fix your issue.

Per the documentation, this third argument stops the package from being used when compiling preview fragments.

Regards,

Sébastien



Gabriel S. X. Smith writes:
This is where my fix starts to come in. When org mode does the small

export of the latex fragment it would include the contents of
org-latex-packages-alist in the LaTex headers. Some packages (namely
'fontspec,' used for xelatex) would lead to a failure to create the
dvi file when the .tex file was compiled with the necessary
'latex' command.

To alleviate this problem I designed this wrapper function which
sets org-latex-packages-alist to nil just before executing the
org-latex-preview function.

--------------A3D17440333E8FDCBECA7EA5--