* links to headline in LaTeX export
@ 2012-01-20 10:08 Alan Schmitt
2012-01-20 11:05 ` Eric S Fraga
2012-01-20 14:42 ` Thomas S. Dye
0 siblings, 2 replies; 9+ messages in thread
From: Alan Schmitt @ 2012-01-20 10:08 UTC (permalink / raw)
To: emacs-orgmode
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 10:08 links to headline in LaTeX export Alan Schmitt
@ 2012-01-20 11:05 ` Eric S Fraga
2012-01-20 11:14 ` Alan Schmitt
2012-01-20 14:42 ` Thomas S. Dye
1 sibling, 1 reply; 9+ messages in thread
From: Eric S Fraga @ 2012-01-20 11:05 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
"Alan Schmitt" <alan.schmitt@polytechnique.org> 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
You could always do this directly using label and ref explicitly? See
attached org document. This may not be the ideal solution but at least
it works and is fairly unobtrusive...
HTH,
eric
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test file --]
[-- Type: text/org, Size: 176 bytes --]
* Introduction
#+LaTeX: \label{sec1}
This is some introductory text.
* Methodology
Here we describe what we actually did to address the problem described in \ref{sec1}.
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.163.gbded9)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 11:05 ` Eric S Fraga
@ 2012-01-20 11:14 ` Alan Schmitt
0 siblings, 0 replies; 9+ messages in thread
From: Alan Schmitt @ 2012-01-20 11:14 UTC (permalink / raw)
To: Eric S Fraga; +Cc: emacs-orgmode
On 20 Jan 2012, at 12:05, Eric S Fraga wrote:
> "Alan Schmitt" <alan.schmitt@polytechnique.org> 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
>
> You could always do this directly using label and ref explicitly? See
> attached org document. This may not be the ideal solution but at
> least
> it works and is fairly unobtrusive...
Thanks a lot. It works great and solves both issues. It's not as pretty
as a real link, but it will clearly do until I understand better how
LaTeX export works.
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 10:08 links to headline in LaTeX export Alan Schmitt
2012-01-20 11:05 ` Eric S Fraga
@ 2012-01-20 14:42 ` Thomas S. Dye
2012-01-20 14:52 ` Alan Schmitt
1 sibling, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2012-01-20 14:42 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
"Alan Schmitt" <alan.schmitt@polytechnique.org> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 14:42 ` Thomas S. Dye
@ 2012-01-20 14:52 ` Alan Schmitt
2012-01-20 16:34 ` Thomas S. Dye
0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-01-20 14:52 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: emacs-orgmode
On 20 Jan 2012, at 15:42, Thomas S. Dye wrote:
> 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?
I get what I would expect:
org-export-latex-hyperref-format's value is "\\ref{%s}"
For some reason it is not taken into account, and I'll have to
investigate why. I'm exporting doing "C-c @" to choose the sub-tree to
export, then "C-c C-e l" to get the LaTeX.
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 14:52 ` Alan Schmitt
@ 2012-01-20 16:34 ` Thomas S. Dye
2012-01-20 16:42 ` Alan Schmitt
0 siblings, 1 reply; 9+ messages in thread
From: Thomas S. Dye @ 2012-01-20 16:34 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
"Alan Schmitt" <alan.schmitt@polytechnique.org> writes:
> On 20 Jan 2012, at 15:42, Thomas S. Dye wrote:
>
>> 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?
>
> I get what I would expect:
> org-export-latex-hyperref-format's value is "\\ref{%s}"
>
> For some reason it is not taken into account, and I'll have to
> investigate why. I'm exporting doing "C-c @" to choose the sub-tree to
> export, then "C-c C-e l" to get the LaTeX.
>
> Alan
>
Aloha Alan,
Hmmm, I can't reproduce your results on my setup. What version of Org
mode are you using?
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 16:34 ` Thomas S. Dye
@ 2012-01-20 16:42 ` Alan Schmitt
2012-01-21 13:30 ` Alan Schmitt
0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-01-20 16:42 UTC (permalink / raw)
To: emacs-orgmode
On 20 Jan 2012, at 17:34, Thomas S. Dye wrote:
> Hmmm, I can't reproduce your results on my setup. What version of Org
> mode are you using?
I'm using the one bundled with Aquamacs 2.4, which is 6.33x. Looking at
the web site, I see that it's quite outdated. I'll try to update it this
week-end and see if it fixes things.
Thanks a lot for your help,
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-20 16:42 ` Alan Schmitt
@ 2012-01-21 13:30 ` Alan Schmitt
2012-01-21 17:22 ` Thomas S. Dye
0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-01-21 13:30 UTC (permalink / raw)
To: emacs-orgmode
On 20 Jan 2012, at 17:42, Alan Schmitt wrote:
> On 20 Jan 2012, at 17:34, Thomas S. Dye wrote:
>
>> Hmmm, I can't reproduce your results on my setup. What version of
>> Org
>> mode are you using?
>
> I'm using the one bundled with Aquamacs 2.4, which is 6.33x. Looking
> at the web site, I see that it's quite outdated. I'll try to update it
> this week-end and see if it fixes things.
I installed the current version from git, and everything work as
expected. Sorry for the noise, and thank for the help.
Alan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: links to headline in LaTeX export
2012-01-21 13:30 ` Alan Schmitt
@ 2012-01-21 17:22 ` Thomas S. Dye
0 siblings, 0 replies; 9+ messages in thread
From: Thomas S. Dye @ 2012-01-21 17:22 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
"Alan Schmitt" <alan.schmitt@polytechnique.org> writes:
> On 20 Jan 2012, at 17:42, Alan Schmitt wrote:
>
>> On 20 Jan 2012, at 17:34, Thomas S. Dye wrote:
>>
>>> Hmmm, I can't reproduce your results on my setup. What version of
>>> Org
>>> mode are you using?
>>
>> I'm using the one bundled with Aquamacs 2.4, which is 6.33x. Looking
>> at the web site, I see that it's quite outdated. I'll try to update
>> it this week-end and see if it fixes things.
>
> I installed the current version from git, and everything work as
> expected. Sorry for the noise, and thank for the help.
>
> Alan
>
>
Glad to hear that you are up and running. Welcome to the Org mode
community!
Regarding your interest in the LaTeX exporter, please be aware that an
experimental exporter is under development by Nicolas Goaziou. One of
the design goals is to iron out differences in translations to different
targets (HTML, LaTeX, etc.). I expect that this will make its way
steadily toward the Org mode core and that it will, in some cases,
change the current LaTeX export behavior.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-01-21 17:22 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 10:08 links to headline in LaTeX export Alan Schmitt
2012-01-20 11:05 ` 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
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).