0

I am trying to nest two enumerate environments, the second inside the first. I am using the xgreek package, which generates the second enumeration as (α'), (β'), (γ') etc. However, when using 2 of the GFS fonts (Elpis & Heraklit), I am facing issues with the ' in the enumeration.

Because I have over 50 .tex files with the nested enumerations, I would prefer to do it with an automatic way and not to have to add a label to every nested enumeration as described on this post.

enter image description here

MWE:

\documentclass[12pt]{article}

\usepackage{enumerate, enumitem, moreenum}
\usepackage{multicol}
\usepackage{fontspec,xgreek, polyglossia}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text]{CMU Serif} 
\setdefaultlanguage{english}
\newfontfamily\myfontfirst{GFS Elpis}
\newfontfamily\myfontsecond{GFS Artemisia}
\newfontfamily\myfontthird{GFS Heraklit}

\begin{document} 
    
    \begin{multicols}{2}
    CMU Serif
    \begin{enumerate}
        \item 
        \begin{enumerate}
            \item 
            \item 
            \item
            \item 
            \item 
            \item 
        \end{enumerate}
        \item
    \end{enumerate}
    
    {\myfontfirst 
        GFS Elpis
        \begin{enumerate}
            \item 
                \begin{enumerate}
                    \item 
                    \item 
                    \item
                    \item 
                    \item 
                    \item 
                \end{enumerate}
            \item
        \end{enumerate}
    }
    \end{multicols}

    \begin{multicols}{2}
    {\myfontsecond 
        GFS Artemisia
        \begin{enumerate}
            \item 
            \begin{enumerate}
                \item 
                \item 
                \item
                \item 
                \item 
                \item 
            \end{enumerate}
            \item
        \end{enumerate}
    }
    
    {\myfontthird
        GFS Heraklit
        \begin{enumerate}
            \item 
            \begin{enumerate}
                \item 
                \item 
                \item
                \item 
                \item 
                \item 
            \end{enumerate}
            \item
        \end{enumerate}
    }   
    \end{multicols}
    
\end{document}
6
  • What's the purpose of using xgreek and set the default language to English?
    – egreg
    Aug 25, 2020 at 8:54
  • I use polyglossia and it doesn't work if I don't set the default language to English. If I remove polyglossia and the default language command, the problem with the enumeration persists.
    – Bill
    Aug 25, 2020 at 9:01
  • Do you need xgreek?
    – egreg
    Aug 25, 2020 at 9:16
  • I think so. If i don't include it, the enumeration becomes (a), (b), (c) which is not desirable.
    – Bill
    Aug 25, 2020 at 9:17
  • What language is your document written in?
    – egreg
    Aug 25, 2020 at 9:19

1 Answer 1

1

The fonts GFS Elpis and GFS Heraklit don't have a glyph for U+0374 GREEK NUMERAL SIGN and, indeed, you get

Missing character: There is no ʹ in font GFS Elpis/OT:script=latn;language=dflt;!
Missing character: There is no ʹ in font GFS Heraklit-Regular/OT:script=latn;language=dflt;!

for each item in the second level enumerations when those fonts are in use.

You can provide a fallback using a font that has the glyph, in the code below I adopted GFS Artemisia.

\documentclass[12pt]{article}

\usepackage{fontspec}
\usepackage{xgreek}
\usepackage{enumitem,moreenum}
\usepackage{multicol}

\setmainfont{CMU Serif} 
\newfontfamily\myfontfirst{GFS Elpis}
\newfontfamily\myfontsecond{GFS Artemisia}
\newfontfamily\myfontthird{GFS Heraklit}

\makeatletter
%%% avoid so many spurious warnings
\protected\def\anw@false{\protected\def\anw@print{}}
\protected\def\anw@true{\protected\def\anw@print{\numer@lsign}}
%%% provide a fall back for U+0374 GREEK NUMERAL SIGN
\protected\def\numer@lsign{\iffontchar\font`ʹ ʹ\else{\myfontsecond ʹ}\fi}
\makeatother

\begin{document} 
    
    \begin{multicols}{2}
    CMU Serif
    \begin{enumerate}
        \item 
        \begin{enumerate}
            \item 
            \item 
            \item
            \item 
            \item 
            \item 
        \end{enumerate}
        \item
    \end{enumerate}
    
    {\myfontfirst 
        GFS Elpis
        \begin{enumerate}
            \item 
                \begin{enumerate}
                    \item 
                    \item 
                    \item
                    \item 
                    \item 
                    \item 
                \end{enumerate}
            \item
        \end{enumerate}
    }
    \end{multicols}

    \begin{multicols}{2}
    {\myfontsecond 
        GFS Artemisia
        \begin{enumerate}
            \item 
            \begin{enumerate}
                \item 
                \item 
                \item
                \item 
                \item 
                \item 
            \end{enumerate}
            \item
        \end{enumerate}
    }
    
    {\myfontthird
        GFS Heraklit
        \begin{enumerate}
            \item 
            \begin{enumerate}
                \item 
                \item 
                \item
                \item 
                \item 
                \item 
            \end{enumerate}
            \item
        \end{enumerate}
    }   
    \end{multicols}
    
\end{document}

By the way, don't load enumerate and enumitem together, as they fight each other. Load only the latter.

enter image description here

2
  • Ι compiled it using Xelatex and instead of ' I get rectangles.
    – Bill
    Aug 25, 2020 at 9:56
  • @Bill The picture has been obtained with XeLaTeX.
    – egreg
    Aug 25, 2020 at 13:38

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.