6

In Turkish, capital "İ" and "I" are different letters, as well as their respective small counterparts "i" and "ı". In the pdf output of the MWE below, the first chapter head (title) respects this difference, but the second does not. Any solutions?

\mainlanguage[tr]
\definefontfamily[libertine][rm][Linux Libertine O]
\setupbodyfont[libertine,serif] 
\setuplayout[grid=yes]
\setupindenting[yes,medium]
\setuphead
[chapter][number=no,textstyle=cap]

\starttext 

\chapter{CAPITAL ``I'' AND ``İ''}% FIRST CHAPTER HEAD WITH CAPITAL LETTERS

\chapter{small ``ı'' and ``i''}% second chapter head with small letters

\stoptext 
2
  • 4
    Maybe the uppercase conversion does not make the différence between those two letters. In that case, it may be worth to ask on ConTeXt mailing list. – sztruks Nov 8 '19 at 20:15
  • 3
    As far as I understand, it's a known problem with the turkish language. There is a single char in Unicode which it's supposed to capitalise differently depending on the language... I'm pretty sure ConTeXt does not have a hook for this and you have to correct it manually. context \uccode`i=`İ \def\up#1{\uppercase{#1}} \setuphead [chapter] [number=no,deeptextcommand=\up] If someone believes it will break something, I'm actually curious. Also if smallcaps works for you you can activate the feature (script=latn). The subsitution is then managed by the font. – Semptum Valoris Nov 9 '19 at 0:22
8

There is existing switch to change the output of i with the \WORD etc. commands but you overload the default settings for the uppercase character. The same problem you have exists also for the german double s which produce SS when you use \WORD but the module s-lingual-de.mkiv shows how you can change this.

With the command \overloaduppercase you can set which character should be used for the uupercase form of a letter. In the example below I adapated the code for the german double s to the dotted i.

\unexpanded\def\enableuppercasedottedi {\overloaduppercase{0x69}{0x130}}
\unexpanded\def\disableuppercasedottedi{\overloaduppercase{0x69}{0x49}}

\installtexdirective
  {fonts.uppercasedottedi}
  \enableuppercasedottedi
  \disableuppercasedottedi

%\enabledirectives[fonts.uppercasedottedi]

\starttext

\WORD{i}

\enableuppercasedottedi

\WORD{i}

\disableuppercasedottedi

\WORD{i}

\stoptext

enter image description here

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.