From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuva Subject: Latex export issues when external links are used inside tables. Date: Mon, 15 Jun 2009 17:04:44 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGASi-00063y-CS for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 07:34:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGASd-00061u-D1 for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 07:34:51 -0400 Received: from [199.232.76.173] (port=44299 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGASd-00061n-3P for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 07:34:47 -0400 Received: from mail-pz0-f203.google.com ([209.85.222.203]:64827) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MGASc-0001rA-Ne for emacs-orgmode@gnu.org; Mon, 15 Jun 2009 07:34:46 -0400 Received: by pzk41 with SMTP id 41so2874335pzk.14 for ; Mon, 15 Jun 2009 04:34:44 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs org mode mailinglist hi, If I try to use link abbrevations inside tables, there are some issues when exporting to latex. Say for example, if we consider the following eg : ------------8<---------------------------------8<-------------------- #+TITLE: Simple refs stuff #+AUTHOR: Yuva #+EMAIL: #+DATE: #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:t d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport #+LINK_UP: #+LINK_HOME: * Bug-References #+CAPTION: References #+LABEL: tbl:references #+LINK: bugzilla http://10.1.2.9/bugzilla/show_bug.cgi?id= #+LINK: ads http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?author=%s&db_key=AST | bug | link | |------+--------------| | 129 | [[bugzilla:129]] | | test | [[ads:test]] | ------------8<---------------------------------8<-------------------- If the link contains this ampersand '&' character, which has special meaning inside latex table, org mode generates incompatible .tex file. With the latest org-mode {from git sources}, I have the following generated output : ------------8<---------------------------------8<-------------------- % Created 2009-06-15 Mon 16:51 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{longtable} \usepackage{hyperref} \title{Simple refs stuff} \author{Yuva} \date{15 June 2009} \begin{document} \setcounter{tocdepth}{3} \tableofcontents \vspace*{1cm} \section{Bug-References} \label{sec-1} \begin{table}[htb] \caption{\label{tbl:references}References} \begin{center} \begin{tabular}{ll} bug & link \\ \hline 129 & \href{http://10.1.2.9/bugzilla/show_bug.cgi?id=129}{http://10.1.2.9/bugzilla/show\_bug.cgi?id=129} \\ test & \href{http://adsabs.harvard.edu/cgi-bin/nph-abs_connect?author=test&db_key=AST}{http://adsabs.harvard.edu/cgi-bin/nph-abs\_connect?author=test\&db\_key=AST} \\ \end{tabular} \end{center} \end{table} \end{document} ------------8<---------------------------------8<-------------------- 'pdflatex' simply fails to produce a pdf because '&' has creeped in due to '#+LINK: ads' expansion. This simple problem can be solved by treating '&' as special character, and replace it with '\&'. For above example, just replace 'test&db' with 'test\&db' IN-THE-FIRST-ARG-OF \href. Well, I am new to elisp, and I am still figuring out how to counter this issue. [Oh! what a lame excuse!]. Thanks, -- YUVA