BibTeX, biblatex and biber'Working Paper' not displayed?

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
texvictim
Posts: 3
Joined: Thu May 26, 2011 5:23 pm

'Working Paper' not displayed?

Post by texvictim »

Hi there,

I have just searched the forum and the internet for a while but could not find a solution to my bibtex problem. Currently I write a book and use the following bib style:

Code: Select all

\bibliographystyle{elsarticle-harv}
Everything works fine, except for unpublished work / working paper. Here an example. An entry in my library is:

Code: Select all

@unpublished{Hasbrouck2006,
address = {New York},
author = {Hasbrouck, Joel},
file = {:D$\backslash$:/Literatur/Hasbrouck\_2006\_Trading Costs and Returns for US Equities Estimating Effective Costs from Daily Data.pdf:pdf},
institution = {Stern School of Business},
pages = {1--52},
title = {{Trading Costs and Returns for US Equities: Estimating Effective Costs from Daily Data}},
year = {2006}
}

These are juste quoted without any indication as "Working Paper":
Hasbrouck, J., 2006. Trading Costs and Returns for US Equities: Estimating Eective Costs from Daily Data.

It rather should look like:
Hasbrouck, J., 2006. Trading Costs and Returns for US Equities: Estimating Eective Costs from Daily Data. Working Paper.

What can I do about this?
Thanks a lot for your support!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

'Working Paper' not displayed?

Post by kaiserkarl13 »

You'll have to edit the bibliography style file (elsarticle-harv.bst) yourself---save it with a different name!---as this is what that document class is supposed to do to handle unpublished things. If Elsevier complained about it, you should tell their LaTeX people that the elsarticle-harv.bst file doesn't handle the @unpublished entry correctly, as it's their problem. If, however, this is for your own style sheet (not theirs), then I recommend creating your own bibliography style, either by modifying elsarticle-harv.bst manually or by generating a new one with "latex makebst".

Good luck!
texvictim
Posts: 3
Joined: Thu May 26, 2011 5:23 pm

'Working Paper' not displayed?

Post by texvictim »

Thanks kaiserkarl123,

but editing a bst seems not that easy for a newbie as me.
I have tried to add the following function

Code: Select all

FUNCTION {add.wp}
{ "Working paper." }
and added teh function here:

Code: Select all

FUNCTION {unpublished}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  format.note "note" output.check
  fin.entry
  add.wp
  write.url
}
But it doesn't work at all, all my references get lost if I compile the document?!?! :?:
Thanks for your support!
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Re: 'Working Paper' not displayed?

Post by kaiserkarl13 »

I can't duplicate the effects you describe---if I use the document class "elsarticle" with the "elsarticle-harv.bst" file available from Elsevier, I don't get a "Working Paper" heading. If you're using a customized version of that document class, then you should post that so we can duplicate what you're doing.

One thought: if you have the bibliography finalized but just want to change the position of one element, you can edit the .bbl file directly and do whatever you want to it. Just DO NOT run BibTeX again unless you want to make all those edits again.
texvictim
Posts: 3
Joined: Thu May 26, 2011 5:23 pm

'Working Paper' not displayed?

Post by texvictim »

Exactly, that is my point! I dont get "Working Paper" in my references as well.
In fact I use the book environment.
Here is an example, which hopefully helps:

Code: Select all

\documentclass[12pt, a4paper, titlepage, reqno, oneside, openany, openbib]{book}%
\usepackage{natbib}
\begin{document}
\chapter{Introduction}
This is some random text including a citation such as \cite{Acharya2010}.
\bibliographystyle{elsarticle-harv}
\bibliography{library}
\end{document}
The library contains the following reference

Code: Select all

@unpublished{Acharya2010,
annote = {Working Paper},
author = {Acharya, Viral V and Amihud, Yakov and Bharath, Sreedhar},
file = {:D$\backslash$:/Literatur/Acharya, Amihud, Bharath\_2010\_Liquidity Risk of Corporate Bond Returns.pdf:pdf},
keywords = {credit risk,credit spreads,default,flight to liq-,recession},
number = {May},
pages = {1--49},
title = {{Liquidity Risk of Corporate Bond Returns}},
type = {Working Paper},
url = {http://www.nber.org/papers/w16394},
year = {2010}
}
What I get as reference in the pdf is
Acharya, V. V., Amihud, Y., Bharath, S., 2010. Liquidity Risk of Corporate
Bond Returns.
URL http://www.nber.org/papers/w16394

But what I like to have in the pdf is this:
Acharya, V. V., Amihud, Y., Bharath, S., 2010. Liquidity Risk of Corporate
Bond Returns. Working Paper.
URL http://www.nber.org/papers/w16394

I tried to edit the .bst file (se the previous post) but it did not work at all?
kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

'Working Paper' not displayed?

Post by kaiserkarl13 »

I'm sorry, I read your original post incorrectly; I thought you were saying you wanted the "Working Paper" part moved to another place. However, if you want to add it, that's a different issue.

I think the following works, though I have only your example that I've tested it on:

Code: Select all

FUNCTION {unpublished}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  format.date "year" output.check
  date.block
  format.title "title" output.check
  format.note "note" output.check
  new.sentence                              % Added line
  "Working Paper" output                    % Added line
  fin.entry
  write.url
}
Replace the original function for unpublished in your .bst file and you should be good to go. Be forewarned that the particular hack I put in there may not be 100% safe, but it is simple (just two added lines). The key to editing bst files is that they're stack-based and use reverse Polish notation; that is, '"Working Paper" output' means, "pass the string 'Working Paper' to the output function."
manuel_flores
Posts: 1
Joined: Fri Feb 25, 2022 11:31 pm

'Working Paper' not displayed?

Post by manuel_flores »

Hello,
I have a similar problem, but instead of adding the "Working Paper" reference I would like the bst file to add the information on the working paper Series and Number fields. I am a total newby and I really do not manage to correctly edit the bst file.
Thanks for your help!
Post Reply