| 1 |
\documentclass{article} |
| 2 |
\usepackage{fontspec} |
| 3 |
\usepackage[series={},nocritical,noend,nofamiliar,noledgroup,noreledmac]{eledmac} |
| 4 |
\usepackage{eledpar,hyperref} |
| 5 |
\usepackage{metalogo} |
| 6 |
\setlength{\parindent}{0pt} |
| 7 |
|
| 8 |
\newfontfamily\syriacfont[Script=Syriac,Scale=1.2]{estre.otf} |
| 9 |
|
| 10 |
\newcommand{\textsyriac}[1] % Syriac inside LTR |
| 11 |
{\bgroup\textdir TRT\syriacfont #1\egroup} |
| 12 |
\newcommand{\n} [1] % for digits inside Arabic text |
| 13 |
{\bgroup\textdir TLT #1\egroup} |
| 14 |
\newcommand{\syriacfootnote} [1] % Syriac Footnotes |
| 15 |
{\footnote{\textsyriac{#1}}} |
| 16 |
\newenvironment{syriac} % Syriac paragraph |
| 17 |
{\textdir TRT\pardir TRT\syriacfont}{} |
| 18 |
|
| 19 |
\begin{document} |
| 20 |
|
| 21 |
\date{} |
| 22 |
\title{Using \LuaLaTeX\ to typeset RTL text with eledpar} |
| 23 |
\maketitle |
| 24 |
\begin{abstract} |
| 25 |
This file provides an example on how to use eledpar and \LuaLaTeX\ to typeset a right to left text with its translation on the facing page\footnote{The text was provided by Latechneuse on \url{http://tex.stackexchange.com/q/227837/7712}.}. |
| 26 |
|
| 27 |
As you can see, the switch to RTL convention is made \emph{before} the \verb+pstart+. |
| 28 |
It must be also called inside \verb+\eledsection+. |
| 29 |
|
| 30 |
For an example with \XeLaTeX, look at \href{./parallel-column-two-languages.tex}{parallel-column-two-languages.tex} file. |
| 31 |
\end{abstract} |
| 32 |
\begin{pages} |
| 33 |
\begin{Leftside} |
| 34 |
\begin{syriac} |
| 35 |
\beginnumbering |
| 36 |
\pstart |
| 37 |
\eledsection*{\textsyriac{ܡܿܟܪܟܝ}} |
| 38 |
\pend |
| 39 |
|
| 40 |
\pstart |
| 41 |
1ܘܟܕ 2ܡܿܟܪܟܝ3ܢܢ ܐܪܟ4ܐܢܐ ܗ̄ 5ܡܘܪܐ6 ܗܿܝ ܩ7ܕܡܝܬܐ |
| 42 |
\pend |
| 43 |
\endnumbering |
| 44 |
\end{syriac} |
| 45 |
\end{Leftside} |
| 46 |
|
| 47 |
\begin{Rightside} |
| 48 |
\beginnumbering |
| 49 |
\pstart |
| 50 |
\eledsection{English headline} |
| 51 |
\pend |
| 52 |
|
| 53 |
\pstart |
| 54 |
Some english text. |
| 55 |
\pend |
| 56 |
\endnumbering |
| 57 |
\end{Rightside} |
| 58 |
|
| 59 |
|
| 60 |
\end{pages} |
| 61 |
\Pages |
| 62 |
\end{document} |