2

The macro \NewList is defined in biditools.sty (originally defined in lollipop) as:

\def\bidi@csarg#1#2{\expandafter#1\csname#2\endcsname}
\def\NewList:#1 {\bidi@csarg\newtoks{#1}\global\csname#1\endcsname{}}

which is different from that defined in easylist.sty.

It should be noted that the macro \NewList is not used anywhere in bidi or xepersian packages, however, in the following code it causes failure.

\documentclass{article}
\usepackage{easylist}
\usepackage[fontsloadable]{xepersian} % option is required because
                   % xepersian 21.8 and 21.9 prevent loading fonts
                   % with the string "HM" in their font name.
\settextfont[Scale=1.44]{Amiri}
\setlatintextfont[Scale=1.44]{Psychedelia HM}
\pagestyle{empty}
\begin{document}
\begin{easylist}\NewList
§ تراز اول --- \lr{first level}
§§§ تراز سوم --- \lr{third level}
\end{easylist}
\end{document}

The error message is:

(c:/texlive/2018/texmf-dist/tex/xelatex/xepersian/loadingorder
-xepersian.def)
(c:/texlive/2018/texmf-dist/tex/xelatex/xepersian/footnote-xep
ersian.def)
(c:/texlive/2018/texmf-dist/tex/xelatex/xepersian/article-xepe
rsian.def)) (./easylist-test.aux)
! Use of \NewList doesn't match its definition.
l.11 §
       تراز اول --- \lr{first level}
? h
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

? 

Is it safe to comment the macro \NewList out in biditools.sty? If yes, is there any (internal or external) command in LaTeX that I can use instead of \NewList?

  • The \NewList command is defined to require : after it. – egreg Dec 4 '18 at 15:15
3

I'm not sure what \NewList is supposed to do as defined in biditools.

Its definition, as it stands, requires it to be followed by a colon.

You can recover the easylist definition, but this might cause problems if the redefined \NewList is needed.

\documentclass{article}
\usepackage{easylist}
\let\easylistNewList\NewList
\usepackage{xepersian}
\settextfont[Scale=1.44]{Amiri}
\AtBeginDocument{\let\NewList\easylistNewList}
\pagestyle{empty}
\begin{document}
\begin{easylist}\NewList
§ تراز اول
§§§ تراز سوم
\end{easylist}
\end{document}

You might want not to do the second \let and use \easylistNewList instead.

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.