From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30649 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.text.pandoc Subject: AW: Separating multiple citations in generated footnote Date: Wed, 1 Jun 2022 18:43:07 +0000 Message-ID: <36da7f02eb3849a199bfacf91d9c55a1@unibe.ch> References: <87wne3cfem.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_36da7f02eb3849a199bfacf91d9c55a1unibech_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34362"; mail-complaints-to="usenet@ciao.gmane.io" To: Original-X-From: pandoc-discuss+bncBCZ27W53TUFBBPXG32KAMGQE5QUO7VQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 01 20:43:16 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f62.google.com ([209.85.167.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nwTJL-0008c5-6o for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 01 Jun 2022 20:43:15 +0200 Original-Received: by mail-lf1-f62.google.com with SMTP id j4-20020a056512398400b0047866b0b823sf1302891lfu.19 for ; Wed, 01 Jun 2022 11:43:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654108994; cv=pass; d=google.com; s=arc-20160816; b=MK1zLJhGoKUkmWlEdFb2KRHy1ONfC2f5MRos8P00O7s9JZWBOH8tWXVqXOgYcl+ohH QWUTDkO9d+SjDRrFW3eoVgaxES7V7Q90ci6lcJTJ7v0wFQuewdVW53QwZNfLH7MKiAha f0iMwOOYFGXPY/3sEbhHA4zFyuDAaFPINEQMOGoM40CZ42DQmCfJ5xlMetE2QAs1qDRu oj6/EhkSmFZy2hdgq6NW9CGTFupIGdLZAxeO6oaMrfxPhp23ujm4OPHY7KY2SnVjx7oq 16OE8Wv5lGZjSVdTyjxbCxePCTvT2xVeJgvuOrqhiNDmCf9//+RgVV1cBYeOQc5pBvrD a84g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:sender :dkim-signature; bh=O01yzJJr2HBxU/DmE6xmmsG9YHCCuCP3fAPTe3VkWLU=; b=MFT4vwYvzKAKqdfWgm+wLtSATgwYWTcVjec3iCRg1i/3K3l6QN/0X94F6Tak54XKDe LkRUJzBUf60csT6Th6vBGKQKDXHsEKTrLcNOsF2Ijc863p0lDBm5Y1UcsBYt7Me6WoEY RvTkn+p8LEik0Qe8rlZ6bvDAjHmRlBzVFcUoaLCbWbAbj9z3JMou8JrZJYvGXVnSHiOb qkQ0QjQq44YYzZVX4Fr0H/cixpfgwpd/mZrX7krAg19q/QdlvkZb3ME8e4ZLDdUhjYFb C+ZPTT25rHKXqN/CDxmCSKSY910GglpdH5F+ZUo3SQ8dMuZ9ylA6cyit0LhKkVZPgcvn JClA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:thread-topic:thread-index:date:message-id :references:in-reply-to:accept-language:content-language :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=O01yzJJr2HBxU/DmE6xmmsG9YHCCuCP3fAPTe3VkWLU=; b=RE9cC1kO3+FzA7HfUNtY+v0pPHfCj7/7n/ioGAiOD5R26Unc1fNqR5yCgwPGxiGckz xjqYMxgxJ7m828Whqg2S4xELChpIgjmTEjDTJUTYB4xfV0/TzaSQ6ptGd5ZB7CqVyIXL gw6M7PWb1k62cvdPNcdXwG717pPBgrZBZjA2DwFxKddLFJn7YDb8XkLXurSIAkDMF3HL DIFp5xB26QJXpvinp0AO83mK19xSttGMmuvbN3mspSW00D5U6g7ilMX9aHf5v/1aExsy bOngMGyS+37rPHNxQ6nAj5S6mX56pE1OYwwJecC+QWL4yd8+BVMz4OjX+xRFpKplFCyb CTsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:thread-topic:thread-index :date:message-id:references:in-reply-to:accept-language :content-language:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=O01yzJJr2HBxU/DmE6xmmsG9YHCCuCP3fAPTe3VkWLU=; b=osDAqy/C0vauYMUhdEAGMFpWpGrul/zhs4+mO7OdZXEnfHbN1wibjMFv56Z+PLAX9j gKvZAhcZ/bH/rqTChjPDPWJrGeMTPn7A1YibvTF6RvzfHd8mMtQEEs5yjiWQdZz0RY1G Nm1hXpMTSEC+BaRgQv0Zbd0x+KfaWI9jVZoXLHBUK2syn3tNjIOYLgfYO+7pSY0qNY8w XSL6lr6Qeu0qhkaTwtwIhclwuZFruZyDD0hJGVrQqwNdetzwwfWZdC1/iWf9q8zlruYi bneg6nBGvoAbHMYTv6CSObuH/vli3CC Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530ZEZ3+O1Z4SriN0LpXzBFvqOTEYmguIOGRtIBiW69j6nnNCVnh ZHBYs1WepBHYvB4pD2YXdrg= X-Google-Smtp-Source: ABdhPJy8A8RP70tnxFYat/7otpzwELlbc7UUAX36iGaruwHr4DF0MTSRwWtNsp+3kBEza49Gr1m3+w== X-Received: by 2002:a05:651c:902:b0:253:db4b:8f34 with SMTP id e2-20020a05651c090200b00253db4b8f34mr36351338ljq.46.1654108994508; Wed, 01 Jun 2022 11:43:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3f16:b0:449:f5bf:6f6a with SMTP id y22-20020a0565123f1600b00449f5bf6f6als2536022lfa.2.gmail; Wed, 01 Jun 2022 11:43:09 -0700 (PDT) X-Received: by 2002:a05:6512:3fa9:b0:478:6364:a23 with SMTP id x41-20020a0565123fa900b0047863640a23mr38770957lfa.509.1654108989779; Wed, 01 Jun 2022 11:43:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654108989; cv=none; d=google.com; s=arc-20160816; b=js9ohGswnZDmF96YkDsoqY5T+fEEe+7F+zp07zeGxjiDPu6wRvcLUqeD5olnp1Tloj cpAZnrrxAUw1eJsCLFldWlZymAo8m0z6PhGmz1Ctya0CJnWxVEj7hb78z3JbU/OCQ+Y0 jYfHhIGW9a158EM4JqMq5DdUCa/9pA8wXtBrLqpRoyqG74So9n7BptRqFaS4kUEj6tER i7rhfDXv0Tar9jY1dc38Z0Bld+s+Q0lUPHvSILa5WeaawjHhcO6KTrV1i20j/ibfw6/3 y4Q4ikJ9BwDXteqXwY+fXixXTPJSgctsp3XGsiG/DdwqBHCX9u/cj8sfbuOfJCBmsxFc t6fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:to :from; bh=+gQZI5smHuHoe07aQOrRgC51A/oc/kv4+JH4CHj3bQ8=; b=QDKU6+0Uv55x/7Q8bx8cBQnD+nMK+wAj17QbrBRJprO47GiV/hDWw7eoVxQSnwpBIm 9tc9Bp5N+uZ1lT6IoHn4YQkGztflog3Jo7lMpFc07UEyc+qJ6Az+FahvaE3chLuKjCKB Kaf/Aba6PNN6Wo0zd316K31Ih3G/DbS9I9aKpNv59RjF4iyEVd0sjfbXpZHdPFJVJpEA PcEOOi08g1QNzT4M0CTRVkJ//8UTTEVzKXVUmJHymvRn+8kIA0fWjzZL573ADdjAmehc FACghSWn37D5j9EkBQIiTibE+1tvQEF4PWPJ85VOBw/tJywhqvoZ9D5bLBb1dW8FAOW1 H5cw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Original-Received: from mailhub-lb1.unibe.ch (mailhub-lb1.unibe.ch. [130.92.0.82]) by gmr-mx.google.com with ESMTPS id k16-20020a0565123d9000b0047878a17143si124680lfv.8.2022.06.01.11.43.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 11:43:09 -0700 (PDT) Received-SPF: pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) client-ip=130.92.0.82; X-Virus-Scanned: By University of Bern - MGW Original-Received: from mail.campus.unibe.ch (aai-edge-04.campus.unibe.ch [130.92.13.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailhub-lb1.unibe.ch (Postfix) with ESMTPS id 2A3955000A1 for ; Wed, 1 Jun 2022 20:43:08 +0200 (CEST) Thread-Topic: Separating multiple citations in generated footnote Thread-Index: AQHYc/PWVfFIWp9Q702YM9tXjaObxa03SFYAgANqjQCAADN2UA== In-Reply-To: Accept-Language: de-CH, en-US Content-Language: de-DE x-originating-ip: [130.92.13.161] X-Original-Sender: denis.maier-NSENcxR/0n0@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of denis.maier-NSENcxR/0n0@public.gmane.org designates 130.92.0.82 as permitted sender) smtp.mailfrom=denis.maier-NSENcxR/0n0@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=unibe.ch Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:30649 Archived-At: --_000_36da7f02eb3849a199bfacf91d9c55a1unibech_ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi everyone, that=E2=80=99s all really interesting stuff here. Would it make sense to co= llect ideas for additional citation support somewhere? Best, Denis Von: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Im A= uftrag von jcr Gesendet: Mittwoch, 1. Juni 2022 19:37 An: pandoc-discuss Betreff: Re: Separating multiple citations in generated footnote Thanks for pointing out the addition of `pandoc.utils.references`. It's def= initely useful. I'll have to look into it the next time I want to do someth= ing 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 source= s in multiple languages, I need multi-lingual spell checking. So, in additi= on 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, th= ey 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 ci= tation 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 th= e document language. For this, perhaps I could use `pandoc.utils.references= `, tag the principal parts of the citation with the reference's language, a= nd save the resulting references in the `Pandoc` element for citeproc. The second application was for a journal that uses idem instead of repeatin= g 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 (a= fter 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 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 e= mail to 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. --=20 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 e= mail 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. --_000_36da7f02eb3849a199bfacf91d9c55a1unibech_ Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi everyo= ne,

&nbs= p;

that=E2= =80=99s all really interesting stuff here. Would it m= ake 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.util= s.references`. It's definitely useful. I'll have to look into it the next t= ime I want to do something special with citations.

 

I have twice wanted to be able to distinguish indivi= dual citations in `Cite`'s inlines. Once was for the purpose of spell check= ing. 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 spe= ll check in LibreOffice. To spell check the citations, they need to be appr= opriately tagged. Because each bibliography entry has an ID derived from it= s 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 la= ng 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 th= e resulting references in the `Pandoc` element for citeproc.

 

The second application was for a journal that uses i= dem instead of repeating author names. When I decided that an automatic sol= ution was not practical, I solved the problem manually for the few citation= s that needed idem. For this, I would need too be able to identify not only individual citations, but also the a= uthor part of the citation. However, knowing my CSL style, I could assume t= hat the author is the first element in the citation proper (after the prefi= x), or the series of elements that ends with `SmallCaps`.

On Monday, May 30, 2022 at 3:35:06 PM UTC+2 Albe= rt Krewinkel wrote:


Shane Liesegang <lies...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org&g= t; 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 &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-d= iscuss+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-4d= 482ae382bcn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc= -discuss/36da7f02eb3849a199bfacf91d9c55a1%40unibe.ch.
--_000_36da7f02eb3849a199bfacf91d9c55a1unibech_--