From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30591 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Divergent styling when using CSL in pandoc(?) Date: Fri, 20 May 2022 16:15:02 +0000 Message-ID: References: <0daa1a20-d847-47f5-a465-708c7875ff8an@googlegroups.com> <04626317-9c4b-4135-abfb-5ab0ae4909b5n@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="10742"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBCH5T2KAMGQEJL2W2BI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri May 20 18:15:07 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f59.google.com ([209.85.221.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ns5HP-0002Zm-PU for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 May 2022 18:15:07 +0200 Original-Received: by mail-wr1-f59.google.com with SMTP id e6-20020adfef06000000b0020d08e465e2sf2812041wro.3 for ; Fri, 20 May 2022 09:15:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653063307; cv=pass; d=google.com; s=arc-20160816; b=0UnlgOAfmhY52ysm/tTcOcGbrxAPdO1XSoMBiD11RqgWTe6HAIwhRJqiHw7BzMwCJa Xca7cgraK4xmH8cOUNm36Mkdjvs5HgRI/QSnq8qno+tLe/Ue2fpMMAP7yut+q6q164n3 3IZRFgShwj9AikqJt4M+WUa+AEeLFK8XL73v+eD6893oPpzmgpN2V83YpH+qDjYEVe97 YYMX2bnJPjyYrOzqaJYGiVzAvrqfeyUnjxpf1oXvMTYG9G/OGej3qk27r2NU9oxLIqBM eOKxLyDEWtlJ1cK3/KBff6J8ZTe74qZDNARc+D0fCjuhGNfKcVQs5xXiRqyM/Itvg/5q odxg== 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=dHbZwFmZtj3TIFDc3GVHjxLNR+zD6siPnNyVaCG9kxA=; b=MekWu3b8Mhzi52KRMDXbdxukOGsZmi7T0WYRXeZ59JyFFmaa4IUawcfqhRr4lI4QwN WaZ6qExYbh5puUhFp4IuRBChWr6/OfC2+TjKkV6XlicrLQyqQ5ooP1EhaGuR3s229wqo 2LpADLAXUJzswHjJqrjNN2u6lTvcKtr3clKCAkqE5XEg2ysJ2fkmz+LBciZrw8HW2wGR /MQFYs5YZgBkqGZIWl2NQObW8tVSFT7hyrZbtr4ZaL/JP9SxCWIQgarDXKIiQtdplMiE 4vh0SETSgPGHaUBdQPncIFEYKr9efwtpiM0BifAt938UfZfLKny/qqAXkrMmL5kjJCmd FIAg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=IWmqmhqO; 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=20210112; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :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=dHbZwFmZtj3TIFDc3GVHjxLNR+zD6siPnNyVaCG9kxA=; b=j7EL+VDn+YOLEgvAdPalaXQkQw9as6s0zgcXFA3VM0cp8wauz+YT9NwGIJ8bamAOcp ql24aJCky1BRTH/q8spv6bl4HOb7SFkFypadVqDQQ1DhGXX4hPwVsRmA6r3JU9rIr5Ic djMnr6mbQG8mRs/P9Zf/Db+c5htlrJmB7Bj8J36p80xUVs0UjFYowVKWrCs6KUyPaSmt 8YiWQ9lBHTdEdRL3gDoIwE9EoL05jKfPjgwc0+Jad1/Op/BpBxlkfPamA5HHrJPhsnRg 070mUDdO3Be1+Fm3gMgiMavFGjyrb/IGFZXkbRx6x+6M9n1vChkmthklGaMA7R+kecTQ h+Ag== 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:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to: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=dHbZwFmZtj3TIFDc3GVHjxLNR+zD6siPnNyVaCG9kxA=; b=f9HRWdX1F1Yqj+z62qS0zUnnBk5KVXFnV3b43RBbbvVhUPovd4mCYzFBOuVodpxo+N Bk+yvAaw/HQvRDevtzXQLjYSpT2ttJzV/MOUiHeT4459mrUgXuBajByWDptya+jq3vnI SJPfiDrcWVWC+hUMtzY8a11Mwe1c9NSFcT7HmA+AWUUlbAAG7Cmw+jTyAXJ6xBD290Ft CxpO0ygO19AaUvbM5b9jYjMfNzD4YlMFcYjKShr+m6wnxct9inBbx/M2zy5jJkGUqK4u lqifJS2OJjUehIilbYl/dFirxj3z8xOChobuJnol7Dt2 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5329esDx49BMaCf/v5DPzbp/l8+KURcElSTmHlmZh1KYMgMMvqoT dtZazhufE3wH90KhWQQrgTY= X-Google-Smtp-Source: ABdhPJzgUq/ByDzevtI4xBtu/QUxc9b2pajir5eAeRsZnJh9aLj8pzb9NfvFdSyOnMrecQ1dtIlSQg== X-Received: by 2002:adf:eec9:0:b0:20d:5f7:f54a with SMTP id a9-20020adfeec9000000b0020d05f7f54amr8935850wrp.714.1653063307351; Fri, 20 May 2022 09:15:07 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:3c9c:b0:393:ef44:c49d with SMTP id bg28-20020a05600c3c9c00b00393ef44c49dls5773559wmb.2.canary-gmail; Fri, 20 May 2022 09:15:03 -0700 (PDT) X-Received: by 2002:a7b:cd95:0:b0:397:3c5e:9639 with SMTP id y21-20020a7bcd95000000b003973c5e9639mr2335446wmj.12.1653063303414; Fri, 20 May 2022 09:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653063303; cv=none; d=google.com; s=arc-20160816; b=kGJ6MLU/bKBe03pDfT1rq7EEiGitV4ATRmLBkN6sDmWRAPZlbS0ZHzWsOQQArDLJpo 4HvsZhlj8YzQiCCkQHqEAGo4CaWWVR3DamGcvbH4+w4T7jZS0nf1tzZ7ohN6daI0kGQs OAux6Y3YDKd7EXJTK3el8lHcXnQEHi9UoL1tRKXXnydf2pF3NiKmsbNnAQNJfgBE7zA7 b7OW0c27dpkIB2dQDgIJhCHIDDqw1WvxjRVAPUOTopWv7r63hTgNXsKrMSR/1cq7Dvxz Fb7YKxGcRzbcfNQy06P3tP19lHaPv/I+Rmsj3+otgiBUTLTlyNF6uVsLVxwqnLw+3ASo 2QdA== 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=yas5iTtml6YObHQzNUq9YuVlU++f3/ap1fpjhSzyt0E=; b=My9OKNXwYNon1+vz83rbSrf74PET79+ep8Rg74Ir8T4MJe8IayRNLNA8+emsgIwM+0 lICY1Ole4tKrtxHY6NvAsuEtr+RdksOYBr7sFhDKlrHhI+7iGRB/qbEI5y3jkiSn7V3T XgPsIf7vERPSzoyt7FzC+sD8vKvsO721jxH/gx+X7/ems6CMIx6GNO7yEj7/cFIxOH23 MCqw19rQohJnpNBToj/lKir9su9K9thlVa0fg47yCQk3jhoSY2RFbW8EsPYDiiz73KIS g7oXTaljZlw3eduNmz+Va0sSfURSbc5CDKk7LEbFQbhRzwg3FrSQMRo97W4qvSaKqJ/a Mo7g== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=IWmqmhqO; 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 h15-20020adffa8f000000b0020d02df3017si116817wrr.6.2022.05.20.09.15.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 09:15:03 -0700 (PDT) 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 1E008240028 for ; Fri, 20 May 2022 18:15:03 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4L4Wyt5p8Jz6tmT for ; Fri, 20 May 2022 18:15:02 +0200 (CEST) Content-Disposition: inline In-Reply-To: <04626317-9c4b-4135-abfb-5ab0ae4909b5n-/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=IWmqmhqO; 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:30591 Archived-At: Then add title-case=3D"title" in the relevant places. Le Friday 20 May 2022 =C3=A0 09:06:19AM, John Carter Wood a =C3=A9crit : > Thank you! Removing text-case=3D"title" on l. 312 does solve the et al. a= nd ed. > problems. >=20 > But then book titles (e.g., the Mumford citation in the examples I sent) > becomes sentence case, and I need book titles to be in title case. Hmmm. >=20 >=20 > Bastien Dumont schrieb am Freitag, 20. Mai 2022 um 17:50:41 UTC+2: >=20 > Remove also text-case=3D"title" on l.=C2=A0312. As for the p./pp. iss= ue, I don't > have any explanation... It may be a bug. >=20 > Le Friday 20 May 2022 =C3=A0 07:56:58AM, John Carter Wood a =C3=A9cri= t : > > Thank you! > > > > That's a helpful explanation. My own workflow is based on Markdown = / > Pandoc, so > > that's the "right" version as far as I'm concerned. :-) > > > > I removed the attribute as you suggested, but the et al. and ed. ar= e > still > > being capitalised in the notes (though not in the bibliography...I = feel > like > > this should help, but this is my first escapade with re-writing CSL= , so > this > > insight hasn't brought me any further). > > > > I have attached an .md file, a .json bibliography and a new version= (19) > of the > > .csl file (that includes the change you suggested in the last versi= on). > > > > The command I used was "pandoc CSL-Test-2.md -o CSL-Test-2-IEG-2-19= .docx > > --citeproc --lua-filter pandoc-quotes.lua" > > > > The bibliography is specified in the YAML header. > > > > I hope I have done all this right. > > > > > > Bastien Dumont schrieb am Freitag, 20. Mai 2022 um 15:42:47 UTC+2: > > > > When testing your CSL file, you should be aware that Zotero and (I = guess) > > the Visual Editor rely on citeproc-js, which is not fully compliant= with > > the CSL specification. Sometimes, Pandoc is right against them. For > > instance, if I remember well, the default value for the "match" att= ribute > > is "any" in citeproc-js, although it should be "all" (as it is in > Pandoc). > > On the other hand, the specification does not define the expected > behaviour > > for all cases. The issue documented by your first screenshot is a g= ood > > example of that. The "title" macro is called on l.=C2=A0332 with th= e attribute > > text-case=3D"title", but the element on l.=C2=A0117 included= in this > macro > > has text-case=3D"lowercase": which one should have the precedence? = Unless I > > have missed something, the CSL specification does not define that, = so > > Pandoc applies the attribute value set on the upper-most element an= d > > citeproc-js that of the inner-most element. Neither is wrong, so th= e only > > solution is to avoid such conflicts in your stylesheet (e.g.=C2=A0b= y removing > > the attribute on l.=C2=A0332). > > > > As for the issue with "p./pp.", I guess that the problem is in your > > Markdown input, but I can't be sure. Could you provide a minimal sa= mple > MD > > file with a stylesheet and a bibliography? > > > > Le Friday 20 May 2022 =C3=A0 04:00:49AM, John Carter Wood a =C3=A9c= rit : > > > I have been working on creating a CSL style for the publication > > house-style at > > > my institution: I've been making progress adapting another style = but am > > running > > > into a few issues that seem to only crop up when using the CSL du= ring a > > > document transformation with pandoc (version 2.18, with CSL file > > specified in a > > > YAML block). In the preview for the visual editor they look OK an= d when > I > > > insert them via Zotero's connector into a LibreOffice / Word docu= ment > > they look > > > fine too; however, when I create the docx via pandoc there are un= wanted > > > variations on a few points > > > > > > There are a few issues, but the format for items in collections s= eems > to > > be the > > > main one. > > > > > > Here is a screenshot of the same citation: the one on top (which > formats > > > incorrectly) was created by using pandoc. The one on the bottom (= which > > formats > > > correctly) was directly inserted into the document using Zotero's > > functionality > > > in LibreOffice. > > > CSL-pandoc-issues.png > > > > > > The problems: > > > 1. et al. is capitalising > > > 2. (ed.) is capitalising > > > 3. the p./pp. contextualisation isn't working right: using pandoc= , when > > the > > > locator is a single page, *the page range for the whole citation* > revert > > to a > > > single "p.", even when it should be plural; if the locator is mor= e than > > one > > > page, then "pp." appears in both, as it should. > > > > > > As I said, when looking at style using the example citations in t= he > > visual > > > editor at for CSL ([1][1]https://editor.citationstyles.org/visual= Editor > /), > > it also > > > looks right (as in the second cite.) > > > > > > CSL-IEG-Visual-Editor.png > > > > > > I am running into a few other challenges with working out CSL, bu= t > since > > this > > > one seems to specifically relate to using pandoc (which is my mai= n > > workflow, as > > > I write in Markdown), I thought I would ask here whether this is = a > known > > issue, > > > whether I'm doing something wrong and whether there's a way to so= lve > > this. > > > > > > Here, for reference, is my CSL file (which is still a work in > progress): > > > > > > [2][2]https://pastebin.com/xefmukzw > > > > > > Thanks in advance for any help. > > > > > > -- > > > You received this message because you are subscribed to the Googl= e > Groups > > > "pandoc-discuss" group. > > > To unsubscribe from this group and stop receiving emails from it,= send > an > > email > > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit [2][3][3]https:// > groups.google.com/ > > d/msgid/ > > > pandoc-discuss/0daa1a20-d847-47f5-a465-708c7875ff8an%[4] > > [4]40googlegroups.com. > > > > > > References: > > > > > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > [2] [5][5]https://groups.google.com/d/msgid/pandoc-discuss/ > > 0daa1a20-d847-47f5-a465-708c7875ff8an%[6]40googlegroups.com?utm_med= ium=3D > email& > > utm_source=3Dfooter > > > > > > > > > > -- > > 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, s= end an > email > > to [6]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [7][7]https://groups.googl= e.com/ > d/msgid/ > > pandoc-discuss/e4cef3f2-bf3f-4359-87b7-61f9f3309670n%[8] > 40googlegroups.com. > > > > References: > > > > [1] [9]https://editor.citationstyles.org/visualEditor/ > > [2] [10]https://pastebin.com/xefmukzw > > [3] [11]https://groups.google.com/d/msgid/ > > [4] [12]http://40googlegroups.com/ > > [5] [13]https://groups.google.com/d/msgid/pandoc-discuss/ > 0daa1a20-d847-47f5-a465-708c7875ff8an%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter > > [6] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [7] [14]https://groups.google.com/d/msgid/pandoc-discuss/ > e4cef3f2-bf3f-4359-87b7-61f9f3309670n%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter >=20 > > --- > > title: CSL-Test-2 > > subtitle: Minimal CSL file > > author: PD Dr. John Carter Wood > > bibliography: /home/john/Documents/libraries/CSL-minimal-test.json > > csl: /home/john/Documents/csl/ieg-2-en-19.csl > > lang: en-GB > > quot-lang: da > > header-includes: > > - \usepackage{csquotes} > > --- > > # Introduction > > Lorem ipsum dolor sit amet, consectetuer adipiscing elit > [@latourette_community_1938, 15]. Donec "hendrerit tempor tellus" > [@oldham_responsible_1948]. Donec pretium posuere tellus > [@latourette_community_1938, 10-12]. Proin quam nisl, "tincidunt et, > 'mattis eget', convallis nec, purus" [@muller_european_2011, 585]. Cu= m > sociis natoque penatibus et magnis dis parturient montes, nascetur > ridiculus mus. Nulla posuere [@muller_european_2011, 586-587]. Donec = vitae > dolor. Nullam tristique diam non turpis. Cras placerat accumsan nulla= . > Nullam rutrum. Nam vestibulum accumsan nisl [@mumford_technics_1934, = 45]. > > > > # Bibliography > > >=20 >=20 >=20 >=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 [15]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [16]https://groups.google.com/d/= msgid/ > pandoc-discuss/04626317-9c4b-4135-abfb-5ab0ae4909b5n%40googlegroups.com. >=20 > References: >=20 > [1] https://editor.citationstyles.org/visualEditor/ > [2] https://pastebin.com/xefmukzw > [3] https://groups.google.com/ > [4] http://40googlegroups.com/ > [5] https://groups.google.com/d/msgid/pandoc-discuss/ > [6] http://40googlegroups.com/?utm_medium=3Demail& > [7] https://groups.google.com/d/msgid/ > [8] http://40googlegroups.com/ > [9] https://editor.citationstyles.org/visualEditor/ > [10] https://pastebin.com/xefmukzw > [11] https://groups.google.com/d/msgid/ > [12] http://40googlegroups.com/ > [13] https://groups.google.com/d/msgid/pandoc-discuss/0daa1a20-d847-47f5-= a465-708c7875ff8an%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r > [14] https://groups.google.com/d/msgid/pandoc-discuss/e4cef3f2-bf3f-4359-= 87b7-61f9f3309670n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r > [15] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [16] https://groups.google.com/d/msgid/pandoc-discuss/04626317-9c4b-4135-= abfb-5ab0ae4909b5n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfoote= r --=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/Yoe%2Bhr4d1kQWS7DI%40localhost.