5

I do custom list for to make uppercase/lowercase for 8-bit TeX for Georgian and it works fine, but how to define it for XeLaTeX/LuaLaTeX? here is a similar question Applying MakeUppercase to non-English characters in math mode

this is example. it works for Russian and English

\documentclass{article}
\usepackage{fontspec}
\usepackage[russian,georgian]{babel}
 \makeatletter
 \def\update@uclc@with@georgian{%
  \expandafter\def\expandafter\@uclclist\expandafter
   {\@uclclist
   \ა\Ⴀ\ბ\Ⴁ\გ\Ⴂ\დ\Ⴃ\ე\Ⴄ\ვ\Ⴅ\ზ\Ⴆ\თ\Ⴇ\ი\Ⴈ\კ\Ⴉ\ლ\Ⴊ\მ\Ⴋ\ნ\Ⴌ\ო\Ⴍ\პ\Ⴎ\ჟ\Ⴏ\რ\Ⴐ\ს\Ⴑ\ტ\Ⴒ\უ\Ⴓ\ფ\Ⴔ\ქ\Ⴕ\ღ\Ⴖ\ყ\Ⴗ\შ\Ⴘ\ჩ\Ⴙ\ც\Ⴚ\ძ\Ⴛ\წ\Ⴜ\ჭ\Ⴝ\ხ\Ⴞ\ჯ\Ⴟ\ჰ\Ⴠ}%
   \let\update@uclc@with@georgian\relax %
  }
    \makeatother
  \setmainfont{Dejavu Serif}
\begin{document}

\MakeUppercase{abc აბგ фип}

\end{document}
  • According to Wikipedia, the Mkhedruli script has no upper/lower case variation; is the source reliable? – egreg Dec 22 '15 at 9:50
  • I know..see comments below. – Levan Shoshiashvili Dec 22 '15 at 9:52
6

You need to tell TeX to map the characters themselves to each other: there are no control sequences involved here. (This is different in 8-bit engines where the code points you want are not single bytes.) You also need to make sure this code gets activated when Georgian is selected. For example

\documentclass{article}
\usepackage{fontspec}
\usepackage[russian,georgian]{babel}
\makeatletter
\g@addto@macro\extrasgeorgian{%
  \def\update@uccode@georgian#1#2{%
    \ifx\relax#2\relax
    \else
      \uccode`#1=`#2 %
      \expandafter\update@uccode@georgian
    \fi
  }%
  \update@uccode@georgian
   \ა\Ⴀ\ბ\Ⴁ\გ\Ⴂ\დ\Ⴃ\ე\Ⴄ\ვ\Ⴅ\ზ\Ⴆ\თ\Ⴇ\ი\Ⴈ\კ\Ⴉ\ლ\Ⴊ\მ\Ⴋ\ნ\Ⴌ\ო\Ⴍ\პ\Ⴎ\ჟ\Ⴏ\რ\Ⴐ\ს\Ⴑ\ტ\Ⴒ\უ\Ⴓ\ფ\Ⴔ\ქ\Ⴕ\ღ\Ⴖ\ყ\Ⴗ\შ\Ⴘ\ჩ\Ⴙ\ც\Ⴚ\ძ\Ⴛ\წ\Ⴜ\ჭ\Ⴝ\ხ\Ⴞ\ჯ\Ⴟ\ჰ\Ⴠ
   \relax\relax
}
\makeatother
\setmainfont{Dejavu Serif}
\begin{document}

\MakeUppercase{abc აბგ фип}

\end{document}

will work. (I've kept your list of escaped characters simply to avoid having to edit it all!)


Not directly relevant, but at least worth noting from the point of view of the question 'Why is no case changing happening as standard?' is the nature of the input you have. For example, is code point U+10D0, listed as

10D0;GEORGIAN LETTER AN;Lo;0;L;;;;;N;GEORGIAN SMALL LETTER AN;;;;

Notice that this is a caseless letter with no upper/lower mapping. On the other hand, (U+10A0) is a cased letter

10A0;GEORGIAN CAPITAL LETTER AN;Lu;0;L;;;;;N;;;;2D00;

but maps to U+2D00. If we look there we find

2D00;GEORGIAN SMALL LETTER AN;Ll;0;L;;;;;N;;;10A0;;10A0

which does mean there is an upper/lower case pair. However, U+2D00 seems to have a different appearance to U+10D0!

(I'm not saying Unicode is 'right' here, just that the data in Unicode TeX engines for case changing is as-standard that taken from the Unicode Consortium, so we can see why there is an issue.)

  • thank you very much... Yes iknow.. modern Georgian is caseless...2D00/10A0 is an old alphabet, but in some cases Capitals are used in headings and as decorative letters... also `capitalized mkhedruli' is used, but this is not unicode standard (capitalized 10D0)..this is a more like 'SmallCaps'...Some non standard fonts have Capilized 10D0 in 10A0 position ... – Levan Shoshiashvili Dec 22 '15 at 9:52
  • Intersesting ..\MakeLowercase{Ⴀ} gives 2D00 ..So toUppercase/Lowercase works for 2D00/10A0 'out of box' :) .. – Levan Shoshiashvili Dec 22 '15 at 9:58
  • @LevanShoshiashvili Yes, as that is in the Unicode data files (as I've mentioned). – Joseph Wright Dec 22 '15 at 9:59
  • Sorry this is not relavent to this question, but 'Uppercase/Lowercase works for 2D00/10A0 ' this works on 'font level' or 'tex'(lualatex,xelatex) level? 'who' is responsible? – Levan Shoshiashvili Dec 22 '15 at 10:02
  • @LevanShoshiashvili It's a TeX-level change. The Unicode engines extend the TeX primitives \uppercase and \lowercase to cover the full range, and (as standard) the formats are then built using the core Unicode data files to set up the mappings. There is some ongoing work by the LaTeX team looking at a richer case-changing approach but this won't affect \MakeUppercase. – Joseph Wright Dec 22 '15 at 10:06

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.