# Undefined control sequence errors from biblatex

I keep getting "undefined control sequence" errors from biblatex when using \printbibliography at the end of the document. These errors are related to special characters in the titles of some of the references, for example in \textgreek.

I have searched for a solution, but unfortunately, nothing I found so far did the trick.

I am using TeXStudio 2.12.6, all packages in MiKTeX are updated to the newest versions.

My very simple, minimal example document is:

\documentclass[11pt,a4paper]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage{lineno}
\PassOptionsToPackage{hyphens}{url}
urlcolor  = blue,
citecolor = blue,
anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}
\usepackage{authblk}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{amsmath}
\usepackage{textgreek}
\usepackage{siunitx}
\usepackage{float}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{rotating}
\usepackage[backend=biber,bibstyle=numeric,citestyle=numeric-comp,sorting=none]{biblatex}

\begin{document}

This reference \cite{Evans.2000} will cause an error.

\end{document}


The reference.bib file contains just this one reference:

@Article{Evans.2000,
author     = {Evans, M.},
title      = {Predicting times to low strain for a 1CrMoV rotor steel using a 6-\textgreek{j} projection technique},
journal    = {Journal of Materials Science},
year       = {2000},
volume     = {35},
number     = {12},
pages      = {2937--2948},
issn       = {00222461},
doi        = {10.1023/A:1004770525118},
pagination = {page},
}


The error then arises from the \textgreek{j} in the title:

! Undefined control sequence.
<argument> ... for a 1CrMoV rotor steel using a 6-\textgreek
{j} projection technique

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.


• Welcome to TeX.SX! Obviously, the macro \textgreek was never defined. I suppose \textgreek{j} should be rendered like ϑ? You can change \textgreek{j} to \vartheta in your .bib file. – Jasper Habicht Feb 2 '18 at 18:08

\textgreek{j} needs greek-babel; the (minimized) example is

\begin{filecontents*}{\jobname.bib}
@Article{Evans.2000,
author     = {Evans, M.},
title      = {Predicting times to low strain for a 1CrMoV rotor
steel using a 6-\textgreek{j} projection technique},
journal    = {Journal of Materials Science},
year       = {2000},
volume     = {35},
number     = {12},
pages      = {2937--2948},
issn       = {00222461},
doi        = {10.1023/A:1004770525118},
pagination = {page},
}
\end{filecontents*}

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}

\usepackage{csquotes}
\usepackage[
backend=biber,
bibstyle=numeric,
citestyle=numeric-comp,
sorting=none
]{biblatex}

\begin{document}

This reference \cite{Evans.2000} will cause an error.

\end{document}


Alternatively, you can use textgreek with some coercion, but it's probably easier to edit the entry to have

  title      = {Predicting times to low strain for a 1CrMoV rotor
steel using a 6-\texttheta\ projection technique},


Here's the example without such editing.

\begin{filecontents*}{\jobname.bib}
@Article{Evans.2000,
author     = {Evans, M.},
title      = {Predicting times to low strain for a 1CrMoV rotor
steel using a 6-\textgreek{j} projection technique},
journal    = {Journal of Materials Science},
year       = {2000},
volume     = {35},
number     = {12},
pages      = {2937--2948},
issn       = {00222461},
doi        = {10.1023/A:1004770525118},
pagination = {page},
}
\end{filecontents*}

\documentclass[11pt,a4paper]{article}

\usepackage{textgreek}

\usepackage{csquotes}
\usepackage[
backend=biber,
bibstyle=numeric,
citestyle=numeric-comp,
sorting=none
]{biblatex}

\newcommand{\textgreek}[1]{\csname sulzergreek#1\endcsname}
\newcommand{\sulzergreekj}{\texttheta}
% add all other needed letters

\begin{document}

This reference \cite{Evans.2000} will cause an error.

\end{document}


## Notes

The filecontents* environment is used just to make the example self-contained.

In your long preamble there are some things to fix.

• Remove \DeclareGraphicsExtensions: it's useless to define extensions such as .TIF, when TIFF support is missing for LaTeX

• hyperref should be loaded last

• latexsym is useless when you have amssymb`.

• Many thanks, hadn't expected such a simple solution! I'm using Citavi for my bibliography management and it outputs greek symbols in titles in this \textgreek form. As such, I will stick with adding greek-babel. Thanks also for the comments on the preamble. I use Authorea to write a rough, first draft of my articles and then "fine-tune" them in TeXStudio. Authorea still needs some improvements with LaTeX support, hence these issues. I would be grateful for any other comments on the preamble as I don't have much experience with different packages... – Sabin Snorlax Feb 4 '18 at 14:42