2

I'm doing a document in which I want to add a bibliography. As I'm under CentOS 7, and there is almost no package installed by default with texlive, I installed bibtex from the CTAN web site.

In my tex file, I load it like this:

\usepackage[backend=bibtex]{biblatex}
\addbibresource{myBib.bib}

And I got this error:

I couldn't open style file biblatex.bst
---line 6 of file myDoc.aux
 : \bibstyle{biblatex
 :                   }
I'm skipping whatever remains of this command
I found no style file---while reading file myDoc.aux

As I did not find the bibtex.bst file on CTAN, I downloaded the plain.bst file on the CTAN site. And, as it did not work on the first try, I put it in multiple places.

~/texmf/tex/plain.bst
~/texmf/tex/bibtex/plain.bst
~/texmf/tex/bibtex/bstplain.bst
~/texmf/tex/latex/biblatex/bst/plain.bst

/usr/share/texlive/texmf/tex/bibtex/bst/plain.bst

I then run texhash ~/texmf/ and sudo texhash /usr/share/texlive/texmf/. Here are the corresponding ls-R files:

~/texmf/ls-R

./tex:
bibtex
generic
latex
plain.bst

./tex/bibtex:
bst
plain.bst

./tex/bibtex/bst:
plain.bst
 .
 .
 .
./tex/latex/biblatex:
biber
bibtex
bst
CHANGES.md
doc
latex
README

./tex/latex/biblatex/bibtex:
bib
bst

./tex/latex/biblatex/bibtex/bst:
biblatex.bst

./tex/latex/biblatex/bst:
plain.bst
 .
 .
 .
./tex/latex/biblatex/latex/bst:
plain.bst
 .
 .
 .

/usr/share/texlive/texmf/ls-R

./tex:
bibtex
generic
latex

./tex/bibtex:
bst

./tex/bibtex/bst:
plain.bst

In my tex file, I then told to bibtex which style I want to use:

\usepackage[backend=bibtex,style=plain]{biblatex}
\addbibresource{myBib.bib}

And know I've got this error:

! Package biblatex Error: Style 'plain' not found.

I don't understand why it's not working, and I can't find anything else on the Internet. Does someone have an idea?

7
  • If you are using texlie from centos you should probably use centos' package system to install stuff instead of attempting to do it by hand which often fails as the centos texlive is (AFAIK) a bit older than what is on CTAN. Centos has probably split texlive into lots of centos packages (Ubuntu does the same) and you will somehow have to figure out which centos package provides what you need. On ubunti I tend to use the apt-file feature as I can ask it to tell me where say siunitx.sty is. Then I can just install that Ubuntu package. Centos probably has something similar.
    – daleif
    Sep 16, 2020 at 13:06
  • That being said, I generally never use the LaTeX that comes with a Linux dist as it is (1) broken into these smaller Linux packages and it is hard to know what you need and (2) they lag behind in updates. Thus I tend to just manually install upstream TeXLive (tug.org/texlive) instead. And I install absolutely everything. will never need 90% but now I know I have it.
    – daleif
    Sep 16, 2020 at 13:08
  • @daleif Thanks for your comment. But you can be sure that, if the bibtex was in my yum repository, I would have installed it with yum! And concerning tux.org/texlive, it looks even more complicated, as I can't find (and install with yum) tlmgr on my system!
    – Phantom
    Sep 17, 2020 at 7:11
  • The linux dists generally remove tlmgr as they want you to install the various latex packages via yum instead. Note that biblatex is not the same as bibtex and will generally use biber instead so again you will need to figure out how to determine which yum packages you need to install. At least in Ubuntu there is a meta package called texlive-full which will install all available Ubuntu texlive packages. Also note that installing the upstream texlive has nothing to do with tlmgr.
    – daleif
    Sep 17, 2020 at 7:40
  • Additionally isn't centos7 rather old? And thus all latex is super old. In that case the upstream textlive might be better. But the binaris might not be able to run on centos7.
    – daleif
    Sep 17, 2020 at 7:48

1 Answer 1

2

Before we start, it is a good idea to try and understand the difference between biblatex and BibTeX. bibtex vs. biber and biblatex vs. natbib has some explanations that should make the difference between the two clearer, so just quickly: BibTeX is a program that extracts bibliography data from a .bib file and processes the data with the help of .bst files ('BibTeX styles') into LaTeX-readable data. More generally, sometimes people (I certainly) say 'BibTeX' when they mean the whole bibliography setup that comes with using BibTeX with .bst files. biblatex is a LaTeX package for citations and bibliographies that works differently from the 'BibTeX approach'. biblatex can be used with BibTeX and the newer Biber as 'backends' that extract the relevant entry data from the .bib file.

When you want to use

\usepackage[<options>]{biblatex}

in your document, you are using biblatex.

When you are loading biblatex with the option backend=bibtex,, then you are using biblatex with the BibTeX backend.

That means you need both biblatex and BibTeX to be properly installed on your system.

The first message

I couldn't open style file biblatex.bst
---line 6 of file myDoc.aux
 : \bibstyle{biblatex
 :                   }
I'm skipping whatever remains of this command
I found no style file---while reading file myDoc.aux

you get suggests BibTeX is up an running (the message comes from BibTeX), but biblatex does not appear to be fully installed. In particular the file biblatex.bst (available from https://ctan.org/tex-archive/macros/latex/contrib/biblatex/bibtex/bst on CTAN) does not appear to be installed correctly.

According to your directory listings you have

./tex/latex/biblatex/bibtex/bst:
biblatex.bst

but the file should live in

./bibtex/bst/biblatex

The correct path here is crucial since the file will not be found correctly by kpsewhich if it resides elsewhere. (The path specifications are known as TDS: http://tug.ctan.org/tds/tds.html. Technically, only the ./bibtex/bst/ bit of the path is crucial, the rest after that is arbitrary, but it is a good idea to keep your directories organised with subdirectories.)


This is one of the perils of installing packages manually from CTAN: For complex packages you might get the directory structure wrong. That's why some packages come with a .tds.zip, where the TDS structure is already correctly represented in the .zip and you only need to unpack everything into your TEXMFHOME.

Another issue with manual installations from CTAN is package compatibility. The version you get from CTAN is the newest version of the package. The new biblatex version may rely on other packages being similarly up-to-date. So if you install one package manually, you may end up having to update or install several other packages manually as well to make sure that versions match.

Since you installed your TeX Live from the software repositories of your Linux distro, it may be possible to properly install biblatex via your Linux distro as well. Unfortunately, I'm not really familiar with CentOS and don't know which version of TeX Live CentOS 7 ships. But firing up yum's search function to look for biblatex can't hurt.

If the TeX Live shipped by your Linux distribution in its repositories is hopelessly outdated or packages you need are not available, you may want to consider installing a 'vanilla' TeX Live from TUG.org. (Instructions for Ubuntu are at How to install "vanilla" TeXLive on Debian or Ubuntu?. Generic instructions at https://tug.org/texlive/acquire-netinstall.html.)


Assuming your biblatex installation is complete and compatible with all packages on your installation,

\usepackage[backend=bibtex,style=plain]{biblatex}
\addbibresource{myBib.bib}

is still not quite right. You are telling biblatex to use a style called plain, but biblatex doesn't know a style of that name. biblatex has its own system of defining bibliography and citation styles that doesn't use BibTeX's .bst files. If plain was meant to refer to the BIbTeX style plain.bst it simply cannot be used with biblatex. (As we have seen, biblatex needs biblatex.bst when it is used with BibTeX. That file is always used no matter what biblatex style you request.)

You need to pick one of biblatex's own styles. The available standard styles are listed in the biblatex documentation and further custom styles are available on CTAN: https://www.ctan.org/topic/biblatex. For example

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}


\usepackage[backend=bibtex,
  style=authoryear,
]{biblatex}

\addbibresource{biblatex-examples.bib}


\begin{document}
Lorem \autocite[380]{sigfridsson}
ipsum \autocite[cf.][]{nussbaum}
dolor \autocite{worman}
sit \autocite[cf.][41]{geer}

\printbibliography
\end{document}

If you don't want to use biblatex at all and just want to use standard BibTeX instead, your document would look like the following

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}


\begin{document}
Lorem \cite[380]{article-full}
ipsum \cite{incollection-full}
dolor \cite{inproceedings-full}
sit \cite[41]{inbook-full}

\bibliographystyle{plain}
\bibliography{xampl}
\end{document}

Note that nowadays it is recommended to use Biber as backend for biblatex instead of BibTeX. Only Biber allows you to make use of all of biblatex's advanced features. But Biber needs to be available on your system and must be installed in a version that is compatible with your biblatex version.

You must log in to answer this question.

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