0

Creating a new bib file to save it in the same folder as my tex file is a mess, therefore I would like to have a permanent general bib file and be able to set a path to it when I am making a new tex file. (I am working with Windows 10).

I have tried:

  1. Use something like \bibliography{"C:/Program Files/MiKTeX 2.9/bibtex/bib/FullBib.bib"} (and without the .bib) but there is a problem with spaces (I would prefer to put the bib file in another folder, something like blabla/documents/math texts/FullBib.bib).
  2. Use something like \bibliography{../../FullBib.bib"}.
  3. Add as a root in Miktex C:/Program Files/MiKTeX 2.9/bibtex/bib/, refresh FNDB and try to use \bibliography{FullBib.bib} but I get an error in the aux file in the line \bibdata{FullBib.bib} and neither trying (1) works.

Point 1 was trying to follow How to have access to (or manage) bib files in MiKTeX?

Can you explain like I was a toddler how to set a unique bib file and use it forever after? Also, I believe I am using Bibtex but I am not sure.

I am working with windows 10, Jabref 5.2, Texniccenter 2.02 and Miktex 2.9. My MnotWE is

\documentclass[a4paper,11pt]{amsart}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath,amsthm,amsfonts}
%More packages
\begin{document}

\cite{something}


\bibliographystyle{plain}
\bibliography{FullBib.bib}%or \bibliography{FullBib} or \bibliography{"C:/Program Files/MiKTeX 2.9/bibtex/bib/FullBib.bib"} etc.

\end{document}
5
  • Using the extra root is the way to go. But you probably need to check that latex can actually find it. Have you tried via the command line to run kpsewhich FullBib.bib. You mention you get an error, please cite the exact error message
    – daleif
    Jun 9 '21 at 11:38
  • And note that neither jabref or Texniccenter are relevant here. Thoug I would probably recommend using something else than texniccenter as it does not seem to be activaly maintained (last updated in 2014)
    – daleif
    Jun 9 '21 at 11:39
  • @daleif The answer I marked solves the issue, thank you anyway. I was aware that Jabref and Texniccenter were probably not relevant, but I was not 100% sure. Also, do you recommend some latex editor in particular? Texniccenter seems to work fine, and as long as it is only an editor I thought it is not relevant to have updated versions (?).
    – MathBug
    Jun 9 '21 at 14:39
  • If you like the editor to help you while you write take a look at texmaker or texstudio the latter has the same ancestor as texmaker but can do more. They also come with a build in pdf viewer with reverse search activated
    – daleif
    Jun 9 '21 at 16:21
  • The call to \bibliography should not include the .bib file extension. So \bibliography{FullBib.bib} would be incorrect and should be \bibliography{FullBib} and similarly for all other suggested calls. While TeX Live has accepted the superfluous .bib extension for some time, MikTeX was not able to find files in that case until recently.
    – moewe
    Jun 9 '21 at 18:23
2
  • Create a folder mylocaltexmf somewhere outside the texsystem. Your documents folder is a good place.
  • in this folder create the subfolders bibtex\bib\mybibs
  • Move your bib into the mybibs folder
  • Go to the miktex console, settings, tab "directories" and add mylocaltexmf as a new root.

You can add more subfolders (e.g. tex\latex) and files to mylocaltexmf, when you do this you will have to update the filename database in the tasks menu of the console.

3
  • THANK YOU! This works smoothly. I assume something need "bibtex/bib/mybibs" to run, is this correct? Could I change some names of the folders or simplify this? Because mylocaltexmf is an odd name. Thank you again kind sir or madam.
    – MathBug
    Jun 9 '21 at 14:35
  • you can choose the names of the "mylocaltexmf" and "mybibs" folders, but the subfolder structure bibtex/bib and tex/latex is important, this follows the structure of the main texmf tree and allows the tex programs to find their files. (and I'm a woman). Jun 9 '21 at 14:40
  • Understood, thank you madam.
    – MathBug
    Jun 9 '21 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.