* Link descriptions
@ 2010-12-14 18:09 Thomas S. Dye
2010-12-15 19:34 ` David Maus
0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2010-12-14 18:09 UTC (permalink / raw)
To: emacs-orgmode ml
Aloha all,
After reading through the documentation fairly carefully, link
descriptions are yielding unexpected results. Perhaps I missed
something?
I have a link defined for citep:
#+source: define-citep-link
#+begin_src emacs-lisp
(org-add-link-type
"citep" 'ebib
(lambda (path desc format)
(cond
((eq format 'latex)
(format "\\citep[%s]{%s}" desc path)))))
#+end_src
With input like [[citep:jones][Jones]], it works fine, yielding
\citep[Jones]{jones}.
My hope, however, is to pass page numbers in the description so with
[[citep:jones][123]] I get \citep[123]{jones}. When I have a
description like this, I get [[citep:jones]$^{123}$] instead.
This looks like a bug to me (at least I wish it would work to pass
page numbers to the \citep command). Have I overlooked a restriction
on link descriptions?
All the best,
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Link descriptions
2010-12-14 18:09 Link descriptions Thomas S. Dye
@ 2010-12-15 19:34 ` David Maus
2010-12-16 3:33 ` Thomas S. Dye
0 siblings, 1 reply; 6+ messages in thread
From: David Maus @ 2010-12-15 19:34 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: emacs-orgmode ml
[-- Attachment #1.1: Type: text/plain, Size: 1270 bytes --]
At Tue, 14 Dec 2010 08:09:21 -1000,
Thomas S. Dye wrote:
>
> Aloha all,
>
> After reading through the documentation fairly carefully, link
> descriptions are yielding unexpected results. Perhaps I missed
> something?
>
> I have a link defined for citep:
>
> #+source: define-citep-link
> #+begin_src emacs-lisp
> (org-add-link-type
> "citep" 'ebib
> (lambda (path desc format)
> (cond
> ((eq format 'latex)
> (format "\\citep[%s]{%s}" desc path)))))
> #+end_src
>
> With input like [[citep:jones][Jones]], it works fine, yielding
> \citep[Jones]{jones}.
>
> My hope, however, is to pass page numbers in the description so with
> [[citep:jones][123]] I get \citep[123]{jones}. When I have a
> description like this, I get [[citep:jones]$^{123}$] instead.
>
> This looks like a bug to me (at least I wish it would work to pass
> page numbers to the \citep command). Have I overlooked a restriction
> on link descriptions?
This is a bug, but not related to links: The LaTeX exporter turns a
sequence like:
][\d+]
into
]$^{\d+}$
Where \d+ is a placeholder for one or more numbers.
The question I cannot answer (yet?) is: Why?
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Link descriptions
2010-12-15 19:34 ` David Maus
@ 2010-12-16 3:33 ` Thomas S. Dye
2010-12-16 5:18 ` Alan L Tyree
2010-12-19 14:00 ` David Maus
0 siblings, 2 replies; 6+ messages in thread
From: Thomas S. Dye @ 2010-12-16 3:33 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode ml
On Dec 15, 2010, at 9:34 AM, David Maus wrote:
> At Tue, 14 Dec 2010 08:09:21 -1000,
> Thomas S. Dye wrote:
>>
>> Aloha all,
>>
>> After reading through the documentation fairly carefully, link
>> descriptions are yielding unexpected results. Perhaps I missed
>> something?
>>
>> I have a link defined for citep:
>>
>> #+source: define-citep-link
>> #+begin_src emacs-lisp
>> (org-add-link-type
>> "citep" 'ebib
>> (lambda (path desc format)
>> (cond
>> ((eq format 'latex)
>> (format "\\citep[%s]{%s}" desc path)))))
>> #+end_src
>>
>> With input like [[citep:jones][Jones]], it works fine, yielding
>> \citep[Jones]{jones}.
>>
>> My hope, however, is to pass page numbers in the description so with
>> [[citep:jones][123]] I get \citep[123]{jones}. When I have a
>> description like this, I get [[citep:jones]$^{123}$] instead.
>>
>> This looks like a bug to me (at least I wish it would work to pass
>> page numbers to the \citep command). Have I overlooked a restriction
>> on link descriptions?
>
> This is a bug, but not related to links: The LaTeX exporter turns a
> sequence like:
>
> ][\d+]
>
> into
>
> ]$^{\d+}$
>
> Where \d+ is a placeholder for one or more numbers.
>
> The question I cannot answer (yet?) is: Why?
>
> Best,
> -- David
Perhaps it has to do with footnotes? That's an org-mode environment
with square brackets and, in some instances, a superscript number.
Whether or not to set the footnote number superscript or some other
way would ideally be handled by the LaTeX class, so shouldn't be
something the org-mode LaTeX exporter worries about.
In my LaTeX experience, directly set superscripts outside of math are
found in area measurements, e.g. 10~m$^[2}$, but not much else.
These musings are my way of saying that I can't think of a reason ][\d
+] should set a superscript in the LaTeX export.
All the best,
Tom
All the best,
Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Link descriptions
2010-12-16 3:33 ` Thomas S. Dye
@ 2010-12-16 5:18 ` Alan L Tyree
2010-12-19 14:00 ` David Maus
1 sibling, 0 replies; 6+ messages in thread
From: Alan L Tyree @ 2010-12-16 5:18 UTC (permalink / raw)
To: emacs-orgmode
On Wed, 15 Dec 2010 17:33:38 -1000
Thomas S.Dye <tsd@tsdye.com> wrote:
>
> On Dec 15, 2010, at 9:34 AM, David Maus wrote:
>
> > At Tue, 14 Dec 2010 08:09:21 -1000,
> > Thomas S. Dye wrote:
> >>
> >> Aloha all,
> >>
> >> After reading through the documentation fairly carefully, link
> >> descriptions are yielding unexpected results. Perhaps I missed
> >> something?
> >>
> >> I have a link defined for citep:
> >>
> >> #+source: define-citep-link
> >> #+begin_src emacs-lisp
> >> (org-add-link-type
> >> "citep" 'ebib
> >> (lambda (path desc format)
> >> (cond
> >> ((eq format 'latex)
> >> (format "\\citep[%s]{%s}" desc path)))))
> >> #+end_src
> >>
> >> With input like [[citep:jones][Jones]], it works fine, yielding
> >> \citep[Jones]{jones}.
> >>
> >> My hope, however, is to pass page numbers in the description so
> >> with [[citep:jones][123]] I get \citep[123]{jones}. When I have a
> >> description like this, I get [[citep:jones]$^{123}$] instead.
> >>
> >> This looks like a bug to me (at least I wish it would work to pass
> >> page numbers to the \citep command). Have I overlooked a
> >> restriction on link descriptions?
> >
> > This is a bug, but not related to links: The LaTeX exporter turns a
> > sequence like:
> >
> > ][\d+]
> >
> > into
> >
> > ]$^{\d+}$
> >
> > Where \d+ is a placeholder for one or more numbers.
> >
> > The question I cannot answer (yet?) is: Why?
> >
> > Best,
> > -- David
>
> Perhaps it has to do with footnotes? That's an org-mode environment
> with square brackets and, in some instances, a superscript
> number. Whether or not to set the footnote number superscript or some
> other way would ideally be handled by the LaTeX class, so shouldn't
> be something the org-mode LaTeX exporter worries about.
>
> In my LaTeX experience, directly set superscripts outside of math
> are found in area measurements, e.g. 10~m$^[2}$, but not much else.
>
> These musings are my way of saying that I can't think of a reason ]
> [\d +] should set a superscript in the LaTeX export.
Sometime back I had a problem with [2010] type references. Jan Bocker
made a disable-plain-footnotes-hack function that put a non-printing
space between the [ and the 2. Will the same trick work here?
Cheers,
Alan
>
> All the best,
> Tom
> All the best,
> Tom
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
--
Alan L Tyree http://www2.austlii.edu.au/~alan
Tel: 04 2748 6206
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Link descriptions
2010-12-16 3:33 ` Thomas S. Dye
2010-12-16 5:18 ` Alan L Tyree
@ 2010-12-19 14:00 ` David Maus
2010-12-19 16:18 ` Thomas S. Dye
1 sibling, 1 reply; 6+ messages in thread
From: David Maus @ 2010-12-19 14:00 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: David Maus, emacs-orgmode ml
[-- Attachment #1.1: Type: text/plain, Size: 753 bytes --]
At Wed, 15 Dec 2010 17:33:38 -1000,
Thomas S. Dye wrote:
> Perhaps it has to do with footnotes? That's an org-mode environment
> with square brackets and, in some instances, a superscript number.
Yes, this was the problem: When preprocessing the buffer for LaTeX
export Org converted anything that looks like a numeric footnote into
a LaTeX-Footnote. I just pushed a fix to master that should take care
of the problem.
The implication of this modification is that you cannot place a
footnote right after a closed square bracket because the LaTeX
processing function from now on skips [\d+] if it character before is
a closed square bracket.
Best,
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Link descriptions
2010-12-19 14:00 ` David Maus
@ 2010-12-19 16:18 ` Thomas S. Dye
0 siblings, 0 replies; 6+ messages in thread
From: Thomas S. Dye @ 2010-12-19 16:18 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode ml
Aloha David,
Very nice. Thanks.
All the best,
Tom
On Dec 19, 2010, at 4:00 AM, David Maus wrote:
> At Wed, 15 Dec 2010 17:33:38 -1000,
> Thomas S. Dye wrote:
>> Perhaps it has to do with footnotes? That's an org-mode environment
>> with square brackets and, in some instances, a superscript number.
>
> Yes, this was the problem: When preprocessing the buffer for LaTeX
> export Org converted anything that looks like a numeric footnote into
> a LaTeX-Footnote. I just pushed a fix to master that should take care
> of the problem.
>
> The implication of this modification is that you cannot place a
> footnote right after a closed square bracket because the LaTeX
> processing function from now on skips [\d+] if it character before is
> a closed square bracket.
>
> Best,
> -- David
>
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-19 16:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 18:09 Link descriptions Thomas S. Dye
2010-12-15 19:34 ` David Maus
2010-12-16 3:33 ` Thomas S. Dye
2010-12-16 5:18 ` Alan L Tyree
2010-12-19 14:00 ` David Maus
2010-12-19 16:18 ` 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).