Citation Style Help: Superscript citation number in bibliography

Hi all,
I'm trying to get the citation numbers to become superscript, without a space, at the beginning of the line in the bibliography. I tried making it like the <citation> field, but that didn't work so well. Can anyone help?

FWIW, this is related to the AIAA journal style, so if this has been done already, please point me there. I tried searching the forums but all I found was a request for the citation style.

Thanks!
Bryan
  • Hard to say without more information. The <citation> field in which style, for example.
  • Ha, oh sorry. From the ACS style, the citation field is:
    <citation>
    <option name="collapse" value="citation-number"/>

    <sort>
    <key variable="citation-number"/>
    </sort>

    <layout delimiter="," vertical-align="sup">
    <text variable="citation-number"/>
    </layout>
    </citation>

    This causes the citation number to be superscript at the location of the cursor when the citation is inserted. I would like the same superscript number to appear before the bibliographic entry.

    Thanks!
    Bryan
  • Try moving vertical-align="sup" from the layout node to the child text node that renders citation-number. The collapse and sort key stuff from citation is irrelevant to superscripting, so if you've added that to bibliography, it can be removed.
  • That results in all of the text in the bibliography being superscripted - even thought the vertical-align key is only in the text tag to specify the citation number.

    Thanks
    Bryan
  • Oh, dear. I filed a little patch for this a month ago. I just checked my installed Zotero, and it looks like it hasn't made it in yet. If you're up to fixing up the source yourself locally, the patch is available in the Files area on the zotero-dev group page. That would only heal things for your particular installation, though; everyone else will see the broken behavior.

    Good luck.
  • Is there a page on the wiki with instructions for compiling the patch into the source? I'm familiar with the concept, but not the particulars of Firefox extensions.

    Also, does the vertical-align="base" fix, suggested here (http://forums.zotero.org/discussion/12112/verticalalign/#Item_0) work yet?

    Thanks!
    Bryan
  • I've extracted the .jar file in \%Firefox Profile%\extensions\zotero@chnm.gmu.edu\chrome. Into which file do I put the patch? I believe the next step would then be to zip the 3 directories which were unzipped back into another .jar file and replace the original.

    Thanks!
    Bryan
  • Sorry for so many posts. Based on the header of your patch, I think the patch code should be copied into the csl.js file in the \content\zotero\xpcom folder. Now my question is, where? There is the section "Zotero.CSL.prototype.formatBibliography". Should it go somewhere in there? Does it matter where?
  • edited May 13, 2010
    The "base" or "baseline" parameter is a noop in the current processor as far as I know. It is included in the CSL 1.0 specification, but I haven't yet bothered to implement it in the new processor. It is unlikely ever to be necessary, if the "sub" and "sup" parameters function correctly.

    For patching Zotero, you're pretty much on your own. You need to find the place where zotero.jar is stored on your system, unpack it with "unzip" or a similar utiity, find the target file (csl.js), patch it with a "patch" utility (or by hand-editing the csl.js file with a text editor), and then repacking the file contents with the "zip" utility or something similar. The details of how all that works will depend on your operating system.

    (Edit: @darthbith sorry for being unresponsive [I was asleep]. Very glad to hear you've gotten it sorted out.)
  • Good luck, I hope it works for you. (I'll just note in passing that none of this extra work would/will be required if the patch were/is merged into Zotero proper.)
  • Quote: "(or by hand-editing the csl.js file with a text editor),"

    If I want to do that, where do I paste the code from the patch file?

    Thanks!
    Bryan
  • For posterity, if you search for "rtfAttributes" (without the quotes) in the csl.js file and replace the "addAfter" line with what appears in the patch file after the "addAfter" line in the patch (i.e. all the lines with + at the beginning), this functionality will be enabled.

    Bryan
Sign In or Register to comment.