summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/ledmac/examples/egarabpar.tex
blob: 777e4fcb2be211c23460aea36c5d825948d5c3a1 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
%%
%% This is file `egarabpar.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ledarab.dtx  (with options: `egarabpar')
%% 
%%   Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
%%   Copyright 2005 Peter R. Wilson
%% 
%%   This work may be distributed and/or modified under the
%%   conditions of the LaTeX Project Public License, either
%%   version 1.3 of this license or (at your option) any
%%   later version.
%%   The latest version of the license is in
%%      http://www.latex-project.org/lppl.txt
%%   and version 1.3 or later is part of all distributions of
%%   LaTeX version 2003/06/01 or later.
%% 
%%   This work has the LPPL maintenance status "unmaintained".
%% 
%%   This work consists of the files listed in the README file.
%% 
%%% egarabpar.tex  ledmac & parallel arabic text
\documentclass[12pt]{article}
\addtolength{\textheight}{-4\baselineskip}
\usepackage{ledmac}
\usepackage{ledpar}
\setcounter{firstlinenum}{1} \setcounter{linenumincrement}{1}
\usepackage{arabtex}
\usepackage{ledarab}
%%
\makeatletter
\def\printlinesAR#1|#2|#3|#4|#5|#6|#7|{\begingroup
  \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
  \ifl@d@pnum #1\fullstop\fi
  \ifledplinenum \RL{#2}\Rlineflag\else \symplinenum\fi
  \endgroup}
\makeatother

%%% We will use the Bfootnote series for the arabic right texts,
%%% in paragraph style
\footparagraph{B}

%%% right text numbering
\let\oldBfootfmt\Bfootfmt
\renewcommand{\Bfootfmt}[3]{%
  \let\printlines\printlinesR
  \oldBfootfmt{#1}{#2}{#3}}

\begin{document}

Here is an example pair of texts. The arabic version is on the right.

\vspace{\baselineskip}

\begin{pairs}

\begin{Leftside}
\beginnumbering
\pstart
\noindent
gUyand kasAn behe \edtext{st}{\Afootnote{Western side}} bA .hUr  hOs ast \\
man mIgUyam keh 'Ab-i angUr hOs ast \\
In naqd begIr wa-dast az 'An nesiyeh bedAr \\
k-'AwAz-i dohol sanIdan az dUr hOs ast.
\pend
\end{Leftside}

\renewcommand{\Rlineflag}{r} % writes r in latin
\begin{Rightside}
\firstlinenum{2} \linenumincrement{2}
\begin{arabtext}
\beginnumbering
\pstart
\noindent
gUyand kasAn behe \edtext{st}{\Bfootnote{Eastern side}} bA .hUr  hOs ast \\
man mIgUyam keh 'Ab-i angUr hOs ast \\
In naqd begIr wa-dast az 'An nesiyeh bedAr \\
k-'AwAz-i dohol sanIdan az dUr hOs ast.
\pend
\end{arabtext}
\end{Rightside}

\Columns

\end{pairs}

\vspace{\baselineskip}

The same texts but more oriented towards arabic.

\vspace{\baselineskip}

\begin{pairs}

\begin{Leftside}
\pstart
\noindent
gUyand kasAn behe st bA .hUr  hOs ast \\
man mIgUyam \edtext{keh}{\Afootnote{\RL{Western side}}} 'Ab-i angUr hOs ast \\
In naqd begIr wa-dast az 'An nesiyeh bedAr \\
k-'AwAz-i dohol sanIdan az dUr hOs ast.
\pend
\endnumbering
\end{Leftside}

%%% right full arabic note numbering
\renewcommand{\Bfootfmt}[3]{%
  \let\printlines\printlinesAR
  \oldBfootfmt{#1}{#2}{#3}}
\renewcommand{\Rlineflag}{\RL{r}} % writes r in arabic

\begin{Rightside}
\firstlinenum{1} \linenumincrement{1}
\arablnumrepR % changes the number to arabic
\begin{arabtext}
\pstart
\noindent
gUyand kasAn behe st bA .hUr  hOs ast \\
man mIgUyam \edtext{keh}{\Bfootnote{\RL{Eastern side}}} 'Ab-i angUr hOs ast \\
In naqd begIr wa-dast az 'An nesiyeh bedAr \\
k-'AwAz-i dohol sanIdan az dUr hOs ast.
\pend
\endnumbering
\end{arabtext}
\end{Rightside}

\begin{arabtext}
\Columns
\end{arabtext}

\end{pairs}

\end{document}
\endinput
%%
%% End of file `egarabpar.tex'.