From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: [BUG][PATCH] latex export of links in description lists Date: Thu, 06 Jun 2013 10:14:21 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkaxM-0006IU-Pl for emacs-orgmode@gnu.org; Thu, 06 Jun 2013 10:14:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkaxK-0008GF-1E for emacs-orgmode@gnu.org; Thu, 06 Jun 2013 10:14:24 -0400 Received: from [204.62.15.78] (port=54887 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkaxJ-0008GB-U6 for emacs-orgmode@gnu.org; Thu, 06 Jun 2013 10:14:21 -0400 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 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