1

I would like make xsim numbering my exercises with greek numerals. For example instead of

  • Θέμα 1
  • Θέμα 2 ...

i would like

  • Θέμα Α
  • Θέμα Β ... etc

How can i modify or set the counter?

I have tried \Alph{counter}

\documentclass[a4paper, 11pt]{memoir}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
% XeLaTeX
\usepackage{mathspec}
\usepackage{xgreek}
\setmainfont{Google Sans}
\setmathfont(Greek,Latin,Digits)[Uppercase=Regular, Lowercase=Regular, Arabic=Regular]{Google Sans}
\usepackage[clear-aux]{xsim}

\DeclareExerciseEnvironmentTemplate{default2}{%
    \GetExerciseHeadingF{\subsection*}%
    {%
        \XSIMmixedcase{\GetExerciseName}\nobreakspace%
        \GetExerciseProperty{counter}
        \IfInsideSolutionF{ \GetExercisePropertyT{subtitle}{ {\normalfont\itshape\PropertyValue} } }%
        }
    }
{\par}
%
\DeclareExerciseType{myquestion}{
    exercise-env = question ,
    solution-env = qsolution ,
    exercise-name = Θέμα ,
    solution-name = Ενδεικτική λύση ,
    exercise-template = default2 ,
    solution-template = default2
    }
%
\DeclareExerciseCollection{test}

\begin{document}
    \activatecollection{test}
        \xsimsetup{ collect }
        \begin{question}
            q.1
        \end{question}
        \begin{qsolution}
            solution 1
        \end{qsolution}
        \begin{question}
            q.2
        \end{question}
        \begin{qsolution}
            solution 2
        \end{qsolution}
    \deactivatecollection{test}
    %
    \printcollection{test}
    \printallsolutions
\end{document}
6
  • Welcome! You have the greekctr and engrec packages to do that.
    – Bernard
    Mar 25, 2021 at 15:28
  • something like \xismsetup{question/the-counter = \Greeknumber{\the\value{question}} } should work
    – cgnieder
    Mar 25, 2021 at 18:41
  • Thank you for your answers. Tried both but it fails, i get ``` Missing number, treated as zero.``` with \EnGrec{}, and You can't use `\relax' after \the. with \Alph{}
    – Petros C
    Mar 25, 2021 at 19:37
  • I tried mine in a more minimal example than yours and it worked, otherwise I wouldn't have suggested it. Just make sure to use the correct option (which is documented)
    – cgnieder
    Mar 25, 2021 at 20:06
  • I remove my custom declarations and running with the default exercise and solution environment, but it still fails. Is \Greeknumber a command from a specific package (I cannot find it). Thank you for your time.
    – Petros C
    Mar 25, 2021 at 20:56

0

You must log in to answer this question.

Browse other questions tagged .