1

Referring to this tread: Xelatex vs Lualatex and font substitution the following code

\documentclass[a4paper,12pt]{article}
\usepackage{ifxetex,ifluatex}
\usepackage{fontspec}

\ifluatex
\usepackage[turkish,italian]{babel}
\babelfont[italian]{rm}[Ligatures=TeX]{FreeSerif}
\babelfont[turkish]{rm}[Ligatures=TeX]{FreeSerif}
\fi

\ifxetex
\setmainfont[Ligatures=TeX]{FreeSerif}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguage{turkish}
\fi

\begin{document}

    \selectlanguage{turkish}

\verb!\MakeUppercase{aabbccddiixx}! \MakeUppercase{aabbccddiixx}

\verb!\MakeUppercase{aabbccddııxx}! \MakeUppercase{aabbccddııxx}

\verb!\MakeLowercase{AABBCCDDİİ}! \MakeLowercase{AABBCCDDİİ}

\verb!\MakeLowercase{AABBCCDDII}! \MakeLowercase{AABBCCDDII}

fi ffi

\end{document}

gives me some errors if I compile it with lualatex:

(/usr/local/texlive/2019/texmf-dist/tex/generic/babel/locale/tr/babel-turkish.t
ex

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.13 \StartBabelCommands
                      *{turkish}{}
? 
! Undefined control sequence.
l.14   \SetCase

? 
! Missing number, treated as zero.
<to be read again> 
\relax 
l.15     {\uccode`i=
                  `İ\relax
? 
! Missing number, treated as zero.
<to be read again> 
\relax 
l.16      \uccode`ı=
                   `I\relax}
? 
! Missing number, treated as zero.
<to be read again> 
\relax 
l.17     {\lccode`İ=
                   `i\relax
? 
! Missing number, treated as zero.
<to be read again> 
\relax 
l.18      \lccode`I=
                  `ı\relax}
? 
! Undefined control sequence.
l.19   \SetHyphenMap
                  {%
? 

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.22 \EndBabelCommands

You can see the .log file here: turkish.log

My distribution is Texlive 2019, always upgraded. Infact I've the last version of turkish.ldf (2019/07/05 v1.4)

  • I made a bug report: github.com/latex3/babel/issues/24 – Ulrike Fischer Aug 1 '19 at 15:56
  • There is no problem here. I compiled your code with LuaTeX, with MiKTeX and Win10. Also with XeLaTeX works. – ferahfeza Aug 1 '19 at 16:05
  • I'm working with Texlive 2019. Miktex is another distribution, so experiences on that one IMHO are irrilevant for my problem @UlrikeFischer Thank you for reporting the bug – user41063 Aug 1 '19 at 18:36
  • Sorry, a mistake from my part. I was working on a fix for luatex and in the last update (3.33) I uploaded the wrong file to CTAN. I'll fix in a few days, but in the meanwhile try adding \babelprovide[import]{turkish}. – Javier Bezos Aug 3 '19 at 6:38

Your Answer

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

Browse other questions tagged or ask your own question.