danielshub / biblatex-cv

A LaTeX package for creating an academic curriculum vitae (CV) from a BibTeX .bib file using the biblatex package.
7 stars 0 forks source link

Undefined control sequence with minimal file #1

Open Hugo-Heagren opened 7 months ago

Hugo-Heagren commented 7 months ago

I have the following .tex file:

\documentclass{article}
\usepackage{biblatex-cv}

\addbibresource{~/.papers/papers.bib}

\begin{document}
Foo bar. \nocite{kripke77_speak_seman} % this entry exists in the above file

\printbibliography{}

\end{document}

I can run LaTeX, then Biber on it with no errors. Running LaTeX again after this gives me the following errors:

./BibLaTeX-cv.bbl:30: Undefined control sequence.
Package biblatex Warning: File 'english-cv.lbx' not found!
(biblatex)                Ignoring mapping 'english' -> 'english-cv'.

(/usr/local/texlive/2024/texmf-dist/tex/latex/biblatex/lbx/english.lbx)
(./BibLaTeX-cv.bbl

<argument> \cv@blx@highlightname@hash@list 

l.30       }

)

Package biblatex Warning: Bibliography string 'by' undefined
(biblatex)                at entry 'kripke77_speak_seman' on input line 9.

./BibLaTeX-cv.tex:9: Undefined control sequence.
<argument> \cv@blx@highlightname@hash@list 

l.9 \printbibliography{
                     }
[1{/usr/local/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./BibLaTeX-cv.aux)

(I have had similar errors trying to build more complex documents, but this is very small MWE). I'm on TeXLive 2024, installed today.

danielshub commented 6 months ago

Currently the package only supports American English and requires the babel package to be loaded. Can you try adding \usepackage[american]{babel} to your MWE before you load biblatex-cv.

Hugo-Heagren commented 6 months ago

Currently the package only supports American English and requires the babel package to be loaded. Can you try adding \usepackage[american]{babel} to your MWE before you load biblatex-cv.

I've just tried this, and I get the same error. My file looked like this:

\documentclass{article}
\usepackage[american]{babel}
\usepackage{biblatex-cv}

\addbibresource{~/.papers/papers.bib}

\begin{document}
Foo bar. \nocite{kripke77_speak_seman} % this entry exists in the above file

\printbibliography{}

\end{document}

And I had this in my output:

./BibLaTeX-cv.bbl:30: Undefined control sequence.
<argument> \cv@blx@highlightname@hash@list 

l.30       }

)
./BibLaTeX-cv.tex:10: Undefined control sequence.
<argument> \cv@blx@highlightname@hash@list 

l.10 \printbibliography{
                      }
danielshub commented 6 months ago

Have you tried following the example in the manual (https://github.com/danielshub/biblatex-cv/blob/master/doc/biblatex-cv.pdf) which is available as https://github.com/danielshub/biblatex-cv/blob/master/doc/cv.tex At a minimum, you still need to define \highlightname{}{}{}{}. I should probably make this optional.

Hugo-Heagren commented 6 months ago

Aha! So to be clear, the highlightname macro must appear in the preamble if I use this package? That wasn't clear to me from the documentation.

I should probably make this optional.

I agree -- having to use it seems counterintuitive to me. Moreover, my CV is such that I don't want my name highlighted, so it doesn't make much difference to me.

danielshub commented 6 months ago

Yes, you need at least \highlightname in the preamble. If you call it with a name that does not appear in the bib file, or possible with an empty name (\highlightname{}{}{}{}), you will not get any highlighting.