From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Problems exporting Org code blocks in LaTeX Date: Tue, 05 Jun 2012 11:05:24 +0200 Message-ID: <80vcj6gmcr.fsf@somewhere.org> References: <80bokyvi1h.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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