2

I want to change the standard enumeration (arabic numbers) in enumeration environment with the greek lowercase alphabet, using enumitem package.

I also use XeLateX engine to compile my document. The problem is that, when I use

\documentclass{article}
\usepackage{fontspec,xgreek,enumitem}
\defaultfontfeatures{Mapping=tex-text}
\setromanfont[Mapping=tex-text]{GFS Artemisia}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[variant=modern]{greek}

\begin{document}    
\begin{enumerate}[label=\let\textdexiakeraia\relax(\alph*)]
      \item bla bla 
      \item bla bla
    \end{enumerate}
\end{document}

I get the following error (from my log file):

! Undefined control sequence.
\labelenumi ->\let \textdexiakeraia 
                                    \relax (\alph *)
l.120 ...label=\let\textdexiakeraia\relax(\alph*)]

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

LaTeX Info: Redefining \anw@print on input line 121.
LaTeX Font Info:    Font shape `EU1/GFSArtemisia(0)/m/sl' in size <10.95> not a
vailable
(Font)              Font shape `EU1/GFSArtemisia(0)/m/it' tried instead on inpu
t line 122.

However, there is no errors when I simply use label=(\alph*) option.

Yorgos
  • 2,694

1 Answers1

4

The xgreek package defines Greek numerals in a quite contorted way, that makes it difficult to change the representation.

Here's code that should work better and allowing locally to change the representation by omitting the numeral sign.

\documentclass{article}
\usepackage{fontspec,xgreek,enumitem}
\setmainfont{GFS Artemisia}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage[variant=modern]{greek}

\makeatletter
\renewrobustcmd{\anw@true}{\let\ifanw@\iftrue}
\renewrobustcmd{\anw@false}{\let\ifanw@\iffalse}\anw@false
\newrobustcmd{\noanw@true}{\let\ifnoanw@\iftrue}
\newrobustcmd{\noanw@false}{\let\ifnoanw@\iffalse}\noanw@false
\renewrobustcmd{\anw@print}{\ifanw@\ifnoanw@\else\numer@lsign\fi\fi}
\newrobustcmd{\noanw}{\noanw@true}
\makeatother

\begin{document}

\begin{enumerate}[label=(\noanw\alph*)]
\item bla bla bla
\item bla bla
\end{enumerate}

\end{document}

enter image description here

egreg
  • 1,121,712