Make a non-listed csl 1.0.1 valid
Hi,
I'm obliged by my university to use a specific csl which has not been published to this repository https://github.com/citation-style-language/styles (an older version is listed, universite-du-quebec-a-montreal.csl is still there but not maintained anymore by the university). As the older one is working fine with zotero and citeproc, the new one send me a warning when I import it in Zotero:
"style_UQAM.csl" n'est pas un style CSL 1.0.1 valide, et peut ne pas fonctionner correctement avec Zotero.
(or, roughly, "style_UQAM.csl" is not a valid CSL 1.0.1 style, and may not work correctly with Zotero.)
As I guess it would still work with Libreoffice Writer or Microsoft Word, my main problem is that I want to write in markdown and export pdfs using pandoc-citeproc. When I try to use pandoc with the flag "--csl=style_UQAM.csl", I get this error:
pandoc-citeproc: Prelude.head: empty list
pandoc: Error running filter pandoc-citeproc
Filter returned error status 1
I googled this error with and without specification about being a pandoc-citeproc specific error and it seems to be an Haskell error, a programming langage that I never used before. My main hypothesis is that pandoc-citeproc need a CSL 1.0.1 to work at all. I've written to my university to ask if that may be the case, but, as I'm waiting for an answer, I suppose I'll be asked to use a supported software, like LO or Word. If necessary, I would like to modify the csl file so I could use it but I'm new to editing those and I'm unsure what I should look for. Is there a tool I could use which could look for errors in the csl file? Do you have any tips for me? The style_UQAM.csl is available at this link : http://guides.bibliotheques.uqam.ca/uploads/uploads/original/style_UQAM.csl?1466513597
Thanks
I'm obliged by my university to use a specific csl which has not been published to this repository https://github.com/citation-style-language/styles (an older version is listed, universite-du-quebec-a-montreal.csl is still there but not maintained anymore by the university). As the older one is working fine with zotero and citeproc, the new one send me a warning when I import it in Zotero:
"style_UQAM.csl" n'est pas un style CSL 1.0.1 valide, et peut ne pas fonctionner correctement avec Zotero.
(or, roughly, "style_UQAM.csl" is not a valid CSL 1.0.1 style, and may not work correctly with Zotero.)
As I guess it would still work with Libreoffice Writer or Microsoft Word, my main problem is that I want to write in markdown and export pdfs using pandoc-citeproc. When I try to use pandoc with the flag "--csl=style_UQAM.csl", I get this error:
pandoc-citeproc: Prelude.head: empty list
pandoc: Error running filter pandoc-citeproc
Filter returned error status 1
I googled this error with and without specification about being a pandoc-citeproc specific error and it seems to be an Haskell error, a programming langage that I never used before. My main hypothesis is that pandoc-citeproc need a CSL 1.0.1 to work at all. I've written to my university to ask if that may be the case, but, as I'm waiting for an answer, I suppose I'll be asked to use a supported software, like LO or Word. If necessary, I would like to modify the csl file so I could use it but I'm new to editing those and I'm unsure what I should look for. Is there a tool I could use which could look for errors in the csl file? Do you have any tips for me? The style_UQAM.csl is available at this link : http://guides.bibliotheques.uqam.ca/uploads/uploads/original/style_UQAM.csl?1466513597
Thanks
and for this style there are indeed a whole number of problems: http://validator.citationstyles.org/?url=http://guides.bibliotheques.uqam.ca/uploads/uploads/original/style_UQAM.csl?1466513597&version=1.0.1#source-code
The pandoc error message is a bit cryptic, but you've made sure that the csl file is actually in your working directory when running that command?
http://guides.bibliotheques.uqam.ca/themes/108-Zotero-a-l-uQAM-et-Carrefour-Zotero
I can't find an english version of this page; if you need, I can translate.
You could try to contact the librarians (bibliotheques at uqam.ca) and point them to this thread. Obviously it's not good that they recommend the use of an invalid style. We'd be happy to work with them to update the copy in our repository with a new valid version.
(our repository style was submitted in 2013, and we haven't gotten any updates from the original submitter. See https://github.com/citation-style-language/styles/pull/428)
"· En effet, vous avez raison, l’usager qui télécharge le style UQAM reçoit un message précisant que le style n’est pas valide, mais même si il n’est pas parfaitement aux normes, il est tout à fait opérationnel et fonctionne bien avec Zotero.
· Le style va être corrigé en 2017 pour être conforme aux normes CSL, Rinze Zelle avec qui vous avez notamment communiqué a déjà pris contact avec l’UQAM.
· Comme vous l’avez probablement noté, le style UQAM actuel est bien différent du style UQAM (Bouthat) (=ancien style UQAM), ce dernier a été codé en CSL par des étudiants et rendu disponible sur le répertoire des styles
de Zotero, alors que le style UQAM actuel n’est pas encore disponible sur le répertoire des styles Zotero. Bien sûr, dès qu’il sera valide au regard des normes CSL, probablement pour l’automne 2017, il sera déposé sur le répertoire de styles Zotero.
· Évidemment, si vous êtes déjà à même de rendre le style UQAM actuel conforme, ce serait apprécié, pourquoi pas ? Vous pouvez nous faire parvenir le fichier CSL dans ce cas. Soyez assuré que votre contribution serait mentionnée sur notre site Web, en plus d’apparaître dans les métadonnées du fichier CSL.
· Dans l’attente de la validation du style, je n’ai pas de solution pour votre utilisation du logiciel Pandoc, peut-être vous rapprocher du service informatique de l’UQAM pour voir s’ils assurent le soutient à ce logiciel : https://servicesinformatiques.uqam.ca/accueil . De mon côté, je ne l’ai pas vu dans leur liste."
https://www.zotero.org/support/dev/citation_styles/style_editing_step-by-step gives you some initial pointers on CSL
Depending on how far you get, either follow-up with questions here, or include them in a pull request for the style:
https://github.com/citation-style-language/styles/blob/master/CONTRIBUTING.md
For this forum, if you have any questions, please include the code you're asking about. You can encode small code snippets (<10lines) usinge <code> </code> tags. Post longer code passages to gist.github.com and link to them here.
I just had a quick look and it seemed quite easy things that were broken.
It validates now, but I didn't check if the various types of references (journla article, book, chapter etc) actually look like they should, so it would be good if you could do the testing and let us know if it actually looks like it's supposed to look. (or can you specifically pinpoint where the examples are in the pdf. so much going on there...)
https://gist.github.com/damnation333/0b0a082dad1e19c5c51031908e96cb1c
From what I gather they style in the repo is old and very different from this one and the old not used anymore? It would be good to get this one uploaded, so students don't use the old one then.
If they want to update their copy, they can download our latest version at https://raw.githubusercontent.com/citation-style-language/styles/master/universite-du-quebec-a-montreal.csl.