Debian Codegraph @

texmf-dist/doc/latex/ledmac/egarabpar.tex

raw
1 %%
2 %% This is file `egarabpar.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ledarab.dtx (with options: `egarabpar')
8 %%
9 %% Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net
10 %% Copyright 2005 Peter R. Wilson
11 %%
12 %% This work may be distributed and/or modified under the
13 %% conditions of the LaTeX Project Public License, either
14 %% version 1.3 of this license or (at your option) any
15 %% later version.
16 %% The latest version of the license is in
17 %% http://www.latex-project.org/lppl.txt
18 %% and version 1.3 or later is part of all distributions of
19 %% LaTeX version 2003/06/01 or later.
20 %%
21 %% This work has the LPPL maintenance status "unmaintened".
22 %%
23 %% This work consists of the files listed in the README file.
24 %%
25 %%% egarabpar.tex ledmac & parallel arabic text
26 \documentclass[12pt]{article}
27 \addtolength{\textheight}{-4\baselineskip}
28 \usepackage{ledmac}
29 \usepackage{ledpar}
30 \setcounter{firstlinenum}{1} \setcounter{linenumincrement}{1}
31 \usepackage{arabtex}
32 \usepackage{ledarab}
33 %%
34 \makeatletter
35 \def\printlinesAR#1|#2|#3|#4|#5|#6|#7|{\begingroup
36 \setprintlines{#1}{#2}{#3}{#4}{#5}{#6}%
37 \ifl@d@pnum #1\fullstop\fi
38 \ifledplinenum \RL{#2}\Rlineflag\else \symplinenum\fi
39 \endgroup}
40 \makeatother
41
42 %%% We will use the Bfootnote series for the arabic right texts,
43 %%% in paragraph style
44 \footparagraph{B}
45
46 %%% right text numbering
47 \let\oldBfootfmt\Bfootfmt
48 \renewcommand{\Bfootfmt}[3]{%
49 \let\printlines\printlinesR
50 \oldBfootfmt{#1}{#2}{#3}}
51
52 \begin{document}
53
54 Here is an example pair of texts. The arabic version is on the right.
55
56 \vspace{\baselineskip}
57
58 \begin{pairs}
59
60 \begin{Leftside}
61 \beginnumbering
62 \pstart
63 \noindent
64 gUyand kasAn behe \edtext{st}{\Afootnote{Western side}} bA .hUr hOs ast \\
65 man mIgUyam keh 'Ab-i angUr hOs ast \\
66 In naqd begIr wa-dast az 'An nesiyeh bedAr \\
67 k-'AwAz-i dohol sanIdan az dUr hOs ast.
68 \pend
69 \end{Leftside}
70
71 \renewcommand{\Rlineflag}{r} % writes r in latin
72 \begin{Rightside}
73 \firstlinenum{2} \linenumincrement{2}
74 \begin{arabtext}
75 \beginnumbering
76 \pstart
77 \noindent
78 gUyand kasAn behe \edtext{st}{\Bfootnote{Eastern side}} bA .hUr hOs ast \\
79 man mIgUyam keh 'Ab-i angUr hOs ast \\
80 In naqd begIr wa-dast az 'An nesiyeh bedAr \\
81 k-'AwAz-i dohol sanIdan az dUr hOs ast.
82 \pend
83 \end{arabtext}
84 \end{Rightside}
85
86 \Columns
87
88 \end{pairs}
89
90 \vspace{\baselineskip}
91
92 The same texts but more oriented towards arabic.
93
94 \vspace{\baselineskip}
95
96 \begin{pairs}
97
98 \begin{Leftside}
99 \pstart
100 \noindent
101 gUyand kasAn behe st bA .hUr hOs ast \\
102 man mIgUyam \edtext{keh}{\Afootnote{\RL{Western side}}} 'Ab-i angUr hOs ast \\
103 In naqd begIr wa-dast az 'An nesiyeh bedAr \\
104 k-'AwAz-i dohol sanIdan az dUr hOs ast.
105 \pend
106 \endnumbering
107 \end{Leftside}
108
109 %%% right full arabic note numbering
110 \renewcommand{\Bfootfmt}[3]{%
111 \let\printlines\printlinesAR
112 \oldBfootfmt{#1}{#2}{#3}}
113 \renewcommand{\Rlineflag}{\RL{r}} % writes r in arabic
114
115 \begin{Rightside}
116 \firstlinenum{1} \linenumincrement{1}
117 \arablnumrepR % changes the number to arabic
118 \begin{arabtext}
119 \pstart
120 \noindent
121 gUyand kasAn behe st bA .hUr hOs ast \\
122 man mIgUyam \edtext{keh}{\Bfootnote{\RL{Eastern side}}} 'Ab-i angUr hOs ast \\
123 In naqd begIr wa-dast az 'An nesiyeh bedAr \\
124 k-'AwAz-i dohol sanIdan az dUr hOs ast.
125 \pend
126 \endnumbering
127 \end{arabtext}
128 \end{Rightside}
129
130 \begin{arabtext}
131 \Columns
132 \end{arabtext}
133
134 \end{pairs}
135
136 \end{document}
137 \endinput
138 %%
139 %% End of file `egarabpar.tex'.