Open ctgraham opened 3 years ago
@seboettg , do you have any feedback on this?
I have also encountered the same issue. I was able to reproduce this with chicago-author-date.csl.
In the case @ctgraham describes, it looks like the .
is added as a prefix to the journal title, e.g. . <i>Futures</I>
so <style-options punctuation-in-quote="true"/>
for the article title wouldn't capture it since .
is a prefix to a separate Text
node.
Hi @ctgraham! Sorry for my late response. Unfortunately I have no good news regarding this issue. I have no idea how to solve this. The problem is the structure of the Stylesheet and the way how citeproc-php handles that. citeproc-php interprets a stylesheet as a tree and it travers through the branches and executes the "instructions" of the respective branch step by step.
In short, the structure of the stylesheet looks like this:
<style>
<bibliography>
<layout suffix=".">
<group delimiter=". ">
<text macro="author"/>
<text macro="title"/>
<text macro="container-title"/>
</group>
</layout>
</bibliography>
<macro name="title">
<text variable="title" quotes="true" text-case="title"/>
</macro>
<macro name="author">
<names variable="author">
<name name-as-sort-order="first" and="text" delimiter-precedes-last="always" delimiter-precedes-et-al="always" initialize="false" initialize-with=". "/>
</names>
</macro>
<macro name="container-title">
<text variable="container-title" font-style="italic" text-case="title"/>
</macro>
</style>
citeproc travers the style as follows: style > bibliography > group
. Afterwards it renders each macro that is linked within this group (author, title, container-title) and remembers the results. Once citeproc is finished with each macro, it concatinates the results and separates them with the defined group delimiter ". " from <group delimiter=". ">
. At this point citeproc has already finished the rendering of the title including quotes and other style defintions of the title and doesn't care about quotes and even doesn't know about quotes.
I've encountered similar problems over and over again reagrding the specification of CSL. Most problems I could solve by more or less hacky workaround approaches but in this special case I have no idea how to make a workaround.
You may change the stylesheet by removing delimiter=". "
from group and add suffix=". "
at text
and name
tags of the affected macros. I think this would solve your issue.
Please follow the general troubleshooting steps first:
Bug reports:
C.f. #50, but without the tag
<style-options punctuation-in-quote="true"/>
. Also tried adding thestyle-options
to the CSL, but no change in output. Reproduced the unexpected behavior inciteproc-php
2.2.5, but not in Zotero's or ExLibris Primo's interpretation of the MLA stylesheet.Expected:
Actual:
Used CSL stylesheet:
modern-language-association.csl 7140f39
Used CSL metadata