emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Somehow orgmode doesn't export code to pdf in MINTED environment!
@ 2017-04-30 15:41 vendo.libri
  0 siblings, 0 replies; only message in thread
From: vendo.libri @ 2017-04-30 15:41 UTC (permalink / raw)
  To: emacs-orgmode

Hello, 
I've already posted a few days ago on my MINTED problem. On someone's 
suggestion on this mailing list, I cleared up my init file and only left the 
following settings:

---------

 (server-start)
; (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
 (setq reftex-plug-into-AUCTeX t)

;;; a key for tilde symbol
(define-key key-translation-map (kbd "M-2") (kbd "~"))
;;; a key for backquote symbol
(define-key key-translation-map (kbd "M-6") "")
(define-key key-translation-map (kbd "M-9") (kbd "`"))
;;this one's only for CDLaTeX math insertion
(define-key key-translation-map (kbd "C-1") (kbd "`"))

;; visual line word wrapping
(global-visual-line-mode t)

;;automatically recognize org files
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

;; MINIMAL init FILE 

(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)

;;; 

(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"))

(setq org-latex-minted-options
   '(("fontsize" "\\footnotesize")("bgcolor" "white")("obeytabs" "true")))

;; -shell-escape for minted pkg (COMMENT WHEN NOT IN USE)
(add-hook 'TeX-mode-hook
  (lambda ()
    (setq TeX-command-extra-options "-shell-escape")
  )
 )
;;;

---------


The above is my ENTIRE .emacs file. There's nothing else on it beyond those 
lines.
After this tweak, all was working fine but today the problem has come up 
again. I DON'T KNOW WHY! Essentially, when going from .org to .tex, it exports 
the contents of #+BEGIN_SRC inside LISTINGS environment, not MINTED, in spite 
of being told to do so! 

This is the minted.org file that I'm trying to export to pdf via .tex (C-c C-e 
l o). I'm on a 32-bit Windows 7, emacs 24, org-mode 8.2, TeXlive 2015 with 
MINTED package and pygmentize correctly installed. Sumatra as pdf viewer.

----------

#+TITLE: My Minted Experiment
#+AUTHOR: me
#+DATE: 
#+STARTUP: nolatexpreview
#+OPTIONS: toc:nil
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [a4paper,10pt]
#+ATTR_LATEX: :mode table :booktabs
#+LATEX_HEADER: \usepackage{esdiff}
#+LATEX_HEADER: \usepackage[version=4]{mhchem}
#+LATEX_HEADER: \usepackage{amssymb}
#+LATEX_HEADER: \usepackage{siunitx}
#+LATEX_HEADER: \usepackage{booktabs}
#+LATEX_HEADER: \setcounter{secnumdepth}{0}
#+LATEX_HEADER: \usepackage[margin=1in]{geometry}
#+LATEX_HEADER: \frenchspacing \allowdisplaybreaks
#+LATEX_HEADER: \usepackage{fancyhdr}
#+LATEX_HEADER: \pagestyle{fancy} % choose page-style
#+LATEX_HEADER: \fancyhf{}  % erase and clean up
#+LATEX_HEADER: \fancyhf[HLE,HRO]{\thepage} % H or F=Header or Footer, 
LCR=Left, Centre, Right
#+LATEX_HEADER: \fancyhf[HC]{My minted experiment}

* SECTION
#+BEGIN_SRC python
 print "there's some code here";
 a= True;
#+END_SRC

----------
Sorry to bother you with the same problem!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-30 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 15:41 Somehow orgmode doesn't export code to pdf in MINTED environment! vendo.libri

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).