From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30587 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 13:42:40 +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="31313"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBU5VT2KAMGQEOKKEAOA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri May 20 15:42:48 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f58.google.com ([209.85.167.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ns2tz-0007wI-Ql for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 May 2022 15:42:47 +0200 Original-Received: by mail-lf1-f58.google.com with SMTP id g2-20020a0565123b8200b004725c7af360sf4311261lfv.19 for ; Fri, 20 May 2022 06:42:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1653054167; cv=pass; d=google.com; s=arc-20160816; b=uM6kxGJh9ylO20FZTuM7cp0RN8FknqAJaauTBLYxHbBFk9FB/Ee/c9kXbkdk65GmD/ Yxs4mNO80BfeNUmRW6v/1I6Fh1vJssbCQ3potm9KGqCi7F00oGbrh88ltkKlk6JtQFcp tcsQejaRqMcgHxEkAuzQ07BWdIveE0B/Y5pgqE/Lu3s5wzvgN+cAD/GcnqswcDNwA1J1 DwytfCF5Je7ne2ORmoT8OPa/Pykrt2nz9Z1eu2dr0bAPZckQ7hpr4GeiUzBTah6/9HTp KSaWxbP4galN6JRcvwSVyxVG+aigIJYQJgiintpPAxQbXAVoxFJ5msUytq8eNgUGZWXq rC2A== 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=QlKR9Pm3LnHCfOK/KNsx2gJg+XbT0WOUR1a2Myja0qY=; b=wBX6cpWR/YH6y86r67Yny90POiowrB4nWHUdxQ+V/EF9jQCwrRmcQpuzFlBuSBzlbU eHhRMTF+EVByCLiczaCmVokGbRc5Sd6VWpHsYYAae584sT83QZAYreCZzPs5ZMUf0WxW Hgnnu+FpPSlzw6UO8WMLZyUh2fpClclU9m+iTHbScz8ZOS7f/j3HjEwIGCjJlSRZ4u8X rCxDz2iRgl/PuzO0Be/KX/EVdmEUlfchHrr+QyOKsur0myHjsvsJFb+/mA43t+7fEU4M ymTm1afDnabk2LLJMjnsPI4weRo3B+jtXl9IUCxxu0T5Ci2S8AOy0KHDoF4++Zmh/a9Z 1tSQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=cq8Lshiw; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 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=QlKR9Pm3LnHCfOK/KNsx2gJg+XbT0WOUR1a2Myja0qY=; b=bDcf6Dt4Xu+0dl+9Tx3JssVKi39U9nX6TJ/qscAR0oAWiETvlNEjshZPJm/glYcPFe gagJa0Y3j2J2ehpGFOfuQG6uy7XQ8x+xvsl4ZGFac8CbJRf6iB7jDrX+KEOeTKahVw7/ 0BbXs2TFh+EsyhxdsYQOaLvphu7smffbChStttoxIXluS6bvEqcMFNSyGElWteWhl2Rj Auv0rku0uRBCYlJurppfxbfEZyLeXK134SOjdCVr4zS/xxr6Z7NOcURovaD0xMXNawW8 qMVOkLQ8Br5hEkIkLCNSKuDrcKjENWGFCTwwGgxtLZ7crxaCJF5b2I6UzXFplONXg2Jp ZODQ== 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=QlKR9Pm3LnHCfOK/KNsx2gJg+XbT0WOUR1a2Myja0qY=; b=orufjTbdOjsdrzYK5EoZN5NLr9MZbElFQ6fDEI0FCKjB3faCUfY9iwBKbPNXnydMCE XWvIH7LnwNvKJXXH01EJOan8J65tQq164mw31LQevktznLuyrb/PL3FduGLtV3VfEQwd hVmsoGwe7Hx+QV+OU90zCQuWo/xszvCI0nNP00qHQQiiDUC0ddb6ixH9KyL4fgiztoGZ fxv9jO2nccg7WHMOIG9xjDRM2UnGvFEuv9+L3G8qcM6Zcfsh9WZ0Ms9hJPj/3MEAlZl+ GQch2YM429Pj4T3UkX+gTx62Yq+bLF6sxGFLK34ghct4 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533JKv7vX8RuiHhoVjbRdbfsy2/iJrhjnkZN+tm/Ovzg7DsyCjqV Tl28O5qnPEFj/oVO7Ikzr2I= X-Google-Smtp-Source: ABdhPJyovvXlqOHKiChWH4X3oDA4b1SZhy67I36DfRsZ0OPbQQkY7bcZvKAYfGe2fWBorLwW/Mghng== X-Received: by 2002:a05:6512:3ca9:b0:478:5a79:2497 with SMTP id h41-20020a0565123ca900b004785a792497mr581692lfv.597.1653054167061; Fri, 20 May 2022 06:42:47 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:b1c:b0:472:38f0:bc75 with SMTP id w28-20020a0565120b1c00b0047238f0bc75ls1429541lfu.0.gmail; Fri, 20 May 2022 06:42:42 -0700 (PDT) X-Received: by 2002:a05:6512:3f26:b0:473:edee:7250 with SMTP id y38-20020a0565123f2600b00473edee7250mr6764581lfa.685.1653054162228; Fri, 20 May 2022 06:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653054162; cv=none; d=google.com; s=arc-20160816; b=MuKVeF5U6qXh4TBkXTV0oMlJh3zPmyTc46VYTcBIOO+pthl0+hiQ0kdOEigWjd2U70 XX7J/KHVTcaJB9+9qXNUxWw2i6IA+HkoYEh0x0O7cmfAdCVaPhlJJGrnLWmsnW7c3YvI nRhAdCl3XXaX8XTerDjrw+01LUK0dwYRCJxAaw84LH8FZk2fgHSRNaMcRCEF7nHqpgSS dXGluPmrVHxvNYeovhHaF7ZsfbdT+lBcu4NlMYOULq+PjTwqROHLkJv5oe6kRM+WTmAq M0ZKsFdNz812yCQqhEQVBhW6qn6bz9o1xKA9/AAOZHrjUe+SuBZSAi8XepXw6SSAaTiZ ii2A== 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=Ao9kA6u/p9jCPdWq3POxwzexkQpCZSoIYW1qgZmpoIg=; b=nBaEl2qoQ6y/XRbBgwYkpv5IQk1IRrfwSHffpkedm2Bb1GW/SGtLyN9RB/KzFnVR6+ OagG/V3hHmZhmqCpXeB25jelK/5pZDDLtDZT6W7kBER/Ry7N2cq1pBPKwIiizP3pAn39 +imSmgExHv4ImoNKFPYWpCeLC3Njf54JHZh0pB+gTPkUuASIR4geM6tT0Y+7BmphR9ak sdog544qGXLL2muBBoR0A6J4t8wzoZ8Dg1+JYT2buKk/gOqlNEQX7m2HhJi+2DDk/P76 2ufGn1iv5+7G8yka+I7R+ZAMPbGP+ruvg31qvUEn1zbfbMtL9m5WcXOTgT5UAvxhU61c D+tg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=cq8Lshiw; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 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 mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id u11-20020ac258cb000000b004723ec9fc4asi323806lfo.0.2022.05.20.06.42.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 06:42:42 -0700 (PDT) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 9946C240109 for ; Fri, 20 May 2022 15:42:41 +0200 (CEST) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4L4Sb51T1fz6tmT for ; Fri, 20 May 2022 15:42:41 +0200 (CEST) Content-Disposition: inline In-Reply-To: <0daa1a20-d847-47f5-a465-708c7875ff8an-/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=cq8Lshiw; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 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:30587 Archived-At: When testing your CSL file, you should be aware that Zotero and (I guess) t= he 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" attribute is "any" in= citeproc-js, although it should be "all" (as it is in Pandoc). On the othe= r hand, the specification does not define the expected behaviour for all ca= ses. The issue documented by your first screenshot is a good example of tha= t. The "title" macro is called on l.=C2=A0332 with the attribute text-case= =3D"title", but the element on l.=C2=A0117 included in this macro ha= s text-case=3D"lowercase": which one should have the precedence? Unless I h= ave 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 t= o avoid such conflicts in your stylesheet (e.g.=C2=A0by removing the attrib= ute on l.=C2=A0332). As for the issue with "p./pp.", I guess that the problem is in your Markdow= n input, but I can't be sure. Could you provide a minimal sample MD file wi= th a stylesheet and a bibliography? Le Friday 20 May 2022 =C3=A0 04:00:49AM, John Carter Wood a =C3=A9crit : > I have been working on creating a CSL style for the publication house-sty= le at > my institution: I've been making progress adapting another style but am r= unning > into a few issues that seem to only crop up when using the CSL during a > document transformation with pandoc (version 2.18, with CSL file specifie= d 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 document the= y look > fine too; however, when I create the docx via pandoc there are unwanted > variations on a few points >=20 > There are a few issues, but the format for items in collections seems to = be the > main one. >=20 > 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 fo= rmats > correctly) was directly inserted into the document using Zotero's functio= nality > in LibreOffice. > CSL-pandoc-issues.png >=20 > The problems: > 1. et al. is capitalising > 2. (ed.) is capitalising > 3. the p./pp. contextualisation isn't working right: using pandoc, when t= he > 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 more than o= ne > page, then "pp." appears in both, as it should. >=20 > As I said, when looking at style using the example citations in the visua= l > editor at for CSL (https://editor.citationstyles.org/visualEditor/), it a= lso > looks right (as in the second cite.) >=20 > CSL-IEG-Visual-Editor.png >=20 > 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 workfl= ow, 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 solve this= . >=20 > Here, for reference, is my CSL file (which is still a work in progress): >=20 > https://pastebin.com/xefmukzw >=20 > Thanks in advance for any help. >=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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/m= sgid/ > pandoc-discuss/0daa1a20-d847-47f5-a465-708c7875ff8an%40googlegroups.com. >=20 > References: >=20 > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/0daa1a20-d847-47f5-a= 465-708c7875ff8an%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/Yoea0AfkWCp%2B6FGe%40localhost.