seboettg / citeproc-php

Full-featured CSL 1.0.1 processor for PHP
MIT License
75 stars 39 forks source link

Punctuation issue (OJS Citation Style Language plugin) #84

Closed dionojs closed 4 years ago

dionojs commented 4 years ago

Bug reports:

commas are always shown inside quotes in American English based styles (they shouldn't) even though punctuation-in-quote="true" is set within the us-EN locale and even though we also put it in the csl style files. This is related to OJS Citation Style Language plugin that uses citeproc -php to show "how to cite" suggestions (dropdown menu with different styles) in the abstract page of published articles. A more detailed description at: https://forum.pkp.sfu.ca/t/citation-style-language-punctuation-issue-ojs-3-1-2-4/60314

Used CSL stylesheet:

all american english styles (e.g. ieee.csl)

seboettg commented 4 years ago

Hi @dionojs, thank you for that bug report. I have made some changes that could solve the described problem. Please checkout the master branch and test if the issue is solved. I'm looking forward for your feedback. Kind regards, Sebastian

dionojs commented 4 years ago

unfotunately we had to customize this plugin to bypass the bug, so it is not possible for me to check now. However, thank you for your time and for considering this. I suppose that we are not the only ones with this issue so it would be a helpful bug fix for all the OJS community. On Sunday, August 30, 2020, 07:52:36 PM GMT+3, Sebastian Böttger notifications@github.com wrote:

Hi @dionojs, thank you for that bug report. I have made some changes that could solve the described problem. Please checkout the master branch and test if the issue is solved. I'm looking forward for your feedback. Kind regards, Sebastian

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

seboettg commented 4 years ago

Hi @dionojs! I'm sorry, but it doesn't work that way. If you open a ticket, you are responsible for it. Ok, I fixed this (in my spare time) 'cauce you wrote a bug report. And it is a lot of work to maintain this library. I think it's ok to expect that a bug reporter also checks if a bug is fixed.

So, whatever you did with a plugin, you still using citeproc-php. If you use it as a part of another library, please contact the maintainer of the other library for a check.

Moreover, it is no problem to write a json file with your metadata and write a small test example as described in the README.

<?php
include "vendor/autoload.php";
use Seboettg\CiteProc\StyleSheet;
use Seboettg\CiteProc\CiteProc;

$data = file_get_contents("metadata.json");
$style = StyleSheet::loadStyleSheet("harvard-north-west-university");
$citeProc = new CiteProc($style);
$bibliography = $citeProc->render(json_decode($data), "bibliography");
$cssStyles = $citeProc->renderCssStyles();
?>
<html>
<head>
    <title>CSL Test</title>
    <style type="text/css" rel="stylesheet">
        <?php echo $cssStyles; ?>
    </style>
</head>
<body>
    <h1>Bibliography</h1>
    <?php echo $bibliography; ?>
</body>
</html>

Thank you.

seboettg commented 4 years ago

Solved with v2.2.1.