4

I've tried to index my sentences like this:

\renewcommand{\theenumi}{\roman{enumi}--\arabic{enumi}--\babyloniannum{enumi}}

The MWE Example is this: but it gives an error as given below:

\documentclass{article}

\usepackage{amssymb,amsmath}
\usepackage{tikz-cd}
\usepackage{xypic}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}

\newcommand{\pullbackcorner}[1][dl]{\save*!/#1-1pc/#1:(1,-1)@^{|-}\restore}
\usepackage[all]{xy}

\usepackage{pgffor}
\usepackage{babyloniannum}

\renewcommand{\theenumi}{\roman{enumi}--\arabic{enumi}--\babyloniannum{enumi}}

\begin{document}
\underline{motto:}{ každý den $\pm$ nový princip }\hfill{$\square$}
\\
\\
\begin{enumerate}
\item rozhodovat se na hraně zajímavého
\item *vždycky to tam máš (data v matematice)
\end{enumerate}
\end{document}

BUT the xelatex says

Command Line:   D:\ProgramFiles\MikTexNEW\miktex\bin\x64\xelatex.exe --interaction=errorstopmode --synctex=-1 "ideje.tex"
Startup Folder: C:\Users\hynek0\Desktop\TH0dipl

This is XeTeX, Version 3.14159265-2.6-0.999991 (MiKTeX 2.9.7050 64-bit)
entering extended mode
(ideje.tex
LaTeX2e <2018-12-01>
(D:\ProgramFiles\MikTexNEW\tex/latex/base\article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(D:\ProgramFiles\MikTexNEW\tex/latex/base\size10.clo))
(D:\ProgramFiles\MikTexNEW\tex/latex/amsfonts\amssymb.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/amsfonts\amsfonts.sty))
(D:\ProgramFiles\MikTexNEW\tex/latex/amsmath\amsmath.sty
For additional information on amsmath, use the `?' option.
(D:\ProgramFiles\MikTexNEW\tex/latex/amsmath\amstext.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/amsmath\amsgen.sty))
(D:\ProgramFiles\MikTexNEW\tex/latex/amsmath\amsbsy.sty)
(D:\ProgramFiles\MikTexNEW\tex/latex/amsmath\amsopn.sty))
(D:\ProgramFiles\MikTexNEW\tex/latex/tikz-cd\tikz-cd.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/frontendlayer\tikz.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/basiclayer\pgf.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/utilities\pgfrcs.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfutil-common.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfutil-common-lists.tex))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfutil-latex.def
(D:\ProgramFiles\MikTexNEW\tex/latex/ms\everyshi.sty))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfrcs.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf\pgf.revision.tex)))
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/basiclayer\pgfcore.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics\graphicx.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics\keyval.sty)
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics\graphics.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics\trig.sty)
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics-cfg\graphics.cfg)
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics-def\xetex.def)))
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/systemlayer\pgfsys.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgfsys.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfkeys.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfkeysfiltered.code.tex))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgf.cfg)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgfsys-xetex.def
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgfsys-dvipdfmx.def
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgfsys-common-pdf.def)))
)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgfsyssoftpath.code.tex)
 (D:\ProgramFiles\MikTexNEW\tex/generic/pgf/systemlayer\pgfsysprotocol.code.tex
)) (D:\ProgramFiles\MikTexNEW\tex/latex/xcolor\xcolor.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/graphics-cfg\color.cfg))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcore.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmath.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathcalc.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathutil.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathparser.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.basic.code.tex
)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.trigonometric.
code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.random.code.te
x)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.comparison.cod
e.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.base.code.tex)

(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.round.code.tex
)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.misc.code.tex)

(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfunctions.integerarithme
tics.code.tex)))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmathfloat.code.tex))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfint.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorepoints.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorepathconstruct.code
.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorepathusage.code.tex
) (D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorescopes.code.tex)

(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoregraphicstate.code.
tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoretransformations.co
de.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorequick.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoreobjects.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorepathprocessing.cod
e.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorearrows.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoreshade.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoreimage.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoreexternal.code.tex)
) (D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorelayers.code.tex)

(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcoretransparency.code.
tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorepatterns.code.tex)
 (D:\ProgramFiles\MikTexNEW\tex/generic/pgf/basiclayer\pgfcorerdf.code.tex)))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/modules\pgfmoduleshapes.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/modules\pgfmoduleplot.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/compatibility\pgfcomp-version-0-65.sty
)
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/compatibility\pgfcomp-version-1-18.sty
)) (D:\ProgramFiles\MikTexNEW\tex/latex/pgf/utilities\pgffor.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/utilities\pgfkeys.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgfkeys.code.tex))
(D:\ProgramFiles\MikTexNEW\tex/latex/pgf/math\pgfmath.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmath.code.tex))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/utilities\pgffor.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/math\pgfmath.code.tex)))
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/frontendlayer/tikz\tikz.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/libraries\pgflibraryplothandlers.cod
e.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/modules\pgfmodulematrix.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/frontendlayer/tikz/libraries\tikzlib
rarytopaths.code.tex)))
(D:\ProgramFiles\MikTexNEW\tex/latex/tikz-cd\tikzlibrarycd.code.tex
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/frontendlayer/tikz/libraries\tikzlib
rarymatrix.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/frontendlayer/tikz/libraries\tikzlib
raryquotes.code.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/pgf/libraries\pgflibraryarrows.meta.code
.tex))) (D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xypic.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xy.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xy.tex Bootstrap'ing: catcodes,
docmode, (D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyrecat.tex)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyidioms.tex)

 Xy-pic version 3.8.9 <2013/10/06>
 Copyright (c) 1991-2013 by Kristoffer H. Rose <krisrose@tug.org> and others
 Xy-pic is free software: see the User's Guide for details.

Loading kernel: messages; fonts; allocations: state, direction,
utility macros; pictures: \xy, positions, objects, decorations;
kernel objects: directionals, circles, text; options; algorithms: directions,
edges, connections;  Xy-pic loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/oberdiek\ifpdf.sty)

LaTeX Warning: You have requested package `xypic',
               but the package provides `xy'.

) (D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyv2.tex
 Xy-pic option: Version 2 Compatibility v.3.8

Xy-pic Warning: `\stop' redefined.

(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyframe.tex
 Xy-pic option: Frame and Bracket extension v.3.14 loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xymatrix.tex
 Xy-pic option: Matrix feature v.3.14 loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyarrow.tex
 Xy-pic option: Arrow and Path feature v.3.9 path, \ar, loaded) loaded))
(D:\ProgramFiles\MikTexNEW\tex/generic/babel\babel.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/babel\switch.def)
*************************************
* Local config file bblopts.cfg used
*
(D:\ProgramFiles\MikTexNEW\tex/latex/arabi\bblopts.cfg)
(D:\ProgramFiles\MikTexNEW\tex/latex/babel-czech\czech.ldf
(D:\ProgramFiles\MikTexNEW\tex/generic/babel\babel.def
(D:\ProgramFiles\MikTexNEW\tex/generic/babel\xebabel.def
(D:\ProgramFiles\MikTexNEW\tex/generic/babel\txtbabel.def)))))
(D:\ProgramFiles\MikTexNEW\tex/latex/base\inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xy.sty
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xy.tex not reloaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyall.tex
 Xy-pic option: All features v.3.8
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xycurve.tex
 Xy-pic option: Curve and Spline extension v.3.12 curve, circles, loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xycmtip.tex
 Xy-pic option: Computer Modern tip extension v.3.7
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xytips.tex
 Xy-pic option: More Tips extension v.3.11 loaded) loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyline.tex
 Xy-pic option: Line styles extension v.3.10 loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xyrotate.tex
 Xy-pic option: Rotate and Scale extension v.3.8 loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xycolor.tex
 Xy-pic option: Colour extension v.3.11 loaded)
(D:\ProgramFiles\MikTexNEW\tex/generic/xypic\xygraph.tex
 Xy-pic option: Graph feature v.3.11 loaded) loaded))
(D:\ProgramFiles\MikTexNEW\tex/xelatex/babyloniannum\babyloniannum.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/fontspec\fontspec.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/l3packages/xparse\xparse.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/l3kernel\expl3.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/l3kernel\expl3-code.tex)
(D:\ProgramFiles\MikTexNEW\tex/latex/l3backend\l3backend-xdvipdfmx.def)))
(D:\ProgramFiles\MikTexNEW\tex/latex/fontspec\fontspec-xetex.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/base\fontenc.sty
(D:\ProgramFiles\MikTexNEW\tex/latex/base\tuenc.def))
(D:\ProgramFiles\MikTexNEW\tex/latex/fontspec\fontspec.cfg)))
(D:\ProgramFiles\MikTexNEW\tex/xelatex/xunicode\xunicode.sty
*** you should *not* be loading the inputenc package
*** XeTeX expects the source to be in UTF8 encoding
*** some features of other encodings may conflict, resulting in poor output.
(D:\ProgramFiles\MikTexNEW\tex/latex/tipa\t3enc.def))
(D:\ProgramFiles\MikTexNEW\tex/latex/numname\numname.sty)) (ideje.aux)
(D:\ProgramFiles\MikTexNEW\tex/latex/tipa\t3cmr.fd)
ABD: EveryShipout initializing macros
*** you should *not* be loading the inputenc package
*** XeTeX expects the source to be in UTF8 encoding
*** some features of other encodings may conflict, resulting in poor output.
(D:\ProgramFiles\MikTexNEW\tex/latex/amsfonts\umsa.fd)
(D:\ProgramFiles\MikTexNEW\tex/latex/amsfonts\umsb.fd)
Underfull \hbox (badness 10000) in paragraph at lines 31--34


Underfull \hbox (badness 10000) in paragraph at lines 31--34

)
! Incomplete \iffalse; all text was ignored after line 35.
<inserted text> 
                \fi 
<*> ./ideje.tex

? 


_____________________________________________________________________

 PDFLaTeX Compilation Report (Pages: 0)

 Errors: 0   Warnings: 2   Bad Boxes: 0
_____________________________________________________________________
5

The MWE can be reduced to

\documentclass{article}
\usepackage{babyloniannum}

\renewcommand{\theenumi}{\babyloniannum{enumi}}

\begin{document}

\begin{enumerate}
\item rozhodovat se na hraně zajímavého
\end{enumerate}

\end{document}

There are two problems. One is in the package, one is in your code.

The \babyloniannum is fragile, as defined, so it cannot be used in the context of counter representation via \the<counter>. This is solved by adding \MakeRobust\babyloniannum.

However, the command wants a number as its argument, not the name of a counter. See the code for the solution.

\documentclass{article}
\usepackage{babyloniannum}

\MakeRobust\babyloniannum

\renewcommand{\theenumi}{\babyloniannum{\value{enumi}}}

\begin{document}

\show\babyloniannum

\begin{enumerate}
\item rozhodovat se na hraně zajímavého
\end{enumerate}

\end{document}

enter image description here

Oh! There's an unwanted space!

See https://tex.stackexchange.com/a/473205/4427 for this.

A slightly different set of changes, which also allows for choosing a different font; here I exploit this in order not to install Santakku as a system font. If one doesn't define \babylonianfont, the package will call Santakku, expecting it available to the OS.

File babyloniannum-fixed.sty

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{babyloniannum-fixed}
    [2011/08/19 0.5 Typeset Babylonian numerals with XeTeX and LuaTeX]
\RequirePackage{fontspec}
\RequirePackage{numname}

\AtBeginDocument{%
  \ifdefined\babylonianfont\else
    \newfontface{\babylonianfont}{Santakku}%
  \fi
}

\newcommand{\unicodedisp}[1]{\symbol{"#1}}
\newcommand{\babylonian}[1]{\babyloniannum{\arabic{#1}}}
\newcommand{\babylonianglyph}[1]{%
  \ifnum #1>\z@ % glyph is not zero
    \chardef\m@mten=10 % cuts by units of 10
    \numdigits{#1}% parse number
    \ifcase\c@xsm@mctr
    \or
      \unicodedisp{1230B}%10
    \or
      \unicodedisp{1230B}\kern-0.15em{}\unicodedisp{1230B}%20 -- unknown?
    \or
      \unicodedisp{1230D}%30
    \or
      \unicodedisp{1240F}%40
    \or
      \unicodedisp{12410}%50
    \fi
    \ifnum \c@ism@mctr > \z@
      \ifnum \c@xsm@mctr > \z@
        \kern-0.5em{}% make glyphs closer
      \fi
    \fi %
    \ifcase\c@ism@mctr
    \or
      \unicodedisp{12079}%1
    \or
      \unicodedisp{1222B}%2
    \or
      \unicodedisp{12408}%3
    \or
      \unicodedisp{120FB}%4
    \or
      \unicodedisp{1240A}%5
    \or
      \unicodedisp{1240B}%6
    \or
      \unicodedisp{1240C}%7
    \or
      \unicodedisp{1240D}%8
    \or
      \unicodedisp{1240E}%9
    \fi
    \addtocounter{baby@glyphs}{1}%
  \else
    \ifnum\c@baby@glyphs > \z@
      \kern0.5em{}% empty space for zero
    \fi
  \fi
}
\newcounter{baby@ism@mctr}  % "units"
\newcounter{baby@xsm@mctr}  % "tens"
\newcounter{baby@csm@mctr}  % "hundreds"
\newcounter{baby@ksm@mctr}  % "thousands"
\newcounter{baby@xksm@mctr} % "ten thousands"
\newcounter{baby@cksm@mctr} % "hundred thousands"
\newcounter{baby@msm@mctr}  % "millions"
\newcounter{baby@xmsm@mctr} % "ten millions"
\newcounter{baby@cmsm@mctr} % "hundred millions"
\newcounter{baby@bsm@mctr}  % "billions"
\newcommand{\babylonian@setcounters}{%
  \setcounter{baby@ism@mctr}{\c@ism@mctr}%
  \setcounter{baby@xsm@mctr}{\c@xsm@mctr}%
  \setcounter{baby@csm@mctr}{\c@csm@mctr}%
  \setcounter{baby@ksm@mctr}{\c@ksm@mctr}%
  \setcounter{baby@xksm@mctr}{\c@xksm@mctr}%
  \setcounter{baby@cksm@mctr}{\c@cksm@mctr}%
  \setcounter{baby@msm@mctr}{\c@msm@mctr}%
  \setcounter{baby@xmsm@mctr}{\c@xmsm@mctr}%
  \setcounter{baby@cmsm@mctr}{\c@cmsm@mctr}%
  \setcounter{baby@bsm@mctr}{\c@bsm@mctr}%
}
\newcounter{baby@glyphs}
\DeclareRobustCommand{\babyloniannum}[1]{%
  \chardef\m@mten=60 % Cut by units of 60
  \numdigits{#1}% Parse number
  \babylonian@setcounters
  \mbox{\babylonianfont
    \setcounter{baby@glyphs}{0}%
    \babylonianglyph{\c@baby@bsm@mctr}%
    \babylonianglyph{\c@baby@cmsm@mctr}%
    \babylonianglyph{\c@baby@xmsm@mctr}%
    \babylonianglyph{\c@baby@msm@mctr}%
    \babylonianglyph{\c@baby@cksm@mctr}%
    \babylonianglyph{\c@baby@xksm@mctr}%
    \babylonianglyph{\c@baby@ksm@mctr}%
    \babylonianglyph{\c@baby@csm@mctr}%
    \babylonianglyph{\c@baby@xsm@mctr}%
    \babylonianglyph{\c@baby@ism@mctr}%
  }%
}
\endinput

Example file

\documentclass{article}
\usepackage{babyloniannum-fixed}

\MakeRobust\babyloniannum

\renewcommand{\theenumi}{\babyloniannum{\value{enumi}}}

\newfontface{\babylonianfont}{Santakku}[
  Path=./,
  Extension=.ttf,
]

\begin{document}

\begin{enumerate}
\item rozhodovat se na hraně zajímavého
\end{enumerate}

\end{document}

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.