public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John Carter Wood <woodjo-ZOsAvrTRSvuEhhMi0yms2Q@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Divergent styling when using CSL in pandoc(?)
Date: Fri, 20 May 2022 09:06:19 -0700 (PDT)	[thread overview]
Message-ID: <04626317-9c4b-4135-abfb-5ab0ae4909b5n@googlegroups.com> (raw)
In-Reply-To: <Yoe4q4BjrrEPSGKM@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 8537 bytes --]

Thank you! Removing text-case="title" on l. 312 does solve the et al. and 
ed. problems. 

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. 


Bastien Dumont schrieb am Freitag, 20. Mai 2022 um 17:50:41 UTC+2:

> Remove also text-case="title" on l. 312. As for the p./pp. issue, I don't 
> have any explanation... It may be a bug.
>
> Le Friday 20 May 2022 à 07:56:58AM, John Carter Wood a écrit :
> > 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. are 
> 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 version).
> > 
> > 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" attribute
> > 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 good
> > example of that. The "title" macro is called on l. 332 with the attribute
> > text-case="title", but the <text> element on l. 117 included in this 
> macro
> > has text-case="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 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. by removing
> > the attribute on l. 332).
> > 
> > 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 sample 
> MD
> > file with a stylesheet and a bibliography?
> > 
> > Le Friday 20 May 2022 à 04:00:49AM, John Carter Wood a écrit :
> > > 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 during 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 document
> > they look
> > > fine too; however, when I create the docx via pandoc there are unwanted
> > > variations on a few points
> > >
> > > There are a few issues, but the format for items in collections seems 
> 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 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/visualEditor/
> ),
> > 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 solve
> > this.
> > >
> > > Here, for reference, is my CSL file (which is still a work in 
> progress):
> > >
> > > [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, send 
> an
> > email
> > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > > To view this discussion on the web visit [2][3]
> https://groups.google.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=email&
> > utm_source=footer
> > 
> > 
> > 
> > 
> > --
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit [7]
> https://groups.google.com/d/msgid/
> > pandoc-discuss/e4cef3f2-bf3f-4359-87b7-61f9f3309670n%40googlegroups.com.
> > 
> > References:
> > 
> > [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-a465-708c7875ff8an%40googlegroups.com?utm_medium=email&utm_source=footer
> > [6] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [7] 
> https://groups.google.com/d/msgid/pandoc-discuss/e4cef3f2-bf3f-4359-87b7-61f9f3309670n%40googlegroups.com?utm_medium=email&utm_source=footer
>
> > ---
> > 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]. 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 placerat accumsan nulla. 
> Nullam rutrum. Nam vestibulum accumsan nisl [@mumford_technics_1934, 45].
> > 
> > # Bibliography
> > 
>
>
>
>

-- 
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/04626317-9c4b-4135-abfb-5ab0ae4909b5n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 14709 bytes --]

  reply	other threads:[~2022-05-20 16:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AQHYbDjihMB6Uii56E23JjqNZrfiNK0npPkAgABzaCCAB6Z9gIAAY+Sw>
     [not found] ` <AQHYbDjihMB6Uii56E23JjqNZrfiNK0npPkAgABzaCA=>
2022-05-20 11:00   ` John Carter Wood
     [not found]     ` <0daa1a20-d847-47f5-a465-708c7875ff8an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-20 11:32       ` John Carter Wood
2022-05-20 13:42       ` Bastien DUMONT
2022-05-20 14:56         ` John Carter Wood
     [not found]           ` <e4cef3f2-bf3f-4359-87b7-61f9f3309670n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-20 15:50             ` Bastien DUMONT
2022-05-20 16:06               ` John Carter Wood [this message]
     [not found]                 ` <04626317-9c4b-4135-abfb-5ab0ae4909b5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-20 16:15                   ` Bastien DUMONT
2022-05-20 16:37                     ` John Carter Wood
2022-05-20 18:45         ` AW: " denis.maier-NSENcxR/0n0
     [not found]           ` <ae5227d7f2574c9ea33550a84d6e03e9-NSENcxR/0n0@public.gmane.org>
2022-05-25 17:25             ` John Carter Wood
     [not found]               ` <4217cb45-f6db-4b04-a598-20ac2422d02an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-25 21:36                 ` AW: " denis.maier-NSENcxR/0n0
     [not found]                   ` <727f6fde7695493c8d44da2ed2cb52b1-NSENcxR/0n0@public.gmane.org>
2022-05-26  7:18                     ` John Carter Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04626317-9c4b-4135-abfb-5ab0ae4909b5n@googlegroups.com \
    --to=woodjo-zosavrtrsvuehhmi0yms2q@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).