土耳其语.ldf 和使用 lualatex 的字体替换

土耳其语.ldf 和使用 lualatex 的字体替换

参考这个帖子: Xelatex 与 Lualatex 以及字体替换 下面的代码

\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}

如果我使用 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

您可以在此处查看 .log 文件: 土耳其语.log

我的发行版是 Texlive 2019,一直在升级。事实上,我拥有 turkish.ldf 的最新版本(2019/07/05 v1.4)

相关内容