[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] LaTeX export of org file uses listings instead of minted, why?
From: |
Nick Dokos |
Subject: |
Re: [O] LaTeX export of org file uses listings instead of minted, why? |
Date: |
Wed, 19 Apr 2017 20:31:25 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
"address@hidden" <address@hidden> writes:
> Hello there!
> I'm having a bit of a problem telling emacs to use MINTED instead of LISTINGS
> to handle code blocks
> enclosed within #+BEGIN_SRC and #+END_SRC when exporting from an org file.
>
> I've had to Customize Org Groups using the GUI menu `Org' but as soon as I
> close and restart emacs, it
> goes back to LISTINGS. I know this because when I export a minimum working
> example org file, the
> resulting pdf does not recognize code. If I manually change the .tex file and
> run it, it works
> perfectly.
>
> I've added a few lines into my .emac file (please find it attached to this
> mail) but because it's
> uneven, often repetitive and scrappy, I suspect there's some conflict going
> on which I, as a simple user
> of orgmode, am not able to detect.
>
> Can someone please check the file and tell me why emacs/orgmode keeps
> reverting to LISTINGS every time I
> shut down and restart emacs?
>
> I'm running org mode 8.2, emacs 24 on a Windows 7 machine. I also have a
> working TeX Live 2015 distro
> with MINTED pkg properly working in AUCTeX and I have python's pygmentize.exe
> in my C:\Python27\Scrips\
> directory. What am I missing? Can you help me fix this?
>
>
Is your .emacs read at all? From the SE exchange, I have my doubts, but a
Windows user
might be able to steer you in the right direction.
I would use a minimal init file and invoke emacs with (the Windows equivalent
of)
emacs -q -l /path/to/minimal/init/file
and then evaluate the variable
C-h v org-latex-listings RET
and try to export your org file. The minimal init file should do the minimum
possible.
Mine looks like this:
--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "~/src/emacs/org/org-mode/lisp")
(require 'org-loaddefs)
(require 'org)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)
;;;
https://emacs.stackexchange.com/questions/32225/latex-export-uses-lstlisting-instead-of-minted-why#comment49631_32225
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
--8<---------------cut here---------------end--------------->8---
and as I said on SE it works fine on Fedora 24 with emacs 26.0.50 and org-mode
9.0.5.
That's more recent than yours but I tried it with org-mode 8.2.10 as well and
it works
there too.
Can you post the org file and the resulting TeX file after this
experiment?
--
Nick