emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG][PATCH] latex export of links in description lists
@ 2013-06-06 14:14 Rick Frankel
  2013-06-18 20:49 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Rick Frankel @ 2013-06-06 14:14 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: [BUG][PATCH] latex export of links in description lists
  2013-06-06 14:14 [BUG][PATCH] latex export of links in description lists Rick Frankel
@ 2013-06-18 20:49 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2013-06-18 20:49 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Hello,

Rick Frankel <rick@rickster.com> writes:

> 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:

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2013-06-18 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-06 14:14 [BUG][PATCH] latex export of links in description lists Rick Frankel
2013-06-18 20:49 ` 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).