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

5
  • 4
    It should be fine to keep the .bst-file with the document (folder) you are working on. Jan 17, 2013 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. Jan 17, 2013 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, 2013 at 20:14
  • 1
    Related: tex.stackexchange.com/questions/69483/…
    – egreg
    Jan 17, 2013 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, 2014 at 18:17

1 Answer 1

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.

6
  • and how do you tell bibtex about them ... Jan 27, 2014 at 17:24
  • @mangledorf see the updated answer
    – Tyler
    Jan 28, 2014 at 18:02
  • 1
    Great, thanks. For others, I made the minor but catastrophic mistake of placing in .../textmf/bibtex/bib rather than .../textmf/bibtex/bst Jan 29, 2014 at 16:09
  • On Arch Linux the folder of the standard texlive package is instead /usr/share/temxf-dist/bibtex/bst/bibliographyname
    – Three Diag
    May 15, 2016 at 16:11
  • @ThreeDiag just for anyone that might be copy/pasting your path, should it be 'temxf' or 'texmf'?
    – SO_tourist
    Mar 28, 2018 at 7:34

Not the answer you're looking for? Browse other questions tagged .