27

Possible Duplicate:
Create a local texmf tree in MiKTeX

I'm trying to create my first bibliography with BibTeX. I want to use the Geological Society of America's .bst file for my style.

I'm not sure where to save the file so that LaTeX will find it (I'm using TeXworks as my editor).

I'm also not sure what needs to be added to the preamble.

I'm going to save the file as gsa.bst, so I'm aware that I need to add \bibliographystyle{gsa} in the bibliography section.

Forgot to add that I already tried \Program Files\MiKTeX2.9\bibtex\bst\base\gsa.bst

user24535
  • 271
  • 4
    It should be fine to keep the .bst-file with the document (folder) you are working on. – Peter Jansson Jan 17 '13 at 19:27
  • 3
    latex doesn't need to see the bst file, it is bibtex that needs to see it. There is an input path for bibtex but just using the folder with your tex file is a good place to start. Then you need to run latex bibtex latex latex on your document to resolve all the citation references. – David Carlisle Jan 17 '13 at 20:02
  • This should also be tagged with [MiKTeX] or [Windows], but it seems we reached an edit limit here. I was going to suggest a export BSTINPUTS="${HOME}/bst:" for .bashrc here. – mafp Jan 17 '13 at 20:14
  • 1
    Related: http://tex.stackexchange.com/questions/69483/create-a-local-texmf-tree-in-miktex – egreg Jan 17 '13 at 21:33
  • @lockstep et al.: I don't think this is really a duplicate. As a LaTeX novice, I may want to use a custom .bst file for all my documents, which means I need to know how to put it in ~/texmf. This is not the same thing as creating a new texmf directory. Furthermore, if I'm trying to install my own bst, I am unlikely to know that 'creating a local texmf tree' has anything to do with my problem. – Tyler Jan 29 '14 at 18:17

1 Answers1

21

On my system (TeXlive on Debian), my personal .bst files are in ~/texmf/bibtex/bst/.

After adding files under ~/texmf/, you need to update the cache by running texhash ~/texmf from the command line. If successful, everything in that folder should be in the 'path' for bibtex.

You can check that your file is properly registered with kpsewhich:

kpsewhich your-bibtex-file.bst

This should produce the full path name to your bst. If so, then you're all set.

Tyler
  • 2,541