summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/eledmac/examples/3-eledpar_pages_different_languages_lualatex.tex
blob: 59b82cc58a0684afd3acce76c6f690ae961e717a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
\documentclass{article}
\usepackage{fontspec}
\usepackage[series={},nocritical,noend,nofamiliar,noledgroup,noreledmac]{eledmac}
\usepackage{eledpar,hyperref}
\usepackage{metalogo}
\setlength{\parindent}{0pt}

\newfontfamily\syriacfont[Script=Syriac,Scale=1.2]{estre.otf}

\newcommand{\textsyriac}[1] % Syriac inside LTR
           {\bgroup\textdir TRT\syriacfont #1\egroup}
\newcommand{\n}         [1] % for digits inside Arabic text
           {\bgroup\textdir TLT #1\egroup}
\newcommand{\syriacfootnote} [1] % Syriac Footnotes
           {\footnote{\textsyriac{#1}}}
\newenvironment{syriac}     % Syriac paragraph
           {\textdir TRT\pardir TRT\syriacfont}{}

\begin{document}

\date{}
\title{Using \LuaLaTeX\ to typeset RTL text with eledpar}
\maketitle
\begin{abstract}
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}.}.  

As you can see, the switch to RTL convention is made \emph{before} the \verb+pstart+.
It must be also called inside \verb+\eledsection+.

For an example with \XeLaTeX, look at \href{./parallel-column-two-languages.tex}{parallel-column-two-languages.tex} file.
\end{abstract}
\begin{pages}
\begin{Leftside}
\begin{syriac}
\beginnumbering
   \pstart 
       \eledsection*{\textsyriac{ܡܿܟܪܟܝ}}
   \pend

   \pstart
        1ܘܟܕ 2ܡܿܟܪܟܝ3ܢܢ ܐܪܟ4ܐܢܐ ܗ̄ 5ܡܘܪܐ6 ܗܿܝ ܩ7ܕܡܝܬܐ
   \pend
\endnumbering
\end{syriac}
\end{Leftside}

\begin{Rightside}
\beginnumbering
   \pstart
       \eledsection{English headline} 
   \pend

   \pstart
        Some english text. 
   \pend
\endnumbering
\end{Rightside}


\end{pages} 
\Pages
\end{document}