# Subfigure numbering for Greek - XeLaTeX

I am writing a thesis in Greek. Everything compiles well and the produced document is the desired one except one little problem. The numbering on my subfigures is followed by a small rectangle, i.e. (α'rectangle'), (β'rectangle') etc. I'm posting my preamble concerning at least the language options. It is very annoying and any help will be appreciated.

\documentclass[a4paper,twoside, 12pt]{book}

\usepackage{fontspec}
\newfontfamily\greekfont{Arial}
\usepackage{polyglossia}
\setdefaultlanguage{greek}
\setotherlanguage{english}
\setmainfont[Mapping=tex-text]{Arial}

\usepackage{float, subfig}

\begin{document}

\begin{figure}
\centering
\subfloat[]{\includegraphics[<options>]{figFile1}} \\
\subfloat[]{\includegraphics[<options>]{figFile2}} \\
\caption{}
\label{}
\end{figure}

\end{document}


The same problem occurs if I use the subfigure package and substitute \subfloat with \subfigure.

-
It's good that you have posted the preamble, but a full MWE would be of greater help. For example, what means do you use to produce subfigures? –  Andrey Vihrov Feb 7 '12 at 16:52
Thanks for the reply. –  TH11 Feb 7 '12 at 17:16
You should also use Script=Greek,Ligatures=TeX for the Greek font. (Ligatures=TeX is an engine-neutral synonym for Mapping=tex-text.) –  Andrey Vihrov Feb 7 '12 at 17:47
Andrey it complains that there is no TeX option in the Ligatures. I have used Script=Greek with no success –  TH11 Feb 7 '12 at 18:20
This is not related to your question. IMHO xgreek is more robust than polyglossia. Also, in case you want to have hyphenations both in greek and in english, since you are using xelatex, the easier way to achieve it is to use package ucharclasses. Check here –  pmav99 Feb 7 '12 at 22:06

The problem seems to be that the Greek numeral used for subfigures is followed by the character ʹ (U+0374 GREEK NUMERAL SIGN) that, apparently, your version of Arial misses.

You can avoid the problem by defining a substitution font for that character:

\newfontfamily\dejavusans{DejaVu Sans}
\usepackage{newunicodechar}
\newunicodechar{ʹ}{{\dejavusans ʹ}}


In case it's difficult for you to input the character, since we already know its code point in Unicode, the syntax is

\newunicodechar{^^^^0374}{{\dejavusans^^^^0374}}


Choose a font that's available in your system. I've used DejaVu Sans, but perhaps Linux Biolinum O is good as well.

Don't use subfigure: it's obsolete.

-
egreg don't I have to DeclareUnicodeCharacter first in order to show which character to change ? –  TH11 Feb 7 '12 at 18:21
...and again it does not seem to work either with DejaVu Sans ... compiled ok but the bloody rectangle is still there ! –  TH11 Feb 7 '12 at 18:28
That's \newunicodechar's job. You need only to provide the Unicode character. And XeLaTeX works differently in this respect than pdfLaTeX, so \DeclareUnicodeCharacter wouldn't work. Knowing the Unicode point you can say \newunicodechar{^^^^0374}{{\dejavusans ^^^^0374}} –  egreg Feb 7 '12 at 18:28
I found that the character displayed is the 25A1 unicode char. I apply it as \newunicode{25A1}{\dejavusans '} and it says that there is an invalid argument. Sorry that I don't get it ... :( –  TH11 Feb 7 '12 at 18:49
I got the idea .. the only thing is how do I put the 0374 char as a first argument on the newunicodechar command? –  TH11 Feb 7 '12 at 19:02