emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "vendo.libri@libero.it" <vendo.libri@libero.it>
To: emacs-orgmode@gnu.org
Subject: Somehow orgmode doesn't export code to pdf in MINTED environment!
Date: Sun, 30 Apr 2017 17:41:59 +0200 (CEST)	[thread overview]
Message-ID: <99936378.16590671493566919306.JavaMail.httpd@webmail-38.iol.local> (raw)

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!

                 reply	other threads:[~2017-04-30 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=99936378.16590671493566919306.JavaMail.httpd@webmail-38.iol.local \
    --to=vendo.libri@libero.it \
    --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).