Automatically Superscript Citations in Word 2007
I've tried searching but no luck.. Is there a way to automatically have zotero insert citation numbers as superscripted in word 2007 (I know I can manually edit each citation). I need vancouver style citations but with superscripts not (x). Can I edit the style like I can with Endnote?
This is the only thing stopping me from ditching endnote completely..
This is the only thing stopping me from ditching endnote completely..
http://www.zotero.org/support/dev/creating_citation_styles
http://www.zotero.org/support/dev/csl_syntax_summary#formatting
So these lines:
<layout prefix="(" suffix=")" delimiter="; ">
<text variable="citation-number"/>
</layout>
should become:
<layout delimiter="; ">
<text variable="citation-number" vertical-align="sup"/>
</layout>
http://gist.github.com/raw/90150/e34437061dcc4215b84f5c4328a19824b071b821/vancouver-superscript.csl
That one works for me (I made the exact changes as outlined above).
<layout prefix="[" suffix="]" delimiter="; ">
<text variable="citation-number" vertical-align="sup"/>
</layout>
Thanks for more help.
<layout prefix="[" suffix="]" delimiter="; ">
then becomes<layout delimiter="; ">
Statement1; 2 (just the numbers are superscripted the ; is regular font)
but I'd like it to be
Statement1, 2 (all superscript)
I hope that makes sense. Thanks for all your help.. This is saving me so much time in working through references!
<layout delimiter=", " vertical-align="sup">
<text variable="citation-number"/>
</layout>
Is it possibe to put this style up in the style section as I need exacty the same style for my work, and I am struggling with the code.
The main difference being that the in text citations are in supersciprt without brackets of parenthesis and that a coma "," is used to separate two references.
Good explanation:
www.fgdp.org.uk/pdf/vancouver.pdf
From the University of Surrey:
In the Vancouver style, a consecutive number is allocated to each reference as it is cited for the first time in the
text of the assignment. This number becomes the unique identifier of that source and if the source is cited again
the same number is repeated. Numbers are inserted to the right of commas and full stops, and to the left of
colons and semi-colons. Multiple sources can be listed at a single reference point. The numbers are then
separated by commas and consecutive numbers are joined with a hyphen. Vancouver uses superscript
numbers, or standard numbers in brackets, in the text, e.g. 1-4,10,12 or (1-4,10,12).
The references are listed at the end of your assignment in the numerical order in which they are cited in the text.
The main advantage of the Vancouver style is that the text reads more easily, without the intrusion of in-text
citations which can be difficult to keep brief. The reader can also check the references as they read through the
text, without having to search through the list alphabetically for the first author of a particular reference.
P.S. I added the style. It may take some time for it to show up though in the Style Repository.
K
I have been using the new superscript style and it works beautifully.
K
kaarthur, the only thing to watch out for is the number of authors in the references, as that sometimes varies by journal,ie how many authors before "et al" is used etc. This can be customized in the csl file.
<layout prefix="[" suffix="]" delimiter="," vertical-align="sup">
<text variable="citation-number"/>
</layout>
However, I can't get what I want. In Word, just the citation-number is superscripted; in OOo, just the citation-number and the suffix string are superscripted.
I tried to check extensions\zotero@chnm.gmu.edu\chrome\zotero\content\zotero\xpcom\csl.js and Zotero-Word-Plugin to find out what happened. But failed.
Thanks for any help.
It's no immediate comfort, but the new CSL processor I'm working on will handle this correctly. Ranging will also work, so with numbered references you should also be able to get something like [1]-[4] and [1],[3],[5]-[7], superscripted. It's not quite done yet, but it's in the works (I'm building this part of the thing this week and next), and if all goes well (touch wood), the processor will eventually be deployed in Zotero.
Small steps ...
After doing some modifications to \chrome\zotero\content\zotero\xpcom\csl.js, I got what I want, which is to format the prefix and suffix in the citation layout.
Here is my patch (More tests needed!):
================================
*** /chrome/zotero/content/zotero/xpcom/csl.js Thu Mar 19 12:19:44 2009
--- /chrome/zotero/content/zotero/xpcom/csl.js Thu Apr 23 17:17:14 2009
@@ -2613,9 +2613,16 @@
this.closeFormatting += formattedString.closeFormatting;
this.closePunctuation += formattedString.closePunctuation;
}
+
+ if(haveAppended && suffix !== false)
+ {
+ var oldCloseFormatting = this.closeFormatting;
+ this.closeFormatting = "";
+ this.append(suffix, null, true);
+ this.string += oldCloseFormatting;
+ }
+
- // append suffix, if we didn't before
- if(haveAppended && suffix !== false) this.append(suffix, null, true);
return haveAppended;
}
@@ -2842,7 +2849,8 @@
}
}
- this.string += addBefore+string;
+ //this.string += addBefore+string;
+ this.string = addBefore+ this.string + string;
if(element && element.@suffix.length()) {
this.append(element.@suffix.toString(), null, true);
================================
The debug output before using this patch:
================================
<updateCitationsResponse>
<citations>
<citation index="0">
<text>{\rtf [\super 1\super0 ]}</text>
</citation>
<citation index="1">
<text>{\rtf [\super 2\super0 ]}</text>
</citation>
<citation index="2">
<text>{\rtf [\super 3-8,2\super0 ]}</text>
</citation>
</citations>
</updateCitationsResponse>
================================
after patching:
================================
<updateCitationsResponse>
<citations>
<citation index="0">
<text>{\rtf \super [1]\super0 }</text>
</citation>
<citation index="1">
<text>{\rtf \super [2]\super0 }</text>
</citation>
<citation index="2">
<text>{\rtf \super [3-8,2]\super0 }</text>
</citation>
</citations>
</updateCitationsResponse>
================================
fbennett said:
It's no immediate comfort, but the new CSL processor I'm working on will handle this correctly. Ranging will also work, so with numbered references you should also be able to get something like [1]-[4] and [1],[3],[5]-[7], superscripted. It's not quite done yet, but it's in the works (I'm building this part of the thing this week and next), and if all goes well (touch wood), the processor will eventually be deployed in Zotero.
I hope he had done. Thanks
which you should be able to find with a regular search - (it's somewhere in the extension folder of your firefox, where exactly depends on your system.
I wouldn't suggest you try to patch it unless you at least know more or less what you are doing.
I I works on Zotero 1.5b2, firefox 3.0.10, and Chinese-Std-GBT7714-Numeric.csl. It requires the prefix and suffix string [] superscripted also. I use Zotero for my master paper which should be completed up to May 15. any suggestion?
Citations like: 2,4-6)
where all the characters including the comma and the parenthesis are superscripted (style as required by the Japanese Journal of Applied Physics) now works without problems.
A big thank you for the fix!
Those codes ONLY appliy to when MULTIPLE-citations are being added at once. However when the user adds a citation, and afterward finds and adds another citation exactly beside the previous one, unlike Endnote, Zoterro can't understand to merge those fields into one, and then re-apply the Style to the newly created bigger field.
Does someone knows how to fix it?
Additional details are described here:
http://forums.zotero.org/discussion/9199/vancouver-style-a-comma-between-two-neighbor-but-separated-fields-needs-automerging-those-fields/
thank you very much :)
* CommentTimeSep 25th 2009
"It looks like this superscript issue has been fixed now. I'm using Zotero 2.0b7.2 + WinWord 3.0a2 without problems."
It's a very good news! But I'm using openoffice 3.1 where the citations and ] are superscripted, but [ is normal size. It seems that the problem was solved uncompletely. More ever, unlike winword, openoffice cannot use find and replace to make [ superscripted. Any help?
In Ooo, use search, click on more options and modify the replace term using the format button on the bottom left. Superscript is in the "position" tab of the format window.