From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30630 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Shane Liesegang Newsgroups: gmane.text.pandoc Subject: Separating multiple citations in generated footnote Date: Mon, 30 May 2022 00:06:45 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1322_2040338679.1653894405286" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13922"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC2OTJELV4GRBBW22GKAMGQEOH5TUFY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon May 30 09:06:49 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f55.google.com ([209.85.160.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nvZUH-0003VQ-QF for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 30 May 2022 09:06:49 +0200 Original-Received: by mail-oa1-f55.google.com with SMTP id 586e51a60fabf-f2d208a614sf6860261fac.1 for ; Mon, 30 May 2022 00:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=CUFr/si52mGglKlmyaKkAqQXZWFAq7AtjYWJa6yAQqM=; b=dM64MNYU6meDz83y6RzyRyxVkLQNdmabwJ4h4D6lXYUhab/WPaYxgh9BpRhZSDDpG+ /WNqrCuieDMTuMI1qNtiWX4c5m98OTgXQc1V8NdY1fqmHpQOlp3HJGDCY3TYt1jv/kJo zDvCte+SP/Zr/x2JSUxryfxu7Mm+NQlm4FhH5YTlDgxVcFgAURr1PvMRgPDfotkF84Kk 0XEk3BLthJzt8lZ52QV6ln9fqgyAPlu2QAd5r3rRhfGenhwpvlFsgFhjS49ZHELpdOK4 TpS8AbpvVvMxyw29lMBWMWLdkAC8PbK86yAlxJjeAO3/fAV1Rc4aKBe18h35d82FeI9c YgYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=CUFr/si52mGglKlmyaKkAqQXZWFAq7AtjYWJa6yAQqM=; b=BEra+Q3p/xNJ7JOFLT/ADyO0fsY2hPV+YzujznuSYXJIA3n+SwVZCESfegohOawbWB FqCeeCVLeXOXSgJiIGoYzuROIRosj5MEoRymcMXKA78atOQZk9R7rUxmNT0xuBYXtY+N 2KTTm9q3eNARq5WxX0FzXQmIo/uQmSBXjAVpg0V0f90ScJK4HpdrnHH4hiGdflZ4ip3Q ji8wAoS/C5hr3ROALoFLdUlP62k+vJPhrxQCZai9BHqGl4Xd9JGs7vaPjySx7MdfZmsE JhIS/v5X/l4r6cZPIkmfOnhfZviZEC2LFn2Cx8pjNs92VjwvZofhb+juF6kmSWY3lDTu rO9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CUFr/si52mGglKlmyaKkAqQXZWFAq7AtjYWJa6yAQqM=; b=2oUuMu0Th/CKloQtRZZumuuEK/j2v1vx6hWA+J8V69xcYBYspQ9+T0MszBdNWqC9eT y80qneARRFiZixQ7LUSr4GC62wwV1PjVrxBW/JNXE8nVIPHcomq/vjVTkbcnItieIOFt 2JMapX/yhhfWnAteOgemVe9yaxAq1HDibZ6puWCzI2tqvdyqGGsRNZawH0TPVF6hvBG6 9s938N504O8L/5fMyjZQkclZ54CWuficlwxv4q5gOrwbd0y7BF42wTI/xs3h/rucnn7e q3N2K3PIe3gWseMGDKPsWPmDTb5v3Mg1DtJKd2IEHCshZbar2dIzUHvWL3vfqAPPxOr7 IBig== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531vU7K4SzOhYIOlnumQxIyeQajdyp5zuZL/rWJqupev53xBxdn2 z1f2Rm0xb7QVWyQcFyS4XPA= X-Google-Smtp-Source: ABdhPJxxlevgIZ+B4MdHLWGmurPD0mD5G78EhgA6KvOcnjV1hXKdWuXCfe9KDtEIZaLvZnlNRO1kjA== X-Received: by 2002:a05:6870:649f:b0:f3:13b1:52ce with SMTP id cz31-20020a056870649f00b000f313b152cemr4520093oab.78.1653894408745; Mon, 30 May 2022 00:06:48 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:15a4:b0:32b:1a5d:cb2d with SMTP id t36-20020a05680815a400b0032b1a5dcb2dls9388354oiw.7.gmail; Mon, 30 May 2022 00:06:46 -0700 (PDT) X-Received: by 2002:a05:6808:2125:b0:32b:1ba0:8b05 with SMTP id r37-20020a056808212500b0032b1ba08b05mr9003920oiw.20.1653894405896; Mon, 30 May 2022 00:06:45 -0700 (PDT) X-Original-Sender: liesegang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:30630 Archived-At: ------=_Part_1322_2040338679.1653894405286 Content-Type: multipart/alternative; boundary="----=_Part_1323_1959223283.1653894405286" ------=_Part_1323_1959223283.1653894405286 Content-Type: text/plain; charset="UTF-8" My institution has a few specific citation style requirements that stray from the standard Chicago Style. The changes are mostly around specific works, so it's difficult-to-impossible to meet the requirements by making a new CSL. For the most part I'm able to handle it with Lua filters. I intercept the citation reference both before and after --citeproc runs and make whatever changes I need to; this might entail changing the style to SuppressAuthor, making some capitalization/punctuation changes, etc. In general this works well, but where it gets difficult is if a single Cite element contains multiple citations. In that case, looking at the generated footnote, there's no hard indicator of which portion came from which citation. I've got something working based on scanning for semicolons, but I worry that's a little bit fragile and will probably break on certain sets of reference data. Is there any good way of mapping portions of the footnote to citation keys? I was thinking to wrap them in a span with some custom metadata, but I can only see the citations either before --citeproc (when the footnote doesn't exist yet) or after (when the multiple citations have already combined). 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. -- 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/baf8fe27-c662-4825-981d-b49fb7b38d71n%40googlegroups.com. ------=_Part_1323_1959223283.1653894405286 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable My institution has a few specific citation style requirements that stray fr= om the standard Chicago Style. The changes are mostly around specific works= , so it's difficult-to-impossible to meet the requirements by making a new = CSL.

For the most part I'm able to handle it with Lua filters. I in= tercept the citation reference both before and after --citeproc runs and ma= ke whatever changes I need to; this might entail changing the style to Supp= ressAuthor, making some capitalization/punctuation changes, etc. In general= this works well, but where it gets difficult is if a single Cite element c= ontains multiple citations. In that case, looking at the generated footnote= , there's no hard indicator of which portion came from which citation. I've= got something working based on scanning for semicolons, but I worry that's= a little bit fragile and will probably break on certain sets of reference = data.

Is there any good way of mapping portions of the footnote to = citation keys? I was thinking to wrap them in a span with some custom metad= ata, but I can only see the citations either before --citeproc (when the fo= otnote doesn't exist yet) or after (when the multiple citations have alread= y combined). What would be truly ideal would be the ability to filter the c= itation process itself, but I'm assuming since that's from a different libr= ary that it is not exposed to Lua?

Like I said, I have something mos= tly working now, but any thoughts/advice would be appreciated.

--
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/baf8fe27-c662-4825-981d-b49fb7b38d71n%40googlegroups.= com.
------=_Part_1323_1959223283.1653894405286-- ------=_Part_1322_2040338679.1653894405286--