* Problems exporting Org code blocks in LaTeX
@ 2012-06-04 22:17 Sebastien Vauban
2012-06-05 9:05 ` Sebastien Vauban
0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2012-06-04 22:17 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
I want to show (in Beamer slides) how to write an Org table.
I first need to add Org as a language to the listings settings.
Then, I write an Org source block, which is exported to LaTeX... but not
fully... The line "#+ATTR_LaTeX: align=rrl" disappears from the exported code!
See ECM.
--8<---------------cut here---------------start------------->8---
#+TITLE: Org code in slide
#+DATE: 2012-06-04 Mon
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %8BEAMER_extra(Extra)
#+BEAMER_HEADER_EXTRA: \lstdefinelanguage{org}{%
#+BEAMER_HEADER_EXTRA: morekeywords={:results, :session, :var, :noweb, :exports},
#+BEAMER_HEADER_EXTRA: sensitive=false,
#+BEAMER_HEADER_EXTRA: morestring=[b]",
#+BEAMER_HEADER_EXTRA: morecomment=[l]{\#},
#+BEAMER_HEADER_EXTRA: }
#+BEAMER_HEADER_EXTRA: \lstset{%
#+BEAMER_HEADER_EXTRA: mathescape=false
#+BEAMER_HEADER_EXTRA: }
* Table
Here's a "simple" but already powerful Org table:
#+begin_src org :exports code
,#+ATTR_LaTeX: align=rrl
,| Janvier | 1300 | \EUR |
,| Fevrier | 1280 | \EUR |
,|---------+------+------|
,| Total | 2580 | \EUR |
,#+TBLFM: @3$2=vsum(@1..@2)
#+end_src
--8<---------------cut here---------------end--------------->8---
I can't get it properly exported to LaTeX, because:
- the line ATTR_LaTeX is removed
- even with my mathescape=false, the $ is interpreted as math char
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Problems exporting Org code blocks in LaTeX
2012-06-04 22:17 Problems exporting Org code blocks in LaTeX Sebastien Vauban
@ 2012-06-05 9:05 ` Sebastien Vauban
2012-06-05 12:07 ` Use [org-latex] or [org-e-latex] for exporter problems Jambunathan K
0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2012-06-05 9:05 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
> I want to show (in Beamer slides) how to write an Org table [...].
>
> I write an Org source block, which is exported to LaTeX... but not fully...
> The line "#+ATTR_LaTeX: align=rrl" disappears from the exported code!
Here a compilable ECM, for the sake of ease:
--8<---------------cut here---------------start------------->8---
#+TITLE: Org code in slide
#+DATE: 2012-06-04 Mon
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [presentation,t]
#+BEAMER_HEADER_EXTRA: \usetheme{default}\usecolortheme{default}
#+BEAMER_FRAME_LEVEL: 1
#+BEAMER_HEADER_EXTRA: \lstdefinelanguage{org}{%
#+BEAMER_HEADER_EXTRA: morekeywords={:results, :session, :var, :noweb, :exports},
#+BEAMER_HEADER_EXTRA: sensitive=false,
#+BEAMER_HEADER_EXTRA: morestring=[b]",
#+BEAMER_HEADER_EXTRA: morecomment=[l]{\#},
#+BEAMER_HEADER_EXTRA: }
#+BEAMER_HEADER_EXTRA: \lstset{%
#+BEAMER_HEADER_EXTRA: mathescape=false,
#+BEAMER_HEADER_EXTRA: columns=flexible,
#+BEAMER_HEADER_EXTRA: keepspaces=true
#+BEAMER_HEADER_EXTRA: }
* Contexte
- I want to show (in Beamer slides) how to write an Org table.
- I first need to add Org as a language to the listings settings -- that's the
purpose of the above =BEAMER_HEADER_EXTRA= lines.
- I then write an Org source block, which is exported to LaTeX... but not
fully... The line =#+ATTR_LaTeX: align=rrl= disappears from the exported code!
- See ECM.
* ECM
Here's a "simple" but already powerful Org table:
#+begin_src org :exports code
,#+ATTR_LaTeX: align=rrl
,| Janvier | 1300 | \EUR |
,| Fevrier | 1280 | \EUR |
,|---------+------+------|
,| Total | 2580 | \EUR |
,#+TBLFM: @3$2=vsum(@1..@2)
#+end_src
I can't get it properly exported to LaTeX, because the line =ATTR_LaTeX= is
*removed from the published code block* (compare the Org source of the code
block with what's shown in the PDF).
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 5+ messages in thread
* Use [org-latex] or [org-e-latex] for exporter problems
2012-06-05 9:05 ` Sebastien Vauban
@ 2012-06-05 12:07 ` Jambunathan K
2012-06-05 12:42 ` Sebastien Vauban
0 siblings, 1 reply; 5+ messages in thread
From: Jambunathan K @ 2012-06-05 12:07 UTC (permalink / raw)
To: Orgmode
Please use [org-latex] or [org-e-latex] while reporting exporter
problems. Likewise for other exporters.
If you are exporting with old exporter, export once with the new
exporter also, just for the fun of it. More importantly report problems
or inconsistencies. This will immensely help to improve the current
backends and associated infrastructure.
--
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Use [org-latex] or [org-e-latex] for exporter problems
2012-06-05 12:07 ` Use [org-latex] or [org-e-latex] for exporter problems Jambunathan K
@ 2012-06-05 12:42 ` Sebastien Vauban
2012-06-05 14:09 ` Jambunathan K
0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2012-06-05 12:42 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Jambunathan,
Jambunathan K wrote:
> Please use [org-latex] or [org-e-latex] while reporting exporter
> problems. Likewise for other exporters.
This was code for Beamer slides, hence using the old LaTeX exporter.
> If you are exporting with old exporter, export once with the new
> exporter also, just for the fun of it.
Converted the Beamer slideware to a document:
--8<---------------cut here---------------start------------->8---
#+TITLE: Org code in slide
#+DATE: 2012-06-04 Mon
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+LaTeX_CLASS: article
#+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: mathescape=false,
#+LaTeX_HEADER: columns=flexible,
#+LaTeX_HEADER: keepspaces=true
#+LaTeX_HEADER: }
* Contexte
- I want to show (in Beamer slides) how to write an Org table.
- I first need to add Org as a language to the listings settings -- that's the
purpose of the above =BEAMER_HEADER_EXTRA= lines.
- I then write an Org source block, which is exported to LaTeX... but not
fully... The line =#+ATTR_LaTeX: align=rrl= disappears from the exported code!
- See ECM.
* ECM
Here's a "simple" but already powerful Org table:
#+begin_src org :exports code
,#+ATTR_LaTeX: align=rrl
,| Janvier | 1300 | \EUR |
,| Fevrier | 1280 | \EUR |
,|---------+------+------|
,| Total | 2580 | \EUR |
,#+TBLFM: @3$2=vsum(@1..@2)
#+end_src
I can't get it properly exported to LaTeX, because the line =ATTR_LaTeX= is
*removed from the published code block* (compare the Org source of the code
block with what's shown in the PDF).
--8<---------------cut here---------------end--------------->8---
- Same problem with the old exporter
- It works with the new one -- but N/A yet for slides; anyway, this is good
news.
> More importantly report problems or inconsistencies. This will immensely
> help to improve the current backends and associated infrastructure.
That, I clearly do (and will still do)...
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-05 14:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-04 22:17 Problems exporting Org code blocks in LaTeX Sebastien Vauban
2012-06-05 9:05 ` Sebastien Vauban
2012-06-05 12:07 ` Use [org-latex] or [org-e-latex] for exporter problems Jambunathan K
2012-06-05 12:42 ` Sebastien Vauban
2012-06-05 14:09 ` Jambunathan K
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).