Repeating some fields twice - Zotero fault or Style fault?

I have been editing the CSL file I will be using for an assignment before I start and it has been going well but I have noticed during the checking process that some fields are being repeated. For example, the publisher is reproduced twice despite there appearing to be no reason for this. This also appears to be happening with the institution field. I believe it's happening on several item types. I'm at somewhat of a loss to track down the cause and would appreciate some help if possible.
  • almost certainly an issue with the style. We'd have to see the style to say more: post to gist.github.com (if you have a github account) or a comparable site (pastebin.com , hastebin.com - please find a site where we don't have to download a file to look at the code, though, so Dropbox won't do) and we can take a look
  • Thank you for getting back to me, I must have just missed you last night! I have created a pastebin account as I don't seem to have a github one (I thought I did!). Here is the link: https://pastebin.com/RR6hp9C7. Any help you can provide will be greatly appreciated.
  • Could you paste a sample citation that comes out wrong right here? Don't worry about formatting like italics et al.
  • This is it produced using a right click command, create bibliography item from Zotero:

    BOOTH, T. and AINSCOW, M., 2002. Index for inclusion: developing learning and participation in schools. CSIECSIE.
  • You have the publisher macro in the macro "locators" that macro, in turn, shows up both in the bibliography and in the title macro (which is also in the bibliography), so publisher -- and anything else in the locators macro -- gets printed twice
  • Thank you for that - I thought it was connected with the locators macro but I was thinking that and the publishers one and I just couldn't see how! Now I understand. Thank you, I will try and make sure it's now right. The problem must have existed in the style I am editing but must not have been picked up at that point because I have not edited to that extent. I have added in some bold and a prefix or two but nothing more really.
  • Are there any tips for good formatting rules? I note that adding a prefix and/or a suffix can make the bibliography look a bit odd in places so I wondered if anyone has put up any good guidelines to follow? If not, never mind, but it might be useful if anyone has to view them. Otherwise, I removed the repeating macro from the title macro because removing it from the end of the bibliography meant that it removed other vital details that I wanted included and it didn't seem to serve any other purpose in the title macro that I could see. The Bibliography now looks clean and, dare I say it, ready. I am going to re-check it with our library's guide and then, hopefully, I will be ready to use it. Very grateful for your help.
  • edited April 3, 2020
    Since I made that original style, it certainly didn't have that mistake. ;)
    (original style> https://github.com/citation-style-language/styles/blob/master/queen-margaret-university-harvard.csl)

    You are calling the locators macro twice, once in the bibliography part, but you added it also INTO the title macro which is also called in the bibliography part. Hence the duplication. (line 147 or something)

    -------

    One general formatting rule for a robust code: use groups with delimiters instead of prefix/suffix.
  • edited April 3, 2020
    I do apologise! I don't remember doing that! I have been working on it for a week and I originally started using the Visual Editor, perhaps I added it accidentally before I went through the specification and learned more. My sincere apologies. I don't know why I would have added the locators macro in the title macro. I do see, looking at the version of the Bibliography your style produces, that I don't end up with everything that our library guide requires, and that must have been why I did it, but I made a mistake in thinking that your version introduced the error and for that I humbly apologise.
  • As I edited your original work, I wanted to ensure that I correctly attributed it and I don't think I have. It doesn't seem to want to take two names. I don't have any difficulty with not being mentioned in the file as it's mostly not my work but I want to make sure that I follow the right protocol. How should this be done when one person writes the style and it is then edited by someone else?
  • ah, don't worry. Just messing ;)

    The way we do it on the repository is add the template link to the style you used as a template. That's enough acknowledgement. And then you can change my name with yours as the author. :)
  • Ok, I think I see how that works. Thank you for your understanding! Wouldn't want to upset anyone :-D! I haven't had to work with any form of XML much before, just not needed to, so it's been interesting. I just worked my way through the specification, but there seems to be more that I'm missing. I'll doubtless pick it up! Thanks for the tip on the group delimiters - I can do some experimentation - in one case it didn't work well but I'll experiment. Aberdeen University's School of Education is fairly specific in its requirements, hence editing a style, but it'll be good to have something that fits the bill - maybe someone else will find it useful!
  • When you're done, upload it to the repository. We'll have a look over it and can give you some more pointers how to make the code nicer. (also, then other people can find the style and contribute to it if there's little mistakes (totally normal)).
  • That would be great. I'll keep going. My assignment deadline isn't until early May so I have a bit of time just now.
  • @damnation I believe my style is ready to upload to the repository - it's been a bit of a journey so, whilst I have quite thoroughly checked the output against every example I can, I'm still expecting changes!

    Do I still follow these instructions? or should I be doing it differently - searched for how to upload:

    "3b. Submitting changes to an existing style
    Visit https://github.com/citation-style-language/styles and find the style you wish to change (dependent styles are stored in the dependent subdirectory). To search by file name press "t" (this activates GitHub’s File Finder) and start typing.
    Click on the style name, which will bring you to a page like https://github.com/citation-style-language/styles/blob/master/apa.csl.
    Click the edit icon (in the shape of a pencil). This opens a code editor in which you can make your changes (you can for example copy and paste your modified style into this window).
    Once you have made your changes in the "<> Edit file" tab (and previewed the changes in the "Preview changes" tab), click the "Propose file change" button.
    In the next window, click the "Create pull request" button. Describe the changes you've made, and click the "Create pull request" button once more."

    It just seems that I'll then be pasting the whole file into that?

    Thanks in anticipation :-)
  • It sounds like yours is a new style -- based on an existing style, but with a different name etc.. In that case you'd follow 3a, not 3b on that page.
  • Thanks, I'll follow 3a, that was sort of my instinct but I didn't want to presume. It is, it has a different name but is based on an existing style.
  • edited January 25, 2021
    Hello everyone,

    I need to use the University of Aberdeen's School of Education style, which @Lleigh has worked upon with such care and devotion, but unfortunately, the style was recently (July, 2020) updated by the University and rendered her efforts (April, 2020) outdated:

    https://www.abdn.ac.uk/library/documents/guides/ugedu010.pdf

    I only realised this when I was about to turn my paper in (big mistake) last semester, so I had to make several corrections by hand.

    Although I tried to edit the original style (and managed some successful changes, others not so successful), I am really not talented at all with CSL despite reading the manual over and over (it's all a bit over my head, to be honest).

    I was wondering if anyone would be willing to give the style a make-over? I wouldn't mind tipping for any efforts, although as a student I count on your understanding that this won't be a lottery ticket for you. ;-)

    Thanks a lot in advance and thank you, @Lleigh, for all your efforts so far.
  • I think if you create a basic list of changes, ideally by order of imporance/priority, good chance someone will take a look
  • Thanks for the tip, @adamsmith ! :-)
Sign In or Register to comment.