emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [latex] Problems with old exporter (for Beamer) and with new exporter
@ 2012-06-07 20:56 Sebastien Vauban
  2012-06-09 20:18 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2012-06-07 20:56 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

I want to write a document where I show:

- Org code to type in a buffer
- (sometimes) its LaTeX translation
- its effect in the output PDF

Though, I have big troubles outputting the Org code one is suppose to write in
the Org buffers. It often gets replaced or modified... See examples in the
following ECM.

With the old exporter (necessary for Beamer), all the below cases fail...

With the new exporter, most things work. What does not work:
- macro does not get executed (no string in orange color),
- the =\end{verbatim}= disappears from the LaTeX output

--8<---------------cut here---------------start------------->8---
#+TITLE:     Org mode examples
#+OPTIONS:   H:3 num:t toc:nil

#+LaTeX_HEADER: \lstdefinelanguage{org}{%
#+LaTeX_HEADER:   morekeywords={:results, :session, :var, :noweb, :exports},
#+LaTeX_HEADER:   sensitive=false,
#+LaTeX_HEADER:   morestring=[b]",
#+LaTeX_HEADER:   morecomment=[l]{\#},
#+LaTeX_HEADER: }

#+LaTeX_HEADER: \lstset{%
#+LaTeX_HEADER:   extendedchars=false,
#+LaTeX_HEADER:   inputencoding=utf8x,
#+LaTeX_HEADER:   %
#+LaTeX_HEADER:   mathescape=false,
#+LaTeX_HEADER:   escapechar=`, % allow escaping to (La)TeX mode within `..`
#+LaTeX_HEADER:   columns=flexible,
#+LaTeX_HEADER:   keepspaces=true
#+LaTeX_HEADER: }

#+MACRO: key \textcolor{orange}{\texttt{$1}}

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{Madrid}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1

* Macros

- With the following macro definition

  #+begin_src org :exports code
  ,#+MACRO: key \textcolor{orange}{\texttt{$1}}
  #+end_src

- Every time we write

  #+begin_src org :exports code
  ,{{{key(C-c C-e)}}}
  #+end_src

  HERE ABOVE, WE SHOULD SEE THE MACRO NAME AND PARAMETER INSIDE CURLY
  BRACKETS. INSTEAD, WE SEE THE LATEX REPLACEMENT CODE.

- We get {{{key(C-c C-e)}}}

* Listings informatiques

- To input a block of code in Org, type it like this:

#+begin_src org :exports code
,#+begin_src sql
,SELECT *
,FROM inventory
,WHERE product = 'ABC123'
,#+end_src
#+end_src

  HERE, WE SHOULD SEE =#+begin_src sql=. INSTEAD, WE SEE =\begin{}sql=.

- And see the nice listing:

#+begin_src sql
SELECT *
FROM inventory
WHERE product = 'ABC123'
#+end_src

* Verbatim

- Same problem for verbatim... Here, the Org code

#+begin_src org :exports code
,#+begin_verbatim
,verbatim  d i s p l a y s  with spaces!
,#+end_verbatim
#+end_src

  HERE, THE META LINE IS CONVERTED INTO ITS LATEX FORM.

- And its translation into LaTeX:

#+begin_src latex :exports code
\begin{verbatim}
verbatim  d i s p l a y s  with spaces!
\end{verbatim}
#+end_src

* Comment

It is also impossible to show how to type a comment block:

#+begin_src org :exports code
#+begin_comment
Paragraph which will not appear in resulting PDF.
#+end_comment
#+end_src

THE ABOVE NEVER IS SHOWN!
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-18  8:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-07 20:56 [latex] Problems with old exporter (for Beamer) and with new exporter Sebastien Vauban
2012-06-09 20:18 ` Nicolas Goaziou
2012-06-14 13:06   ` Sebastien Vauban
2012-06-14 18:06     ` Nicolas Goaziou
2012-06-15  9:09       ` Sebastien Vauban
2012-06-18  7:40         ` Eric S Fraga

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