citation-label anomolies

I've been building a style using the Visual Style Editor at http://editor.citationstyles.org/visualEditor/ and using citation-label as my first entry in an inline citation, but am finding that if other variable fields or even macros are put after citation-label, the disambiguation suffix disappears. ? At first I thought it was my home-brew csl, but now I find it also happens with the other label based style https://www.zotero.org/styles/din-1505-2-alphanumeric.

Is this a bug?
Try putting another variable field or a macro in the din-1505-2 style right after citation-label and you'll see the odd behavior. You'll need to add a couple of ambiguous citations into one of the citation lists to see the before and after effects of the additional field.

I'm not well versed enough in these csl's to figure it out .. help??

edit-btw, it's not the Visual Editors problem, I was trying to correct the same problem I was getting when running the csl in Zotero. :(
  • could you give an example? If the _citation_ contains something other than the label, then we'd expect the disambiguation suffix to disappear since the citation is no longer ambiguous (even if the label might be).
  • edited March 20, 2014
    Ahh, Yes. That makes sense. I got so wrapped up in the csl 'hack' that I'm doing I totally lost track of zotero's original purpose. :-)

    I am modding a style to help me automate entries into DokuWiki that helps me build a listing page in DokuWiki syntax, which when pasted into it's editor gives me a wiki page name followed by the title. In DokuWiki the syntax [[citation-label | title]] yields a name that is a link to the page name/filename. The page name needs to be unique, so that's why I was using citation-label. What I really need is the non-existent unique zotero item id.

    I also have a biblio style that gives me an automated DokuWiki page item with title, document type, abstract, and a proper citation in DokuWiki footnote syntax but I was trying to be compact and have the page list generated by a note citation and the page text generated by the bibliography, all in the same style sheet. I see now that I need two csl files, both being bibliographies.

    I think I realize that citation-label would only be unique (for ambigious items) in any given multiple item selection .. or would it? Would it be unique for an entire sub-collection? I'm guessing no, but hoping someone says yes.
  • edited March 21, 2014
    The page name needs to be unique, so that's why I was using citation-label. What I really need is the non-existent unique zotero item id.
    well, that ID exists, it's just not accessible for citation styles. I'd recommend doing this as an export translator where you can get the unique item ID - that would be doable with very minimal javascript. Have a look at the translator fbennett and I use for our ODF scan add-on
    https://github.com/Zotero-ODF-Scan/zotero-odf-scan/blob/master/plugin/resource/translators/Scannable Cite.js
    which gives you the basic template. You should be abld to simplify this significantly.
  • Thank you for that, adam.
    I'll have a go at the translator route. It seems to be the right way considering I'm doing a re-purposing, hybrid thing.
  • edited March 25, 2014
    adamsmith ...
    <help!>

    I'm hopelessly lost trying to work with translators. I installed Scaffold, and I can't even figure IT out, lol. I've looked at two tutorials but they seem to deal more with scrapers and not so much with a pure export like I'm looking to build.

    Is there any chance I can commission you or someone to write what I need, based on my existing csl files? The content of the csl's is fine, but as I mentioned I need a unique and consistent zotero ID for my "cite"'s, and using citation-label almost works, but will cause me problems once I begin adding new items into zotero.

    I've put my two csl files here:
    https://github.com/JD4x4/zotero2dokuwiki

    If you or someone could even just get me started, I might be able to figure the rest out.. but at this point I'm ready to offer any sort of reasonable compensation! :-)

    btw, an example of the final output of a copy to clipboard and paste into DokuWiki from zotero, using dokuwiki-page-entry.csl is here:
    http://e-cigarette-research.info/doku.php/research:documents:bedo06
  • I've had a brief look at the CSLs, but I'm still not 100% sure what you need. Could you give examples of how this should look?
    I'm particularly confused by the bibliography of the "page-entry" csl.

    Doing something like [[|title]] is easy with a translator, but a full bibliography output is going to be more than a little tricky and if that's needed it may be better to consider another route.
  • Well, thanks for the quick response.. and as it turns out I've found a bug in the page entry csl and am thinking that is probably best to leave it as a csl.

    The dokuwiki-page-list.csl is the one that really needs a unique id in place of the citation-label, and it's likely easier since it's simpler?

    The output of it is literally : [[unique-id | title]], **type**, (author-short, mm-yyyy issued) \\

    I hope you can make all that out, but it's dokuwiki markup around these 5 zotero fields: unique-id (I'm using citation-label now), title, type, author-short, mm-yyyy issued.

    Does that make any sense?
  • edited March 25, 2014
    Basically, dokuwiki-page-list creates a clickable dokuwiki page link document, where unique-id is what dokuwiki will use as filename and create for me when I click the link. Once it's made the page name and put me in it's editor, I can then run the page entry cite to my clipboard and paste the formatted page-entry "cite" to give me a final page.

    The title after the pipe symbol, and everything else is what's visible on the list page and it's really there so I can then go back to zotero, find the item (by title, author, etc) and run the page-entry cite to grab the content for the unique-id named final page.
  • is type the content of the type field or the item type? If the latter, does it need to be in any particular format?

    Beyond that, I can put that together for you, shouldn't be hard/expensive. Contact me (Sebastian) at the e-mail at the bottom of this post:
    https://www.zotero.org/blog/summer-zotero-workshops/
  • edited March 25, 2014
    Well, ya got me on that distinction as well! :-)

    In zotero itself, it's what I see as "Item Type", but the csl field is just "type". The output doesn't quite match what I see in zotero (ie. Journal Article outputs as Article-Journal with sentence formatting) but that's close enough for me. Unless of course you're aware of something that might jump up to bite me later. But in reality, as far as the output of the page-list.csl, I could even omit it. I used it with the thought that I might keep the page list document as an index over the dokuwiki generated index.

    Thanks so much for your help. I'll contact you.
  • Sebastian ..
    I might be ok with this now. Somehow I had found old documentation on translators, as well as an old version of Scaffold. I've found v3 and better docs, so I might be able to muddle through it myself.
    .. But if you have started on something, I'd certainly take the easy way out! :-)
  • sounds good - this would probably take me no more than an hour, so just shoot me an e-mail if you get stuck.
  • Wow. I never thought this old dog (62) could learn javascript, but I built it.
    https://github.com/JD4x4/zotero2dokuwiki/blob/master/DokuWiki Page List Creator.js

    Thanks, Sebastian. Now, where do you export translator builders hang out? I want to build the page entry style into an export, but I need some serious schooling.
  • edited March 26, 2014
    that's very well done congrats.
    Translator development questions should go to https://groups.google.com/forum/?fromgroups=#!forum/zotero-dev
    (edit: note that especially your first post, but in general many posts with links, can get stuck in moderation for a bit, so if it seems to "vanish" just wait a bit)
Sign In or Register to comment.