0

I am using Tex since last a few years and use multiple *.bib files to manage the references. In order to avoid the copies of the bib files, I keep them in the texmf-local directory so that they can be accessed as and when required. I recently moved to Windows 11 and having troubles with the same process which is working fine till Windows 10. Here are the details:

I am adding the bib file to the main.tex file as follows:

\addbibresource{referencesAmit}

[[Note that the error is same if I use add bib resource as follows depending on the usages of bibtex/ biblatex:

\bibliography{referencesAmit}

After running pdflatex (once) and bibtex; the error message is:

I couldn't open database file referencesAmit.bib

The file is available at

"C:\texlive\texmf-local\bibtex\bib\local\referencesAmit.bib"

Naturally, I have made sure that the file exists. If I use the absolute path, it works (however, it's not ideal if multiple users are using the same files), i.e.,

\addbibresource{C:/texlive/texmf-local/bibtex/bib/local/referencesAmit}

I have also checked TEXMFHOME (on Windows 10 and Windows 11) using

kpsewhich -var-value TEXMFHOME

which results (same on both Windows 10 and Windows 11):

C:/Users/amit2/texmf

I have tried to move the files to this folder, however, the error is the same.

I have also tried to change the TEXMFHOME in texmf.cnf file, however, there is no change in the output.

I am using texlive 2021 on Windows 11 and tried to run both on TexStudio and command line (Windows Subsystem for Linux).

3
  • what exactly are you doing here? You haven't told us any details about your document. My quess is that you are using biblatex and that is it configured to use biber (default) not bibtex. So use biber and not bibtex to generate your bibliography
    – daleif
    Commented Mar 21, 2022 at 10:56
  • 1
    It should be \addbibresource{referencesAmit.bib} with the extension. But apart from this, are files found at all from your texmf-local? (And do you really use wsl?) Commented Mar 21, 2022 at 10:58
  • @daleif, the problem persists if I use bibtex or biblatex. Since the problem is more of a system dependent, there is no MWE. @UlrikeFischer, as per my information, the bib resource would be without extension. It is able to find another script (texcount.pl) in the texmf-local but not the bib files. I am using WSL but calling the installation in the Windows C drive. Something like /mnt/c/texlive/2021/bin/win32/bibexport.exe
    – novice
    Commented Mar 21, 2022 at 12:15

1 Answer 1

1

I was able to solve it. Here is the solution which worked for me. Based on many reads, it can be helpful for others.

I was right to check the TEXMFHOME using (kpsewhich -var-value TEXMFHOME). It results in

C:/Users/amit2/texmf

Earlier, I moved the bib file to this location, which was not working correctly. I should have followed the TDS, i.e., moved the files to

C:/Users/amit2/texmf/bibtex/bib/local

I had to create the folders. Then it worked as expected.

You must log in to answer this question.

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