CTAN Comprehensive TeX Archive Network

Directory macros/xetex/latex/arabdoc

README.md

arabdoc — One-line Arabic RTL setup for

Version 1.0.0 (2025-01-15)

Author: Dr Nibras Abo Alzahab <nibras.abo.alzahab@gmail.com>

A collection of packages that simplifies Arabic right-to-left typesetting. Replaces 15–25 lines of fragile preamble with a single \usepackage call.

Overview

Package Type Purpose
arabdoc-setup .sty Core RTL stack: bidi + polyglossia + fonts + captions
arabdoc .cls Document classes: article, book, thesis, report
arabdoc-glossary .sty Arabic glossary and acronym styles
arabdoc-bib .sty Arabic bibliography support (biblatex)

The Problem

Arabic requires a specific package loading order. One mistake causes errors:

! Package bidi Error: Oops! you have loaded package hyperref after bidi

A correct preamble needs 15–25 lines with exact ordering. arabdoc-setup encapsulates all of this.

Quick Start

Minimal

% !TEX program = xelatex
\documentclass[11pt,a4paper]{article}
\usepackage[amiri,captions]{arabdoc-setup}

\begin{document}
\section{المقدمة}
هذا نص عربي.
\end{document}

Using document classes

\documentclass{arabdoc-article}    % or arabdoc-book, arabdoc-thesis, arabdoc-report
\begin{document}
\section{المقدمة}
هذا نص عربي.
\end{document}

With glossary and bibliography

\documentclass{arabdoc-article}
\usepackage{arabdoc-glossary}
\usepackage{arabdoc-bib}
\makeglossaries
\addbibresource{refs.bib}

\newarabicacronym{ai}{AI}{Artificial Intelligence}{الذكاء الاصطناعي}

\begin{document}
\acrfull{ai}
\printglossaries
\printbibliography[heading=arabicbib]
\end{document}

Options

Option Default Description
amiri yes Use Amiri font
scheherazade Use Scheherazade New font
lateef Use Lateef font
custom User sets fonts manually
maghrib yes Western numerals (0,1,2...)
arabicdigits Eastern Arabic numerals (٠,١,٢)
gregorian yes Gregorian calendar
islamic Hijri calendar
captions off Arabic caption overrides (الفهرس، الشكل، الجدول)
colorlinks off Colored hyperlinks
legal-sections off Section prefix "المادة"

Requirements

  • ( Live 2021+ or MiK)
  • Amiri font family (or Scheherazade New / Lateef)
  • Gyre Termes font (for English text)
  • Packages: bidi, polyglossia, fontspec, hyperref, glossaries, biblatex

Installation

Local

Copy tex/ contents to your tree or set TEXINPUTS:

# Linux/macOS
export TEXINPUTS=/path/to/arabdoc/tex:$TEXINPUTS

# Windows PowerShell
$env:TEXINPUTS = "C:\path\to\arabdoc\tex;" + $env:TEXINPUTS

CTAN

tlmgr install arabdoc    # TeX Live
mpm --install=arabdoc    # MiKTeX

License

LPPL 1.3c

Download the contents of this package in one zip archive (43.4k).

arabdoc – One-line Arabic RTL setup for

This bundle simplifies Arabic right-to-left typesetting in  by replacing 15–25 lines of fragile preamble with a single \usepackage call.

The collection consists of four packages: arabdoc-setup (core RTL stack), arabdoc document classes (arabdoc-article, arabdoc-book, arabdoc-report, arabdoc-thesis), arabdoc-glossary (bilingual glossary and acronym management), and arabdoc-bib (Arabic bibliography with biblatex). Options include font selection, numeral style, calendar, caption overrides, and legal-style section numbering.

The bundle requires with bidi, polyglossia, and fontspec.

Packagearabdoc
Version1.0.0
LicensesThe Project Public License 1.3c
MaintainerNibras Abo Alzahab
TopicsClass
Article-like
Arabic
Report like
Book publication
Bidirectional

Dissertation
...
Guest Book Sitemap Contact Contact Author