blob: ecd94d3fb55e96e5cdbb6bce37f3fa01e96e65b5 (
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
|
%%
%% This is file `unicode-bidi.sty'.
%%
%% __________________________________________________
%% Copyright (c) 2016 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.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{unicode-bidi}[2016/11/09 v0.01
Experimental unicode bidi package for XeTeX]
\newcount\unicode@bidi@latin@alphabets
\newXeTeXintercharclass\unicode@bidi@latin@alphabets@charclass
\newXeTeXintercharclass\unicode@bidi@latin@punctuations@charclass
\unicode@bidi@latin@alphabets=`\A \loop \XeTeXcharclass \unicode@bidi@latin@alphabets \unicode@bidi@latin@alphabets@charclass \ifnum\unicode@bidi@latin@alphabets<`\Z \advance\unicode@bidi@latin@alphabets \@ne \repeat
\unicode@bidi@latin@alphabets=`\a \loop \XeTeXcharclass \unicode@bidi@latin@alphabets \unicode@bidi@latin@alphabets@charclass \ifnum\unicode@bidi@latin@alphabets<`\z \advance\unicode@bidi@latin@alphabets \@ne \repeat
\XeTeXcharclass `\, \unicode@bidi@latin@punctuations@charclass
\XeTeXcharclass `\( \unicode@bidi@latin@punctuations@charclass
\XeTeXcharclass `\) \unicode@bidi@latin@punctuations@charclass
\XeTeXcharclass `\[ \unicode@bidi@latin@punctuations@charclass
\XeTeXcharclass `\] \unicode@bidi@latin@punctuations@charclass
\XeTeXinterchartoks \z@ \unicode@bidi@latin@alphabets@charclass {\unicode@bidi@startlatin}
\XeTeXinterchartoks \e@alloc@intercharclass@top \unicode@bidi@latin@alphabets@charclass {\unicode@bidi@startlatin}
\XeTeXinterchartoks \e@alloc@intercharclass@top \z@ {\unicode@bidi@finishlatin}
\XeTeXinterchartoks \unicode@bidi@latin@alphabets@charclass \z@ {\unicode@bidi@finishlatin}
\newcommand*{\unicode@bidi@startlatin}{\if@nonlatin\bgroup\beginL\latinfont\@nonlatinfalse\fi}
\newcommand*{\unicode@bidi@finishlatin}{\if@nonlatin\else\unskip\endL\egroup{ }\fi}
\endinput
%%
%% End of file `unicode-bidi.sty'.
|