From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: links to headline in LaTeX export Date: Fri, 20 Jan 2012 04:42:14 -1000 Message-ID: References: <6EC0E92F-5886-4D7A-92E4-3CB088386B71@polytechnique.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoFfe-00087H-38 for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 09:42:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoFfY-0001TM-6Y for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 09:42:25 -0500 Received: from oproxy4-pub.bluehost.com ([69.89.21.11]:46453) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RoFfX-0001TA-Pr for emacs-orgmode@gnu.org; Fri, 20 Jan 2012 09:42:20 -0500 In-Reply-To: <6EC0E92F-5886-4D7A-92E4-3CB088386B71@polytechnique.org> (Alan Schmitt's message of "Fri, 20 Jan 2012 11:08:09 +0100") 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: Alan Schmitt Cc: emacs-orgmode@gnu.org "Alan Schmitt" writes: > Hello, > > I'm trying to have links (in the form of \ref and \label) work in > LaTeX export, but I cannot seem to succeed. I'm following the advice > of http://orgmode.org/worg/org-tutorials/org-latex-export.html > (section 16). I have two problems with my links: first I would like > the text to be the section number as is the usual in LaTeX, and second > the links sometimes point to the wrong place. This second problem > seems to occur when the target is after the source. > > Here is a small input showing the problem: > > * Title > > ** Section 1 > > Text. > > ** Section 2 > > I would like a link to [[Section%201][Section 1]] or [[Section 3]]. > > ** Section 3 > > I would like a link to [[Section%202][Section 2]]. > > > > Exporting to LaTeX gives: > > % Created 2012-01-20 Fri 11:05 > \documentclass[11pt]{article} > \usepackage[utf8]{inputenc} > \usepackage[T1]{fontenc} > \usepackage{graphicx} > \usepackage{longtable} > \usepackage{float} > \usepackage{wrapfig} > \usepackage{soul} > \usepackage{amssymb} > \usepackage{hyperref} > > > \title{test} > \author{Alan Schmitt} > \date{20 January 2012} > > \begin{document} > > \maketitle > > \setcounter{tocdepth}{3} > \tableofcontents > \vspace*{1cm} > \section{Title} > \label{sec-1} > > > \subsection{Section 1} > \label{sec-1.1} > > > Text. > > \subsection{Section 2} > \label{sec-1.2} > > > I would like a link to \hyperref[sec-1.1]{Section 1} or > \hyperref[sec-1.2]{Section 3}. > > \subsection{Section 3} > \label{sec-1.3} > > > I would like a link to \hyperref[sec-1.2]{Section 2}. > > \end{document} > > Any suggestion? > > Thanks, > > Alan > > Aloha Alan, Your LaTeX output indicates that this setting: (setq org-export-latex-hyperref-format "\\ref{%s}") hasn't taken effect for one reason or another. What do you get with C-h v org-export-latex-hyperref-format RET? All the best, Tom -- Thomas S. Dye http://www.tsdye.com