[Tex/LaTex] Help with editing .bst file to output article titles in the bibliography

bibliographiesbibtexnatbib

I am using this .bst file in my LaTeX document:
http://ads.harvard.edu/pubs/bibtex/astronat/apj/apj.bst

Everything is working, except that I would like the outputs in the reference section to contain article titles, which they currently do not.

The .bst file allows for each entry to have a title, and all of the ones in my citation file do, but it just doesn't get output in the bibliography.

Is there some modification I can make to the .bst file to get the titles to output to the bibliography?

Thank you for your help.

Best Answer

You will need to edit the article function in apj.bst and provide an instruction to print the contents of the entry's title field. I suggest you do so as follows:

  • Make a copy of the file apj.bst; call the copy, say, myapj.bst.

  • Open the file myapj.bst in a text editor and search for the function called article. I believe it starts right after the line that says %%%%%%% End of functions from astrobib.

  • In the function article, locate the lines

      date.block
      crossref missing$
    
  • Insert the line

      format.title "title" output.check
    

    between these two lines.

  • Save the file myapj.bst, either in the directory where your main .tex file is located or in a directory that's searched by BibTeX. If you choose the latter method, you should also update the TeX distribution's filename database.

  • Start using the new bibliography style with the instruction \bibliographystyle{myapj}. When switching from one bibliography style to another, it's important to run latex, bibtex, and latex twice more so that all changes are fully propagated.

If you're interested in learning more about the BibTeX infix syntax, I heartily recommend you read the document Tame the BeaST -- The B to X of BibTeX by Nicolas Markey.