emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Francesco Pizzolante <fpz-djc/iPCCuDYQheJpep6IedvLeJWuRmrY@public.gmane.org>
To: Carsten Dominik
	<carsten.dominik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: mailing-list-org-mode <emacs-orgmode-mXXj517/zsQ@public.gmane.org>
Subject: Re: LaTeX export of section links
Date: Fri, 20 Nov 2009 16:14:27 +0100	[thread overview]
Message-ID: <877htlcjos.fsf@missioncriticalit.com> (raw)
In-Reply-To: <361B87B2-29D2-465C-84BE-A82376059D35-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> (Carsten Dominik's message of "Fri, 20 Nov 2009 15:13:20 +0100")

Hi Carsten,

>> --8<---------------cut here---------------start------------->8---
>> * First
>>  :PROPERTIES:
>>  :CUSTOM_ID: heading-a
>>  :END:
>>
>>  Hello Toto!
>>
>> * Second
>> # <<heading-b>>
>>
>>  Hello Tata!
>>
>> * Third
>> #+CUSTOM_ID: heading-c
>>
>>  Hello Titi!
>>
>> * Fourth
>> #+ID: heading-d
>>
>>  Hello Tete!
>>
>> [[heading-a]]
>> [[heading-b]]
>> [[heading-c]]
>> [[heading-d]]
>> --8<---------------cut here---------------end--------------->8---
>>
>> Which give the following LaTeX code:
>>
>> --8<---------------cut here---------------start------------->8---
>> \section{First}
>> \label{sec-1}
>> \label{heading-a}
>>
>>
>>  Hello Toto!
>>
>> \section{Second}
>> \label{sec-2}
>> \label{heading-b}
>>
>>
>>  Hello Tata!
>>
>> \section{Third}
>> \label{sec-3}
>>
>>
>>  Hello Titi!
>>
>> \section{Fourth}
>> \label{sec-4}
>>
>>
>>  Hello Tete!
>>
>> \hyperref[sec-1]{heading-a}
>> \hyperref[sec-2]{heading-b}
>> \hyperref[sec-3]{heading-c}
>> \hyperref[sec-4]{heading-d}
>> --8<---------------cut here---------------end--------------->8---
>>
>> The third and fourth cases are very elegant as they use only aliases (which
>> are dropped from the LaTeX code).
>
> Third and forth are non-existent syntax in Org, these lines are just treated
> as comments and are removed during export.

OK. But the information in these 2 comments is correctly used to replace the
alias (heading-c and heading-d) with the label generated by org during the
export. See the last 2 references in my example: these references are correct.
They thus have been correctly processed from heading-c and heading-d to sec-3
and sec-4... these comments are thus not simply removed... right?

In the case of the :CUSTOM_ID: property, the property is also used to convert
the alias to the label (heading-a to sec-1) but additionally an extra label
(heading-a) is created and not used.

That's why, when creating references to sections I found the #+CUSTOM_ID very
elegant... But apparently I don't have to use such syntax...

I wanted to know the recommended way of doing references...

Thanks a lot for your help.

Francesco


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  parent reply	other threads:[~2009-11-20 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 11:34 LaTeX export of section links Francesco Pizzolante
2009-11-20 12:42 ` Bernt Hansen
2009-11-20 14:13 ` Carsten Dominik
     [not found]   ` <361B87B2-29D2-465C-84BE-A82376059D35-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-11-20 15:14     ` Francesco Pizzolante [this message]
2009-11-20 15:18       ` Carsten Dominik
     [not found]         ` <224945F4-65E4-4904-9065-ADF3FE9F4DD2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-11-20 15:23           ` Francesco Pizzolante

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=877htlcjos.fsf@missioncriticalit.com \
    --to=fpz-djc/ipccudyqhejpep6iedvlejwurmry@public.gmane.org \
    --cc=carsten.dominik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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).