<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%% $Id: hvarabic.tex 104 2021-06-01 06:01:56Z herbert $
%
\listfiles\setcounter{errorcontextlines}{100}
\documentclass[paper=a4,fontsize=11pt,DIV=13,parskip=half-,
               captions=tableabove,twoside=on]{scrartcl}
\usepackage{fontspec}
\setmainfont{AccanthisADFStdNo3}[
  UprightFont   =*-Regular,
  BoldFont      =*-Bold,
  ItalicFont    =*-Italic,
  BoldItalicFont=*-BoldItalic,
  RawFeature    = -rlig,
]
\setsansfont{GilliusADF}[
  UprightFont   =*-Regular,
  BoldFont      =*-Bold,
  ItalicFont    =*-Italic,
  BoldItalicFont=*-BoldItalic,
  RawFeature    = -rlig,
]
\setmonofont{Anonymous Pro}[Scale=MatchLowercase,FakeStretch=0.9]

\usepackage[english]{babel}
\usepackage{scrlayer-scrpage}
\usepackage{showexpl}
\usepackage{dtk-extern,xcolor}
\lstset{basicstyle=\hvALM\small,language=[LaTeX]TeX,rframe=}

\setkeys{dtk}{cleanup,force=false}

\def\Lfile#1{\texttt{#1}\index{#1 file@\texttt{#1} file}}
\def\Lext#1{\texttt{.#1}\index{#1 file extension@\texttt{.#1} file extension}}
\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}}
\def\Lenv#1{\texttt{#1}\index{#1 environment@\texttt{#1} environment}}
\def\Lpack#1{\texttt{#1}\index{#1 package@\texttt{#1} package}}
\def\Lprog#1{\texttt{#1}\index{#1 program@\texttt{#1} program}}
\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1} package option}}
\let\Ldim\Lcs

%\usepackage[bibstyle=dtk]{biblatex}
%\addbibresource{\jobname.bib}


\makeatletter% from: doc.sty
\newcommand*\GetFileInfo[1]{%
  \def\filename{#1}%
  \def\@tempb##1 ##2 ##3\relax##4\relax{%
    \def\filedate{##1}%
    \def\fileversion{##2}%
    \def\fileinfo{##3}}%
  \edef\@tempa{\csname ver@#1\endcsname}%
  \expandafter\@tempb\@tempa\relax? ? \relax\relax}
\makeatother

%\GetFileInfo{xltabular.sty}
\usepackage{xspace}
\usepackage{hvarabic}
\def\setVersion#1{\setVVersion#1!!}
\def\setVVersion#1=#2!!{\def\hvarabicVersion{#2}} 

\usepackage[imakeidx]{xindex}
\makeindex

\usepackage{url}
\usepackage[colorlinks,linktocpage]{hyperref}


\setVersion{version = 0.01a}%

\title{Package \texttt{hvarabic} \\--\\ Provide macros for RTL typesetting. \\ \normalsize \hvarabicVersion\ (\today)}
\author{Herbert VoĂź\thanks{\url{hvoss@tug.org}}}
\begin{document}
\maketitle
%\tableofcontents

\section{Package option}

By default a footnoterule is set from left to right, with left-to-right (LTR) and also with right-to-left (RTL) text.
Using the optional package argument \Loption{RTLfootnoterule} forces \LaTeX\ to draw the footnoterule also von right to left:

\let\myFont\hvALM

\begin{Verbatim}[fontfamily=myFont,frame=single,label=Source]
[...]
\usepackage{hvarabic}% the default
[...]
\begin{RTL}
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† \nLTR{ŮˇŮ˘ŮŁŮ¤ŮĄ} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ©
Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ†\RTLfootnote{Ř­Ř§Ř´ŮŠŘ© ŘąŘ±Ř¨ŮŠŘ©.} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†.
\end{RTL}
\end{Verbatim}




\begin{externalDocument}[
%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
  pages={1},
  frame,
  compiler=lualatex,
  crop,
  force,
  xindex,
  runs=2,code=false,docType=latex,
  align=\centering,
  lstOptions={columns=fixed}]{hvarabic}
\documentclass[paper=a6,paper=landscape,DIV=13]{scrartcl}
\textheight=0.6\textheight %% Only for demo
%StartVisiblePreamble
\usepackage{hvarabic}
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
\begin{RTL}
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† \nLTR{ŮˇŮ˘ŮŁŮ¤ŮĄ} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ©
Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ†\RTLfootnote{Ř­Ř§Ř´ŮŠŘ© ŘąŘ±Ř¨ŮŠŘ©.} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†.
\end{RTL}
\end{document}
\end{externalDocument}

\begin{Verbatim}[fontfamily=myFont,frame=single,label=Source]
[...]
\usepackage[RTLfootnoterule]{hvarabic}% draw footnoterule also RTL!
[...]
\begin{RTL}
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† \nLTR{ŮˇŮ˘ŮŁŮ¤ŮĄ} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ©
Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ†\RTLfootnote{Ř­Ř§Ř´ŮŠŘ© ŘąŘ±Ř¨ŮŠŘ©.} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†.
\end{RTL}
\end{Verbatim}




\begin{externalDocument}[
%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
  pages={1},
  frame,
  compiler=lualatex,
  crop,
  force,
  xindex,
  runs=2,code=false,docType=latex,
  align=\centering,
  lstOptions={columns=fixed}]{hvarabic}
\documentclass[paper=a6,paper=landscape,DIV=13]{scrartcl}
\textheight=0.6\textheight %% Only for demo
%StartVisiblePreamble
\usepackage[RTLfootnoterule]{hvarabic}
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
\begin{RTL}
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† \nLTR{ŮˇŮ˘ŮŁŮ¤ŮĄ} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ©
Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ†\RTLfootnote{Ř­Ř§Ř´ŮŠŘ© ŘąŘ±Ř¨ŮŠŘ©.} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†.
\end{RTL}
\end{document}
\end{externalDocument}


\section{Small RTL text sequences}

\begin{verbatim}
\textRTL{RTL text sequence}
\end{verbatim}

\begin{Verbatim}[fontfamily=myFont,frame=single,label=Source]
English text ``\textRTL{Ř¬Ů…Ů„Ř© ŘąŘ±Ř¨ŮŠŘ© ŮŘłŘ· Ř¬Ů…Ů„Ř© ŘĄŮ†Ř¬Ů„ŮŠŘ˛ŮŠŘ©}'' with Arabic in between. 
To protect the people of Massachusetts from the COVID-19 pandemic you left your 
classes and, in [...]
\end{Verbatim}




\begin{externalDocument}[
%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
  pages={1},
  frame,
  compiler=lualatex,
  crop,
  force,
  xindex,
  runs=2,code=false,docType=latex,
  align=\centering,
  lstOptions={columns=fixed}]{hvarabic}
\documentclass[paper=a6,paper=landscape,DIV=13]{scrartcl}
%StartVisiblePreamble
\usepackage[RTLfootnoterule]{hvarabic}
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
English text ``\textRTL{Ř¬Ů…Ů„Ř© ŘąŘ±Ř¨ŮŠŘ© ŮŘłŘ· Ř¬Ů…Ů„Ř© ŘĄŮ†Ř¬Ů„ŮŠŘ˛ŮŠŘ©}'' with Arabic in between. 
To protect the people of Massachusetts from the COVID-19 pandemic you left your 
classes and, in [...]
\end{document}
\end{externalDocument}


\section{Long RTL text sequences}
The macro \Lcs{footnote} is still available but prints the footnote with footnoterule
left justified. With \Lcs{RTLfootnote} the footnotetext can be printed right justified.
It depends to current state if the footnoterule should be left or right justified.
It can be changed by two commands or for the whole document with the package option.


\begin{verbatim}
\begin{RTL}
...
\end{RTL}
\nLTR{digits}% for digits inside Arabic text
\RTLfootnote{RTL footnote inside RTL environment}
\setLTRfootnoterule
\setRTLfootnoterule
\end{verbatim}

\begin{Verbatim}[fontfamily=myFont,frame=single,label=Source]
English text ``\textRTL{Ř¬Ů…Ů„Ř© ŘąŘ±Ř¨ŮŠŘ© ŮŘłŘ· Ř¬Ů…Ů„Ř© ŘĄŮ†Ř¬Ů„ŮŠŘ˛ŮŠŘ©}'' with Arabic in between. 
To protect the people of Massachusetts from the COVID-19 pandemic you left your 
classes and, in many cases, your home at Harvard to move to a virtual mode of education. 

\begin{RTL}
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† \nLTR{ŮˇŮ˘ŮŁŮ¤ŮĄ} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ©
Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ†\RTLfootnote{Ř­Ř§Ř´ŮŠŘ© ŘąŘ±Ř¨ŮŠŘ©.} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†.

Ů„Ř­Ů…Ř§ŮŠŘ© ŘłŮŘ§Ů† Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł Ů…Ů† Ř¬Ř§Ř¦Ř­Ř© \nLTR{COVID-19} ŘŞŘ±ŮŘŞ ŘŻŘ±ŮŘłŮ ŘŚ ŮŮŮŠ
ŮŮŠ ŮŘ«ŮŠŘ± Ů…Ů† Ř§Ů„Ř­Ř§Ů„Ř§ŘŞ ŘŚ Ů…Ů†Ř˛Ů„Ů ŮŮŠ Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„Ů„Ř§Ů†ŘŞŮ‚Ř§Ů„ ŘĄŮ„Ů‰ ŮŘ¶Řą Ř§Ů„ŘŞŘąŮ„ŮŠŮ… Ř§Ů„Ř§ŮŘŞŘ±Ř§Ř¶ŮŠ. ŮŮŠ Ů†ŮŘł Ř§Ů„ŮŮ‚ŘŞ ŘŁŮ†ŘŞ
ŘµŘąŘŻ Ů„Ř®ŘŻŮ…Ř© Ů…Ř¬ŘŞŮ…ŘąŘ§ŘŞŮ ŮŮŠ Ř¬Ů…ŮŠŘą ŘŁŮ†Ř­Ř§Řˇ Ř§Ů„ŘąŘ§Ů„Ů…. Ř§Ů†ŘŞŮ‚Ů„ Ř¨ŘąŘ¶ŮŮ… Ů…Ř¨Ř§Ř´Ř±Ř© ŘĄŮ„Ů‰ Ř§Ů„ŘŁŮ…Ř§Ů…
Ř®Ř·ŮŘ· Ř§Ů„ŮŘ¨Ř§Řˇ ŘŚ Ů…Ř«Ů„ Ř·Ů„Ř§Ř¨ ŮŮ„ŮŠŘ© Ř§Ů„Ř·Ř¨ Ř¨Ř¬Ř§Ů…ŘąŘ© Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„ŘąŘ§Ů… \nLTR{2020} Ř§Ů„Ř°ŮŠŮ† Ř§Ř®ŘŞŘ§Ř±ŮŘ§ Ř§Ů„ŘŞŘ®Ř±Ř¬
ŮŮŠ ŮŮ‚ŘŞ Ů…Ř¨ŮŘ± Ř­ŘŞŮ‰ ŮŠŘŞŮ…ŮŮ†ŮŘ§ Ů…Ů† Ř§Ů„Ř§Ů†Ř¶Ů…Ř§Ů… ŘĄŮ„Ů‰ Ř§Ů„Ů‚ŘŞŘ§Ů„ ŮŘŁŮŮ„Ř¦Ů Ů…Ů† T.H. Ů…ŘŻŘ±ŘłŘ© ŘŞŘ´Ř§Ů† Ů„Ů„ŘµŘ­Ř© Ř§Ů„ŘąŘ§Ů…Ř©
ŘŞŘ·ŮŘą Ů„ŘŞŮŮŮŠŘ± Ů†Ř¸Ř§Ů… ŘŞŘŞŘ¨Řą Ř§Ů„Ř§ŘŞŘµŘ§Ů„ Ů„Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł.
\end{RTL}
\end{Verbatim}




\begin{externalDocument}[
%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
  pages={1},
  frame,
  compiler=lualatex,
  crop,
  force,
  xindex,
  runs=2,code=false,docType=latex,
  align=\centering,
  lstOptions={columns=fixed}]{hvarabic}
\documentclass[paper=a5,paper=landscape,DIV=13]{scrartcl}
\textheight=0.6\textheight % Only for demo
%StartVisiblePreamble
\usepackage[RTLfootnoterule]{hvarabic}
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
English text ``\textRTL{Ř¬Ů…Ů„Ř© ŘąŘ±Ř¨ŮŠŘ© ŮŘłŘ· Ř¬Ů…Ů„Ř© ŘĄŮ†Ř¬Ů„ŮŠŘ˛ŮŠŘ©}'' with Arabic in between. 
To protect the people of Massachusetts from the COVID-19 pandemic you left your 
classes and, in many cases, your home at Harvard to move to a virtual mode of education. 

\begin{RTL}
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† \nLTR{ŮˇŮ˘ŮŁŮ¤ŮĄ} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ©
Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†
ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ† ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰
Ř§Ů„ŮŠŮ…ŮŠŮ†\RTLfootnote{Ř­Ř§Ř´ŮŠŘ© ŘąŘ±Ř¨ŮŠŘ©.} ŮŮ‚Ř±Ř© ŘąŘ±Ř¨ŮŠŘ© Ů…Ř­Ř§Ř°Ř§Ř© ŘĄŮ„Ů‰ Ř§Ů„ŮŠŮ…ŮŠŮ†.

Ů„Ř­Ů…Ř§ŮŠŘ© ŘłŮŘ§Ů† Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł Ů…Ů† Ř¬Ř§Ř¦Ř­Ř© \nLTR{COVID-19} ŘŞŘ±ŮŘŞ ŘŻŘ±ŮŘłŮ ŘŚ ŮŮŮŠ
ŮŮŠ ŮŘ«ŮŠŘ± Ů…Ů† Ř§Ů„Ř­Ř§Ů„Ř§ŘŞ ŘŚ Ů…Ů†Ř˛Ů„Ů ŮŮŠ Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„Ů„Ř§Ů†ŘŞŮ‚Ř§Ů„ ŘĄŮ„Ů‰ ŮŘ¶Řą Ř§Ů„ŘŞŘąŮ„ŮŠŮ… Ř§Ů„Ř§ŮŘŞŘ±Ř§Ř¶ŮŠ. ŮŮŠ Ů†ŮŘł Ř§Ů„ŮŮ‚ŘŞ ŘŁŮ†ŘŞ
ŘµŘąŘŻ Ů„Ř®ŘŻŮ…Ř© Ů…Ř¬ŘŞŮ…ŘąŘ§ŘŞŮ ŮŮŠ Ř¬Ů…ŮŠŘą ŘŁŮ†Ř­Ř§Řˇ Ř§Ů„ŘąŘ§Ů„Ů…. Ř§Ů†ŘŞŮ‚Ů„ Ř¨ŘąŘ¶ŮŮ… Ů…Ř¨Ř§Ř´Ř±Ř© ŘĄŮ„Ů‰ Ř§Ů„ŘŁŮ…Ř§Ů…
Ř®Ř·ŮŘ· Ř§Ů„ŮŘ¨Ř§Řˇ ŘŚ Ů…Ř«Ů„ Ř·Ů„Ř§Ř¨ ŮŮ„ŮŠŘ© Ř§Ů„Ř·Ř¨ Ř¨Ř¬Ř§Ů…ŘąŘ© Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„ŘąŘ§Ů… \nLTR{2020} Ř§Ů„Ř°ŮŠŮ† Ř§Ř®ŘŞŘ§Ř±ŮŘ§ Ř§Ů„ŘŞŘ®Ř±Ř¬
ŮŮŠ ŮŮ‚ŘŞ Ů…Ř¨ŮŘ± Ř­ŘŞŮ‰ ŮŠŘŞŮ…ŮŮ†ŮŘ§ Ů…Ů† Ř§Ů„Ř§Ů†Ř¶Ů…Ř§Ů… ŘĄŮ„Ů‰ Ř§Ů„Ů‚ŘŞŘ§Ů„ ŮŘŁŮŮ„Ř¦Ů Ů…Ů† T.H. Ů…ŘŻŘ±ŘłŘ© ŘŞŘ´Ř§Ů† Ů„Ů„ŘµŘ­Ř© Ř§Ů„ŘąŘ§Ů…Ř©
ŘŞŘ·ŮŘą Ů„ŘŞŮŮŮŠŘ± Ů†Ř¸Ř§Ů… ŘŞŘŞŘ¨Řą Ř§Ů„Ř§ŘŞŘµŘ§Ů„ Ů„Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł.
\end{RTL}
\end{document}
\end{externalDocument}


\section{Arabic font}
The package uses by default the predefined fontface \Lcs{RTLfont}, which defines as
arabic font Scheherazade and for verbatim text the only possible arabic font with 
monospace, the ALM (Arabic Latin Modern). It is available by using the macro \Lcs{hvALM}
and is scaled down to 85\%.:

\begin{verbatim}
\providefontfamily\RTLfont
    [Script=Arabic,        % to get correct arabic shaping
     Scale=1.2]{Scheherazade}         % whatever Arabic font you like
\newfontfamily\hvALM{ALM Fixed}[Scale=0.9]
\end{verbatim}

\section{Global change of the text direction}

The two macros start a new paragraph and then changes the text direction to TRT
or TLT.

\begin{verbatim}
\setRTL
\setLTR
\end{verbatim}

\begin{Verbatim}[fontfamily=myFont,frame=single,label=Source]
\setRTL\RTLfont
Ů„Ř­Ů…Ř§ŮŠŘ© ŘłŮŘ§Ů† Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł Ů…Ů† Ř¬Ř§Ř¦Ř­Ř© \nLTR{COVID-19} ŘŞŘ±ŮŘŞ ŘŻŘ±ŮŘłŮ ŘŚ ŮŮŮŠ
ŮŮŠ ŮŘ«ŮŠŘ± Ů…Ů† Ř§Ů„Ř­Ř§Ů„Ř§ŘŞ ŘŚ Ů…Ů†Ř˛Ů„Ů ŮŮŠ Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„Ů„Ř§Ů†ŘŞŮ‚Ř§Ů„ ŘĄŮ„Ů‰ ŮŘ¶Řą Ř§Ů„ŘŞŘąŮ„ŮŠŮ… Ř§Ů„Ř§ŮŘŞŘ±Ř§Ř¶ŮŠ. ŮŮŠ Ů†ŮŘł Ř§Ů„ŮŮ‚ŘŞ ŘŁŮ†ŘŞ
ŘµŘąŘŻ Ů„Ř®ŘŻŮ…Ř© Ů…Ř¬ŘŞŮ…ŘąŘ§ŘŞŮ ŮŮŠ Ř¬Ů…ŮŠŘą ŘŁŮ†Ř­Ř§Řˇ Ř§Ů„ŘąŘ§Ů„Ů…. Ř§Ů†ŘŞŮ‚Ů„ Ř¨ŘąŘ¶ŮŮ… Ů…Ř¨Ř§Ř´Ř±Ř© ŘĄŮ„Ů‰ Ř§Ů„ŘŁŮ…Ř§Ů…
Ř®Ř·ŮŘ· Ř§Ů„ŮŘ¨Ř§Řˇ ŘŚ Ů…Ř«Ů„ Ř·Ů„Ř§Ř¨ ŮŮ„ŮŠŘ© Ř§Ů„Ř·Ř¨ Ř¨Ř¬Ř§Ů…ŘąŘ© Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„ŘąŘ§Ů… \nLTR{2020} Ř§Ů„Ř°ŮŠŮ† Ř§Ř®ŘŞŘ§Ř±ŮŘ§ Ř§Ů„ŘŞŘ®Ř±Ř¬
ŮŮŠ ŮŮ‚ŘŞ Ů…Ř¨ŮŘ± Ř­ŘŞŮ‰ ŮŠŘŞŮ…ŮŮ†ŮŘ§ Ů…Ů† Ř§Ů„Ř§Ů†Ř¶Ů…Ř§Ů… ŘĄŮ„Ů‰ Ř§Ů„Ů‚ŘŞŘ§Ů„ ŮŘŁŮŮ„Ř¦Ů Ů…Ů† T.H. Ů…ŘŻŘ±ŘłŘ© ŘŞŘ´Ř§Ů† Ů„Ů„ŘµŘ­Ř© Ř§Ů„ŘąŘ§Ů…Ř©
ŘŞŘ·ŮŘą Ů„ŘŞŮŮŮŠŘ± Ů†Ř¸Ř§Ů… ŘŞŘŞŘ¨Řą Ř§Ů„Ř§ŘŞŘµŘ§Ů„ Ů„Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł.
\setLTR
Ů„Ř­Ů…Ř§ŮŠŘ© ŘłŮŘ§Ů† Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł Ů…Ů† Ř¬Ř§Ř¦Ř­Ř© \nLTR{COVID-19} ŘŞŘ±ŮŘŞ ŘŻŘ±ŮŘłŮ ŘŚ ŮŮŮŠ
ŮŮŠ ŮŘ«ŮŠŘ± Ů…Ů† Ř§Ů„Ř­Ř§Ů„Ř§ŘŞ ŘŚ Ů…Ů†Ř˛Ů„Ů ŮŮŠ Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„Ů„Ř§Ů†ŘŞŮ‚Ř§Ů„ ŘĄŮ„Ů‰ ŮŘ¶Řą Ř§Ů„ŘŞŘąŮ„ŮŠŮ… Ř§Ů„Ř§ŮŘŞŘ±Ř§Ř¶ŮŠ. ŮŮŠ Ů†ŮŘł Ř§Ů„ŮŮ‚ŘŞ ŘŁŮ†ŘŞ
ŘµŘąŘŻ Ů„Ř®ŘŻŮ…Ř© Ů…Ř¬ŘŞŮ…ŘąŘ§ŘŞŮ ŮŮŠ Ř¬Ů…ŮŠŘą ŘŁŮ†Ř­Ř§Řˇ Ř§Ů„ŘąŘ§Ů„Ů…. Ř§Ů†ŘŞŮ‚Ů„ Ř¨ŘąŘ¶ŮŮ… Ů…Ř¨Ř§Ř´Ř±Ř© ŘĄŮ„Ů‰ Ř§Ů„ŘŁŮ…Ř§Ů…
Ř®Ř·ŮŘ· Ř§Ů„ŮŘ¨Ř§Řˇ ŘŚ Ů…Ř«Ů„ Ř·Ů„Ř§Ř¨ ŮŮ„ŮŠŘ© Ř§Ů„Ř·Ř¨ Ř¨Ř¬Ř§Ů…ŘąŘ© Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„ŘąŘ§Ů… \nLTR{2020} Ř§Ů„Ř°ŮŠŮ† Ř§Ř®ŘŞŘ§Ř±ŮŘ§ Ř§Ů„ŘŞŘ®Ř±Ř¬
ŮŮŠ ŮŮ‚ŘŞ Ů…Ř¨ŮŘ± Ř­ŘŞŮ‰ ŮŠŘŞŮ…ŮŮ†ŮŘ§ Ů…Ů† Ř§Ů„Ř§Ů†Ř¶Ů…Ř§Ů… ŘĄŮ„Ů‰ Ř§Ů„Ů‚ŘŞŘ§Ů„ ŮŘŁŮŮ„Ř¦Ů Ů…Ů† T.H. Ů…ŘŻŘ±ŘłŘ© ŘŞŘ´Ř§Ů† Ů„Ů„ŘµŘ­Ř© Ř§Ů„ŘąŘ§Ů…Ř©
ŘŞŘ·ŮŘą Ů„ŘŞŮŮŮŠŘ± Ů†Ř¸Ř§Ů… ŘŞŘŞŘ¨Řą Ř§Ů„Ř§ŘŞŘµŘ§Ů„ Ů„Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł.
\end{Verbatim}




\begin{externalDocument}[
%  grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule},
  pages={1},
  frame,
  compiler=lualatex,
  crop,
  xindex,
  force,
  runs=2,code=false,docType=latex,
  align=\centering,
  lstOptions={columns=fixed}]{hvarabic}
\documentclass{scrartcl}
%StartVisiblePreamble
\usepackage[RTLfootnoterule]{hvarabic}
%StopVisiblePreamble
\pagestyle{empty}
\begin{document}
\setRTL\RTLfont
Ů„Ř­Ů…Ř§ŮŠŘ© ŘłŮŘ§Ů† Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł Ů…Ů† Ř¬Ř§Ř¦Ř­Ř© \nLTR{COVID-19} ŘŞŘ±ŮŘŞ ŘŻŘ±ŮŘłŮ ŘŚ ŮŮŮŠ
ŮŮŠ ŮŘ«ŮŠŘ± Ů…Ů† Ř§Ů„Ř­Ř§Ů„Ř§ŘŞ ŘŚ Ů…Ů†Ř˛Ů„Ů ŮŮŠ Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„Ů„Ř§Ů†ŘŞŮ‚Ř§Ů„ ŘĄŮ„Ů‰ ŮŘ¶Řą Ř§Ů„ŘŞŘąŮ„ŮŠŮ… Ř§Ů„Ř§ŮŘŞŘ±Ř§Ř¶ŮŠ. ŮŮŠ Ů†ŮŘł Ř§Ů„ŮŮ‚ŘŞ ŘŁŮ†ŘŞ
ŘµŘąŘŻ Ů„Ř®ŘŻŮ…Ř© Ů…Ř¬ŘŞŮ…ŘąŘ§ŘŞŮ ŮŮŠ Ř¬Ů…ŮŠŘą ŘŁŮ†Ř­Ř§Řˇ Ř§Ů„ŘąŘ§Ů„Ů…. Ř§Ů†ŘŞŮ‚Ů„ Ř¨ŘąŘ¶ŮŮ… Ů…Ř¨Ř§Ř´Ř±Ř© ŘĄŮ„Ů‰ Ř§Ů„ŘŁŮ…Ř§Ů…
Ř®Ř·ŮŘ· Ř§Ů„ŮŘ¨Ř§Řˇ ŘŚ Ů…Ř«Ů„ Ř·Ů„Ř§Ř¨ ŮŮ„ŮŠŘ© Ř§Ů„Ř·Ř¨ Ř¨Ř¬Ř§Ů…ŘąŘ© Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„ŘąŘ§Ů… \nLTR{2020} Ř§Ů„Ř°ŮŠŮ† Ř§Ř®ŘŞŘ§Ř±ŮŘ§ Ř§Ů„ŘŞŘ®Ř±Ř¬
ŮŮŠ ŮŮ‚ŘŞ Ů…Ř¨ŮŘ± Ř­ŘŞŮ‰ ŮŠŘŞŮ…ŮŮ†ŮŘ§ Ů…Ů† Ř§Ů„Ř§Ů†Ř¶Ů…Ř§Ů… ŘĄŮ„Ů‰ Ř§Ů„Ů‚ŘŞŘ§Ů„ ŮŘŁŮŮ„Ř¦Ů Ů…Ů† T.H. Ů…ŘŻŘ±ŘłŘ© ŘŞŘ´Ř§Ů† Ů„Ů„ŘµŘ­Ř© Ř§Ů„ŘąŘ§Ů…Ř©
ŘŞŘ·ŮŘą Ů„ŘŞŮŮŮŠŘ± Ů†Ř¸Ř§Ů… ŘŞŘŞŘ¨Řą Ř§Ů„Ř§ŘŞŘµŘ§Ů„ Ů„Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł.

\setLTR\bigskip
Ů„Ř­Ů…Ř§ŮŠŘ© ŘłŮŘ§Ů† Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł Ů…Ů† Ř¬Ř§Ř¦Ř­Ř© \nLTR{COVID-19} ŘŞŘ±ŮŘŞ ŘŻŘ±ŮŘłŮ ŘŚ ŮŮŮŠ
ŮŮŠ ŮŘ«ŮŠŘ± Ů…Ů† Ř§Ů„Ř­Ř§Ů„Ř§ŘŞ ŘŚ Ů…Ů†Ř˛Ů„Ů ŮŮŠ Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„Ů„Ř§Ů†ŘŞŮ‚Ř§Ů„ ŘĄŮ„Ů‰ ŮŘ¶Řą Ř§Ů„ŘŞŘąŮ„ŮŠŮ… Ř§Ů„Ř§ŮŘŞŘ±Ř§Ř¶ŮŠ. ŮŮŠ Ů†ŮŘł Ř§Ů„ŮŮ‚ŘŞ ŘŁŮ†ŘŞ
ŘµŘąŘŻ Ů„Ř®ŘŻŮ…Ř© Ů…Ř¬ŘŞŮ…ŘąŘ§ŘŞŮ ŮŮŠ Ř¬Ů…ŮŠŘą ŘŁŮ†Ř­Ř§Řˇ Ř§Ů„ŘąŘ§Ů„Ů…. Ř§Ů†ŘŞŮ‚Ů„ Ř¨ŘąŘ¶ŮŮ… Ů…Ř¨Ř§Ř´Ř±Ř© ŘĄŮ„Ů‰ Ř§Ů„ŘŁŮ…Ř§Ů…
Ř®Ř·ŮŘ· Ř§Ů„ŮŘ¨Ř§Řˇ ŘŚ Ů…Ř«Ů„ Ř·Ů„Ř§Ř¨ ŮŮ„ŮŠŘ© Ř§Ů„Ř·Ř¨ Ř¨Ř¬Ř§Ů…ŘąŘ© Ů‡Ř§Ř±ŮŘ§Ř±ŘŻ Ů„ŘąŘ§Ů… \nLTR{2020} Ř§Ů„Ř°ŮŠŮ† Ř§Ř®ŘŞŘ§Ř±ŮŘ§ Ř§Ů„ŘŞŘ®Ř±Ř¬
ŮŮŠ ŮŮ‚ŘŞ Ů…Ř¨ŮŘ± Ř­ŘŞŮ‰ ŮŠŘŞŮ…ŮŮ†ŮŘ§ Ů…Ů† Ř§Ů„Ř§Ů†Ř¶Ů…Ř§Ů… ŘĄŮ„Ů‰ Ř§Ů„Ů‚ŘŞŘ§Ů„ ŮŘŁŮŮ„Ř¦Ů Ů…Ů† T.H. Ů…ŘŻŘ±ŘłŘ© ŘŞŘ´Ř§Ů† Ů„Ů„ŘµŘ­Ř© Ř§Ů„ŘąŘ§Ů…Ř©
ŘŞŘ·ŮŘą Ů„ŘŞŮŮŮŠŘ± Ů†Ř¸Ř§Ů… ŘŞŘŞŘ¨Řą Ř§Ů„Ř§ŘŞŘµŘ§Ů„ Ů„Ů…Ř§ŘłŘ§ŘŞŘ´ŮŘłŘŞŘł.
\end{document}
\end{externalDocument}

%\printindex

\end{document}</pre></body></html>