[Tex/LaTex] biblatex: why isn’t the own .bbx file found

biblatex

In both the LaTeX source file's directory and in my local texmf tree (namely, in ~/Library/texmf/tex/latex/biblatex/bbx) I've placed the following .bbx file:

\ProvidesFile{mybooknumeric.bbx}
%[\abx@bbxid]
\RequireBibliographyStyle{standard}
\RequireBibliographyStyle{numeric}
%
\DeclareBibliographyOption[boolean]{dashed}[true]{%
  \ifstrequal{#1}{true}
    {\ExecuteBibliographyOptions{pagetracker}%
     \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}}
    {\renewbibmacro*{bbx:savehash}{}}}
%
\newbibmacro*{bbx:savehash}{%
  \savefield{fullhash}{\bbx@lasthash}}

The purpose of that is simply to used horizontal lines to replace the author name for subsequent bibliography entries having the same author.

But when I process my source, such as the one below, I get an error:

(/usr/local/texlive/2016/texmf-dist/tex/latex/biblatex/biblatex.def)
(./mybooknumeric.bbx
(/usr/local/texlive/2016/texmf-dist/tex/latex/biblatex/bbx/standard.bbx)
(/usr/local/texlive/2016/texmf-dist/tex/latex/biblatex/bbx/numeric.bbx))

/usr/local/texlive/2016/texmf-dist/tex/latex/biblatex/biblatex.sty:13002: Packa
ge biblatex Error: Style 'mybooknumeric' not found.

l.13002 \RequireCitationStyle{\blx@cbxfile}

What's wrong?

The source:

\documentclass[12pt]{memoir}

\usepackage[style=mybooknumeric,backend=bibtex,,dashed=true]{biblatex}

\begin{filecontents}{euler.bib}
@article{EulerE1776,
    Author = {Euler, Leonhard},Title = {All about E},
    Journal = {Math.\ Psychol.},
    Year = {1776},Volume = {4},number={1},
    pages={1--2718}
}
@article{EulerE1748,
    Author = {Euler, Leonhard},Title = {My formula},
    Journal = {Math.\ Formulas},
    Year = {1748},Volume = {4},
    pages={233--234}
}
\end{filecontents}

\addbibresource{euler.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

Best Answer

Among biblatex's 'load-time' options are (biblatex version 3.5, §.3.1.1):

style=<file>                                             default: numeric 
Loads the bibliography style file .bbx and the citation style file .cbx.
See § 3.3 for an overview of the standard styles.

bibstyle=<file>                                           default: numeric
Loads the bibliography style file .bbx. See § 3.3.2 for an overview of the
standard bibliography styles.

citestyle=<file>                                          default: numeric
Loads the citation style file .cbx. See § 3.3.1 for an overview of the
standard citation styles.

So, if you use style=mybooknumeric, biblatex will try to find both mybooknumeric.bbx and mybooknumeric.cbx. In your case, it managed to find the former, but cannot (obviously) find the latter.

So you probably want to load biblatex in the following way:

% strictly speaking, naming the `citestyle` is not needed 
% if you want the 'numeric' style
\usepackage[bibstyle=mybooknumeric, citestyle=numeric, backend=bibtex, dashed=true]{biblatex}

... or create a mybooknumeric.cbx.

Related Question