* problem with label in latex export
@ 2010-09-10 11:42 Indraneel Majumdar
2010-09-21 22:41 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Indraneel Majumdar @ 2010-09-10 11:42 UTC (permalink / raw)
To: orgmode
Hi all,
I'm having some problems with latex export, can someone help me out?
Since orgmode already uses hyperref, is there any reason why
\phantomsection is not added before \label by default? How can I enable it?
Also, how can I disable <<target>> from printing out the value in the
latex output from inside numbered lists? ie:
\label{target}
instead of
\label{target} target
It works fine at section headings but not within a list.
I tried this:
1.
#+ <<target>>
Some text
2. More text [[target][go to]]
and the latex export ignored the target (ie, no \label was generated)
TIA,
Indraneel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with label in latex export
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
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2010-09-21 22:41 UTC (permalink / raw)
To: Indraneel Majumdar; +Cc: orgmode
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,
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with label in latex export
2010-09-21 22:41 ` Bastien
@ 2010-09-22 3:53 ` Indraneel Majumdar
2010-09-22 9:10 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Indraneel Majumdar @ 2010-09-22 3:53 UTC (permalink / raw)
To: Bastien; +Cc: orgmode
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,
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with label in latex export
2010-09-22 3:53 ` Indraneel Majumdar
@ 2010-09-22 9:10 ` Bastien
2010-09-22 9:35 ` Indraneel Majumdar
2010-09-22 10:56 ` Nicolas Goaziou
0 siblings, 2 replies; 6+ messages in thread
From: Bastien @ 2010-09-22 9:10 UTC (permalink / raw)
To: Indraneel Majumdar; +Cc: orgmode
Hi Indraneel,
Indraneel Majumdar <indraneel@indraneel.info> writes:
> 11.
> #+ <<target>>
> Some text
> 12. More text [[target][go to]]
You're right that there is a problem.
The usual way of turning radio links invisible is to comment them, but
Org comments need to be at the beginning of the line, which breaks list
indentation. (Btw, no need for the '+' in '#+' -- '#+' is the syntax
prefix for optional elements like blocks, etc.)
The workaround here is to add (INVISIBLE) after your <<target>>
This works:
> 11. <<target>>(INVISIBLE)
> Some text
> 12. More text [[target][go to]]
It exports okay in HTML and LaTeX.
I've added a FAQ entry for this -- not sure whether it should go in the
manual.
Thanks for bringing this up!
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with label in latex export
2010-09-22 9:10 ` Bastien
@ 2010-09-22 9:35 ` Indraneel Majumdar
2010-09-22 10:56 ` Nicolas Goaziou
1 sibling, 0 replies; 6+ messages in thread
From: Indraneel Majumdar @ 2010-09-22 9:35 UTC (permalink / raw)
To: Bastien; +Cc: orgmode
Thanks Bastien, this works inline. Please put it in the manual, it's
just one line. I've spent looking for it every inch of the manual for
more than a day.
So will you be putting in \phantomsection for inline targets to work? I
guess if someone is using a <<target>> then it's more likely /not/ to be
a section heading. Putting it at a section heading doesn't hurt, but not
having it inline makes for a useless <<target>>. Off course for Latex
only, so probably should be in the exporter.
Indraneel
On 2010-09-22 14:40, Bastien wrote:
> Hi Indraneel,
>
> Indraneel Majumdar<indraneel@indraneel.info> writes:
>
>> 11.
>> #+<<target>>
>> Some text
>> 12. More text [[target][go to]]
> You're right that there is a problem.
>
> The usual way of turning radio links invisible is to comment them, but
> Org comments need to be at the beginning of the line, which breaks list
> indentation. (Btw, no need for the '+' in '#+' -- '#+' is the syntax
> prefix for optional elements like blocks, etc.)
>
> The workaround here is to add (INVISIBLE) after your<<target>>
>
> This works:
>
>> 11.<<target>>(INVISIBLE)
>> Some text
>> 12. More text [[target][go to]]
> It exports okay in HTML and LaTeX.
>
> I've added a FAQ entry for this -- not sure whether it should go in the
> manual.
>
> Thanks for bringing this up!
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with label in latex export
2010-09-22 9:10 ` Bastien
2010-09-22 9:35 ` Indraneel Majumdar
@ 2010-09-22 10:56 ` Nicolas Goaziou
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2010-09-22 10:56 UTC (permalink / raw)
To: Bastien; +Cc: orgmode, Indraneel Majumdar
Hello,
>>>>> Bastien writes:
> You're right that there is a problem.
> The usual way of turning radio links invisible is to comment them,
> but Org comments need to be at the beginning of the line, which
> breaks list indentation. (Btw, no need for the '+' in '#+' -- '#+'
> is the syntax prefix for optional elements like blocks, etc.)
#+ is also a valid comment syntax according to the manual.
By the way, do you think lists should ignore indentation of comments,
that is lines matching "^#[ \t]+"?
Regards
-- Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-09-22 10:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2010-09-22 9:10 ` Bastien
2010-09-22 9:35 ` Indraneel Majumdar
2010-09-22 10:56 ` Nicolas Goaziou
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).