3

I'm trying to format bibtex entries of type unpublished (for Working Papers) like those of type article. That is, institution + series shall be formatted as if it was the name of the journal.

This is my bibtex entry:

@unpublished{SomeKey,
    title = {bst files are difficult},
    year = {2015},
    author = {Author, Unknown},
    series = {Discussion Paper},
    institution = {Bibtex-Institute}
}

To do so, I'm tweaking the agsm style:

FUNCTION {unpublished}
{ output.bibitem
  list.label.output
  " \harvardyearleft " list.year * "\harvardyearright " * output.nonnull
  author "author" item.check
  title.field field.used =
    { skip$ }
    { format.title quote "title" output.check }
  if$
  institution emphasize output
  series emphasize output
  new.block
  fin.entry
}

which outputs

Author, U. (2015), 'bst files are difficult', Bibtex-Institute, Discussion Paper. How do I get rid of the comma between the fields institution and series?

The original function was:

FUNCTION {unpublished}
{ output.bibitem
  list.label.output
  " \harvardyearleft " list.year * "\harvardyearright " * output.nonnull
  author "author" item.check
  title.field field.used =
    { skip$ }
    { format.title "title" output.check }
  if$
  new.block
  note "note" output.check
  fin.entry
  write.url
}
1
  • The answer is here: tell the parser it is not in the middle of a sentence by adding before.all 'output.state := in between.
    – JHBonarius
    Commented Mar 2, 2018 at 9:06

1 Answer 1

2

Rather than modify the bibliography style file agsm.bst, I would employ the note field with an entry of type @unpublished or @misc. Which type to employ will depend on whether or not you want the publication's title to be encased in single quotes.

Oh, if the string Bibtex-Institute Discussion Paper should be typeset in italics, simply replace

note  = {Bibtex-Institute Discussion Paper},

with

note  = {\emph{Bibtex-Institute Discussion Paper}},

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@unpublished{SomeKeyA,
    title = {bst files are difficult},
    year  = {2015},
    author= {Author, Unknown},
    note  = {Bibtex-Institute Discussion Paper},
}
@misc{SomeKeyB,
    title = {bst files are difficult},
    year  = {2016},
    author= {Author, Unknown},
    note  = {Bibtex-Institute Discussion Paper},
}
\end{filecontents}
\documentclass{article}
\usepackage{har2nat}
\bibliographystyle{agsm}
\begin{document} 
10
  • 1
    Altering the .bib file is no option for me, unfortunately: We import it directly from Mendeley.
    – MERose
    Commented Jul 1, 2016 at 9:29
  • @MERose - I don't understand the basis for your comment. Just because the entry is imported via some external program (here:Mendeley) should not imply that you can't change the entry once it's been imported
    – Mico
    Commented Jul 1, 2016 at 9:34
  • Well, that depends on the meaning of import. We do not copy the file. We really can't change the file. That's the point.
    – MERose
    Commented Jul 1, 2016 at 9:42
  • 1
    @Mico that is a solution. I found a better one (imho). See my comment to the OP. And if you know a better solution then mendeley let me know. Until then, mendeley is saving me TONS of time.
    – JHBonarius
    Commented Mar 2, 2018 at 9:07
  • 1
    (sorry for the discussion in comments) True. I'm now in contact with SAGE Tex support. Their bst files seem to be outdated, as Harvard reference style went from "URL:" to "Available from: (accessed ...)". I proposed a new SageH.bst (not breaking the existing note/howpublished structures). Maybe they will consider it.
    – JHBonarius
    Commented Mar 2, 2018 at 9:41

Not the answer you're looking for? Browse other questions tagged .