Style Generator

Hello
i've starded a style generator yesterday. It's not yet finish but it works. I think i could make a first version for next week.
In the end it won't made a perfect style because it will be only possible cite one element:
article or book or chapter etc...

EDIT: change url to new version

if you want test and comment you can found it there

excuse my english
«134
  • Cool.

    You might look on the dev list for some upcoming discussions on this issue.
  • edited June 2, 2008
    Hi
    Ok i'll look.

    EDIT: link to the new version
    I've update the page

    -numbered citation works
    -authors like citation works but all options are not yet avaible

    I hope there is not a lot of error
  • thanks a lot - progress on this is really much appreciated.

    I may work this wrong, but at first try one pretty essential thing is not working yet: I can only have one font style for "title" for example - but, of course, I usually want titles for journal articles (and similar things) in quotation marks, while I'd want titles of monographies in Italics. Generally, a lot of the stuff done by macros in the styles isn't working, so that the different nature of each format can't be taken into account.

    There may be more things, but that's the first I noted.

    If you want to work on usability, maybe you could try to combine this with the
    chrome://zotero/content/tools/csledit.xul
    test pane, so that whenever you click generate it automatically shows you citations of a selected Zotero reference?

    Once again, thanks for trying to tackle this!
  • Hi

    Thanks for your comment.
    You are right this version don't use macro and it's the first problem. I've made it to better understand the work to do and have a quickly working script.
    To use macro and have multiple style i must change all the presentation: there so mutch options!
    I'm currently working in a new version witch 'll able to use macro.

    Using zotero test panel is a good idea but i can't work on it now .
    I hope having a style auto installation too.
  • edited April 26, 2008
    If you want to work on usability, maybe you could try to combine this with the chrome://zotero/content/tools/csledit.xul
    test pane, so that whenever you click generate it automatically shows you citations of a selected Zotero reference?
    I think this is the wrong direction. This needs to be a web application, so previewing needs to happen independent of Zotero.

    Also, Jon (who posted a note on the dev list) is working on designing a web interface and will post examples soon.

    My design ideas are quite different than lemaxx's. In my approach, you'd drive the design using (required) metadata and a rich collection of macros. It's too complicated to force users to do all this low-level stuff.
  • I think this is the wrong direction. This needs to be a web application, so previewing needs to happen independent of Zotero.
    I presume (please correct if wrong!) this is because you're thinking here of creating generic CSL files, which are of course independent of Zotero. I do think there is real value in that as far as promoting citation standards. But I'm wondering if it wouldn't be easier and in some ways nicer to have a Citation Style Editor as part of Zotero (or at least that closely integrates with it) that can create and modify CSLs with attention to how Zotero manages bibliographic data, as what we (or any reference manager) can spit out is only as good as how it's schematized in the first place. I'm particularly interested in the case of how users handle exceptions to the generic formatting rules that CSL provides. Is it a good idea to allow them to edit their local CSL files (and perhaps share them if generally useful) to handle cases that a base CSL file had wrong or did not accommodate--while using their own bibliographic data as test cases?

    Apologies if my post exudes undue ignorance--i'm still trying to get my head around some of these fascinating issues.
  • I presume (please correct if wrong!) this is because you're thinking here of creating generic CSL files, which are of course independent of Zotero
    The whole point of CSL is that the styles are "generic" and will render the same in any client that supports the standard. If there are things that CSL can't currently support, they should be discussed on the XBib list.
    Is it a good idea to allow them to edit their local CSL files (and perhaps share them if generally useful) to handle cases that a base CSL file had wrong or did not accommodate--while using their own bibliographic data as test cases?
    If the base CSLs are deficient, they should be improved, not forked. SVN commit access to the CSL directory is open to anyone with a Trac account.

    I think the key here is to develop a comprehensive test library that covers a wide range of edge cases so that it's possible to see at a glance what's supported and what needs to be fixed.

    Unit testing would also be helpful here. If the correct output of a particular reference for a particular style is known, the repository should verify the output when changes to the CSL are committed and flag errors on the preview page.
  • A new version available here you can now manage exceptions for you bibliography
  • Is there any chance that you could add ISBN # as one of the fields to be generated?
  • Yes i'll try test that asap
  • It *might* be worth considering folding ISBN into a more generic "identifier" macro call (that would also configure DOIs amd such)?
  • I'm most likely missing something obvious here as I've only played around with the new version a bit but how do you get it to put an "and" or "&" between two authors in a simple author-date citation e.g. (Adorno and Horkheimer 1997) all I can get it to do at the mo. is (Adorno Horkheimer 1997).
    Thanks for all your work.
  • @jon: look for the "author settings" pane and select from the "And" pop-up.

    Max: the UI needs to provide a little help on some of the more obscure options here.

    Also, somehow it needs to make clear that these rules are not just for authors, but also for other contributors. In some of the styles we've done more recently, we have a separate "name" (or "names"; I forget) macro to do this.
  • bdarcus, sorry , should have been clearer that I was after altering the way the intext citation works, rather than the bibliography. Your suggestion gives me an "and" or "&" in the bibliography, but not the intext citation, which is what I was after.
  • oops; yeah, doesn't seem possible. Really need a consistent interface logic between the citation and the bibliography section. This will become particularly apparent when dealing with note styles that don't have bibliographies.
  • It would nice to be able to change an already made style. Say I want to add an exception later on cause I figured out that I had "Book chapter" in my reference list and I didn't include an exception for that when I made the style.

    This is just hypothetically
  • Changing an already-made style would be much more difficult to program. However, one variant that is easier is to be able to create styles based on a pre-set group of existing styles. E.g., have a few core styles with pre-determined defaults, and to select those.
  • Is it possible to sorting order of in-text citations.

    I want to decide if it should sort by author or by year (ascending/descending)


    Johan
  • edited June 7, 2008
    I really like this style generator but I do have some troubles

    I'm having trouble setting & as "Delimiter between authors". When I do that I get

    XML Parsing Error: not well-formed
    Location: file:///D:/test-7-06-06-07-08.csl

    Line Number 81, Column 21:
    --------------------^

    when trying to add the file

    Furthermore, I wonder how to get the Initial after the Last name instead in front of in the bibliography

    I can only get J Asplund and not Asplund, J

    I am also having trouble with the et al in citation. I've set it to minimum 3 author but it doesn't work no matter how many authors I have per reference. If this would work where do I change et al to italics?

    I can't seem to get Collapse: Year-suffix to work
  • edited June 7, 2008
    I'm having trouble setting & as "Delimiter between authors". When I do that I get

    XML Parsing Error: not well-formed
    Location: file:///D:/test-7-06-06-07-08.csl

    Line Number 81, Column 21:
    --------------------^
    Two problems here. First, you're not using the right field for this; you should use the "and" pop-up select.

    Second, Max needs to deal with creating and validating the CSL files using proper XML libraries. The character "&" is invalid XML, and needs to be escaped. XML libraries will do this automatically.
    Furthermore, I wonder how to get the Initial after the Last name instead in front of in the bibliography

    I can only get J Asplund and not Asplund, J
    In CSL, initialization is independent of name order. This appear configurable in the bib section under "authors settings"). As I say above, this all needs to be generalized so that it can be configured also in the citation.
    I am also having trouble with the et al in citation. I've set it to minimum 3 author but it doesn't work no matter how many authors I have per reference. If this would work where do I change et al to italics?
    You need both the first two options in that section (including the "use ..." and "minimum ...").
  • There's no "and" pop-up selection for in-text citation only for bibliography

    Where in the "authors settings" can I find settings for putting initial after last name?

    et al...
    Do you mean that I need to set both
    "Minimum authors to activate et-al in citation" and "How many authors include before et-al in citation" That's what I did and it didn't work I set the latter to 1
  • Hello thanks for all your feedback. I apologize i am very busy this week so i have hold development.

    I test to add "and" in citation, i make a "how to" but it take a while.

    "Second, Max needs to deal with creating and validating the CSL files using proper XML"

    Yes i work on it , for next version.

    Asplundj : To activate "et al" you need set the two fields. If it don't work there is a problem i will search
  • As I said I set the two fields and it didn't work


    Thanks
    Johan
  • edited June 10, 2008
    I find what's wrong with the et al thing now

    it only adds

    option name="et-al-subsequent-min" value="3"/>
    option name="et-al-subsequent-use-first" value="1"/>

    not

    option name="et-al-min" value="3"/>
    option name="et-al-use-first" value="1"/>

    meaning that it will not work on the first citation but only subsequent of the same author.
  • Yes you are right
    zotero use "et-al" in citation if they are configure in citation and in bibliography options


    Sorry i am not yet ready to add help in the generator
  • But if you want different et-al options in citation and bibliography?

    as it is now citation-options are added if I add options for bibliography these are hardly ever the same


    Johan
  • yes there is a problem, et-al in citation work like in bibliography but i don't know why.
    I'll work on it
  • big step forward with this approach. However it would be nice to somehow integrate a wysiwg-line. Maybe via a basic dummy reference where after selecting the style parameters you get the style entry before confirming for creation?
  • Ingino it could be an option.

    Johan i think i understand the problem:

    to manage et al in citation you must have this in citation part:
    <option name="et-al-min" value="6"/>
    <option name="et-al-use-first" value="4"/>
    <option name="et-al-subsequent-min" value="3"/>
    <option name="et-al-subsequent-use-first" value="4"/>

    and this in bibliography part:

    <option name="et-al-min" value="6"/>
    <option name="et-al-use-first" value="4"/>

    but now if you want only 1 author in citation and 4 in bibliography you don't change the bibliograpy part but the citation you must have:

    <option name="et-al-min" value="6"/>
    <option name="et-al-use-first" value="1"/>
    <option name="et-al-subsequent-min" value="3"/>
    <option name="et-al-subsequent-use-first" value="1"/>

    I think the problem is my script don't change the et-al-use-first value in citation but keep the bibliography value.


    If someone could confirm i 'll change that
  • Yes, that's correct. There are essentially two independent contexts (citation and bibliography) and two different conditions (first and subsequent) in which et-al can be configured.
Sign In or Register to comment.