6

I have spent a lot of time customizing the biblatex style to my needs. Just when I thought it's finally ready, I can't seem to work biblatex properly.

I need to use babel for correct hyphenation. But Turkish language is not available in csquotes. This causes errors and I can't compile my document. I can only compile it if I disable babel. Here are the codes,

\documentclass[11pt,a4paper,oneside]{article}
    \usepackage[turkish]{babel}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[a4paper, top=2.5cm, right=2.5cm, bottom=2.5cm, left=4cm]{geometry}
    \usepackage{setspace}
    \usepackage[backend=biber, style=authoryear,date=year, firstinits=true, natbib=true]{biblatex}
    \usepackage{csquotes}

And here is the error log:

Errors:

./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing number, treated as zero. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing number, treated as zero. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing number, treated as zero. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Extra \endcsname. [...lmektedir \citep{frankel1981,diamond1984}.]
./test.tex:46: Missing \endcsname inserted. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Extra \endcsname. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Missing \endcsname inserted. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Extra \endcsname. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Missing number, treated as zero. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Missing \endcsname inserted. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Extra \endcsname. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Missing \endcsname inserted. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:46: Extra \endcsname. [...ya olduğu bilinmektedir \citep{albayrak} ]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing number, treated as zero. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing number, treated as zero. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing number, treated as zero. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Use of \\blx@imc@bibstring doesn't match its definition. [\end]
./test.tex:64: Extra }, or forgotten \endgroup. [\end]
./test.tex:64: Argument of \@gobble has an extra }. [\end]
./test.tex:64: Paragraph ended before \@gobble was complete. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing number, treated as zero. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing number, treated as zero. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]
./test.tex:64: Missing \endcsname inserted. [\end]
./test.tex:64: Extra \endcsname. [\end]

Warnings:

./test.tex: Package biblatex Warning: Conflicting options.
./test.tex: Package csquotes Warning: No style for language 'turkish'.

Is there any way to workaround this?

Here is a MWE. Document compiles fine if babel is disabled :

\documentclass[11pt,a4paper,oneside]{article}
    \usepackage[turkish]{babel}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[a4paper, top=2.5cm, right=2.5cm, bottom=2.5cm, left=4cm]{geometry}
    \usepackage[backend=biber, style=authoryear, date=year, firstinits=true, natbib=true]{biblatex}
    \usepackage{csquotes}
    \usepackage{filecontents}   

\begin{filecontents*}{\jobname.bib}
  @book{Knu86,
    author = {Knuth, Donald E.},
    year = {1986},
    title = {The \TeX book},
  }
\end{filecontents*}


\addbibresource{\jobname.bib}


\begin{document}

\section{mwe}
{
 Lorem ipsum dolor sit amet, consectetur adipiscing elit \cite{Knu86}. Vivamus a fermentum tortor. Curabitur lacinia feugiat eros. Aenean sagittis pulvinar orci id sodales. Aenean vulputate leo elit, vitae euismod odio cursus sed. Integer nec risus semper, lobortis arcu nec, sodales urna. Sed convallis vitae justo nec vehicula. Maecenas eleifend, erat sit amet ultricies ultricies, mi nibh hendrerit arcu, in consequat leo dui vitae eros.  
}

%KAYNAKÇA
\printbibliography
\end{document}
4
  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jun 18, 2014 at 13:47
  • I edited my post and appended a MWE at the end. Thank you.
    – krypt
    Jun 18, 2014 at 13:58
  • Load babel after biblatex
    – egreg
    Jun 18, 2014 at 14:07
  • That actually worked! Thank you very much!!!
    – krypt
    Jun 18, 2014 at 14:12

1 Answer 1

5

The babel module for Turkish defines = as a shorthand that is aimed to leave some space before it in case it's used in text.

Since there is no reason for using = in text, just remove it from the shorthand list:

\usepackage[turkish,shorthands=:!]{babel}

if you have babel version 3.9

\documentclass[11pt,a4paper,oneside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[turkish,shorthands=:!]{babel}

\usepackage[
  a4paper,
  top=2.5cm,
  right=2.5cm,
  bottom=2.5cm,
  left=4cm,
]{geometry}

\usepackage{csquotes}
\usepackage[
  backend=biber,
  style=authoryear,
  date=year,
  firstinits=true,
  natbib=true,
]{biblatex}

A different workaround, if you still have an old version of babel is to load it after biblatex

\documentclass[11pt,a4paper,oneside]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[
  a4paper,
  top=2.5cm,
  right=2.5cm,
  bottom=2.5cm,
  left=4cm,
]{geometry}

\usepackage{csquotes}
\usepackage[
  backend=biber,
  style=authoryear,
  date=year,
  firstinits=true,
  natbib=true,
]{biblatex}

\usepackage[turkish]{babel}
4
  • Both methods work. Very helpful explanation! Thank you!
    – krypt
    Jun 18, 2014 at 21:10
  • I've bumped into another error though. When I try to change the order of url and url date via renewing url+urldate macro, errors arise. But it works fine when I disable babel.
    – krypt
    Jun 18, 2014 at 23:11
  • @krypt Probably a new question is in order, with a full example of the \renewbibmacro command you're using.
    – egreg
    Jun 19, 2014 at 9:46
  • I've posted another question about the issue. Here is the link: tex.stackexchange.com/questions/185612/…
    – krypt
    Jun 19, 2014 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.