2

I have the following MWE using counters. At which place can I insert \stepcounter to increase always at the next \enumerate item? All positions which I've tried have failed with \endcsname error.

\documentclass{article}

\usepackage{fontspec}

\newfontfamily\ngg{NewGardiner}


\newcounter{nw}
\setcounter{nw}{13000}

\renewcommand{\theenumi}{\ngg\symbol{"\the\value{\stepcounter{nw}}}}

\begin{document}

\begin{enumerate}
\item rozhodovat se na hraně zajímavého
\item vždycky to tam máš (data v matematice)
\end{enumerate}
\end{document}
user2925716
  • 1,940
  • 1
    Try loading package enumitem and use \begin{enumerate}[label=\ngg\symbol{\theenumi}] (if this is a first level list). – Bernard Oct 06 '19 at 17:17
  • @Bernard I need to set the initial value to 13000. And this doesn't work for me: \usepackage{enumitem}

    \begin{document}

    \begin{enumerate}[\setcounter{theenumi}{13000} label=\ngg\symbol{\theenumi}] \item rozhodovat se na hraně zajímavého \item vždycky to tam máš (data v matematice) \end{enumerate} \end{document}

    – user2925716 Oct 06 '19 at 17:29
  • You can use the key start=13000. – Bernard Oct 06 '19 at 17:33
  • You do not want to start at 13000 decimal you want to start at hex 13000 which is 77824 or "13000 also you don't want NewGardiner as that is the font which does not have the hieroglyphs in Unicode positions. – David Carlisle Oct 06 '19 at 17:38
  • @DavidCarlisle So which font if not NewGardiner ? – user2925716 Oct 06 '19 at 17:45
  • 1
    as I commented on one of your earlier questions the page you linked to showed two versions of that font the old one (that you have) which pre-dates these characters being in Unicode and a new one called something like NewGardiner-SSP, I forget exactly, which has the characters in Unicode order. – David Carlisle Oct 06 '19 at 17:49

1 Answers1

2

enter image description here

\documentclass{article}

\usepackage{fontspec}
\usepackage{enumitem}

%I don't have this font and you want teh updated verison with Unicode ordering.
%\newfontfamily\ngg{NewGardiner} 
\newfontfamily\ngg{Segoe UI Historic}

%you do not need a counter and want to start from 77824 not 13000
%\newcounter{nw}
%\setcounter{nw}{13000}

%\renewcommand{\theenumi}{\ngg\symbol{"\the\value{\stepcounter{nw}}}}

\begin{document}

\begin{enumerate}[start="13000,label={\ngg\symbol{\value{enumi}}}]
\item rozhodovat se na hraně zajímavého
\item vždycky to tam máš (data v matematice)
\item zzz
\item zzz
\item zzz
\item zzz
\item zzz
\item zzz
\item zzz
\end{enumerate}
\end{document}
David Carlisle
  • 757,742
  • 1
    Forks fine. Actually I need to subtract "13000 from the other occurence of the counter enumi as given here: `label=\roman{enumi}--\arabic{enumi}'. How do I do this in XeTeX? This doesn't work: label=\roman{enumi-13000}--\arabic{enumi-13000} One counter is supposed to be for Hieroglyphs and the other for roman and arabic and these latter two begin at 1 not at 13000. – user2925716 Oct 06 '19 at 17:53
  • 2
    leave start as the default 1 and use label=\roman{enumi}--{\ngg\symbol{\numexpr "13000+\value{enumi}}}. and it will print the decimal value as well as a hieroglyph – David Carlisle Oct 06 '19 at 17:59