2

I am using arabluatex package with lualatex system. Three questions please:

  1. The text does not scale appropriately with the arabverse environment. This is the tex file:

\documentclass[article, 11pt, b6paper, landscape, oneside]{memoir}
\usepackage{arabluatex}
\usepackage[nopar]{quran}
\usepackage{lineno}
\usepackage{fontspec}

\begin{document}

This is with normal font:

\begin{arabverse}
    \begin{linenumbers}
      \bayt{الشطر الأول}[]{الشطر الثانى}\\
    \end{linenumbers}
\end{arabverse}

This is by using \texttt{tiny} fontsize:

\begin{arabverse}\tiny
    \begin{linenumbers}
      \bayt{الشطر الأول}[]{الشطر الثانى}\\
    \end{linenumbers}
\end{arabverse}

\end{document}

This is an example of the output:

enter image description here

  1. Isn't there a simpler command instead of \bayt{}[]{}\\; e.g., something like: Text & Text\\

  2. Another general question please: why should I use lualatex system with arabluatex package instead of using pdflatex with arabtex? I am just writing in English and Arabic

EDIT: I managed to produce a LISP function to convert from the text writing style of any Arabic Poem to \bayt style of the package:

(defun text-to-bayt ()
(interactive)

  ;;remove the in-between marks (.....) or (   ...   ) between the two parts of a bayt.
  (goto-char 1)
  (while (search-forward-regexp "\\(\\s-*\\.\\{2,\\}\\s-*\\)" nil t)
    (replace-match " === " t nil))

  ;;put a bay in the form \bayt{SADR}[]{AGEZ}
  (goto-char 1)
  (while (search-forward-regexp "^\\([^=]+\\) === \\([^=]+\\)$" nil t)
    (replace-match
     (concat
      "\\\\bayt{" (match-string 1) "}[]{" (match-string 2) "}\\\\\\\\" )t nil))

  ;; remove the carriage return that was at the end of each bayt which is now followed by "}" (easier to be removed here)
  (goto-char 1)
  (while (search-forward-regexp "
}" nil t)
    (replace-match "}" t nil))

  )
  • 1
    It’s best to ask one question at a time. But about your third, if you’re familiar with arabtex and satisfied with its output, there’s no reason why you can’t use it. If you want more choice of typefaces, then there’s arabxetex as well as arabluatex. arabluatex is newest and still rapidly developing, so you may find a bug now and then, but if you need luatex for other reasons, then arabluatex is for you. – Thérèse Dec 11 '17 at 17:16
  • Thanks so much; should I remove the first two question? – Waleed A. Yousef Dec 11 '17 at 18:28
  • The reason for asking one question at a time seems to be mostly that it makes searching for a particular topic easier. But we don’t (yet) have so many questions on arabluatex that it’s hard to search through them, so you can probably leave this question in its present state. What we do have is the author of arabluatex among our users: @RobertAlessi will be able to explain the workings of his verse environment. – Thérèse Dec 11 '17 at 18:51
  • 1
    Of course you can: just do \begin{arabverse}\small before the actual lines: \bayt{}{}. By the way, arabluatex also includes an arabluatex.el file that you may want to copy to your ~/.emacs.d/auctex/auto local directory. This will enable the appropriate hooks for arabluatex in AUCTeX. – Robert Alessi Dec 13 '17 at 9:10
  • 1
    I see. What you got is what's expected, as your tiny Arabic has been stretched to \baytwidth. Please read to documentation sect. 5 on p. 27 for more details. BTW: also mind to put \\ after each bayt, like so: `\bayt{}{}\\` – Robert Alessi Dec 13 '17 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.