Style Request: Spiritual Care

Hello,

I am working on a CSL file for the publication "SPIRITUAL CARE" (ISSN: 2365-8185).

Here is the style guide: https://www.degruyter.com/publication/journal_key/SPIRCARE/downloadAsset/SPIRCARE_Hinweise für Autoren--de.pdf

I've adapted an existing style and produced this: https://we.tl/t-uKhczmb0Un

However, I'm getting stuck on a few (minor) issues:

-"Hrsg." should be "Hg." (I can't find this label anywhere in the code)
-Full stop instead of comma after publisher (New York: Oxford University Press. 184–213.) (I can't find the corresponding suffix/prefix/separator).

The author guidelines also specify a few cases which are more complex. I'm not sure if/how they could be implemented:

Electronic publications:

When no author is apparent: Deutsche Gesellschaft für Palliativmedizin (2016)
Definitionen zur Hospiz- und Palliativversorgung (Zitierdatum: 07.04.2021), abrufbar
unter https://www.dgpalliativmedizin.de/images/DGP_GLOSSAR.pdf.

When author is apparent: Sun LH (2018) Top White House official in charge of
pandemic response exits abruptly. Washington Post (Zitierdatum: 07.04.2021),
abrufbar unter https://www.washingtonpost.com/news/to-your-
health/wp/2018/05/10/top-white-house-official-in-charge-of-pandemic-response-
exits-abruptly/.

Artikel ahead of print: Loetz C, Müller J, Petersen Y, Mauer C (2013) Attachment
theory and Spiritual Care: two threads converging in Palliative Care? Evidence-Based
Complementary and Alternative Medicine. doi:10.1155/2013/740291. [Epub ahead of
print].

Artikel in exclusively electronic journals: Büssing A, Hedtstück
A, Khalsa SB, Ostermann T, Heusser P (2012) Development of specific aspects of
spirituality during a 6-Month intensive Yoga practice. Evidence-based Complementary
and Alternative Medicine. doi.org/10.1155/2012/981523. [Epub].

New editions: Include date of first publication: Kant I (1784/1999) Was ist
Aufklärung? Ausgewählte kleine Schriften. Hamburg: Meiner.

Any help would be greatly appreciated!
  • For future reference, please put CSL files on pastebin.com, github.com or a similar site where we don't need to download the file to look at it.
    "Hrsg." should be "Hg." (I can't find this label anywhere in the code)
    You'd have to (re)define the form="short" term for editor as the style already does for editortranslator in row 21-22
    -Full stop instead of comma after publisher (New York: Oxford University Press. 184–213.) (I can't find the corresponding suffix/prefix/separator).
    You have a prefix=", " set for chapters in the locator macro, row 476. Changing this to ". " would fix this, but make sure that doesn't cause other issues.

    I don't see the issue with electronic publications. Just check for if variable="URL"?

    For ahead of print publications, we typically check for those by the absence of issue and volume (so if variable="issue volume" match="none").
    Exclusively electronic journals would typically have volumes but no page numbers.

    New editions -- you already have original-date in the style, you'd just have to rework how it's used.
  • Many thanks for your quick reply! I was able to fix a lot of it.

    Still struggling with this though:

    -For websites, term "accessed" should be "Zitierdatum". The current output however is "Zugegriffen." I can't find this string in the code. Where is this term stored and how do I change it?

    -It seems I can check for issue volume at locators (macro) > Conditional > If article-journal OR article > Conditional > If issued > Conditional > If NOT (page OR issue) > status (variable) ... However I'm not sure where I can define the variable to " [Epub ahead of print]"

    Thank you!



  • edited September 19, 2023
    1. Same thing as with the Hrsg. >> Hg. You need to redefine the term in your german locale section.
    <term name="accessed">Zitierdatum</term>

    2. You can use the term "preprint" and again, redefine it to "Epub ahead of print" as above and then use it where you need it.

    Considering you're probably going to put the style on the repository anyway and to make it easier for us to give help why don't you submit it on the repository and then make edits as you go along? See https://github.com/citation-style-language/styles/blob/master/CONTRIBUTING.md
  • edited September 19, 2023
    2. You can use the term "preprint" and again, redefine it to "Epub ahead of print" as above and then use it where you need it.
    I agree in principle, but don't use preprint (which is something else and you might want to still use). Please use the termadvance-online-publication instead. See https://docs.citationstyles.org/en/stable/specification.html#type-terms for a list of terms
  • (wasn't aware of that term so far. Thank you adamsmith)
  • Thank you both for your help! I could fix #1.

    As to #2, I changed Layout > Group > locators (macro) > Conditional > If article-journal OR article > Conditional > If issued > Conditional > If NOT (page OR issue) > status (variable) to term "advance-online-publication", which I defined as "[Epub ahead of print]"

    However, this string does not turn up on citations with no page or issue data. Also, many preprints have "0(0)" instead of empty fields, not sure if that would satisfy the If NOT (page OR issue) check.

    Here's the XML: https://pastebin.com/AbXaVgdi

    @damnation I've posted it on GitHub here: https://github.com/citation-style-language/styles/pull/6704


  • edited September 19, 2023
    Works for me for a paper WITHOUT issue and page.
    Campbell JL & Pedersen OK (2007) Copy: The Varieties of Capitalism and Hybrid Success. Comparative Political Studies 40. [Epub ahead of print].
  • @damnation Yes, that works for me too - not sure why it didn't with my test reference.
    However this doesn't count prepublications with "0(0)" as volume/issue, because conditions can only be set to "is present" or "is a number", but not "is number 0". Is there a work-around?

    Last open issue: is it possible to set conditions to catch articles in journals published exclusively in electronic form? The style guide requires these to be tagged with [Epub]. I guess whether a journal is electronic-only cannot be discerned from citation data..?

    Thanks!
  • CSL cannot test the content of a variable, so 0/0 won't be possible to achieve, afaik.
  • edited September 19, 2023
    In general, items without volume/issue numbers should not have junk data like 0/0 entered in their place—publishers should either not include those or users should remove that on import (or perhaps the Zotero translator should remove such data).
  • edited September 20, 2023
    OK - I'll remove 0(0) manually going forwards. It's fairly common, definitely worth stripping it automatically on import.

    One more thing:

    I tried to get direct quotes in this format: (Koenig 2012: 165–174) or (in case of only two pages): (Schweitzer 2004: 81 und 169).

    To replace "p." with ":" I added


    <term name="page" form="short">
    <single>:</single>
    <multiple>:</multiple>
    </term>


    But this created an extra blank space: (Koenig 2012 : 165–174). I fixed it by removing the group delimiter for author-short which created (Koenig2012: 165–174), then adding a blank space suffix " ". Not sure that's how it should be done.

    Anyhow, is there a way to get the "und" when two page numbers are given?

    GitHub here: https://github.com/citation-style-language/styles/pull/6704/commits

    Thanks everyone!
  • edited September 20, 2023
    No, you're going about this the wrong way. Not everything is solved by redefining terms. :D

    You'd change lines 621-5 to the following and set the delimiter on the groups for the various macros, as well as remove lines 527-529 (citation-locator macro).
    <group delimiter=": ">
    <group delimiter=" ">
    <text macro="author-short"/>
    <text macro="issued-year"/>
    <text macro="citation-locator"/>
    </group>
    </group>
  • That didn't work for me. When adding the group delimiter I got a syntax error, so I added an extra apostrophe: group delimiter=": "

    Removing lines 527-529 also creates an error, so I just removed line 527: text variable="locator" prefix=" " .. Or did you mean line 517-529 (the entire locator macro?)

    Now I'm getting this: (Mares 2001 S. 244–2522001 )


  • edited September 20, 2023
    I forgot a ". Sorry. fixed now.

    I think you're still new to CSL and still not sure about the basics yet.

    Let's analyse your citation-locator macro:

    <macro name="citation-locator">
    <group>
    <choose>
    <if locator="chapter">
    <label form="long" variable="locator" text-case="capitalize-first"/>
    </if>
    <else>
    <label variable="locator" form="short"/>
    </else>
    </choose>
    <text variable="locator" prefix=" "/>
    </group>
    </macro>


    It currently does prints out the locator variable for everything and adds the locator variables for. BUT it differentiates for chapters and everything else (else). For chapters it wants the long version ("Kapitel 13"), for pages etc. it will render the short form ("S. 13").

    So, if you want to remove the "S. " you just remove the complete "else" statement as that's where page locator labels would come from.

    Further to that, you're saying you're now getting (Mares 2001 S. 244–2522001 ).

    The in-text citation is rendered from what you have in citation>> layout, so lines 620-626.
    If you want to have a colon : between the author-date info and the locator you do what I posted above, earlier today. Add the colon in a group that contains the author-date stuff (in a group) and the citation-locator macro call.
  • Removing lines 527-529 still breaks the syntax for me:

    527: <text variable="locator" prefix=" "/>
    528: </group>
    529: </macro>


    After inserting your snippet at 621-5 it now looks like this:

    <layout delimiter="; " prefix="(" suffix=")">
    <group>
    <text macro="author-short"/>
    <text macro="issued-year"/>
    <text macro="citation-locator"/>
    <group delimiter=": ">
    <group delimiter=" ">
    <text macro="author-short"/>
    <text macro="issued-year"/>
    <text macro="citation-locator"/>
    </group>
    </group>
    </group>
    </layout>


    This produces "(Mares 2001 S. 244–2522001 )"

    Would you mind making the change as you suggest? Here's the code: https://pastebin.com/tY8F2Rg5
  • edited September 20, 2023
    I just posted a reply while you posted yours.

    (No need for pastebin if you have your PR on GitHub. It makes it more confusing, especially since the lines I mentioned refer to your code on GitHub)
  • edited September 20, 2023
    Yes, I am new to CSL. Thank you for explaining this!

    I think I have fixed it:

    -deleted the else-statement which produced "S."
    -added your group delimiter snippet
    -added a condition "if page is present" inside the macro "issued-year", which contains the value ":".

    Now the colon is printed as part of issued-year when there's a page number.

    I hope that is cleaner than my term definitions...?

    I've posted it on GitHub.
Sign In or Register to comment.