emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Frankel <rick@rickster.com>
To: emacs-orgmode@gnu.org
Subject: [BUG][PATCH] latex export of links in description lists
Date: Thu, 06 Jun 2013 10:14:21 -0400	[thread overview]
Message-ID: <f76451237455beac62958a05f30e1dd3@mail.rickster.com> (raw)

There is a bug in the processing of description list.

Given the list:

,----
| - not a link :: not a link
| - [[http://link.com][http link]] :: baz
| - [[#href-test][custom_id link]] :: bar
| - [[def list][search link]] :: foo
`----

The latex exporter generates the following output, which fails
latex processing on the `hyperref's.

,----
| \begin{description}
| \item[not a link] not a link
| \item[\href{http://link.com}{http link}] baz
| \item[\hyperref[sec-1]{custom\_id link}] bar
| \item[\hyperref[sec-1]{search link}] foo
| \end{description}
`----

I believe the simplest patch to solve is to wrap the item argument in
braces as follows:

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index 41cf1d0..e16c62d 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1612,7 +1612,7 @@ contextual information."
(trans "$\\boxminus$ ")))
(tag (let ((tag (org-element-property :tag item)))
;; Check-boxes must belong to the tag.
-       (and tag (format "[%s] "
+       (and tag (format "[{%s}] "
(concat checkbox
(org-export-data tag info)))))))
(concat counter "\\item" (or tag (concat " " checkbox))

--------
rick

             reply	other threads:[~2013-06-06 14:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 14:14 Rick Frankel [this message]
2013-06-18 20:49 ` [BUG][PATCH] latex export of links in description lists Nicolas Goaziou

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=f76451237455beac62958a05f30e1dd3@mail.rickster.com \
    --to=rick@rickster.com \
    --cc=emacs-orgmode@gnu.org \
    /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).