From: Indraneel Majumdar <indraneel@indraneel.info>
To: Bastien <bastien.guerry@wikimedia.fr>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: problem with label in latex export
Date: Wed, 22 Sep 2010 09:23:17 +0530 [thread overview]
Message-ID: <4C997DAD.2010406@indraneel.info> (raw)
In-Reply-To: <87tyli1zyx.fsf@gnu.org>
Sorry, forgot to cc to the list...
Hi Bastien,
I'm so glad to receive a reply. The problem is twofold. I need numbered
paragraphs in Latex, with cross-references to the paragraphs. Since
latex seems to have muddled with \par and \endpar, although numbered
paragraphs are possible in Tex, they are not automatic or simple in
latex. Numbered lists, however are easy in orgmode. Another problem in
Tex/Latex is that references always point to the beginning of the
smallest environment (probably actually section, but maybe hyperref
modifies it to the beginning of environment). So, placing a \label in a
numbered list has the desired effect. However, orgmode seems to have a
bug (or a feature lack), in that I cannot place a #+<<label>> inside a
list without destroying the automatic numbering.
An example of what does not work (no label generated):
11.
#+ <<target>>
Some text
12. More text [[target][go to]]
And this one breaks automatic numbering:
10. Something
#+<<target>>
11. Some text <<---- running C-c C-c on 11 changes it to 1.
Obviously, I want the target to be the item, not to some changeable text
in the list content, and I also want to hide the target identifier.
[Two more problems I noticed (or my lack of knowledge of orgmode):
<<target>> always prints out the contents; i.e. an option like
<<target><description>> would be nice. Also numbers in []; i.e. [[11]]
or [[11][see 11]] get mangled in latex output; I couldn't figure out how
to avoid that.]
Since I couldn't use numbered lists, the other option was to number
paragraphs by hand, and place #+<<target>> in the lines above them.
Orgmode does correctly place the \label but latex/tex ignores it.
hyperref enables this label only if \phantomsection is present in the
line above it. With \phantomsection and \label the pdf output works
fine. Actually \phantomsection \label{target} works fine anywhere in the
text.
My suggestion is twofold:
1. Allow a <<target><description>> where description can be empty or
nil; eg. <<target><>> If orgmode does not do something like this
already, this will allow suppressing contents of the target in the
output, if target is present inline; i.e. no #+
2. Add a \phantomsection where ever a <<target><description>> is
located, while exporting to latex.
Please let me know if I'm missing something. I'm new to orgmode, and
thank you for it.
Indraneel
On 2010-09-22 4:11, Bastien wrote:
> Hi Indraneel,
>
> Indraneel Majumdar<indraneel@indraneel.info> writes:
>
>> Since orgmode already uses hyperref, is there any reason why
>> \phantomsection is not added before \label by default?
> Can you explain why \phantomsection is useful here?
>
> Thanks,
>
next prev parent reply other threads:[~2010-09-22 3:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 11:42 problem with label in latex export Indraneel Majumdar
2010-09-21 22:41 ` Bastien
2010-09-22 3:53 ` Indraneel Majumdar [this message]
2010-09-22 9:10 ` Bastien
2010-09-22 9:35 ` Indraneel Majumdar
2010-09-22 10:56 ` Nicolas Goaziou
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C997DAD.2010406@indraneel.info \
--to=indraneel@indraneel.info \
--cc=bastien.guerry@wikimedia.fr \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.