[texhax] bibtex inbook: use both author and editor, and book and chapter titles
Christopher W. Ryan
cryan at binghamton.edu
Fri Nov 23 20:54:48 CET 2007
I used custom-bib to create a bibliographystyle I called
StandardMedicalJournal. I may have unknowingly done something I didn't
want to do when I was going through all the questions on screen, because
my style won't print editor, author, book title, and chapter title for
an INBOOK reference. Here is the reference in my bib file:
@INBOOK{Ryan2005,
title = {Headache},
publisher = {Elsevier-Health Sciences Division},
year = {2005},
editor = {RE Rakel and ET Bope},
author = {CW Ryan},
booktitle = {Conn's Current Therapy},
edition = {57th edition}
}
Here is the reference I get, after running bibtex on my source file
(which is for my CV, using ModernCV.)
Ryan C. Headache, Elsevier-Health Sciences Division. 57th edition
edition, 2005; .
with the word Headache italicized. And yes, the word edition appears twice.
Below is the inbook entry in my .bst file. Is there an easy way to fix
it so that editor, author, book title, and chapter title all appear?
And to get rid of the second appearance of "edition?" Or would you
advise starting over and going through custom-bib to create a new .bst
file (I'm pretty happy with the rest of it.)
Thanks.
--Chris Ryan
FUNCTION {inbook}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check
}
{ format.authors output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
if$
}
if$
new.block
format.btitle "title" output.check
crossref missing$
{
format.publisher.address output
format.bvolume output
new.block
format.number.series output
new.sentence
}
{
new.block
format.book.crossref output.nonnull
}
if$
format.edition output
format.date "year" output.check
date.block
add.blank
format.pages "pages" output.check
new.block
format.note output
fin.entry
}
More information about the texhax
mailing list