emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Table caption produces trailing "nil" in pdf export
Date: Tue, 10 Aug 2010 22:48:52 +0200	[thread overview]
Message-ID: <87bp9a8a8b.wl%n.goaziou@gmail.com> (raw)
In-Reply-To: <AANLkTinUWLkZs9Qs_4S=3gAtg0-eNcsiYOdOW-M=rW9i@mail.gmail.com>

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

Hello,

>>>>> John Hendy writes:

> Suddenly I'm getting a line with nothing but "nil" between the caption and
> the table when exporting from org-mode to LaTeX. I swear this not happening.
> I believe I did a git pull on Friday or some time last week. The only reason
> I noticed is that I just set up emacs, org, and LaTeX on a new computer and
> tested an old file to make sure the export was working. I then checked my
> other computer with what I thought was a fine install and it's doing it now,
> too. I originally thought I missed something on the new computer, but now
> I'm wondering if it's from the fresh pull.

This patch (needed by my own mistake) should correct the problem.

Regards,

-- Nicolas


[-- Attachment #2: 0001-Fix-empty-label-bug.patch --]
[-- Type: text/plain, Size: 1077 bytes --]

From 38a3ae8cf8716af0db87a47a421b6d5af654d045 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Tue, 10 Aug 2010 22:43:35 +0200
Subject: [PATCH] Fix empty label bug

* org-latex.el (org-export-latex-tables): Return "" instead of nil
  when no label is attached.
---
 lisp/org-latex.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-latex.el b/lisp/org-latex.el
index 056f1b3..b0ba939 100644
--- a/lisp/org-latex.el
+++ b/lisp/org-latex.el
@@ -1683,7 +1683,7 @@ The conversion is made depending of STRING-BEFORE and STRING-AFTER."
                              "\\caption%s{%s} %s"
                              (if shortn (concat "[" shortn "]") "")
                              (or caption "")
-			     (when label (format "\\label{%s}" label))))
+			     (if label (format "\\label{%s}" label) "")))
                         (if (and longtblp caption) "\\\\\n" "\n")
                         (if (and org-export-latex-tables-centered (not longtblp))
                             "\\begin{center}\n")
-- 
1.7.2.1


[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-08-10 20:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-10 19:36 Table caption produces trailing "nil" in pdf export John Hendy
2010-08-10 20:48 ` Nicolas Goaziou [this message]
2010-08-11  7:50   ` [Accepted] Re: [PATCH] " Carsten Dominik
2010-08-12 13:56     ` John Hendy
2010-08-12 14:18       ` Bastien
2010-08-12 20:55         ` John Hendy
2010-08-10 21:07 ` David Maus
2010-08-10 21:14   ` John Hendy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bp9a8a8b.wl%n.goaziou@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jw.hendy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).