[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wip-cite status question and feedback
From: |
Nicolas Goaziou |
Subject: |
Re: wip-cite status question and feedback |
Date: |
Fri, 23 Apr 2021 13:49:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> "Bruce D'Arcus" <bdarcus@gmail.com> writes:
>
>> In general (conceptually), if you have one footnote in text, and one
>> in a footnote, with a note style, both will be rendered as footnotes.
>>
>> So in an adapted version from earlier:
>>
>> ----
>> Text 1 [@cite:@a].
>> Text 2[fn:1].
>>
>> [fn:1] This is [cite:@b].
>> ----
>>
>> Output would put both citations in respective footnotes.
>
> So it would produce the same output as
>
> ---
> Text 1 [fn::[@cite:@a]].
> Text 2[fn:1].
>
> [fn:1] This is [cite:@b].
> ---
>
> ?
>
> If that's correct, this requires a specific tool in "oc.el", for example
>
> (defun org-cite-wrap-footnote (citation)
> "Wrap CITATION object within an anonymous footnote."
> ...)
>
> which can be used upon "exporting" the footnote, after having done
> appropriate checks.
I went ahead and implemented `org-cite-wrap-citation' function in
"oc.el" (from wip-cite-new branch). Here's a quick demo.
--8<---------------cut here---------------start------------->8---
(defun ngz-cite-demo-export-citation (citation &rest _)
(unless (org-cite-inside-footnote-p citation)
(org-cite-wrap-citation citation))
"(Doe, 1999)")
(org-cite-register-processor 'demo
:export-citation #'ngz-cite-demo-export-citation)
--8<---------------cut here---------------end--------------->8---
When I export the following document to ASCII
--8<---------------cut here---------------start------------->8---
#+cite_export: demo
Regular footnote[fn:1].
Reference outside footnote: [cite:@key]
Footnote with a reference[fn:2].
[fn:1] Definition 1
[fn:2] Reference [cite:@key].
--8<---------------cut here---------------end--------------->8---
I get
--8<---------------cut here---------------start------------->8---
Regular footnote[1].
Reference outside footnote: [2]
Footnote with a reference[3].
Footnotes
─────────
[1] Definition 1
[2] (Doe, 1999)
[3] Reference (Doe, 1999).
--8<---------------cut here---------------end--------------->8---
Regards,
--
Nicolas Goaziou
- Re: wip-cite status question and feedback, (continued)
- Re: wip-cite status question and feedback, John Kitchin, 2021/04/21
- Re: wip-cite status question and feedback, John Kitchin, 2021/04/21
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/21
- Re: wip-cite status question and feedback, Timothy, 2021/04/21
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/22
- Re: wip-cite status question and feedback, Timothy, 2021/04/22
- Re: wip-cite status question and feedback, András Simonyi, 2021/04/21
- Re: wip-cite status question and feedback, Nicolas Goaziou, 2021/04/21
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/21
- Re: wip-cite status question and feedback, Nicolas Goaziou, 2021/04/21
- Re: wip-cite status question and feedback,
Nicolas Goaziou <=
- Re: wip-cite status question and feedback, András Simonyi, 2021/04/23
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/23
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/23
- Re: wip-cite status question and feedback, András Simonyi, 2021/04/23
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/23
- Re: wip-cite status question and feedback, M . ‘quintus’ Gülker, 2021/04/24
- Re: wip-cite status question and feedback, Nicolas Goaziou, 2021/04/24
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/24
- Re: wip-cite status question and feedback, Bruce D'Arcus, 2021/04/26
- Re: wip-cite status question and feedback, Denis Maier, 2021/04/26