Adding a New .bst File to Your LaTeX GUI

Sometimes finding a simple explanation to a very specific question is hard. For example, recently I wanted to add a new .bst file to my LaTeX GUI (Texmaker) so I could have a very specific bibliography style (American Geophysical Union; AGU) and I wasted two hours searching for how to do it and then troubleshooting it.

Anyway, here is how to add a new .bst file to a LaTeX GUI like Texmaker:

  1. Create the .bst file. I wanted an AGU style bibliography so I copied the online agu.bst file and saved it to my Desktop (this is temporary and you can skip this if you are acquainted with the command line).
  2. Find where your .bst files are stored. You can find you .bst files searching the root:
    find / -name "*.bst"
    On my Ubuntu 16.04 computer, the .bst files where stored in:/usr/share/texlive/texmf-dist/bibtex/bstIn ~/bst there are several packages. I chose to store my agu.bst in the ~/bst/natbib folder. I use natbib all the time so this made sense for me, but feel free to make your own folder or organize it however you want.
  3. Move your .bst file to the desired location using the mv command.
  4. Run the command:
    sudo texhash

    This command updates the information in your directories. If you do not run this, you may get error messages when compiling your LaTeX files that read:
    Process started
    This is BibTeX, Version 0.99d (TeX Live 2015/Debian) The top-level auxillary file: ****.aux I couldn't open style file agu.bst ---line 2 of the file ****.aux : \bibstyle{agu : } I'm skipping whatever remains of this command I found no style file---while reading the ****.aux(There were 2 error messages)
    Process exited with error(s)

    and it may not recognize the new .bst.
  5. Enjoy your new .bst file
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s