From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Holst Subject: Re: [bug] org block not correctly exported to LaTeX Date: Mon, 25 Jul 2011 10:02:37 +0200 Message-ID: References: <87zkk3tgry.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlG8F-0006gQ-B7 for emacs-orgmode@gnu.org; Mon, 25 Jul 2011 04:03:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlG8D-0003EL-CR for emacs-orgmode@gnu.org; Mon, 25 Jul 2011 04:03:19 -0400 Received: from smtp2-v.fe.bosch.de ([139.15.237.6]:29243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlG8D-0003DI-4l for emacs-orgmode@gnu.org; Mon, 25 Jul 2011 04:03:17 -0400 In-Reply-To: <87zkk3tgry.fsf@gnu.org> (bzg@altern.org's message of "Mon, 25 Jul 2011 01:12:17 +0200") 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "emacs-orgmode@gnu.org" Cc: "Holst Thomas (DGS-EC/ESE4)" , Bastien Hi Bastien, thanks for your answer.=20 >> when the follwing org-file is exported to LaTeX, #+BEGIN_ORG >> and #+END_ORG is inserted in the tex-file. > > You surely want > #+begin_src org > #+end_src org > "#+begin_org" doesn't exist. #+BEGIN_ORG=20 #+END_ORG gets inserted by org-babel. Here is the relevant part of ob.el lines 1620 ff. #+srcname: ob.el #+begin_src emacs-lisp ;; .... ((member "org" result-params) (wrap "#+BEGIN_ORG" "#+END_ORG")) ;; ... #+end_src emacs-lisp Here is an example which shows the issue. #+begin_src org * Testing org-babel perl =20 #+srcname: TestingPerl #+begin_src perl :exports results :results output org print("#+CAPTION: A caption\n"); print("#+LABEL: tbl:dvi\n"); print("#+ATTR_LaTeX: placement[H]\n"); print("| *bold/T* |\n"); print("|--------|\n"); print("| normal |\n"); #+end_src #+results: TestingPerl #+BEGIN_ORG #+CAPTION: A caption #+LABEL: tbl:dvi #+ATTR_LaTeX: placement[H] | *bold/T* | |--------| | normal | #+END_ORG #+end_src org I tested replacing=20 #+BEGIN_ORG=20 #+END_ORG=20 with=20 #+BEGIN_SRC org #+END_SRC org But that doesn't work. The org-babel output is inserted verbatim when exported to LaTeX. That is not what is expected.=20 I could use a :results output raw header, but with a long output (including blank lines) org-babel has problems finding the end of the output when recalculating the source block. The org-babel output gets appended not rewritten. My workaround is not indenting the source block. Then everything works as expected. But indented soure blocks look nicer. Thanks again for looking into this. --=20 Mit freundlichen Gr=FC=DFen / Best regards=20 Thomas Holst=20 DGS-EC/ESE4 Tel. +49 (711) 811-40681 PC-Fax +49 (711) 811-5182208