4

I am new to ArabLuaTeX and wondering if and how to make list environments (such as itemize, enumerate, etc.) within \begin{arab} and \end{arab} I tried my best but could not figure out.

This works until the enumerate environment is added:

\documentclass{article}
\usepackage{fontspec,luatextra}
\newfontfamily\arabicfont[Script=Arabic]{amiri}
\usepackage{arabluatex}
\begin{document}

\begin{arab}

\begin{enumerate}
\item الأصل الأول منها في التوحيد
\item الأصل الثّاني في القدر
\item الأصل الثّالث في العدل
\item الأصل الرابع في الوعد والوعيد
\end{enumerate}

\end{arab}
\end{document}
6
  • 1
    Welcome to TeX.SX!! Please give a full minimal working example. Currently we have to guess what packages etc you are using and this makes it really hard to help you. A MWE should start with a \documentclass command, have a minimal preamble and then \begin{document}...\end{document}. The code should compile and be as small as possible to demonstrate your problem. Cutting your code down to a MWE may well reveal what your problem actually is. In any case, it is really difficult to help you without more information. – user30471 Nov 1 '16 at 3:39
  • this might be of some help perhaps.. mirror.pregi.net/tex-archive/language/arabic/arabi/arabi/texmf/… – shahrina ismail Nov 1 '16 at 5:05
  • 3
    arabluatex is a quite newest package. I suggest you to ask for new feature on issues.robertalessi.net – Maïeul Nov 1 '16 at 21:38
  • For some reason, the call \begin{enumerate} causes LuaTeX to process \begin {\txarb{eنُمeرَتe}} – egreg Nov 1 '16 at 22:49
  • This is more a feature that has to be added in arabluatex than an actual bug. I'll look into this tomorrow and will post a new release as quickly as possible. – Robert Alessi Nov 5 '16 at 22:58
5

Thank you for this report.

I have to confess that list environments have slipped my mind so far! Very sorry about that. The next release of arabluatex, which I hope to publish soon, will support such environments.

Meanwhile, the two environments asparaenum and asparaitem that are provided by the paralist package will get us out of trouble.

The following mwe works with arabluatex 1.4.5:

\documentclass{article}
\usepackage{fontspec}

\usepackage{paralist}

% 'RawFeature={+anum}' is added below to have 'Indian numbers'
\newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}]
\usepackage{arabluatex}

\begin{document}


\begin{asparaenum}[.1] % '.1' for the dot to appear after the number
                       % in RTL mode.
  \begin{arab}
  \item{} الأصل الأول منها في التوحيد % '\item{}' mind the braces
  \item{} الأصل الثّاني في القدر
  \item{} الأصل الثّالث في العدل
  \item{} الأصل الرابع في الوعد والوعيد
  \end{arab}
\end{asparaenum}

\begin{asparaitem}
  \begin{arab}
  \item{} الأصل الأول منها في التوحيد
  \item{} الأصل الثّاني في القدر
  \item{} الأصل الثّالث في العدل
  \item{} الأصل الرابع في الوعد والوعيد
  \end{arab}
\end{asparaitem}

\end{document}


Edit:

arabluatex 1.5 is out and should become available on the mirrors within the next 24 hours. Among the new features, en­vi­ron­ments and list en­vi­ronments are now pro­cessed in Ara­bic mode; uni­code Ara­bic in­put for short in­ser­tions and run­ning para­graphs as well is facilitated by the \txarb command and a new txarab environment.

To take one example, the following code will work:

\documentclass{article}
\usepackage{fontspec}

% 'RawFeature={+anum}' is added below to have 'Indian numbers'
\newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}]
\usepackage{arabluatex}

\begin{document}


\begin{txarab}
  \begin{enumerate}
  \item الأصل الأول منها في التوحيد
  \item الأصل الثّاني في القدر
  \item الأصل الثّالث في العدل
  \item الأصل الرابع في الوعد والوعيد
  \end{enumerate}
\end{txarab}

\begin{txarab}
  \begin{itemize}
  \item الأصل الأول منها في التوحيد
  \item الأصل الثّاني في القدر
  \item الأصل الثّالث في العدل
  \item الأصل الرابع في الوعد والوعيد
  \end{itemize}
\end{txarab}

\end{document}

4
  • I'll post a note here when the next release of arabluatex is ready. – Robert Alessi Nov 6 '16 at 14:31
  • BTW, this issue has been reported here: issues.robertalessi.net/view.php?id=5 today. – Robert Alessi Nov 6 '16 at 17:15
  • I now have a way to make arabluatex work with list environments. The next release of arabluatex should be out by the end of this week. – Robert Alessi Nov 9 '16 at 15:43
  • As promised, just a quick note: the next release of arabluatex is ready and I will upload it to CTAN tomorrow morning. I will also add here a new answer with a couple of examples. – Robert Alessi Nov 13 '16 at 23:48

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.