[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Minor problems with dvipng latex image preview
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Minor problems with dvipng latex image preview |
Date: |
Thu, 23 May 2013 15:21:00 +0200 |
Nick Dokos <address@hidden> writes:
> Nicolas Goaziou <address@hidden> 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!
The surprising part of that third element is that it is assumed to be
non-nil when missing (see `org-latex-packages-to-string').
> 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.
The docstring already contains two references to
`org-latex-packages-alist'. Wouldn't suggesting to insert
(add-to-list 'org-latex-packages-alist '("" "minted" nil))
be confusing, since we don't provide a third element for "listings" and
"color" packages? Well, unless we provide the element for the three of
them (t for the first two, and nil for the last).
> There is also a (perhaps unlikely) scenario where this is not enough:
> previewing typeset code where I *want* to use minted:
>
> * Code
>
> \begin{minted}{c} printf("Hello world\n"); \end{minted}
In that case, I suggest to use `imagemagick' for the conversion, since
it relies on `org-latex-pdf-process' value (and is therefore
customizable).
Regards,
--
Nicolas Goaziou
- [O] Minor problems with dvipng latex image preview, Nick Dokos, 2013/05/19
- Re: [O] Minor problems with dvipng latex image preview, Nicolas Goaziou, 2013/05/22
- Re: [O] Minor problems with dvipng latex image preview, Nick Dokos, 2013/05/23
- Re: [O] Minor problems with dvipng latex image preview,
Nicolas Goaziou <=
- Re: [O] Minor problems with dvipng latex image preview, Nick Dokos, 2013/05/23
- Re: [O] Minor problems with dvipng latex image preview, Nicolas Goaziou, 2013/05/23
- Re: [O] Minor problems with dvipng latex image preview, Nick Dokos, 2013/05/23
- Re: [O] Minor problems with dvipng latex image preview, Nicolas Goaziou, 2013/05/25
- Re: [O] Minor problems with dvipng latex image preview, Nick Dokos, 2013/05/26
- Re: [O] Minor problems with dvipng latex image preview, Nicolas Goaziou, 2013/05/30
- Re: [O] Minor problems with dvipng latex image preview, Nick Dokos, 2013/05/30