From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Donat Subject: [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation Date: Wed, 5 Oct 2011 14:15:26 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e65a076eca0b6504ae8c296f Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBQNq-0001ya-2Y for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 08:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBQNl-0005uL-0h for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 08:15:33 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:63072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBQNk-0005u3-Ov for emacs-orgmode@gnu.org; Wed, 05 Oct 2011 08:15:28 -0400 Received: by wwp14 with SMTP id 14so2022895wwp.30 for ; Wed, 05 Oct 2011 05:15:26 -0700 (PDT) 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 --0016e65a076eca0b6504ae8c296f Content-Type: text/plain; charset=ISO-8859-1 Hello everyone, I am experience a very strange problem so that any help would be appreciated! I precise that I use org-mode 7.7 on Linux/Debian. I tried to perform latex export of the following org file : === cut here begin === # -*- coding: utf-8 -*- #+TITLE: Title #+AUTHOR: Roland #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:{} f:t TeX:t author:t #+LaTeX_CLASS: article #+LaTeX_CLASS_OPTIONS: [a4paper,twoside,10pt] #+LATEX_HEADER: \usepackage{booktabs} #+MACRO: TBL src_emacs-lisp[:var v=$1[$2,$3]]{v} #+TBLNAME: test-macro | 1 | #+TBLNAME: Test-latex | A | B | |---+---| | 1 | 3 | | 2 | 4 | * The footnote A footnote [fn:a: youhou!] * The macro The value (0,0) of table test-macro is {{{TBL(test-macro,0,0)}}}. * The code block #+begin_src latex :noweb yes \begin{table} \centering \begin{tabularx}{0.9\textwidth}{p{1.5cm}X} <> \end{tabularx} \end{table} #+end_src #+srcname: booktabs-2 #+begin_src emacs-lisp :var table='((:head) hline (:body)) (flet ((to-tab (tab) (orgtbl-to-generic (mapcar (lambda (lis) (if (listp lis) (mapcar (lambda (el) (if (stringp el) el (format "%S" el))) lis) lis)) tab) (list :lend " \\\\" :sep " & " :hline "\\hline")))) (org-fill-template " \\toprule %table \\bottomrule\n" (list (cons "table" ;; only use \midrule if it looks like there are column headers (if (equal 'hline (second table)) (concat (to-tab (list (first table))) "\n\\midrule\n" (to-tab (cddr table))) (to-tab table)))))) #+end_src === cut here end === Unfortunately, I get the error message : org-export-latex-preprocess: Wrong type argument: integer-or-marker-p, nil But when I comment the content of one of the 3 headers, the export is done just fine. The combination of a footnote, a macro call and a code block evaluation seems to be not compatible. Sounds weird, doesn't it? Anybody see what is happening? Thank you in advance for your help! Roland. --0016e65a076eca0b6504ae8c296f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello everyone,

I am experience a very strange problem so that any h= elp would be appreciated!

I precise that I use org-mode 7.7 on Linu= x/Debian.

I tried to perform latex export of the following org file= :

=3D=3D=3D cut here begin =3D=3D=3D
# -*- coding: utf-8 -*-
#+TITL= E: Title
#+AUTHOR: Roland

#+OPTIONS: H:3 num:t toc:nil \n:nil @:t= ::t |:t ^:{} f:t TeX:t author:t

#+LaTeX_CLASS: article
#+LaTeX_C= LASS_OPTIONS: [a4paper,twoside,10pt]

#+LATEX_HEADER: \usepackage{booktabs}

#+MACRO: TBL src_emacs-lis= p[:var v=3D$1[$2,$3]]{v}


#+TBLNAME: test-macro
| 1 |

#= +TBLNAME: Test-latex
| A | B |
|---+---|
| 1 | 3 |
| 2 | 4 |

* The footnote
A footnote [fn:a: youhou!]

* The macroThe value (0,0) of table test-macro is {{{TBL(test-macro,0,0)}}}.

*= The code block

#+begin_src latex :noweb yes
=A0\begin{table}
=A0=A0 \centering
=A0=A0 \begin{tabularx}{0.9\textwidth}{p{1.5cm}X}
= =A0=A0=A0=A0 <<booktabs-2(table=3Dtest-latex)>>
=A0=A0 \end{= tabularx}
=A0\end{table}
#+end_src

#+srcname: booktabs-2
#+= begin_src emacs-lisp :var table=3D'((:head) hline (:body))
(flet ((to-tab (tab)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (orgtbl-= to-generic
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (mapcar (lambda= (lis)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 (if (listp lis)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (mapcar (lambda (el)
=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (stringp el)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 el
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (format "%S" el))) lis)
= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 lis)) tab)
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (list :l= end " \\\\" :sep " & " :hline "\\hline"))= ))
=A0 (org-fill-template
=A0=A0 "
\\toprule
%table
\\bottomr= ule\n"
=A0=A0 (list
=A0=A0=A0 (cons "table"
=A0=A0= =A0=A0=A0=A0=A0=A0=A0 ;; only use \midrule if it looks like there are colum= n headers
=A0=A0=A0=A0=A0=A0=A0=A0=A0 (if (equal 'hline (second tabl= e))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (concat (to-tab (list (first table)= ))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "= ;\n\\midrule\n"
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 (to-tab (cddr table)))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (t= o-tab table))))))
#+end_src

=3D=3D=3D cut here end =3D=3D=3D

Unfortunately, I get the error message : org-export-latex-preprocess: W= rong type argument: integer-or-marker-p, nil

But when I comment the = content of one of the 3 headers, the export is done just fine. The combinat= ion of a footnote, a macro call and a code block evaluation seems to be not= compatible. Sounds weird, doesn't it?

Anybody see what is happening?

Thank you in advance for your hel= p!

Roland.

--0016e65a076eca0b6504ae8c296f--