From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33511 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: citeproc hack for multilingual citations? Date: Tue, 12 Dec 2023 06:43:25 +0000 Message-ID: References: <8fd3ff8c-44e7-4abe-9c65-38fb5debbb3dn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9021"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBFEC4CVQMGQEE3Y7SSY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Dec 12 07:43:36 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-qv1-f61.google.com ([209.85.219.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1rCwUS-0002Bb-LV for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 12 Dec 2023 07:43:36 +0100 Original-Received: by mail-qv1-f61.google.com with SMTP id 6a1803df08f44-67eee3fbeb1sf247786d6.2 for ; Mon, 11 Dec 2023 22:43:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702363415; cv=pass; d=google.com; s=arc-20160816; b=y2P92WB/FMUrqkzJ32tzwSra7TgygPe3yHmdzTNxyEdwdMe/1t4zYQmRDAC7ySblB2 9nz0LevAMKhFbNjM+mycQrZafSlfdZucs3FD/wrFzFvDE7mi8yvQvFNwjFdN7oHtIhj5 qIwOSKfKX/RU1MNNJbWumZYbkMuHfni1NH3IL3ak3QCI+CkKlUQqo9EQLZ4u8++RKl18 q8+s7ZJuvjDlSpUipaRWR9PG1HFYWBxjt6FStechuxFohhwdLlUfCj2JqeTs3dsNYNxT 7rrzJsEpe4HCWvFV9kGc5fdFd8Hp3o9/MJAn0ey1VjbjYZ8k4Q8H0SThmrK3W5vL33Pc eM+A== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=wfYwAT8FhYyfCigHQ+R33rd15Z6FFc4RuUsASvUwqC0=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=wL+FIIhNsH7OE5cpwNXB/zGkK3I/7gCveDbTWh/MLWtdmUWJbRj3fU9eqzk3HfonbF FAQVKUUnXe6yi1ga/+0VNJ1iP00p8vwMAL3R34oDCg6lclpVB1w4aN19TaaZLJWD1s9A ydnu3KIF9SNoyISvhDU03wLHJdRBERbr59IW+n4/JUbCD7QVC3WBpAXk6xpi/QihfpCM u+ms/CKNk2TkojkWrREmz+f9Xn3A83J9xZQtDZ17GwjnwDQjq0mOVdoYVE7jkVAANzBy 08+qQCEXzJwi3dtK1K7S6bKRBI4x1fflk/5L2DZu3ZjPKm0suxa5+OLb86sT+73JcqTv OphA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=O7AQJnk+; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1702363415; x=1702968215; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=wfYwAT8FhYyfCigHQ+R33rd15Z6FFc4RuUsASvUwqC0=; b=sNFTDJQa4S04d9OoP2+62FSyfwIZncdetMJxDvLjZj7rdcl5SVGOjCbtfa9ZS1M4Xl In4Cy5lHE/5R4ae6Bp17bIlXTD1qQajKEOzdfhFec1eeda4xMVJv15OPqTRLhqUc54Qn 9Ylu4UjDH8/BPnd0+H3A/ujzhKQY8ZaXkqFcSVELCdsDV4IekeLsqkUe9gWVrVT0MVF6 2zY6+U5m8TMERTwVKkyfl/FOSbxv4xFD8mCILS9u6z8Jte+e12YAWkYrhdNKP1vcW8jH X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702363415; x=1702968215; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=wfYwAT8FhYyfCigHQ+R33rd15Z6FFc4RuUsASvUwqC0=; b=Zky5OWvoBnoJfDnV0NHSvQ+OLFqslIIiy1oXgPO4jbHjs2qW0BtymjnJ/Z+8rVD4bf NObTyvXQioUHvrsIBBRQ9MwWC5i/SjxIbMckT//lekd8Zo5DJq67iCw531V9+y/yjFSr lu3V20oBeb9MKUesf0D2WoDLh5SzSh2n2jJ4XVMZNDabknpxMA2FxEgAoT3oOlQVhJo9 Pzq0SY+vyysuKehsKLLxeVt9S9pg Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YyhYJdqW8cAFtBZMDink9oh9wRjfuxkSYCRCa1WC3Wmyifg0HlJ Ar+vGM8Jx/yL1qLofmGfMQg= X-Google-Smtp-Source: AGHT+IHExp3IYnz8wD1nV3v2EwamkSYkVz1K9xya9Qb9eHFEVyuB8A2mgf2mFSoO2V4/OOsBaeef3Q== X-Received: by 2002:a05:6214:141b:b0:67a:a721:caed with SMTP id pr27-20020a056214141b00b0067aa721caedmr5488132qvb.78.1702363415659; Mon, 11 Dec 2023 22:43:35 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:ad4:4f10:0:b0:67a:4cc:6765 with SMTP id fb16-20020ad44f10000000b0067a04cc6765ls3663036qvb.2.-pod-prod-05-us; Mon, 11 Dec 2023 22:43:32 -0800 (PST) X-Received: by 2002:a0c:c485:0:b0:67a:a35c:ba4a with SMTP id u5-20020a0cc485000000b0067aa35cba4amr4966191qvi.21.1702363412028; Mon, 11 Dec 2023 22:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702363412; cv=none; d=google.com; s=arc-20160816; b=WAhlJPGJiPXnurBE7jWE3ULpODrzxbRuYZ8jzu1qfZU8f//4dNxX768bo0KqQM55N2 /pbx0ScUoo763dAHjXNd9XbOpI+uil5aiX0Y2IyrjBubtKMcaJho/I8CUZBtYvnGtvqZ HtXOu8pea0GabW9dc51sli7pHU0pw+/qqroLlPmEqDOC9uVwVrK9wjgf6o571l6+RYpF +FYxsB2aeTmu3NVrKZqIc3dGsQqgAsOMDH4q594RBdR6eFIaea7aRqFTHWzY7UEbKhQf cVu9sRlBi7kvXEP+Egl+5F1xVmzV7CUlH8VLBfbWxWMnKCCHMWwZ8zrcSAYooUJfX8WH JgAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=7eClezQnVUMzWSU4eJfWK4tRz0aFJAG/Iuj9ndwh+D0=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=TrU+DKVGFFy/cifB+0dYkPO84uAgEtIO/TtHNigFBapqp7YdGikBtmtY3FVYLYRHfy JsvzXzCe3pRlGQnQ7S2EIku0H6cLYfXrPHG5pCpsSQgZHob38XcEh5cHf513b5eXfDzP zxiATmmrY4Ld8IbnrCwMuMhSFq6KIqgQCBXsJV1W8xhIneOZEvxYvA7zp8z/2tN4sElD lOWNYedtR6GFgULsRAE5z9VxwaVFClDYlvewyn9M9WYbcSDWFv/rzZQUe2DXFuj4i9qT iUJeYPEOOFnWGK8H+k6pn/t+nEbWsioXjF8LBLVB2BdXyTwDqp9NrubSihGIo9Kf5Yeu WfXg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=O7AQJnk+; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id n6-20020a0cec46000000b0067abc7d2c36si873049qvq.0.2023.12.11.22.43.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 22:43:32 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BFA02240027 for ; Tue, 12 Dec 2023 07:43:30 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sq8Ft3HWMz6twJ for ; Tue, 12 Dec 2023 07:43:30 +0100 (CET) Content-Disposition: inline In-Reply-To: <8fd3ff8c-44e7-4abe-9c65-38fb5debbb3dn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=O7AQJnk+; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:33511 Archived-At: I don't understand why it should be a Pandoc issue. I can't help you for th= e HTML/CSS part, but I think that you can achieve what you want by modifyin= g your CSL stylesheet only. For the author, you use a custom variable in the "note" field specifying th= e author name as a literal string ("=C5=8Ctani Y=C5=ABka") and use this var= iable (as a regular string variable, not a name) in the stylesheet for the = bibliography. You will have to change the sorting rule to take account of t= his new variable. When you use a variable in the "note" field, don't use "note", use the name= of the variable. In your sample: Le Monday 11 December 2023 =C3=A0 05:48:36PM, Thomas Newhall a =C3=A9crit : > Hello everyone, >=20 > I'm trying to use pandoc's citeproc to render multilingual citations, sav= ed in > zotero, and automatically exported to CSL JSON. I wrote about this issue = on > the=C2=A0[1]Zotero forum=C2=A0earlier today, but was told this was "more = of a Pandoc > issue". I see there are also similar threads on this forum=C2=A0[2]here,= =C2=A0[3]here, > and=C2=A0[4]here, but I couldn't determine whether the solutions provided= would work > for me. >=20 > I know there are some limitations to citeproc (that may be getting addres= sed > with the [5]citeproc-rs project), but I am trying to figure out the best > workaround that still maintains a markdown-based workflow. I think I almo= st > have it as I need them, but there's a few issues still: >=20 > Right now, my html output renders like this: >=20 > Inline citation: (=C5=8Ctani 2016) >=20 > Bibliography: > =C5=8Ctani, Y=C5=ABka =E5=A4=A7=E8=B0=B7=E7=94=B1=E9=A6=99. 2016. =E2=80= =9C(Ronbun) Niss=C5=8Ds=C5=8D Shunj=C5=8D wo hattan toshita niss=C5=8Dkan > =E2=80=98Ensh=C5=AB kaitai=E2=80=99 rons=C5=8D=EF=BC=BB=E8=AB=96=E6=96=87= =EF=BC=BD=E5=85=A5=E5=AE=8B=E5=83=A7=E4=BF=8A=E8=8A=BF=E3=82=92=E7=99=BA=E7= =AB=AF=E3=81=A8=E3=81=97=E3=81=9F=E6=97=A5=E5=AE=8B=E9=96=93=E3=80=8C=E5=86= =86=E5=AE=97=E6=88=92=E4=BD=93=E3=80=8D=E8=AB=96=E4=BA=89.=E2=80=9D > Nihon Bukky=C5=8D s=C5=8Dg=C5=8D kenky=C5=AB =E6=97=A5=E6=9C=AC=E4=BB=8F= =E6=95=99=E7=B6=9C=E5=90=88=E7=A0=94=E7=A9=B6 14: 105=E2=80=93132. >=20 > There are two changes I would like to make to this. >=20 > First, I would like to be able to keep the inline citation as is, while > removing the comma after the name "=C5=8Ctani" in the bibliography. This = would be > possible with Juris-m if I were to simply copy-and-paste citations, but I= was > hoping to be able to have in-text citations linked to the bibliography (a= nd, > ideally, live citations), which seem like they will be difficult to imple= ment > if I'm not rendering citations using citeproc. >=20 > Second, I would like to keep the English language transliteration of the > journal title in italics (i.e. Nihon Bukky=C5=8D s=C5=8Dg=C5=8D kenky=C5= =AB), while making the > Japanese text for the journal title (i.e. =E6=97=A5=E6=9C=AC=E4=BB=8F=E6= =95=99=E7=B6=9C=E5=90=88=E7=A0=94=E7=A9=B6) to be regular > non-italicized text. In a latex/pdf output this is no problem; latex igno= res > italicized Chinese characters, but I am wondering if it is possible with = the > HTML output. I thought this would be possible by including the Japanese t= ext > for the title of the journal as a "note" field, but I couldn't get the "n= ote" > field to print at all (see following example). Alternatively, if there we= re a > way to simply tell css to ignore italics for Chinese/Japanese fonts (like= latex > does), that could work. >=20 > Here is the (Better)CSL-JSON for this entry: >=20 > ```json > { > "id": "otani-2016", > "author": [{ "family": "=C5=8Ctani", "given": "Y=C5=ABka =E5=A4=A7=E8=B0= =B7=E7=94=B1=E9=A6=99" }], > "citation-key": "otani-2016", > "container-title": "Nihon Bukky=C5=8D s=C5=8Dg=C5=8D kenky=C5=AB =E6=97= =A5=E6=9C=AC=E4=BB=8F=E6=95=99=E7=B6=9C=E5=90=88=E7=A0=94=E7=A9=B6", > "DOI": "10.20588/nbs.14.0_105", > "ISSN": "1348-4850", > "issued": { "date-parts": [["2016"]] }, > "language": "jpn", > "note": "cjk-title: =E6=97=A5=E6=9C=AC=E4=BB=8F=E6=95=99=E7=B6=9C=E5=90= =88=E7=A0=94=E7=A9=B6", > "page": "105=E2=80=93132", > "publisher": "=E6=97=A5=E6=9C=AC=E4=BB=8F=E6=95=99=E7=B6=9C=E5=90=88=E7= =A0=94=E7=A9=B6=E5=AD=A6=E4=BC=9A", > "source": "search.library.ucla.edu", > "title": "(Ronbun) Niss=C5=8Ds=C5=8D Shunj=C5=8D wo hattan toshita niss= =C5=8Dkan 'Ensh=C5=AB kaitai' > rons=C5=8D=EF=BC=BB=E8=AB=96=E6=96=87=EF=BC=BD=E5=85=A5=E5=AE=8B=E5=83=A7= =E4=BF=8A=E8=8A=BF=E3=82=92=E7=99=BA=E7=AB=AF=E3=81=A8=E3=81=97=E3=81=9F=E6= =97=A5=E5=AE=8B=E9=96=93=E3=80=8C=E5=86=86=E5=AE=97=E6=88=92=E4=BD=93=E3=80= =8D=E8=AB=96=E4=BA=89", > "type": "article-journal", > "volume": "14" > } > ``` >=20 > And here is the CSL of the portion that I think will apply to this case: >=20 > ``` > < /macro> > =C2=A0 =C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 > =C2=A0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A0 =C2=A0 =C2=A0 =C2=A0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 > =C2=A0 =C2=A0 > ```` >=20 > If this is impossible to do with a "hack" (i.e. using the note field for = the > Chinese/japanese title) in CSL or zotero, is is possible to wrote some cu= stom > (lua or python) filter that either gets rid of the commas or gets rid of = the > italics (or both)? >=20 > Thanks in advance, > Tom >=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= email > to [6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [7]https://groups.google.com/d/m= sgid/ > pandoc-discuss/8fd3ff8c-44e7-4abe-9c65-38fb5debbb3dn%40googlegroups.com. >=20 > References: >=20 > [1] https://forums.zotero.org/discussion/110097/using-the-note-field-for-= rendering-mutilingual-text-with-csl#latest > [2] https://groups.google.com/g/pandoc-discuss/c/mjmQqT3xJd0/m/RVkHA6a4Ag= AJ > [3] https://groups.google.com/g/pandoc-discuss/c/iYW55X9PDWA/m/lGwXhHslAg= AJ > [4] https://groups.google.com/g/pandoc-discuss/c/BaD8D5y7Nb8/m/SHjZk2rKAA= AJ > [5] https://github.com/zotero/citeproc-rs > [6] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [7] https://groups.google.com/d/msgid/pandoc-discuss/8fd3ff8c-44e7-4abe-9= c65-38fb5debbb3dn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=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/ZXgBDc7RKdBbLAOZ%40localhost.