blob: 004187e249d7ac8cc033236d45219494cfb91232 (
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
|
%%
%% This is file `latex-localise-misc-xepersian.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xepersian.dtx (with options: `table,latex-localise-misc-xepersian.def')
%%
%% __________________________________________________
%% Copyright (c) 2008--2018 Vafa Khalighi <persian-tex@tug.org>
%%
%% It may be distributed and/or modified under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is “author-maintained” (as per LPPL maintenance status)
%% by Vafa Khalighi.
%%
%%
%% \CheckSum{10521}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
\ProvidesFile{latex-localise-misc-xepersian.def}[2012/01/01 v0.2 miscellaneous Persian localisation of LaTeX2e]
\تر\گرجدید#1{%
\شمار@\نویسهویژه \نویسهویژه\من@ا
\بگذار#1\گرنادرست
\@گر#1\گردرست
\@گر#1\گرنادرست
\نویسهویژه\شمار@}
\تر\@گر#1#2{%
\بگسترپساز\تر\نامفرمان\بگسترپساز\@خورحریصانهدو\رشته#1%
\بگسترپساز\@خورحریصانهدو\رشته#2\پایاننامفرمان
{\بگذار#1#2}}
\بگذار\تعریفنشده\undefined
\تر\حلقه#1\ازنو{\تر\تکرارکن{#1\راحت\بگسترپساز\تکرارکن\رگ}%
\تکرارکن \بگذار\تکرارکن\راحت}
\بگذار\ازنو\رگ
\بلند\تر \حلقه #1\ازنو{%
\تر\تکرارکن{#1\راحت % \راحت اضافی
\بگسترپساز\تکرارکن\رگ
}%
\تکرارکن
\بگذار\تکرارکن\راحت
}
\بگذار\ازنو=\رگ
\@ifdefinitionfileloaded{latex-xetex-bidi}{%
\def\@xfloat #1[#2]{%
\@nodocument
\def \@captype {#1}%
\def \@fps {#2}%
\@onelevel@sanitize \@fps
\def \reserved@b {!}%
\ifx \reserved@b \@fps
\@fpsadddefault
\else
\ifx \@fps \@empty
\@fpsadddefault
\fi
\fi
\ifhmode
\@bsphack
\@floatpenalty -\@Mii
\else
\@floatpenalty-\@Miii
\fi
\ifinner
\@parmoderr\@floatpenalty\z@
\else
\@next\@currbox\@freelist
{%
\@tempcnta \sixt@@n
\expandafter \@tfor \expandafter \reserved@a
\expandafter :\expandafter =\@fps
\do
{%
\if \reserved@a h%
\ifodd \@tempcnta
\else
\advance \@tempcnta \@ne
\fi
\fi
\if \reserved@a ا%
\ifodd \@tempcnta
\else
\advance \@tempcnta \@ne
\fi
\fi
\if \reserved@a t%
\@setfpsbit \tw@
\fi
\if \reserved@a ب%
\@setfpsbit \tw@
\fi
\if \reserved@a b%
\@setfpsbit 4%
\fi
\if \reserved@a ز%
\@setfpsbit 4%
\fi
\if \reserved@a p%
\@setfpsbit 8%
\fi
\if \reserved@a ص%
\@setfpsbit 8%
\fi
\if \reserved@a !%
\ifnum \@tempcnta>15
\advance\@tempcnta -\sixt@@n\relax
\fi
\fi
}%
\@tempcntb \csname ftype@\@captype \endcsname
\multiply \@tempcntb \@xxxii
\advance \@tempcnta \@tempcntb
\global \count\@currbox \@tempcnta
}%
\@fltovf
\fi
\global \setbox\@currbox
\color@vbox
\normalcolor
\vbox \bgroup
\hsize\columnwidth
\@parboxrestore
\@floatboxreset
}
\let\bm@و\bm@c
\let\bm@چ\bm@l
\let\bm@ر\bm@r
\let\bm@ز\bm@b
\let\bm@ب\bm@t
\let\bm@ک\bm@s
\long\def\@iiiparbox#1#2[#3]#4#5{%
\leavevmode
\@pboxswfalse
\if@hboxRconstruct\@bidi@list@minipage@parbox@not@nobtrue\fi
\if@RTL\if#1t\@bidi@list@minipage@parboxtrue\else\if#1b\@bidi@list@minipage@parboxtrue\else\if#1ز\@bidi@list@minipage@parboxtrue\else\if#1ب\@bidi@list@minipage@parboxtrue\fi\fi\fi\fi\fi
\setlength\@tempdima{#4}%
\@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
\ifx\relax#2\else
\setlength\@tempdimb{#2}%
\edef\@parboxto{to\the\@tempdimb}%
\fi
\if#1b\vbox
\else\if#1ز\vbox
\else\if #1t\vtop
\else\if #1ب\vtop
\else\ifmmode\vcenter
\else\@pboxswtrue $\vcenter
\fi\fi\fi\fi\fi
\@parboxto{\let\hss\vss\let\unhbox\unvbox
\csname bm@#3\endcsname}%
\if@pboxsw \m@th$\fi
\@end@tempboxa}
\def\@iiiminipage#1#2[#3]#4{%
\leavevmode
\@pboxswfalse
\if@hboxRconstruct\@bidi@list@minipage@parbox@not@nobtrue\fi
\if@RTL\if#1t\@bidi@list@minipage@parboxtrue\else\if#1b\@bidi@list@minipage@parboxtrue\else\if#1ز\@bidi@list@minipage@parboxtrue\else\if#1ب\@bidi@list@minipage@parboxtrue\fi\fi\fi\fi\fi
\setlength\@tempdima{#4}%
\def\@mpargs{{#1}{#2}[#3]{#4}}%
\setbox\@tempboxa\vbox\bgroup
\color@begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
\let\@footnotetext\@mpfootnotetext
\let\@LTRfootnotetext\@mpLTRfootnotetext
\let\@RTLfootnotetext\@mpRTLfootnotetext
\let\@listdepth\@mplistdepth \@mplistdepth\z@
\@minipagerestore
\@setminipage}
\def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
\ifnum \@lastchclass=3 5 \else
\z@ \if #1c\@chnum \z@ \else
\if #1و\@chnum \z@ \else
\if \if@RTLtab#1r\else#1l\fi\@chnum \@ne \else
\if \if@RTLtab#1ر\else#1چ\fi\@chnum \@ne \else
\if \if@RTLtab#1l\else#1r\fi\@chnum \tw@ \else
\if \if@RTLtab#1چ\else#1ر\fi\@chnum \tw@ \else
\@chclass \if #1|\@ne \else
\if #1@\tw@ \else
\if #1p3 \else
\if #1پ3 \else \z@ \@preamerr 0\fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi}%
}{}
\@ifdefinitionfileloaded{array-xetex-bidi}{%
\def\@testpach{\@chclass
\ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
\ifnum \@lastchclass=7 5 \else
\ifnum \@lastchclass=8 \tw@ \else
\ifnum \@lastchclass=9 \thr@@
\else \z@
\ifnum \@lastchclass = 10 \else
\edef\@nextchar{\expandafter\string\@nextchar}%
\@chnum
\if \@nextchar c\z@ \else
\if \@nextchar و\z@ \else
\if \@nextchar \if@RTLtab r\else l\fi\@ne \else
\if \@nextchar \if@RTLtab ر\else چ\fi\@ne \else
\if \@nextchar \if@RTLtab l\else r\fi\tw@ \else
\if \@nextchar \if@RTLtab چ\else ر\fi\tw@ \else
\z@ \@chclass
\if\@nextchar |\@ne \else
\if \@nextchar !6 \else
\if \@nextchar @7 \else
\if \@nextchar <8 \else
\if \@nextchar >9 \else
10
\@chnum
\if \@nextchar m\thr@@\else
\if \@nextchar م\thr@@\else
\if \@nextchar p4 \else
\if \@nextchar پ4 \else
\if \@nextchar b5 \else
\if \@nextchar ز5 \else
\z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}%
}{}
\@ifdefinitionfileloaded{arydshln-xetex-bidi}{
\ifadl@usingarypkg
\def\@testpach{\@chclass
\ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
\ifnum \@lastchclass=7 5 \else
\ifnum \@lastchclass=8 \tw@ \else
\ifnum \@lastchclass=9 \thr@@
\else \z@
\ifnum \@lastchclass = 10 \else
\edef\@nextchar{\expandafter\string\@nextchar}%
\@chnum
\if \@nextchar c\z@ \else
\if \@nextchar و\z@ \else
\if \@nextchar \if@RTLtab r\else l\fi\@ne \else
\if \@nextchar \if@RTLtab ر\else چ\fi\@ne \else
\if \@nextchar \if@RTLtab l\else r\fi\tw@ \else
\if \@nextchar \if@RTLtab چ\else ر\fi\tw@ \else
\z@ \@chclass
\if\@nextchar |\@ne \let\@arrayrule\adl@arrayrule \else
\if\@nextchar :\@ne \let\@arrayrule\adl@arraydashrule \else
\if\@nextchar ;\@ne \let\@arrayrule\adl@argarraydashrule \else
\if \@nextchar !6 \else
\if \@nextchar @7 \else
\if \@nextchar <8 \else
\if \@nextchar >9 \else
10
\@chnum
\if \@nextchar m\thr@@\else
\if \@nextchar م\thr@@\else
\if \@nextchar p4 \else
\if \@nextchar پ4 \else
\if \@nextchar b5 \else
\if \@nextchar ز5 \else
\z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}
\def\@classz{\@classx
\@tempcnta \count@
\prepnext@tok
\@addtopreamble{\ifcase \@chnum
\hfil
\adl@putlrc{\d@llarbegin \insert@column \d@llarend}\hfil \or
\hskip1sp\adl@putlrc{\d@llarbegin \insert@column \d@llarend}\hfil \or
\hfil\hskip1sp\adl@putlrc{\d@llarbegin \insert@column \d@llarend}\or
\setbox\adl@box\hbox \adl@startmbox{\@nextchar}\insert@column
\adl@endmbox\or
\setbox\adl@box\vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
\setbox\adl@box\vbox \@startpbox{\@nextchar}\insert@column \@endpbox
\fi}\prepnext@tok}
\def\adl@class@start{4}
\def\adl@class@iiiorvii{7}
\else
\def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4\relax \else
\ifnum \@lastchclass=\thr@@ 5\relax \else
\z@ \if #1c\@chnum \z@ \else
\if #1و\@chnum\z@ \else
\if \if@RTLtab#1r\else#1l\fi\@chnum \@ne \else
\if \if@RTLtab#1ر\else#1چ\fi\@chnum \@ne \else
\if \if@RTLtab#1l\else#1r\fi\@chnum \tw@ \else
\if \if@RTLtab#1چ\else#1ر\fi\@chnum \tw@ \else
\@chclass
\if #1|\@ne \let\@arrayrule\adl@arrayrule \else
\if #1:\@ne \let\@arrayrule\adl@arraydashrule \else
\if #1;\@ne \let\@arrayrule\adl@argarraydashrule \else
\if #1@\tw@ \else
\if #1p\thr@@ \else
\if #1پ\thr@@ \else\z@ \@preamerr 0\fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}
\def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
\or \or \@addamp \or
\@acolampacol \or \@firstampfalse \@acol \fi
\edef\@preamble{\@preamble
\ifcase \@chnum
\hfil\adl@putlrc{$\relax\@sharp$}\hfil
\or \adl@putlrc{$\relax\@sharp$}\hfil
\or \hfil\adl@putlrc{$\relax\@sharp$}\fi}}
\def\@tabclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
\or \or \@addamp \or
\@acolampacol \or \@firstampfalse \@acol \fi
\edef\@preamble{\@preamble
\ifcase \@chnum
\hfil\adl@putlrc{\@sharp\unskip}\hfil
\or \adl@putlrc{\@sharp\unskip}\hfil
\or \hfil\hskip\z@ \adl@putlrc{\@sharp\unskip}\fi}}
\def\adl@class@start{6}
\def\adl@class@iiiorvii{3}
\fi
}{}
\@ifdefinitionfileloaded{tabulary-xetex-bidi}{%
\def\@testpach{\@chclass
\ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
\ifnum \@lastchclass=7 5 \else
\ifnum \@lastchclass=8 \tw@ \else
\ifnum \@lastchclass=9 \thr@@
\else \z@
\ifnum \@lastchclass = 10 \else
\edef\@nextchar{\expandafter\string\@nextchar}%
\@chnum
\if \@nextchar c\z@ \else
\if \@nextchar و\z@ \else
\if \@nextchar \if@RTLtab r\else l\fi\@ne \else
\if \@nextchar \if@RTLtab ر\else چ\fi\@ne \else
\if \@nextchar \if@RTLtab l\else r\fi\tw@ \else
\if \@nextchar \if@RTLtab چ\else ر\fi\tw@ \else
\if \@nextchar C7 \else
\if \@nextchar س7 \else
\if \@nextchar L8 \else
\if \@nextchar ف8 \else
\if \@nextchar R9 \else
\if \@nextchar ا9 \else
\if \@nextchar J10 \else
\if \@nextchar ت10 \else
\z@ \@chclass
\if\@nextchar |\@ne \else
\if \@nextchar !6 \else
\if \@nextchar @7 \else
\if \@nextchar <8 \else
\if \@nextchar >9 \else
10
\@chnum
\if \@nextchar m\thr@@\else
\if \@nextchar م\thr@@\else
\if \@nextchar p4 \else
\if \@nextcharپ4 \else
\if \@nextchar b5 \else
\if \@nextchar ز5 \else
\z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi\fi \fi \fi\fi \fi \fi \fi \fi \fi \fi \fi \fi
\fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi \fi}%
}{}
\@ifdefinitionfileloaded{float-xetex-bidi}{%
\let\@float@Hx\@xfloat
\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@ifnextchar{آ}{\@float@آآ{#1}[}{\@float@Hx{#1}[}}}
\def\@float@HH#1[H]{%
\expandafter\let\csname end#1\endcsname\float@endH
\let\@currbox\float@box
\def\@captype{#1}\setbox\@floatcapt=\vbox{}%
\expandafter\ifx\csname fst@#1\endcsname\relax
\@flstylefalse\else\@flstyletrue\fi
\setbox\@currbox\color@vbox\normalcolor
\vbox\bgroup \hsize\columnwidth \@parboxrestore
\@floatboxreset \@setnobreak
\ignorespaces}
\def\@float@آآ#1[آ]{%
\expandafter\let\csname end#1\endcsname\float@endH
\let\@currbox\float@box
\def\@captype{#1}\setbox\@floatcapt=\vbox{}%
\expandafter\ifx\csname fst@#1\endcsname\relax
\@flstylefalse\else\@flstyletrue\fi
\setbox\@currbox\color@vbox\normalcolor
\vbox\bgroup \hsize\columnwidth \@parboxrestore
\@floatboxreset \@setnobreak
\ignorespaces}
}{}
\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12 |gdef|@x@xepersian@localize@verbatim#1\پایان{همانطورکههست}[#1|پایان[همانطورکههست]]
|gdef|@sx@xepersian@localize@verbatim#1\پایان{همانطورکههست*}[#1|پایان[همانطورکههست*]]
|endgroup
\def\همانطورکههست{\@verbatim \frenchspacing\@vobeyspaces \@x@xepersian@localize@verbatim}
\def\endهمانطورکههست{\if@newlist \leavevmode\fi\endtrivlist}
\ExplSyntaxOn
\AtBeginDocument{\@namedef{همانطورکههست*}{\@verbatim \fontspec_print_visible_spaces: \@sx@xepersian@localize@verbatim}}
\ExplSyntaxOff
\expandafter\let\csname endهمانطورکههست*\endcsname =\endهمانطورکههست
\endinput
%%
%% End of file `latex-localise-misc-xepersian.def'.
|