summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-06-11 03:02:13 +0000
committerNorbert Preining <norbert@preining.info>2020-06-11 03:02:13 +0000
commite3a95d205140a9c1ec8bc34f9a6125d8074f5e58 (patch)
tree9c905c13b24fc43e1645387b937d7a8af3dd4f51 /macros/latex/contrib
parent6706ba0fbc0ef5a672ef0ccb05bd75174a30bb07 (diff)
CTAN sync 202006110302
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/caption/README2
-rw-r--r--macros/latex/contrib/caption/caption.dtx75
-rw-r--r--macros/latex/contrib/caption/caption3.dtx19
-rw-r--r--macros/latex/contrib/caption/ltcaption.dtx11
-rw-r--r--macros/latex/contrib/hvarabic/CHANGELOG1
-rw-r--r--macros/latex/contrib/hvarabic/README.md16
-rw-r--r--macros/latex/contrib/hvarabic/doc/hvarabic.pdfbin0 -> 170869 bytes
-rw-r--r--macros/latex/contrib/hvarabic/doc/hvarabic.tex372
-rw-r--r--macros/latex/contrib/hvarabic/latex/hvarabic.sty66
9 files changed, 551 insertions, 11 deletions
diff --git a/macros/latex/contrib/caption/README b/macros/latex/contrib/caption/README
index 317e095646..ed00e7db48 100644
--- a/macros/latex/contrib/caption/README
+++ b/macros/latex/contrib/caption/README
@@ -1,7 +1,7 @@
==========================================================================
The `caption' package bundle
-Release 2020-05-10
+Release 2020-05-30
Copyright (C) 1994-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
License: LPPL = LaTeX Project Public Licence
diff --git a/macros/latex/contrib/caption/caption.dtx b/macros/latex/contrib/caption/caption.dtx
index 06c2832c70..e75d4bd431 100644
--- a/macros/latex/contrib/caption/caption.dtx
+++ b/macros/latex/contrib/caption/caption.dtx
@@ -28,7 +28,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{2977}
+% \CheckSum{3022}
%
% \iffalse
%<*driver>
@@ -218,7 +218,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption}[2020/05/10 v3.4j Customizing captions (AR)]
+\ProvidesPackage{caption}[2020/05/30 v3.4k Customizing captions (AR)]
% \end{macrocode}
%
% \section{Loading the kernel}
@@ -2444,6 +2444,77 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{The changepage package}
+% \changes{v3.4k}{2020/05/30}{Patch of the \package{changepage} package added}
+%
+% \begin{macrocode}
+\caption@IfPackageLoaded{changepage}[2008/07/23 memoir-v3.7k]{%
+% \end{macrocode}
+%
+% Both environments, \env{adjustwidth} and \env{adjustwidth*}, are starting a \env{list} \cs{item}.
+% But \cs{hsize} isn't set properly inside a \env{list} item, and therefore \cs{@makecaption}
+% (offered by document classes) doesn't work properly when used inside \env{adjustwidth}.
+% Therefore we try to detect the situation ``Are we inside a adjustwidth environment?''
+% inside \cs{@makecaption} and fix this. (Sigh!)
+%
+% We cannot simply set and test a flag here since our adjustment to \cs{hsize} should
+% not be done within a \cs{parbox} within a adjustwidth environment for example,
+% and therefore we store \cs{hsize} and \cs{linewidth}, and test \cs{hsize} and \cs{linewidth}
+% against the stored values instead. If they are equal we are (hopefully) quite save
+% to assume that we are now inside a plain \env{adjustwidth} environment and therefore need
+% to fix \cs{hsize} before typesetting the caption. (Deep sigh!)
+%
+% \begin{macro}{\caption@adjustwidth@hsize}
+% \begin{macro}{\caption@adjustwidth@linewidth}
+% \begin{macrocode}
+ \newdimen\caption@adjustwidth@hsize
+ \newdimen\caption@adjustwidth@linewidth
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\caption@set@adjustwidth}
+% \changes{v3.4k}{2020/05/30}{This macro and its usage added}
+% Store the values of \cs{hsize} and \cs{linewidth}.
+% \begin{macrocode}
+ \providecommand*\caption@set@adjustwidth{%
+ \caption@adjustwidth@hsize\hsize
+ \caption@adjustwidth@linewidth\linewidth}%
+% \end{macrocode}
+% \begin{macrocode}
+ \providecommand*\caption@patch@changepage[1]{%
+ \expandafter\let\csname caption@#1\expandafter\endcsname\csname #1\endcsname
+ \expandafter\renewcommand\csname #1\endcsname[2]{%
+ \@nameuse{caption@#1}{##1}{##2}%
+ \caption@set@adjustwidth}}%
+ \caption@patch@changepage{adjustwidth}%
+ \caption@patch@changepage{adjustwidth*}%
+ \let\caption@patch@changepage\relax
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\caption@test@adjustwidth}
+% \changes{v3.4k}{2020/05/30}{This macro and its usage added}
+% Test if the values of \cs{hsize} and \cs{linewidth} are identical to
+% the ones stored in the \env{adjustwidth} environment.
+% If yes, set \cs{hsize} to the correct value.
+% \begin{macrocode}
+ \providecommand\caption@test@adjustwidth{%
+ \ifdim\hsize=\caption@adjustwidth@hsize
+ \ifdim\linewidth=\caption@adjustwidth@linewidth
+ \hsize=\linewidth
+ \fi
+ \fi}%
+% \end{macrocode}
+% \begin{macrocode}
+\AtBeginCaption{\caption@test@adjustwidth}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+ }{}%
+% \end{macrocode}
+%
% \subsection{The chkfloat package}
% \changes{v3.3}{2018/09/06}{Support of the \package{chkfloat} package added}
%
diff --git a/macros/latex/contrib/caption/caption3.dtx b/macros/latex/contrib/caption/caption3.dtx
index 7319d178df..84134e7944 100644
--- a/macros/latex/contrib/caption/caption3.dtx
+++ b/macros/latex/contrib/caption/caption3.dtx
@@ -28,12 +28,12 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{3573}
+% \CheckSum{3576}
%
% \iffalse
%<*driver>
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesFile{caption3.drv}[2015/09/15 v1.8 Implementation of the caption kernel]
+\ProvidesFile{caption3.drv}[2020/05/30 v1.12 Implementation of the caption kernel]
\hbadness=9999 \newcount\hbadness \hfuzz=100pt % Make TeX shut up.
%\errorcontextlines=3
%
@@ -57,7 +57,7 @@
\ifpdf\usepackage{hypdestopt}\fi
\hypersetup{pdfkeywords={LaTeX, package, caption},pdfstartpage={},pdfstartview={}}
%
-\usepackage{caption3}[2019/09/09]
+\usepackage{caption3}[2020/05/30]
%
\DeclareRobustCommand*\AmS{\texorpdfstring
{{\protect\usefont{OMS}{cmsy}{m}{n}A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}%
@@ -191,7 +191,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{caption3}[2020/05/10 v1.11 caption3 kernel (AR)]
+\ProvidesPackage{caption3}[2020/05/30 v1.12 caption3 kernel (AR)]
% \end{macrocode}
%
% \section{Workaround for bug in package \package{arabtex}}
@@ -1770,10 +1770,19 @@
\DeclareCaptionLabelSeparator{period}{. }
\DeclareCaptionLabelSeparator{space}{ }
\DeclareCaptionLabelSeparator*{quad}{\quad}
-\DeclareCaptionLabelSeparator*{newline}{\\}
+\DeclareCaptionLabelSeparator*{newline}{\captionnewline}
\DeclareCaptionLabelSeparator*{endash}{\space\textendash\space}
% \end{macrocode}
%
+% \begin{macro}{\captionnewline}
+% \changes{v1.12}{2020/05/30}{This macro added}
+% Will be used in the caption label separator |new|\-|line|,
+% and re-defined for |long|\-|table| environments.
+% \begin{macrocode}
+\newcommand*\captionnewline{\\}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\caption@setdefaultlabelsep}
% \changes{v1.2d}{2009/03/29}{This macro added}
% \begin{macrocode}
diff --git a/macros/latex/contrib/caption/ltcaption.dtx b/macros/latex/contrib/caption/ltcaption.dtx
index 343dbf695b..314528d58b 100644
--- a/macros/latex/contrib/caption/ltcaption.dtx
+++ b/macros/latex/contrib/caption/ltcaption.dtx
@@ -2,7 +2,7 @@
%
% This is file `ltcaption.dtx'.
%
-% Copyright (C) 2007-2013 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
+% Copyright (C) 2007-2020 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
%
% --------------------------------------------------------------------------
%
@@ -28,7 +28,7 @@
% caption-deu.tex, caption-eng.tex, caption-rus.tex.
%
% \fi
-% \CheckSum{378}
+% \CheckSum{381}
%
% \iffalse
%<*driver>
@@ -464,7 +464,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{ltcaption}[2018/08/26 v1.4a longtable captions (AR)]
+\ProvidesPackage{ltcaption}[2020/05/30 v1.4b longtable captions (AR)]
% \end{macrocode}
%
% \begin{macrocode}
@@ -554,6 +554,7 @@
%
% \begin{macro}{\LT@array}
% \changes{v1.1a}{2008/03/21}{Improved redefinition of \cs{refstepcounter} etc.}
+% \changes{v1.4b}{2020/05/30}{Re-definition of \cs{captionnewline} added}
% We insert our stuff into the definition of |\LT@array| here.
% Since the \package{hyperref} package patches |\LT@array| as well
% and since this only works with the original definition of |\LT@array|,
@@ -582,6 +583,10 @@
% \begin{macrocode}
\def\lst@@caption{\relax}%
% \end{macrocode}
+% Re-define |\caption|\-|newline| so |\par| will be used inside longtables instead of |\\|.
+% \begin{macrocode}
+ \def\captionnewline{\par}%
+% \end{macrocode}
% \begin{macrocode}
\ltcaption@ORI@LT@array}}
% \end{macrocode}
diff --git a/macros/latex/contrib/hvarabic/CHANGELOG b/macros/latex/contrib/hvarabic/CHANGELOG
new file mode 100644
index 0000000000..feeb6b920f
--- /dev/null
+++ b/macros/latex/contrib/hvarabic/CHANGELOG
@@ -0,0 +1 @@
+0.01 2020-06-08 - first CTAN version
diff --git a/macros/latex/contrib/hvarabic/README.md b/macros/latex/contrib/hvarabic/README.md
new file mode 100644
index 0000000000..9e0418faf4
--- /dev/null
+++ b/macros/latex/contrib/hvarabic/README.md
@@ -0,0 +1,16 @@
+# hvarabic.sty
+
+The package provides some macros for typesetting right to left text.
+Mainly for the arabic language, but it can also be used for
+other RTL languages
+
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+
+
+hvoss@tug.org \ No newline at end of file
diff --git a/macros/latex/contrib/hvarabic/doc/hvarabic.pdf b/macros/latex/contrib/hvarabic/doc/hvarabic.pdf
new file mode 100644
index 0000000000..476d1bf356
--- /dev/null
+++ b/macros/latex/contrib/hvarabic/doc/hvarabic.pdf
Binary files differ
diff --git a/macros/latex/contrib/hvarabic/doc/hvarabic.tex b/macros/latex/contrib/hvarabic/doc/hvarabic.tex
new file mode 100644
index 0000000000..8b879fdfda
--- /dev/null
+++ b/macros/latex/contrib/hvarabic/doc/hvarabic.tex
@@ -0,0 +1,372 @@
+%% $Id: fbox.tex 1128 2020-01-03 20:57:59Z 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.01}%
+
+\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}
+\providefamily\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} \ No newline at end of file
diff --git a/macros/latex/contrib/hvarabic/latex/hvarabic.sty b/macros/latex/contrib/hvarabic/latex/hvarabic.sty
new file mode 100644
index 0000000000..e1d00bacd0
--- /dev/null
+++ b/macros/latex/contrib/hvarabic/latex/hvarabic.sty
@@ -0,0 +1,66 @@
+%% This is file `hvarabic.sty',
+%%
+%% Copyright (C) 2020
+%% Herbert Voss <hvoss@tug.org>
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%
+% -------------------------------------
+\ProvidesPackage{hvarabic}[2020/06/08 v. 0.01 define macros for RTL typesetting (hv)]
+%
+\RequirePackage{iftex}
+\iftutex
+\else
+ \ExplSyntaxOn
+ \msg_new:nnn {unitconv} {need-lualatex}
+ {
+ The~ hvarabic~ package~ requires~ LuaLaTeX or XeLaTeX.\\\\
+ You~ must~ change~ your~ typesetting~ engine~ to,~
+ "lualatex/xelatex" instead~ of~ "latex", or ~"pdflatex".
+ }
+ \msg_fatal:nn {unitconv} {need-lualatex/xelatex}
+ \ExpSyntaxOff
+ \endinput
+\fi
+
+\RequirePackage{xkeyval,fontspec}
+
+\newif\ifhv@RTLfootnoterule \hv@RTLfootnoterulefalse
+\DeclareOptionX{RTLfootnoterule}[true]{\@nameuse{hv@RTLfootnoterule#1}}
+%
+\ProcessOptionsX\relax
+
+\providefontface\RTLfont
+ [Script=Arabic, % to get correct arabic shaping
+ Scale=1.2]{Scheherazade} % whatever Arabic font you like
+\newfontfamily\hvALM{ALM Fixed}[Scale=0.85]
+\newcommand\textRTL[1]{\bgroup\textdir TRT\RTLfont #1\egroup}% Arabic inside LTR
+\newcommand\nLTR[1]{\bgroup\textdir TLT #1\egroup}% for digits inside Arabic text
+\newcommand\RTLfootnote[1]{\footnote{\textRTL{#1}}}% Arabic footnotes
+
+\ifhv@RTLfootnoterule
+ \newenvironment{RTL}
+ % Arabic paragraph
+ {\setRTLfootnoterule\textdir TRT\pardir TRT\RTLfont}
+ {\setLTRfootnoterule}
+\else
+ \newenvironment{RTL}
+ % Arabic paragraph
+ {\textdir TRT\pardir TRT\RTLfont}
+ {}
+\fi
+\def\setLTRfootnoterule{\let\LTRfootnoterule\footnoterule}
+\def\setRTLfootnoterule{%
+ \global\let\LTRfootnoterule=\footnoterule
+ \gdef\footnoterule{\noindent\parbox{\textwidth}{\hfill\vbox{\LTRfootnoterule}}}}
+
+\def\setRTL{\par\textdir TRT\pardir TRT}
+\def\setLTR{\par\textdir TLT\pardir TLT}
+\endinput
+