5

I would like to maintain single .bib file for all my papers/lecture notes etc.

It looks like I have to save .bib file in the same folder where I have the .tex file.

This force me to copy paste the .bib file in multiple folders.

Suppose I add a reference in one of the .bib files, It will not show the change in other .bib file. It might be difficult to remember where I have added.

So, Is there any solution for such problem?

  • Please consider not to suggest JabRef/mendeley or any such. I am simply not capable of doing that magic. . :) – Praphulla Koushik Apr 06 '20 at 18:23
  • Please read my last comment. These directories are all part of your TeX distribution. LEAVE THEM ALONE! :) There is no problem. And adding this image just makes your question more confusing. You need to make a texmf directory in your own home folder. Not inside /usr/local or /etc/ etc. – Alan Munn Apr 07 '20 at 01:45
  • If your home folder doesn't contain a texmf directory, then you need to create one yourself. I posted a link that explains how this works. There's also a link there to a shell script on my github that will create it for you if you prefer. – Alan Munn Apr 07 '20 at 01:47
  • I believe there home folder does not contain texmf directory.. When I opened the terminal and run "~/texmf'' it said "bash: /home/name/texmf: No such file or directory" It means there is no texmf directory in home folder. Right? I will create one.. – Praphulla Koushik Apr 07 '20 at 01:50
  • 1
    Yes, this is correct. – Alan Munn Apr 07 '20 at 01:51
  • Thank you... Please guide my through your shell script to create a texmf directory... – Praphulla Koushik Apr 07 '20 at 01:53
  • You don't really need the script. Just do cd ~;mkdir -p texmf/bibtex/bib and you should have what you need. You can add other directories later. – Alan Munn Apr 07 '20 at 01:59
  • @AlanMunn :) I did it... When I run "~/texmf" it says "bash: /home/name/texmf: Is a directory" – Praphulla Koushik Apr 07 '20 at 02:01
  • Well of course. It makes no sense to "run" it. It's not a program, it's just a folder. Now put your .bib file inside ~/texmf/bibtex/bib and you will be good to go. It seems that you need to learn a little basic Linux skills. This is not the place for that. – Alan Munn Apr 07 '20 at 02:03
  • Yes. I donot have any idea about linux.. I understand that it is not a place to learn about linux.. Sorry for that... Thanks for helping me out :) I did not think it is this easy... – Praphulla Koushik Apr 07 '20 at 02:04
  • @AlanMunn It is working.. – Praphulla Koushik Apr 07 '20 at 02:15

1 Answers1

7

You can have a master .bib file stored in your local texmf directory. It needs to be placed in the bibtex/bib directory within that.

So if your .bib file is called MyBigBibFile.bib then on a Linux system it would typically go here:

~/texmf/bibtex/bib/MyBigBibFile.bib

On a Mac it would go here:

~/Library/texmf/bibtex/bib/MyBigBibFile.bib

If your local texmf folder doesn't exist, just create it yourself and make sure you also make the bibtex/bib directories. See How to have local package override default package for more details on this.

If you're using MikTeX, it depends on how you created your local directory. See Create a local texmf tree in MiKTeX for details on how to do that.

Alan Munn
  • 218,180