2

When trying to export from org to beamer I get this msg:

Processing LaTeX file ./ppt.tex... org-latex-compile: PDF file ./ppt.pdf wasn't produced: [undefined control sequence]

I don't know what that means. Can someone please help me understand and fix this error? Perhaps I haven't properly configured emacs for this kind of export?

This is part of my .emacs file which I copied from one of the questions here in TeX.SX. I'm not sure if I have AUCTeX configured with shell-escape but I'd like to have the proper code in my .emacs file for when it's time to include some python lines in the final pdf, be it an article or a beamer presentation.

    ;; Org mode and bearmer export
(require 'ox-beamer)
(setq org-latex-to-pdf-process 
  '("pdflatex --shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex --shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex --shell-escape -interaction nonstopmode -output-directory %o %f"))


(defun my-beamer-bold (contents backend info)
 (when (eq backend 'beamer)
  (replace-regexp-in-string "\\`\\\\[A-Za-z0-9]+" "\\\\textbf" contents)))

(add-to-list 'org-export-filter-bold-functions 'my-beamer-bold)

(setq org-src-fontify-natively t)
(org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)
  (latex . t)))
(setq org-confirm-babel-evaluate nil)
(setq org-babel-python-command "ipython --pylab --pdb --nosep --classic --no-banner --no-confirm-exit")

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

(require 'ox-latex)
(setq org-src-fontify-natively t)
(setq org-latex-pdf-process
   '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
    "pdflatex -shell-escape -interaction nonstopmode -output-directory %o   %f"
    "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(setq org-src-preserve-indentation t)

The following is the ppt.org file which I can't translate into pdf!

#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation, smaller]
#+BEAMER_THEME: CambridgeUS
#+BEAMER_FRAME_LEVEL: 2
#+OPTIONS: H:3 email:n |:t
#+TITLE: CNT antennas
#+AUTHOR: W.W.
#+DATE: Dec 2015

* What are CNTs?
** who, what, when, how

* How do antennas work?
** /what/, when, how
 - a short description of a simple antenn
 - what parameters define the quality of an antenna
 - what are the common use of an antenna

* How can CNTs be used as antennas? 
 - how does it work?
   + describe the advantages...
   + ...and the disadvantages
 - any alternative materials?

* Other applications of CNTs to communications
 - self-assembly
see ch.4 of S.F. Bush "Nanoscale Communication Networks"
  • Which command are you using to transform your .org into pdf? Is it org-latex-to-pdf-process? – Romain Picot Dec 1 '15 at 14:13
  • Isn't it C-c C-e l and then choose either P or O? How do I set it? From the Org menu of emacs while ppt.org is open? – WobblyWindows Dec 1 '15 at 16:47
  • I don' t have python installed in my system (Windows 7 32 bit) or any other related package from elpa. Does that account for the error? I'd also like to recant my previous request -- doesn't matter if I have to pull out the python/minted lines, what is the bare minimum .emacs configuration to get org-mode to properly translate into a pdf/beamer presentation? – WobblyWindows Dec 1 '15 at 19:13
0

I've add the code you provide to my emacs setup (could be found on my github sorry for the publicity) with emacs 24.4.1 .

The error come from the sentance /what/, when, how. Beamer don't really enjoy using \emph{} and other command that are used in section title. A way to avoid it is to use LaTeX command for this point: ** \protect\emph{what}, when, how.

Which give as a result:

#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation, smaller]
#+BEAMER_THEME: CambridgeUS
#+BEAMER_FRAME_LEVEL: 2
#+OPTIONS: H:3 email:n |:t
#+TITLE: CNT antennas
#+AUTHOR: W.W.
#+DATE: Dec 2015

* What are CNTs?
** who, what, when, how

* How do antennas work?
** \protect\emph{what}, when, how
 - a short description of a simple antenn
 - what parameters define the quality of an antenna
 - what are the common use of an antenna

* How can CNTs be used as antennas? 
 - how does it work?
   + describe the advantages...
   + ...and the disadvantages
 - any alternative materials?

* Other applications of CNTs to communications
 - self-assembly
see ch.4 of S.F. Bush "Nanoscale Communication Networks"

I haven't found a solution at this point using only org command if someone have it, I'm interested.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.