From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30589 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 15:50:03 +0000 Message-ID: References: <0daa1a20-d847-47f5-a465-708c7875ff8an@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="40425"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBTXRT2KAMGQE6GETHRA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri May 20 17:50:42 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f62.google.com ([209.85.128.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ns4tl-000ALs-QJ for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 May 2022 17:50:41 +0200 Original-Received: by mail-wm1-f62.google.com with SMTP id h133-20020a1c218b000000b003972dbb1066sf2833475wmh.4 for ; Fri, 20 May 2022 08:50:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653061841; cv=pass; d=google.com; s=arc-20160816; b=NwcLLvPKsb5v4/T2yNJMIrJv0YVrbyGL1tJBJ5EIwcFflgYao+tnMGGBUYbz90/aqj WRuiDPZxc8t9mihOYGQ5a1yEmQK0t1N9RpkGLiSdHc1IKGkwLv80Yq5XxmMoJaFXagvy ZJ3H+NfPmsOq9hU6dP/qlKcTITJjbfCbk/GPlmhAz8IClp1Ec6fMdju0gNm4yyP9DlEa 8IhcTvZxTs5FRBLLeZ+yibBokOphFwGyNlSX/FzxVdaewdklrLR3Is9f9c88vlCt85Lu mAUZeUHXAIJf7UMDStX7RJpQHQNTyl0tK5getA/IeHz9WQhWWG+s0GyNYypIDbEhYgLc 8Dbw== 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=LGSwekseRoxmfIb+4rK6zDdfKFI8j2TReQDwiCuhLNI=; b=jROBq+8suduOvQZH/cjRzEwxJ49WxN5oxq8CSJZMHXf3o+hesfA3HucfxTcZnopm2V Ta3quYRlUgAujAegXH52lCQLnk5qN11zp8QkuAx4NVl6F1Nm6UzMpbMamDPH5RpD8laI G3pD5mc3iPW+FxrjB4OplT13WXI704tGYC163x2PCs5qT0lK3BHCBF2a1xrRr/r4tPVU mMOUyD678ALdVvuOWlcjJJkHv+Z/KUrYDfB9zssKn1gAQ1iWMPE2UXuo+kPolKoz32Y2 YM8Sx0yFW0k8z16ZgF+QdwQtd2vcmha2gjaXdBZvp5Rga44o72SQcX3xeMoizNl884kE 1tWw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=qWwFNVAx; 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=LGSwekseRoxmfIb+4rK6zDdfKFI8j2TReQDwiCuhLNI=; b=RQeZAL+/jQn84LYcX26ra82Mek1BqioTAXvYK6SprIfEKSczczC3GqMXeCx5d3B5FW h3vF4cGsCSo6PzQh1fcyrOAXfb7FIxg8GKguT09R5EZUo4tBhOfabT1RX+gnPxKINKaA dA2zis45ipnVfIyBD9RBil0/9+00q6/OjenVOPDUKW+IYtgViXFPju+5ZfdXandniau7 uLB7xSWDj89WEwHgW7Dph1ahoQRxAGHqTzfvZXqV5ml05ZkDYdOl0gZvYN4a6BAddL0F E/OLKsqKxhan0k9QlWiS9a1JfALHYSiiOVl936U7m8zQ1bFUe7fM3w008O9jYS0Jn9qD P/jA== 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=LGSwekseRoxmfIb+4rK6zDdfKFI8j2TReQDwiCuhLNI=; b=su0a6MBybZ5R0x5kLO6kvRgKWTyAydQReFEmt1JV359vgT6LXhUkgUt1ry3xvXw8Vq CmpCVQHGn6Z1MyrNbdmH9ojLcsSOTf3DVw/1BxgvL36YAav/eFnKfOWcbZRoKw8qG+jE RWOMXw9kUGwju5zPkZx14S2Ddktn8VWdBLbtdfZGuHlSZQoUcpPs+BwQU2Ua8fNJ2rcV eUBwKiZsJsokOfkbXj0BTjptzng+awWL5O9LWIq5iRQWiDKYS64rJGpanq+nI15bl3AE wcqMh639ysRwt18jsOjq61/qCCdXAz6I0wccOga8FgyA Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532YZtLOenTGKneve8QvNqLEqZ2pySxXM7z0F/2Yfw1KpHeiC2nI QNhgdELlFN0A4e5yHVnJnFo= X-Google-Smtp-Source: ABdhPJyYgAIcIyrJyNJItkcy3NBgn5USP1qZyVEKmRHtznbBDhr6HzP19zyLF47YtJNEIzxX6SpvuQ== X-Received: by 2002:a05:600c:2b89:b0:397:330f:a5e8 with SMTP id j9-20020a05600c2b8900b00397330fa5e8mr6835648wmc.150.1653061841275; Fri, 20 May 2022 08:50:41 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6000:1e0b:b0:20e:7a8a:8c81 with SMTP id bj11-20020a0560001e0b00b0020e7a8a8c81ls2758945wrb.1.gmail; Fri, 20 May 2022 08:50:37 -0700 (PDT) X-Received: by 2002:adf:e58e:0:b0:20e:640d:494c with SMTP id l14-20020adfe58e000000b0020e640d494cmr9278955wrm.68.1653061837196; Fri, 20 May 2022 08:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653061837; cv=none; d=google.com; s=arc-20160816; b=yRatdYyn5r7siDVi03ZNGHyTTRw44QjlTFuK7dijTjGnNAdIjLPLdt4YaKISW95hoa lM8TQSZlfm0EcNVF2UpfZleLke92MQPtOseSsA3nEV8fychvR/uge4BZGkbHEOWeW8mV Eqde2CfH6M2ZhJzYbPNLrey9gWF+r7UZbwMl04PwcwtzxLlNGbCYoBJH+p7+UD2JvaGq rPiRKudZGExKfjIHuyBtEqCPdEkBnlQkFJAdbSaUYftkUJd2N9YqOwo62EIXYBuNQ5mE B6CJLkQUP9YgiF/SuPu6flOuQF+FObVW09VSKqj/RLO2NSAY+e+/nD7B/U6bBMWBiorD 44uA== 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=qp0N+wh1Af0LFNrCx42YejRFu2evJBfnOp/PAYr282Y=; b=1JMitppH32+ZiIKXmos83zjp01ldTMLeAVFp1vhOo7/iyDJcIF4jQDWHNTv/RWwIeq DF/+qtV4bMndBAzPVqwneafgFdSbv6uP09XESXKDsWso8oXN/bg/Urqme9bZQbK4TW+s VxInMzfeqYyXraOMeosy+C4v7iEg6fpsgO4zvf1jMYz7tZTru2UoppGG8vzlNh4WHGd9 mmnWNZ24x4Iirb7NHgJvYWKGStkuEeiJFqli3M83Diwb3W3WUJRjMsdMxHm5KmXel3y/ T8TNUcT38+q/y79hsAzAl7HRpfuYUsQvQcRBXLCIcYovxCzCjiqQnlZeOsL48l3SFkRy PjsQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=qWwFNVAx; 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 m123-20020a1ca381000000b003973d014ec1si53434wme.1.2022.05.20.08.50.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 08:50:37 -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 CC745240029 for ; Fri, 20 May 2022 17:50:36 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4L4WQh31w4z6tml for ; Fri, 20 May 2022 17:50:36 +0200 (CEST) Content-Disposition: inline In-Reply-To: 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=qWwFNVAx; 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:30589 Archived-At: Remove also text-case=3D"title" on l.=C2=A0312. As for the p./pp. issue, I = don't have any explanation... It may be a bug. Le Friday 20 May 2022 =C3=A0 07:56:58AM, John Carter Wood a =C3=A9crit : > Thank you! >=20 > That's a helpful explanation. My own workflow is based on Markdown / Pand= oc, so > that's the "right" version as far as I'm concerned. :-) >=20 > I removed the attribute as you suggested, but the et al. and ed. are stil= l > being capitalised in the notes (though not in the bibliography...I feel l= ike > this should help, but this is my first escapade with re-writing CSL, so t= his > insight hasn't brought me any further). >=20 > 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 version). >=20 > The command I used was "pandoc CSL-Test-2.md -o CSL-Test-2-IEG-2-19.docx > --citeproc --lua-filter pandoc-quotes.lua" >=20 > The bibliography is specified in the YAML header. >=20 > I hope I have done all this right. >=20 >=20 > Bastien Dumont schrieb am Freitag, 20. Mai 2022 um 15:42:47 UTC+2: >=20 > When testing your CSL file, you should be aware that Zotero and (I gu= ess) > the Visual Editor rely on citeproc-js, which is not fully compliant w= ith > the CSL specification. Sometimes, Pandoc is right against them. For > instance, if I remember well, the default value for the "match" attri= bute > is "any" in citeproc-js, although it should be "all" (as it is in Pan= doc). > On the other hand, the specification does not define the expected beh= aviour > for all cases. The issue documented by your first screenshot is a goo= d > example of that. The "title" macro is called on l.=C2=A0332 with the = attribute > text-case=3D"title", but the element on l.=C2=A0117 included i= n this macro > has text-case=3D"lowercase": which one should have the precedence? Un= less I > have missed something, the CSL specification does not define that, so > Pandoc applies the attribute value set on the upper-most element and > citeproc-js that of the inner-most element. Neither is wrong, so the = only > solution is to avoid such conflicts in your stylesheet (e.g.=C2=A0by = removing > the attribute on l.=C2=A0332). >=20 > 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 samp= le MD > file with a stylesheet and a bibliography? >=20 > Le Friday 20 May 2022 =C3=A0 04:00:49AM, John Carter Wood a =C3=A9cri= t : > > 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 bu= t am > running > > into a few issues that seem to only crop up when using the CSL duri= ng 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 and = when I > > insert them via Zotero's connector into a LibreOffice / Word docume= nt > they look > > fine too; however, when I create the docx via pandoc there are unwa= nted > > variations on a few points > > > > There are a few issues, but the format for items in collections see= ms to > be the > > main one. > > > > Here is a screenshot of the same citation: the one on top (which fo= rmats > > incorrectly) was created by using pandoc. The one on the bottom (wh= ich > 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* r= evert > to a > > single "p.", even when it should be plural; if the locator is more = than > one > > page, then "pp." appears in both, as it should. > > > > As I said, when looking at style using the example citations in the > visual > > editor at for CSL ([1]https://editor.citationstyles.org/visualEdito= r/), > 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, but = since > this > > one seems to specifically relate to using pandoc (which is my main > 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 solv= e > this. > > > > Here, for reference, is my CSL file (which is still a work in progr= ess): > > > > [2]https://pastebin.com/xefmukzw > > > > Thanks in advance for any help. > > > > -- > > 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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [2][3]https://groups.googl= e.com/ > d/msgid/ > > pandoc-discuss/0daa1a20-d847-47f5-a465-708c7875ff8an%[4] > 40googlegroups.com. > > > > References: > > > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2] [5]https://groups.google.com/d/msgid/pandoc-discuss/ > 0daa1a20-d847-47f5-a465-708c7875ff8an%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter >=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 [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/e4cef3f2-bf3f-4359-87b7-61f9f3309670n%40googlegroups.com. >=20 > References: >=20 > [1] https://editor.citationstyles.org/visualEditor/ > [2] https://pastebin.com/xefmukzw > [3] https://groups.google.com/d/msgid/ > [4] http://40googlegroups.com/ > [5] https://groups.google.com/d/msgid/pandoc-discuss/0daa1a20-d847-47f5-a= 465-708c7875ff8an%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > [6] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [7] https://groups.google.com/d/msgid/pandoc-discuss/e4cef3f2-bf3f-4359-8= 7b7-61f9f3309670n%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > --- > title: CSL-Test-2=20 > subtitle: Minimal CSL file=20 > 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_com= munity_1938, 15]. Donec "hendrerit tempor tellus" [@oldham_responsible_194= 8]. Donec pretium posuere tellus [@latourette_community_1938, 10-12]. Pro= in quam nisl, "tincidunt et, 'mattis eget', convallis nec, purus" [@muller_= european_2011, 585]. Cum 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 placera= t accumsan nulla. Nullam rutrum. Nam vestibulum accumsan nisl [@mumford_t= echnics_1934, 45]. >=20 > # Bibliography > =09 --=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/Yoe4q4BjrrEPSGKM%40localhost.