emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] problem with code blocks


From: Sebastien Vauban
Subject: Re: [O] problem with code blocks
Date: Mon, 08 Aug 2011 09:47:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi LanX,

LanX wrote:
> Thanks for the suggestion, but the problem persists!

You see it's easier with an ECM...

> Only replacing the "0" with an "a" helps.

I don't have that problem. I guess it must have been fixed recently. It
clearly is related to [0] being interpreted as a footnote reference... It
should not, when in code. Please update your Org-mode version.

> ----------------------------------------------
> #+LaTeX_CLASS: beamer
> #+startup: beamer
>
> * Lanx
> ** title
>
> #+BEGIN_Example perl
>  grep { $_ ->[a] }      # <- 0 fails
>  X{1,2,3} X{1,2,3} X{1,2,3};
> #+END_Example
>
> ----------------------------------------------
>
> type C-c C-e d  (or C-c C-e L)

BTW, putting the language name after `begin_example' is useless. There is no
such concept. You should use the `begin_src' environments, where the language
is accepted as parameter:

#+begin_src perl
 grep { $_ ->[0] }      # <- 0 does not fail
 X{1,2,3} X{1,2,3} X{1,2,3};
#+end_src

Doing so, instead of:

#+begin_src latex
\begin{verbatim}
 grep { $_ ->[0] }      # <- 0 does not fail
 X{1,2,3} X{1,2,3} X{1,2,3};
\end{verbatim}
#+end_src

you'll get:

#+begin_src latex
\lstset{language=Perl}
\begin{lstlisting}
 grep { $_ ->[0] }      # <- 0 does not fail
 X{1,2,3} X{1,2,3} X{1,2,3};
\end{lstlisting}
#+end_src

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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