public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: <denis.maier-NSENcxR/0n0@public.gmane.org>
To: <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: AW: Separating multiple citations in generated footnote
Date: Wed, 1 Jun 2022 18:43:07 +0000	[thread overview]
Message-ID: <36da7f02eb3849a199bfacf91d9c55a1@unibe.ch> (raw)
In-Reply-To: <d07b4bcd-8431-4fff-8b61-4d482ae382bcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 4038 bytes --]

Hi everyone,

that’s all really interesting stuff here. Would it make sense to collect ideas for additional citation support somewhere?

Best,
Denis

Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Im Auftrag von jcr
Gesendet: Mittwoch, 1. Juni 2022 19:37
An: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Betreff: Re: Separating multiple citations in generated footnote

Thanks for pointing out the addition of `pandoc.utils.references`. It's definitely useful. I'll have to look into it the next time I want to do something special with citations.

I have twice wanted to be able to distinguish individual citations in `Cite`'s inlines. Once was for the purpose of spell checking. When I cite sources in multiple languages, I need multi-lingual spell checking. So, in addition to the document that I will submit, I make ODT with the languages tagged so that I can spell check in LibreOffice. To spell check the citations, they need to be appropriately tagged. Because each bibliography entry has an ID derived from its bibliography key, I can identify them and give them an appropriate `lang` attribute. But in footnotes, it's not clear where one citation ends and the next begins, so I can't add a lang attribute in general. Even if there's just one citation, it could have a prefix or suffix in the document language. For this, perhaps I could use `pandoc.utils.references`, tag the principal parts of the citation with the reference's language, and save the resulting references in the `Pandoc` element for citeproc.

The second application was for a journal that uses idem instead of repeating author names. When I decided that an automatic solution was not practical, I solved the problem manually for the few citations that needed idem. For this, I would need too be able to identify not only individual citations, but also the author part of the citation. However, knowing my CSL style, I could assume that the author is the first element in the citation proper (after the prefix), or the series of elements that ends with `SmallCaps`.
On Monday, May 30, 2022 at 3:35:06 PM UTC+2 Albert Krewinkel wrote:

Shane Liesegang <lies...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> What would be truly ideal would be the ability to filter the
> citation process itself, but I'm assuming since that's from a
> different library that it is not exposed to Lua? Like I said, I
> have something mostly working now, but any thoughts/advice would
> be appreciated.

The closest thing is probably the `pandoc.utils.references`
function (added in pandoc 2.17). It gives you access to the
structured reference entries. Theoretically one could write a
custom citation handler by using that function and filtering
`Cite` elements; it might or might not be worth the effort in your
case.

HTH,

Albert


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d07b4bcd-8431-4fff-8b61-4d482ae382bcn%40googlegroups.com<https://groups.google.com/d/msgid/pandoc-discuss/d07b4bcd-8431-4fff-8b61-4d482ae382bcn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/36da7f02eb3849a199bfacf91d9c55a1%40unibe.ch.

[-- Attachment #2: Type: text/html, Size: 7605 bytes --]

      parent reply	other threads:[~2022-06-01 18:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30  7:06 Shane Liesegang
     [not found] ` <baf8fe27-c662-4825-981d-b49fb7b38d71n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-30  8:14   ` AW: " denis.maier-NSENcxR/0n0
     [not found]     ` <8ed092b504f248fa984c4284113f68ff-NSENcxR/0n0@public.gmane.org>
2022-05-30 13:42       ` Shane Liesegang
     [not found]         ` <CAD7-qeusumC9zcpbCGbjevJ6J9Vdi4W8YJyTjiTmbR_yk5+mrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-31  7:24           ` AW: " denis.maier-NSENcxR/0n0
     [not found]             ` <873d53586f8b4f968ac667b38da1796c-NSENcxR/0n0@public.gmane.org>
2022-05-31  8:29               ` Shane Liesegang
     [not found]                 ` <25193173-1E8E-4A2B-81C2-9AB3BBE6DC12-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-05-31  8:59                   ` Bastien DUMONT
2022-05-31 11:34                     ` BPJ
     [not found]                       ` <CADAJKhDwb6p9DxUrN-d5Rja6q6cteESc5MBRZBZwkh8dx5UwEw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-31 11:43                         ` BPJ
     [not found]                           ` <CADAJKhCNRMrBE5erg3N2_vj-Y+W3=r-nwjDexzh89TnHTDrC4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-31 12:33                             ` Bastien DUMONT
2022-05-30 13:26   ` Albert Krewinkel
     [not found]     ` <87wne3cfem.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-05-31  7:08       ` Shane Liesegang
2022-06-01 17:36       ` jcr
     [not found]         ` <d07b4bcd-8431-4fff-8b61-4d482ae382bcn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-06-01 18:43           ` denis.maier-NSENcxR/0n0 [this message]

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=36da7f02eb3849a199bfacf91d9c55a1@unibe.ch \
    --to=denis.maier-nsencxr/0n0@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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.
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 NNTP newsgroup(s).