From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Minor problems with dvipng latex image preview Date: Thu, 23 May 2013 02:21:38 -0400 Message-ID: <877giq1aj1.fsf@pierrot.dokosmarshall.org> References: <871u9238sl.fsf@pierrot.dokosmarshall.org> <87ehcyg7mg.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfOuP-0005iT-AG for emacs-orgmode@gnu.org; Thu, 23 May 2013 02:21:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfOuO-0002ki-BH for emacs-orgmode@gnu.org; Thu, 23 May 2013 02:21:53 -0400 Received: from plane.gmane.org ([80.91.229.3]:36735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfOuO-0002kR-4l for emacs-orgmode@gnu.org; Thu, 23 May 2013 02:21:52 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UfOuM-0004QZ-4Z for emacs-orgmode@gnu.org; Thu, 23 May 2013 08:21:50 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 May 2013 08:21:50 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 May 2013 08:21:50 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: >> ... I set: >> >> (setq org-export-latex-listings 'minted) > > You mean `org-latex-listings'. `org-export-latex-listings' belongs to > the old export framework (like almost all variables with > "org-export-BACKEND-" prefix). > Yes, indeed. >> (add-to-list 'org-latex-packages-alist '("" "minted")) > >> in which case, I end up with a \usepackage{minted} in the preview >> latex file. > > Use: > > (add-to-list 'org-latex-packages-alist '("" "minted" nil)) > > to tell Org not to include the package for previewing snippets. > OK, that works - I didn't know about the three-element list form. Thanks! Perhaps the docstring for org-latex-listings should include the three-element list form, with a pointer to the org-latex-packages-alist doc for more details. There is also a (perhaps unlikely) scenario where this is not enough: previewing typeset code where I *want* to use minted: --8<---------------cut here---------------start------------->8--- * Code \begin{minted}{c} printf("Hello world\n"); \end{minted} --8<---------------cut here---------------end--------------->8--- -- Nick