BibTeX, biblatex and biberEditing natbib's plainnat to blockquote notes

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Lewisham
Posts: 3
Joined: Sun Dec 07, 2008 3:15 am

Editing natbib's plainnat to blockquote notes

Post by Lewisham »

Hello there,
I'd like to make an annotated bibiliography, but natbib's plainnat doesn't wrap notes in the quote environment.

I can't for the life of me figure out the .bst file format, I was hoping someone might know how to edit this function so that it does the quoting, which I can then paste as a new function and change the note field to output through that instead.

Code: Select all

FUNCTION {output}
{ duplicate$ empty$
    'pop$
    'output.nonnull
  if$
}
Thanks in advance!

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Editing natbib's plainnat to blockquote notes

Post by josephwright »

Make a copy of plainnat.bst with a new name, then edit as follows. What you need to do is alter the part that prints the notes, which is not the 'output' function. Something like

Code: Select all

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  author format.key output
  new.block
  format.title "title" output.check
  new.block
  crossref missing$
    { journal emphasize "journal" output.check
      eid empty$
        { format.vol.num.pages output }
        { format.vol.num.eid output }
      if$
      format.date "year" output.check
    }
    { format.article.crossref output.nonnull
      eid empty$
        { format.pages output }
        { format.eid output }
      if$
    }
  if$
  format.issn output
  format.doi output
  format.url output
  new.block
  note empty$
  'skip$
   { "\begin{quote}" note * "\end{quote}" * output }
  fi$
  fin.entry
}
You'll have to edit each entry that currently reads 'note output' to what I've got above.
Joseph Wright
Lewisham
Posts: 3
Joined: Sun Dec 07, 2008 3:15 am

Editing natbib's plainnat to blockquote notes

Post by Lewisham »

EDIT: Dove into the command-line bibtex command and found it was upset about

Code: Select all

fi$
. Changed it to

Code: Select all

if$
and now it works great! Thank you!
Eva1
Posts: 1
Joined: Sun Nov 21, 2010 8:53 pm

Re: Editing natbib's plainnat to blockquote notes

Post by Eva1 »

Hiya!
I am using plainnat.bst and I would like to change the citation from
Karlgren, J. (2008)a. ......
to
Karlgren, J. (2008a)...

Any ideas of how I could edit my plainnat file to get this output?
Thank you all in advance
Eva

FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
author format.key output
new.block
format.date "year" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
eid empty$
{ format.vol.num.pages output }
{ format.vol.num.eid output }
if$
}
{ format.article.crossref output.nonnull
eid empty$
{ format.pages output }
{ format.eid output }
if$
}
if$
format.issn output
format.doi output
format.url output
new.block
note output
fin.entry
}
Post Reply