emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation
@ 2011-10-05 12:15 Roland Donat
  2011-10-05 13:26 ` Roland
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Donat @ 2011-10-05 12:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

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}
     <<booktabs-2(table=test-latex)>>
   \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.

[-- Attachment #2: Type: text/html, Size: 2685 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation
  2011-10-05 12:15 [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation Roland Donat
@ 2011-10-05 13:26 ` Roland
  2011-10-05 14:46   ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Roland @ 2011-10-05 13:26 UTC (permalink / raw)
  To: emacs-orgmode

Hello again,

I just add some complements to the problem.

First, here is a more compact buffer to reproduce the bug :

== 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]

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

#+TBLNAME: test-macro
| 1 | 2 |
| 3 | 4 |

* A footnote

A footnote [fn:1: yihaa!] 

* A macro

The value (1,1) of table test-macro is {{{TBL(test-macro,1,1)}}}.

* A code block latex

#+begin_src latex
$$a^{2} = b^{2} + c^{2}$$
#+end_src

== cut here end ==

Remember if you try to export to latex, you get a "org-export-latex-preprocess: 
Wrong type argument: integer-or-marker-p, nil" message.

But if you comment at least the content under one of the three headlines, it 
works.

And I have just noticed that if you add a new headline, say "* test" after the 
latex source block, the export is done just fine without commenting anything. 

Please help me before I get crazy...

Thanks.

Roland.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation
  2011-10-05 13:26 ` Roland
@ 2011-10-05 14:46   ` Nicolas Goaziou
  2011-10-05 19:48     ` Roland Donat
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2011-10-05 14:46 UTC (permalink / raw)
  To: Roland; +Cc: emacs-orgmode

Hello,

Roland <roland.donat@gmail.com> writes:

> Hello again,
>
> I just add some complements to the problem.
>
> First, here is a more compact buffer to reproduce the bug :
>
> == 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]
>
> #+MACRO: TBL src_emacs-lisp[:var v=$1[$2,$3]]{v}
>
> #+TBLNAME: test-macro
> | 1 | 2 |
> | 3 | 4 |
>
> * A footnote
>
> A footnote [fn:1: yihaa!] 
>
> * A macro
>
> The value (1,1) of table test-macro is {{{TBL(test-macro,1,1)}}}.
>
> * A code block latex
>
> #+begin_src latex
> $$a^{2} = b^{2} + c^{2}$$
> #+end_src
>
> == cut here end ==

I can't reproduce it on latest Org. If you're not using that version,
you should upgrade: some bug fixing happened to footnotes since 7.7.

Now, if it happens on that latest version, I will look at it again.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation
  2011-10-05 14:46   ` Nicolas Goaziou
@ 2011-10-05 19:48     ` Roland Donat
  2011-10-05 19:53       ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Roland Donat @ 2011-10-05 19:48 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1463 bytes --]

Hello,

Thank you for your answer.

Yes, I use orgmode 7.7-2, it seems to be the latest packaged version
available on linux.

I have just reproduced the bug on ubuntu this evening...

The problem only happens while latex exporting. For example, an ascii export
works fine.

Thanks again for your time.

Regards,

Roland.


2011/10/5 Nicolas Goaziou <n.goaziou@gmail.com>

> Hello,
>
> Roland <roland.donat@gmail.com> writes:
>
> > Hello again,
> >
> > I just add some complements to the problem.
> >
> > First, here is a more compact buffer to reproduce the bug :
> >
> > == 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]
> >
> > #+MACRO: TBL src_emacs-lisp[:var v=$1[$2,$3]]{v}
> >
> > #+TBLNAME: test-macro
> > | 1 | 2 |
> > | 3 | 4 |
> >
> > * A footnote
> >
> > A footnote [fn:1: yihaa!]
> >
> > * A macro
> >
> > The value (1,1) of table test-macro is {{{TBL(test-macro,1,1)}}}.
> >
> > * A code block latex
> >
> > #+begin_src latex
> > $$a^{2} = b^{2} + c^{2}$$
> > #+end_src
> >
> > == cut here end ==
>
> I can't reproduce it on latest Org. If you're not using that version,
> you should upgrade: some bug fixing happened to footnotes since 7.7.
>
> Now, if it happens on that latest version, I will look at it again.
>
> Regards,
>
> --
> Nicolas Goaziou
>

[-- Attachment #2: Type: text/html, Size: 2136 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation
  2011-10-05 19:48     ` Roland Donat
@ 2011-10-05 19:53       ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2011-10-05 19:53 UTC (permalink / raw)
  To: Roland Donat; +Cc: emacs-orgmode

Roland Donat <roland.donat@gmail.com> writes:

> Yes, I use orgmode 7.7-2, it seems to be the latest packaged version
> available on linux.

What gives M-x org-version ?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-05 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-05 12:15 [orgmode 7.7] - Latex export problem with footnote, macro and code block evaluation Roland Donat
2011-10-05 13:26 ` Roland
2011-10-05 14:46   ` Nicolas Goaziou
2011-10-05 19:48     ` Roland Donat
2011-10-05 19:53       ` Nicolas Goaziou

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).