Style request : apalike
Hi all !
I have been trying to find an equivalent to the "apalike" style for Zotero, without any success.
Here is what I would like (source : http://sites.stat.psu.edu/~surajit/present/bib.htm):
For citation :
[Abut, 1990]
For bibliography :
[Abut, 1990] H. Abut, editor. Vector Quantization. IEEE Press, 1990.
Another example :
[Fanty et al., 1993] Fanty, M., Schmid, P., and Cole., R. (1993). City name recognition over the telephone. In Proc. International Conference on Acoustics, Speech and Signal Processing, volume I, pages 549-552, Minneapolis, U.S.A.
I tried to modify the "IEEE Trigraph" and the "springer" style without success for now.
Basically, I would like a style with a label [name, year] (family name of the first author, and al. and year of the issue in yyyy or yy).
Would anybody have an idea or a close equivalent ?
Thanks in advance.
Romain
I have been trying to find an equivalent to the "apalike" style for Zotero, without any success.
Here is what I would like (source : http://sites.stat.psu.edu/~surajit/present/bib.htm):
For citation :
[Abut, 1990]
For bibliography :
[Abut, 1990] H. Abut, editor. Vector Quantization. IEEE Press, 1990.
Another example :
[Fanty et al., 1993] Fanty, M., Schmid, P., and Cole., R. (1993). City name recognition over the telephone. In Proc. International Conference on Acoustics, Speech and Signal Processing, volume I, pages 549-552, Minneapolis, U.S.A.
I tried to modify the "IEEE Trigraph" and the "springer" style without success for now.
Basically, I would like a style with a label [name, year] (family name of the first author, and al. and year of the issue in yyyy or yy).
Would anybody have an idea or a close equivalent ?
Thanks in advance.
Romain
This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.
In first I add et-al-min="2" into macro author-citation:
<macro name="author-citation">
<choose>
<if variable="author editor translator" match="any">
<names variable="author">
<name form="short" et-al-min="2"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
</substitute>
</names>
</if>
<else>
<text term="anonymous" form="short" text-case="uppercase"/>
</else>
</choose>
</macro>
In a second step I change prefix and suffix in tag <layout> in element <citation>:
<layout prefix="[" suffix="]" delimiter="; ">
In next step I change element <bibliography> : after <layout> I add same code as is in elemnt <citation>:
<group delimiter=", " prefix="[" suffix="] " >
<group delimiter=" ">
<text macro="author-citation" suffix=","/>
<text macro="year-date"/>
</group>
<group delimiter=" ">
<label variable="locator" form="short"/>
<text variable="locator"/>
</group>
</group>
I think thats all. You can use similar changes in your favourite style.
Thanks for your help.
Indeed, it worked quite well. However I still have one issue : in the bibliography, after the [author_yy], it starts with the name of the second author instead of the first one.
Ex :
[Friedman_97] D Geiger, M Goldszmidt. Bayesian Network Classifiers. Mach Learn. 1997 Nov;29(2-3):131–63.
Instead of :
[Friedman_97] N.Friedman, D Geiger, M Goldszmidt. Bayesian Network Classifiers. Mach Learn. 1997 Nov;29(2-3):131–63.
I use different macro for "[Friedman_97]" and for "N.Friedman, D Geiger, M Goldszmidt." in two separate group.
Would you have an idea ?
The code is too long for one post so I give you only the citation, bilbiography part and the main macro about "author" :
<macro name="author-short-in-citation">
<names variable="author">
<name form="short" et-al-min="1" and="text"/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
</substitute>
</names>
</macro>
<macro name="author-in-citation">
<names variable="author">
<name delimiter=", " sort-separator=" " delimiter-precedes-last="always" initialize-with=""/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
</substitute>
</names>
</macro>
<macro name="author">
<names variable="author">
<name delimiter=", " initialize-with="" delimiter-precedes-last="always" sort-separator=" "/>
<label form="long" prefix=", "/>
<substitute>
<names variable="editor"/>
</substitute>
</names>
</macro>
<citation et-al-min="1" et-al-use-first="1" disambiguate-add-year-suffix="true">
<sort>
<key macro="author-short-in-citation"/>
<key variable="issued" sort="descending"/>
</sort>
<layout delimiter=" ; ">
<group delimiter="_">
<text prefix="[" macro="author-short-in-citation"/>
<text suffix="]" macro="year-in-citation"/>
</group>
</layout>
</citation>
<bibliography hanging-indent="true" entry-spacing="1" line-spacing="1">
<sort>
<key macro="author-in-citation"/>
<key macro="issued-sort" sort="ascending"/>
</sort>
<layout>
<group delimiter="_">
<text prefix="[" macro="author-short-in-citation"/>
<text suffix="] " macro="year-in-citation"/>
</group>
<group delimiter=". " suffix=". ">
<text macro="author"/>
<text macro="title"/>
</group>
<group delimiter=" " suffix=" ">
<text macro="editor"/>
<text macro="container-title"/>
<text macro="publisher"/>
<group delimiter=" ">
<text suffix=" " macro="date"/>
<text macro="journal-location"/>
<text macro="pages"/>
</group>
</group>
</layout>
</bibliography>
</style>
Thanks, both of you, for your advices.
I tried to put "et-al-min" to 2 and it did solve my problem about bibliography (the name of the first author is present).
However I now have citation like [Abut et al._90]. I would like to delete the "et al.". Maybe I should try to create another macro ?
The full code is available here :
https://gist.github.com/rbreunev/14669702c722b797ab37
<term name="et-al"></term>
Here is example of your style with this new definition:
Text: some text [Burkhart_03] other text [Dines_09] ; [Endo_14]
Bibliography:
[Burkhart_03] SS Burkhart, CD Morgan, WB Kibler. “The disabled throwing shoulder: spectrum of pathology Part I: pathoanatomy and biomechanics.” Arthroscopy. 2003 Apr. 19 (4). p. 404–20.
[Dines_09] JS Dines, JB Frank, M Akerman, LA Yocum. “Glenohumeral internal rotation deficits in baseball players with ulnar collateral ligament insufficiency.” Am. J. Sports Med. 2009 Mar. 37 (3). p. 566–70.
[Endo_14] Y Endo, M Sakamoto. “Correlation of shoulder and elbow injuries with muscle tightness, core stability, and balance by longitudinal measurements in junior high school baseball players.” J. Phys. Ther. Sci. 2014 May. 26 (5). p. 689–93.
I tried your modification.
I added under "<group" the following line :
<term name="et-al"></term>
The CSL Editor told me "Citeproc initialisation exception: Undefined node name "term"."
Then I saw on the CSL Specification that "term" is a child element of "terms" so I tried :
<terms>
<term name="et-al"></term>
</terms>
The CSL Editor tells me "Citeproc initialisation exception: Undefined node name "terms"."
Maybe the three line of codes are not in the right position ?
(terms is a child of locale and those are already defined at the top).
Thank you both !
https://github.com/robertour/apalike-zotero