Re: [O] [bug] org block not correctly exported to LaTeX
Hi Eric, thanks for looking into this. · Eric Schulte schulte.e...@gmail.com wrote: Thomas Holst thomas.ho...@de.bosch.com writes: Hi Bastien, thanks for your answer. 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 #+END_ORG gets inserted by org-babel. Yes, Babel uses the #+begin/end_org as markers, so that it can identify the beginning and end of raw Org-mode results when those results need to be deleted or replaced with new results. Since these are just used as markers and are functionally equivalent to comment lines (e.g., no special treatment of the portion between the begin_org and end_org lines) we didn't really coordinate this with the results of Org-mode. It seems however that since comments must start on the first character of a line, these don't work when indented. Would it be difficult to recognize these two lines as comments when they are indented? Note we also have #+begin/end_result lines which may likely have similar issues. This exactly is the issue. If I remove the indentation from the result block export works fine. As you mentioned #+begin/#+end_org markers are treated as comments and do not appear in the LaTeX output. I tried to find a solution to this but my lisp is not (yet) good enough. -- Mit freundlichen Grüßen / Best regards Thomas Holst DGS-EC/ESE4 Tel. +49 (711) 811-40681 PC-Fax +49 (711) 811-5182208
Re: [O] [bug] org block not correctly exported to LaTeX
Hi Bernt, · Bernt Hansen be...@norang.ca wrote: Thomas Holst thomas.ho...@de.bosch.com writes: Hi Bastien, thanks for your answer. 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 #+END_ORG Here is an example which shows the issue. #+begin_src org * Testing org-babel perl #+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 You have nested #+begin_src / #+end_src in this example. I'm not sure that is supported. I used #+begin_src / #+end_src org only to show the org file in my email. The part between #+begin / #+end_src org is the content of my test org file. As Eric said the problem is #+begin_org / #+end_org which is inserted by babel. If #+begin_org / #+end_org does not start at column 0 it appears in the exported LaTeX file. -- Mit freundlichen Grüßen / Best regards Thomas Holst DGS-EC/ESE4 Tel. +49 (711) 811-40681 PC-Fax +49 (711) 811-5182208
Re: [O] [bug] org block not correctly exported to LaTeX
Hi Bastien, thanks for your answer. 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 #+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 #+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 #+BEGIN_ORG #+END_ORG with #+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. 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. -- Mit freundlichen Grüßen / Best regards Thomas Holst DGS-EC/ESE4 Tel. +49 (711) 811-40681 PC-Fax +49 (711) 811-5182208
Re: [O] [bug] org block not correctly exported to LaTeX
Thomas Holst thomas.ho...@de.bosch.com writes: Hi Bastien, thanks for your answer. 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 #+END_ORG gets inserted by org-babel. Yes, Babel uses the #+begin/end_org as markers, so that it can identify the beginning and end of raw Org-mode results when those results need to be deleted or replaced with new results. Since these are just used as markers and are functionally equivalent to comment lines (e.g., no special treatment of the portion between the begin_org and end_org lines) we didn't really coordinate this with the results of Org-mode. It seems however that since comments must start on the first character of a line, these don't work when indented. Would it be difficult to recognize these two lines as comments when they are indented? Note we also have #+begin/end_result lines which may likely have similar issues. Best -- Eric -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [bug] org block not correctly exported to LaTeX
Thomas Holst thomas.ho...@de.bosch.com writes: Hi Bastien, thanks for your answer. 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 #+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 #+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 Hi Thomas, You have nested #+begin_src / #+end_src in this example. I'm not sure that is supported. Fontification of this example seems to indicate that the second #+begin_src perl is invalid and the first #+end_src terminates the #+begin_src org -Bernt
[O] [bug] org block not correctly exported to LaTeX
Hello, when the follwing org-file is exported to LaTeX, #+BEGIN_ORG and #+END_ORG is inserted in the tex-file. --8schnipp-8--- * Testing output perl to org #+srcname: TestingPerlToOrg #+begin_src perl :exports results :results output org print Hello World\n; #+end_src #+results: TestingPerlToOrg #+BEGIN_ORG Hello World #+END_ORG --8schnapp-8--- Relevant part of the tex-file: --8schnipp-8--- #+begin_src latex \#+begin\_{}org Hello World \#+end\_{}org #+end_src --8schnapp-8--- If the #+BEGIN_ORG ... #+END_ORG starts at column 0 it is not inserted into the tex-file. Other blocks (e.g. #+BEGIN_EXAMPLE ... #+END_EXAMPLE) are not inserted if they are indented. Tested with: emacs 23.2.1 on WinXP Org-mode version 7.6 (release_7.6.75.g67e9) (local patch to makefile) Thanks again for org-mode. More and more of my collegues are starting to use it! -- Mit freundlichen Grüßen / Best regards Thomas Holst DGS-EC/ESE4 Tel. +49 (711) 811-40681 PC-Fax +49 (711) 811-5182208