The apsr style is almost what I need to comply to our totally unique Harvard style based University referencing requirements. I need to make the following customizations:
For displaying authors the specified format for apsr is
FUNCTION {format.authors}
{ author empty$
{ "" }
{ author #1 "{vv~}{ll}{, jj}{, f}" format.name$
"{ff }{vv~}{ll}{, jj}" author format.rem.names
}
if$
}
I need all authors to follow the style "{vv~}{ll}{, jj}{, f}". When I try to change the line "{ff }{vv~}{ll}{, jj}" author format.rem.names
to "{vv~}{ll}{, jj}{, f}" author format.rem.names
I do not get any change 🙁 . Should I change another function as well?
Example bibtex:
@article{wang2015cyber
, author = {Wang, Lihui and T\"orngren, Martin and Onori, Mauro}
, title = {Current status and advancement of cyber-physical systems in manufacturing}
, journal = {Journal of Manufacturing Systems}
, year = {2015}
, publisher = {Elsevier}
}
I would like to have it:
WANG, L., TORNGEREN M. & ONORI M. 2015. ect…
I am quite new and the only one using latex at my University it seems, everybody is using MS WORD . I am trying to build a template for post graduate students.
here is a link to the original apsr.bst
Best Answer
The
apsr.bst
license requiresSo, if you intend to change it, you should rename the file to something else. Following your suggestion, let's call it
apsrTUT.bst
.I copied the original file and renamed it with (in a unix-like environment):
(
kpsewhich
finds the file in the texlive tree so that I don't have to look for it; it actually resides in$TEXDIR/texmf-dist/bibtex/bst/harvard/apsr.bst
)Then I applied the change you mentioned; here's the
diff
for the originalapsr.bst
to the newapsrTUT.bst
:We must then pass the new style file to the
bibliographystyle
call in our fileIf you've done this and it still isn't working, make sure to delete the external auxiliary files (
.aux
,.bbl
,.blg
,.log
) before compiling the document again.Here's a MWE (with the packages you mentioned in your comments):
The
filecontents
environment used here allows one to ship an external file (here the bibliographic database,\jobname.bib
) within the document. It is used here only to provide a fully compilable example.And the output: