emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [FIXED] Re: :latex-listings publishing option not used; minted


From: Dan Davison
Subject: [Orgmode] [FIXED] Re: :latex-listings publishing option not used; minted + beamer incompatibility?
Date: Mon, 14 Feb 2011 11:15:12 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (darwin)

Hsiu-Khuern Tang <address@hidden> writes:

> Hi Dan,
>
> * On Wed 09:09AM, 20 Oct 2010, Dan Davison (address@hidden) wrote:
>> Hsiu-Khuern Tang <address@hidden> writes:
>> > BTW, has anyone used minted with beamer?  I get errors like
>>
>> Yes, I exported Eric Fraga's babel/beamer slides example using minted
>> last week and it worked fine. However,
>>
>> > Runaway argument?
>> >  int main(int argc, char **argv) { \ETC.
>> > ! Paragraph ended before address@hidden was complete.

This problem is now fixed in Org. The problem was that frames using
minted needed to be marked as fragile; Org was only doing this for
verbatim and lstlisting.

If you are unable to pull the latest Org from the git repo, please
change the `org-beamer-fragile-re' regexp as follows

(setq org-beamer-fragile-re "^[ 
\t]*\\\\begin{\\(verbatim\\|lstlisting\\|minted\\)}")

Customize can also be used to make this change.

Attached is a version of Eric Fraga's beamer example, modified to use
python instead of octave, and the pdf export resulting from C-c C-e d.

Dan

#+TITLE:     Writing Beamer presentations in org-mode
#+AUTHOR:    Eric S Fraga
#+EMAIL:     address@hidden
#+DATE:      2010-03-30 Tue
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  en
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 
path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:

#+startup: oddeven

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [bigger]
#+latex_header: \mode<beamer>{\usetheme{Madrid}}
#+BEAMER_FRAME_LEVEL: 2

#+COLUMNS: %20ITEM %13BEAMER_env(Env) %6BEAMER_envargs(Args) %4BEAMER_col(Col) 
%7BEAMER_extra(Extra)

* Introduction
** Overview
- org-mode template
- beamer structure
- beamer settings


* Methodology

** A simple slide
This slide consists of some text with a number of bullet points:
- the first, very @important@, point!
- the previous point shows the use of the special markup which
  translates to the Beamer specific /alert/ command for highlighting
  text.
The above list could be numbered or any other type of list and may
include sub-lists.

** A more complex slide
This slide illustrates the use of Beamer blocks.  The following text,
with its own headline, is displayed in a block:
*** Org mode increases productivity                               :B_theorem:
    :PROPERTIES:
    :BEAMER_env: theorem
    :END:
    - org mode means not having to remember \LaTeX commands.
    - it is based on ascii text which is inherently portable.
    - Emacs!

    \hfill \(\qed\)

** Two columns

*** A block                                           :B_ignoreheading:BMCOL:
    :PROPERTIES:
    :BEAMER_env: ignoreheading
    :BEAMER_col: 0.4
    :END:
    - this slide consists of two columns
    - the first (left) column has no heading and consists of text
    - the second (right) column has an image and is enclosed in an
      @example@ block

*** A screenshot                                            :BMCOL:B_example:
    :PROPERTIES:
    :BEAMER_col: 0.6
    :BEAMER_env: example
    :END:
    #+ATTR_LATEX: width=\textwidth
    [[file:../../images/org-beamer/a-simple-slide.png]]

** Babel
   :PROPERTIES:
   :BEAMER_envargs: [t]
   :END:
*** Python code                                               :BMCOL:B_block:
    :PROPERTIES:
    :BEAMER_col: 0.45
    :BEAMER_env: block
    :END:
#+srcname: pythonexample
#+begin_src python :results output :exports both
def f(a):
    return a*a
for i in range(3):
    print f(i)
#+end_src

*** The output                                                :BMCOL:B_block:
    :PROPERTIES:
    :BEAMER_col: 0.4
    :BEAMER_env: block
    :BEAMER_envargs: <2->
    :END:

#+results: pythonexample
: 0
: 1
: 4

* Conclusions

** Summary
   - org is an incredible tool for time management
   - @but@ it is also excellent for writing and for preparing presentations
   - Beamer is a very powerful \LaTeX{} package for presentations
   - the combination is unbeatable!

Attachment: presentation.pdf
Description: Adobe PDF document


>>
>> yes, I now get that error. So something has changed recently. I'm using
>> fully updated ubuntu 10.10. What system are you using?
>
> I'm using Debian unstable.  My texlive package is version 2009-8; the
> current version in Debian unstable is 2009-11.
>
>
>> > A search on Google shows lots of reports related to beamer and Sweave.
>>
>> So perhaps we're seeing the effects of a recent change in the tex/latex
>> stack, rather than an emacs/org/minted/pygments problem??
>
> Some of the Google results go back quite a long time, e.g.,
> http://tolstoy.newcastle.edu.au/R/help/04/12/9454.html.  I'm staying
> with listings for now.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]