From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Minor problems with dvipng latex image preview
Date: Thu, 23 May 2013 15:21:00 +0200 [thread overview]
Message-ID: <87d2shrfwj.fsf@gmail.com> (raw)
In-Reply-To: <877giq1aj1.fsf@pierrot.dokosmarshall.org> (Nick Dokos's message of "Thu, 23 May 2013 02:21:38 -0400")
Nick Dokos <ndokos@gmail.com> writes:
> Nicolas Goaziou <n.goaziou@gmail.com> 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
next prev parent reply other threads:[~2013-05-23 13:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-19 22:27 Minor problems with dvipng latex image preview Nick Dokos
2013-05-22 19:03 ` Nicolas Goaziou
2013-05-23 6:21 ` Nick Dokos
2013-05-23 13:21 ` Nicolas Goaziou [this message]
2013-05-23 16:06 ` Nick Dokos
2013-05-23 16:53 ` Nicolas Goaziou
2013-05-23 21:37 ` Nick Dokos
2013-05-25 20:20 ` Nicolas Goaziou
2013-05-26 6:38 ` Nick Dokos
2013-05-30 15:12 ` Nicolas Goaziou
2013-05-30 15:25 ` Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2shrfwj.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).