[-- Attachment #1: Type: text/plain, Size: 526 bytes --] Hi, When I try to insert a citation as the first item into a non-inline-definition footnote, org-ref-cite refuses to insert the citation returning in the minibuffer "Cannot insert citation here". The same problem does not occur if the footnote has an inline definition. As for non-inline-definition footnotes, if I copy the citation into the footnote, no problem occurs, either. The citation is also properly exported to LaTeX. Is this a problem of org-cite/org-mode in general or rather of org-ref-cite? Best regards, Elias [-- Attachment #2: Type: text/html, Size: 643 bytes --]
Elias - do you mean org-cite-insert won't allow this?
[fn:1] [cite:@doe2019].
If yes, I don't see that; it inserts fine.
I'm using bibtex-actions for the insert processor, but I don't think
that should make any difference, since it's org-cite that's handling
that.
On Sat, Sep 18, 2021 at 4:23 PM Elias Bounatirou
<elias.bounatirou@gmail.com> wrote:
>
> Hi,
> When I try to insert a citation as the first item into a non-inline-definition footnote, org-ref-cite refuses to insert the citation returning in the minibuffer "Cannot insert citation here". The same problem does not occur if the footnote has an inline definition. As for non-inline-definition footnotes, if I copy the citation into the footnote, no problem occurs, either. The citation is also properly exported to LaTeX.
> Is this a problem of org-cite/org-mode in general or rather of org-ref-cite?
>
> Best regards,
> Elias
[-- Attachment #1: Type: text/plain, Size: 1878 bytes --] I have looked at the problem that citations cannot be inserted as 1st items in footnotes once again more closely. It has become obvious for me that this is indeed a bug of org-cite or rather a default setting which was deliberately introduced, although it is not really user-friendly or practical to my mind. I modified the function org-cite--allowed-p in oc.el and inserted 'footnote-definition' in the following lines: ;; Paragraphs and blank lines at top of document are fine. ((memq type '(nil paragraph footnote-definition))) (I leave the comment in its original form to make the passage easier to identify.) 'footnote-definition' by the way does not appear anywhere in org-cite--allowed-p in its current form. After this I can easily insert footnotes as 1st items in citations, and I do not get Org's warning "Cannot insert citation here". Am Sa., 18. Sept. 2021 um 22:39 Uhr schrieb Bruce D'Arcus <bdarcus@gmail.com >: > Elias - do you mean org-cite-insert won't allow this? > > [fn:1] [cite:@doe2019]. > > If yes, I don't see that; it inserts fine. > > I'm using bibtex-actions for the insert processor, but I don't think > that should make any difference, since it's org-cite that's handling > that. > > On Sat, Sep 18, 2021 at 4:23 PM Elias Bounatirou > <elias.bounatirou@gmail.com> wrote: > > > > Hi, > > When I try to insert a citation as the first item into a > non-inline-definition footnote, org-ref-cite refuses to insert the citation > returning in the minibuffer "Cannot insert citation here". The same problem > does not occur if the footnote has an inline definition. As for > non-inline-definition footnotes, if I copy the citation into the footnote, > no problem occurs, either. The citation is also properly exported to LaTeX. > > Is this a problem of org-cite/org-mode in general or rather of > org-ref-cite? > > > > Best regards, > > Elias > [-- Attachment #2: Type: text/html, Size: 2485 bytes --]
Hello, Elias Bounatirou <elias.bounatirou@gmail.com> writes: > I have looked at the problem that citations cannot be inserted as 1st items > in footnotes once again more closely. It has become obvious for me that > this is indeed a bug of org-cite or rather a default setting which was > deliberately introduced, although it is not really user-friendly or > practical to my mind. This is not intentional. > I modified the function org-cite--allowed-p in oc.el and inserted > 'footnote-definition' in the following lines: > > ;; Paragraphs and blank lines at top of document are fine. > ((memq type '(nil paragraph footnote-definition))) This allows one to insert a citation in the middle of the citation number, which is not desirable either. IOW, an additional check is required. Regards, -- Nicolas Goaziou
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> This allows one to insert a citation in the middle of the citation
> number, which is not desirable either. IOW, an additional check is
> required.
I think this is now fixed. Thank you.
Regards,
--
Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 471 bytes --] Great, thanks! I can confirm it works now. Once again thank you very much. Best regards, Elias Am Mi., 6. Okt. 2021 um 14:44 Uhr schrieb Nicolas Goaziou < mail@nicolasgoaziou.fr>: > Nicolas Goaziou <mail@nicolasgoaziou.fr> writes: > > > This allows one to insert a citation in the middle of the citation > > number, which is not desirable either. IOW, an additional check is > > required. > > I think this is now fixed. Thank you. > > Regards, > -- > Nicolas Goaziou > [-- Attachment #2: Type: text/html, Size: 898 bytes --]
Hi Nicolas,
Nicolas Goaziou writes:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> This allows one to insert a citation in the middle of the citation
>> number, which is not desirable either. IOW, an additional check is
>> required.
>
> I think this is now fixed. Thank you.
It looks like this commit introduced a test failure. Starting with
7d22dca54 (oc: Fix citations in footnotes when using biblatex back-end,
2021-10-06), test-org-cite/list-citations fails on my end (Emacs 27.2):
--8<---------------cut here---------------start------------->8---
Test test-org-cite/list-citations condition:
(ert-test-failed
((should
(equal '...
(org-test-with-parsed-data "Text[fn:1]
[fn:1] [fn:2][cite:@a]
[fn:2] [cite:@b]" ...)))
:form
(equal
("b" "a")
("a"))
:value nil :explanation
(proper-lists-of-different-length 2 1
("b" "a")
("a")
first-mismatch-at 0)))
FAILED 1/1 test-org-cite/list-citations (0.015186 sec)
--8<---------------cut here---------------end--------------->8---
Hello,
Kyle Meyer <kyle@kyleam.com> writes:
> It looks like this commit introduced a test failure.
Fixed. Thank you.
Regards,
--
Nicolas Goaziou