emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Alan Schmitt" <alan.schmitt@polytechnique.org>
To: emacs-orgmode@gnu.org
Subject: links to headline in LaTeX export
Date: Fri, 20 Jan 2012 11:08:09 +0100	[thread overview]
Message-ID: <6EC0E92F-5886-4D7A-92E4-3CB088386B71@polytechnique.org> (raw)

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

             reply	other threads:[~2012-01-20 10:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 10:08 Alan Schmitt [this message]
2012-01-20 11:05 ` links to headline in LaTeX export Eric S Fraga
2012-01-20 11:14   ` Alan Schmitt
2012-01-20 14:42 ` Thomas S. Dye
2012-01-20 14:52   ` Alan Schmitt
2012-01-20 16:34     ` Thomas S. Dye
2012-01-20 16:42       ` Alan Schmitt
2012-01-21 13:30         ` Alan Schmitt
2012-01-21 17:22           ` Thomas S. Dye

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=6EC0E92F-5886-4D7A-92E4-3CB088386B71@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --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).