BibTeX, biblatex and biber ⇒ problems with bib.... help,please
problems with bib.... help,please
Dear Guys,
What should I do if I wan to have one copy of my bibliography
Now I have one folder in this
/Users/XXX/Desktop/phd
inside that folder I have two folders one is
/Users/XXX/Desktop/phd/folder 1
and another folder is
/Users/XXX/Desktop/phd/folder 2
Now in each folder I have one .bib (my bibliography) because I use them in my latex works
the problem whenever I add some information to one bib (e.g. add another article information) I have to do the same in the other bib in the second folder
my question is how I have one bib that I can use in a latex work either this .tex file has been saved on folder 1 or folder 2...?
so there is no need for me to do a change in each bib..
What should I do if I wan to have one copy of my bibliography
Now I have one folder in this
/Users/XXX/Desktop/phd
inside that folder I have two folders one is
/Users/XXX/Desktop/phd/folder 1
and another folder is
/Users/XXX/Desktop/phd/folder 2
Now in each folder I have one .bib (my bibliography) because I use them in my latex works
the problem whenever I add some information to one bib (e.g. add another article information) I have to do the same in the other bib in the second folder
my question is how I have one bib that I can use in a latex work either this .tex file has been saved on folder 1 or folder 2...?
so there is no need for me to do a change in each bib..
Last edited by man2011 on Thu Jan 20, 2011 8:05 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.

problems with bib.... help,please
It's probably best to put in your home texmf folder. I'm assuming you're using a mac. The folder is probably /Users/XXX/Library/texmf/, but it might be /Users/XXX/texmf depending on how you installed TeXlive. You can find out by using the following command from inside a terminal:
Go into the folder it spits out (create it if need be). Create a subfolder called bibtex, and a subfolder of that called bib, so the final folder will either be:
or
depending on what the earlier command told you. Put your bib file in there.
A bib file in there should always be readable, no matter where the file you're working on is.
If it doesn't work at first, try running
(or the same without Library if need be). Then it should work.
IF you're really set on having all the files in subdirectory of your phd folder instead, then I'd suggest using symlinks. I don't know enough about macs about how you create symlinks using its File Manager, but from the Unix terminal if you do:
Then the file "references.bib" in folder 2 will be "linked" to the "real" file in folder 1, and the system will treat them as the same file, so if you edit one, the edits will show up on the other as well.
Code: Select all
kpsewhich -var TEXMFHOME
Code: Select all
/home/XXX/texmf/bibtex/bib/
Code: Select all
/home/XXX/Library/texmf/bibtex/bib/
A bib file in there should always be readable, no matter where the file you're working on is.
If it doesn't work at first, try running
Code: Select all
texhash /usr/XXX/Library/texmf
IF you're really set on having all the files in subdirectory of your phd folder instead, then I'd suggest using symlinks. I don't know enough about macs about how you create symlinks using its File Manager, but from the Unix terminal if you do:
Code: Select all
ln -s "/Users/XXX/Desktop/phd/folder 1/references.bib" "/Users/XXX/Desktop/phd/folder 2/references.bib"
Re: problems with bib.... help,please
thank you for your help
it is working now so there is no need for me to put a info.bib file if i use latex so every time i work on a tex and I put this command in tex file ??
\bibliography{info}
it goes immediately in the info.bib that I have created in
/Users/XXXX/Library/texmf/bibtex/bib.. is that so?
??
thank you so much for your help
it is working now so there is no need for me to put a info.bib file if i use latex so every time i work on a tex and I put this command in tex file ??
\bibliography{info}
it goes immediately in the info.bib that I have created in
/Users/XXXX/Library/texmf/bibtex/bib.. is that so?
??
thank you so much for your help
problems with bib.... help,please
It should find it there, yes.
If there are other
The command:
from a terminal will tell you what folders it searches for bib files and in what order. Notice that the first one there is probably ".", which means the active directory, so it'll probably start by looking for info.bib in that folder, and then move through the others. But one of them will the folder you now put info.bib into.
So if there's another copy of info.bib in the active folder, it will use that. If not, it'll look through the other folders listed.
If there are other
The command:
Code: Select all
kpsepath bib
So if there's another copy of info.bib in the active folder, it will use that. If not, it'll look through the other folders listed.
problems with bib.... help,please
hi
I did what you said and this is what I have got.. what does that mean??
I did what you said and this is what I have got.. what does that mean??
Code: Select all
Last login: Thu Jan 20 20:31:40 on console
Muhammad-Alzaidis-iMac:~ muhammadalzaidi$ kpsepath bib
.:/Users/muhammadalzaidi/Library/texlive/2010/texmf-config/bibtex/bib//:/Users/muhammadalzaidi/Library/texlive/2010/texmf-var/bibtex/bib//:/Users/muhammadalzaidi/Library/texmf/bibtex/bib//:!!/usr/local/texlive/2010/texmf-config/bibtex/bib//:!!/usr/local/texlive/2010/texmf-var/bibtex/bib//:!!/usr/local/texlive/2010/texmf/bibtex/bib//:!!/usr/local/texlive/2010/../texmf-local/bibtex/bib//:!!/usr/local/texlive/2010/texmf-dist/bibtex/bib//
problems with bib.... help,please
That's a list of folders separated by ":". It means that when you use the command:
in one of your documents, and then call BibTeX, BibTeX will look for a file named something.bib in the following folders:
1. The folder ".", which is a funny name for the folder you're currently in, i.e., the folder containing the .tex document. If it doesn't find it there, it moves to the next one on the list.
2. It then looks in "/Users/muhammadalzaidi/Library/texlive/2010/texmf-config/bibtex/bib/". If it doesn't find it there, then...
3. It then looks in "/Users/muhammadalzaidi/Library/texlive/2010/texmf-var/bibtex/bib/". If it doesn't find it there, then ...
4. It then looks in "/Users/muhammadalzaidi/Library/texmf/bibtex/bib/" (which is the folder I suggested you use). It it doesn't find it there, it moves on the others...
And so on. The first folder in that list containing a file named something.bib is the folder containing the version that it will use.
Code: Select all
\bibliography{something}
1. The folder ".", which is a funny name for the folder you're currently in, i.e., the folder containing the .tex document. If it doesn't find it there, it moves to the next one on the list.
2. It then looks in "/Users/muhammadalzaidi/Library/texlive/2010/texmf-config/bibtex/bib/". If it doesn't find it there, then...
3. It then looks in "/Users/muhammadalzaidi/Library/texlive/2010/texmf-var/bibtex/bib/". If it doesn't find it there, then ...
4. It then looks in "/Users/muhammadalzaidi/Library/texmf/bibtex/bib/" (which is the folder I suggested you use). It it doesn't find it there, it moves on the others...
And so on. The first folder in that list containing a file named something.bib is the folder containing the version that it will use.
Re: problems with bib.... help,please
thank you so much for your help.. 

Re: problems with bib.... help,please
sorry
How can I do the same thing for including external images
rather than include the image which is in the same folder of the tex.file so i wan to download all the images I need in one folder and whenever I use this command in any tex.file, latex will find it
\includegraphics{XX}
How can I do the same thing for including external images
rather than include the image which is in the same folder of the tex.file so i wan to download all the images I need in one folder and whenever I use this command in any tex.file, latex will find it
\includegraphics{XX}
Last edited by man2011 on Sat Jan 22, 2011 12:59 pm, edited 1 time in total.
problems with bib.... help,please
I would put images you want to reuse for multiple documents in /Users/XXX/Library/texmf/tex/generic/ -- but they can go anywhere in the result of "kpesepath pict".
(The graphicx package, however, also has a \graphicspath command you can use to customize this if you want. See its documentation.)
(The graphicx package, however, also has a \graphicspath command you can use to customize this if you want. See its documentation.)
Re: problems with bib.... help,please
oh thank you so much for your wonderful help and patience
I did your first advice and it is working now... brilliant
thank you a lot for your help again

I did your first advice and it is working now... brilliant
thank you a lot for your help again
