From: Manfred Lotz <manfred.lotz@arcor.de>
To: emacs-orgmode@gnu.org
Subject: Re: minted question
Date: Fri, 25 Jul 2014 08:33:50 +0200 [thread overview]
Message-ID: <20140725083350.64315411@hogwart.bsdlocal.net> (raw)
In-Reply-To: <m2iomq1lrl.fsf@tsdye.com>
Hi Tom,
On Mon, 21 Jul 2014 10:48:14 -1000
tsd@tsdye.com (Thomas S. Dye) wrote:
> Hi Manfred,
>
> Manfred Lotz <manfred.lotz@arcor.de> writes:
>
> > Hi Tom,
> >
> > On Mon, 21 Jul 2014 09:53:41 -1000
> > tsd@tsdye.com (Thomas S. Dye) wrote:
> >
> >> Aloha Manfred,
> >>
> >> You should be able to use attr_latex (untested).
> >>
> >> Manfred Lotz <manfred.lotz@arcor.de> writes:
> >>
> >> #+ATTR_LATEX: :options linenos=true frame=single
> >> > #+BEGIN_SRC perl
> >> > #! /usr/bin/perl
> >> >
> >> > use strict;
> >> > use warnings;
> >> > use 5.010;
> >> >
> >> > say 'hey';
> >> > #+END_SRC
> >>
> >
> > Unfortunately, that doesn't work.
>
> Yes, when I tried a slightly modified version here I got incorrect
> LaTeX output:
>
> \begin{minted}[,linenos=true, frame=single]{perl}
> #! /usr/bin/perl
>
> use strict;
> use warnings;
> use 5.010;
>
> say 'hey';
> \end{minted}
>
> Note the extraneous comma in the optional argument before "linenos".
>
> I get what looks to be correct LaTeX export if I set options in the
> variable org-latex-minted-options, as shown in the emacs-lisp code
> block below.
>
> #+ATTR_LATEX: :options linenos=true, frame=single
> #+BEGIN_SRC perl
> #! /usr/bin/perl
>
> use strict;
> use warnings;
> use 5.010;
>
> say 'hey';
> #+END_SRC
>
> #+begin_src emacs-lisp
> (require 'ox-latex)
> (add-to-list 'org-latex-packages-alist '("" "minted"))
> (setq org-latex-listings 'minted)
> (setq org-latex-minted-options
> '(("linenos" "true") ("frame" "single")))
> #+end_SEC
>
In the end I did put the code into the .emacs file which isn't too bad
as I usually like to have those minted settings globally.
--
Best, Manfred
prev parent reply other threads:[~2014-07-25 6:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 19:30 minted question Manfred Lotz
2014-07-21 19:53 ` Thomas S. Dye
2014-07-21 20:14 ` Manfred Lotz
2014-07-21 20:48 ` Thomas S. Dye
2014-07-22 4:23 ` Manfred Lotz
2014-07-22 8:10 ` Nick Dokos
2014-07-22 17:22 ` Thomas S. Dye
2014-07-25 6:33 ` Manfred Lotz [this message]
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=20140725083350.64315411@hogwart.bsdlocal.net \
--to=manfred.lotz@arcor.de \
--cc=emacs-orgmode@gnu.org \
/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).