The function calc.label
in apalike.bst
is responsible of this: it strips away all non alphanumeric characters and keeps the last up to four characters remaining.
If you copy apalike.bst
to myapalike.bst
and change the function defined in lines 896-912 to become
FUNCTION {calc.label}
{ type$ "book" =
type$ "inbook" =
or
'author.editor.key.label
{ type$ "proceedings" =
'editor.key.label % apalike ignores organization
'author.key.label % for labeling and sorting
if$
}
if$
", " % these three lines are
* % for apalike, which
year field.or.null #-1 #4 substring$ % uses all four digits
*
'label :=
}
then \bibliographystyle{myapalike}
will accept year={n.d.}
as you wish: it consists of four characters, after all!
The change consists simply in removing the string purify$
. I can't say if this may have adverse effects on other entries; but, as long as you have only years or n.d.
, all should go well.
You can set up Jabref to automatically import a reference from Firefox into the current database, but it's somewhat arcane. Here is my solution under Linux:
1) Select Options -> Preferences -> Advanced -- and check "Listen for remote operation ..." I don't think it matters which port.
2) Create a small bash script (text file) named "jabref-import" that looks like this:
#!/usr/bin/env bash
java -jar ~/local/jabref/JabRef-2.8.1.jar -i --importToOpen "$*"
Replace "~/local/jabref/JabRef-2.8.1.jar" with the path to your Jabref .jar file on your machine. Or if you have a working executable called "jabref", you can replace everything before the "-i" with "jabref". Just make sure your executable accepts command-line options (mine didn't).
In Ubuntu 13.04, the following variant of the script works:
#!/usr/bin/env bash
jabref -i --importToOpen "$*"
3) Make the file executable:
chmod ugo+x jabref-import
4) Make sure Jabref is already open. Go to Firefox, download a citation file. It could be a .bib or .ris or .ref or whatever. Select the "Open with..." option in the dialog, and select the jabref-import executable that you just made. The import dialog should pop up in Jabref with your citation.
Best Answer
This article by Karsten Jahn is probably the best and simplest solution I came across: https://www.k-jahn.de/2012/02/22/exporting-a-word-library-to-latexbibtex/ <- broken link
Took less than 5 minutes to convert the whole bibliography. It can be used with recent versions of MS Word. Only difference is that you should place the file in
And you have to insert this element on line 90, as Markus Hartmeier pointed out in the comments - otherwise it won't appear in the list: