summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/xevlna/xevlna.sty
blob: 2ef3cc02f300d6c70d9acbc70f10fdf5b0c8eedf (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
\expandafter\ifx\csname ProvidesPackage\endcsname\relax % No identification in plain XeTeX
\else % Identification for XeLaTeX
\ProvidesPackage{xevlna}[2016/09/05 vlna for both XeLaTeX and plain XeTeX]
\PackageInfo{xevlna}{$Id: xevlna.sty 533 2016-09-07 00:22:25Z zw $\@gobble}
\fi

\edef\CSat{\the\catcode`\@} % in order to work in plain XeTeX
\catcode`\@=11
\ifdefined\e@alloc@intercharclass@top
  \chardef\CSboundary=\e@alloc@intercharclass@top
\else
  \ifdefined\XeTeXinterwordspaceshaping
    \chardef\CSboundary=4095 %
    \def\newXeTeXintercharclass{%
      \e@alloc\XeTeXcharclass\chardef
              \xe@alloc@intercharclass\m@ne\@ucharclass@boundary}
  \else
    \chardef\CSboundary=255
  \fi
\fi
\catcode`\@=\CSat

\XeTeXinterchartokenstate 1
\newXeTeXintercharclass\CSopenpunctuation
\newXeTeXintercharclass\CSnonsyllabicpreposition
\XeTeXcharclass`\(\CSopenpunctuation
\XeTeXcharclass`\[\CSopenpunctuation
\XeTeXcharclass`\„\CSopenpunctuation
\XeTeXcharclass`\»\CSopenpunctuation
\XeTeXcharclass`\K\CSnonsyllabicpreposition
\XeTeXcharclass`\k\CSnonsyllabicpreposition
\XeTeXcharclass`\S\CSnonsyllabicpreposition
\XeTeXcharclass`\s\CSnonsyllabicpreposition
\XeTeXcharclass`\V\CSnonsyllabicpreposition
\XeTeXcharclass`\v\CSnonsyllabicpreposition
\XeTeXcharclass`\Z\CSnonsyllabicpreposition
\XeTeXcharclass`\z\CSnonsyllabicpreposition
\XeTeXcharclass`\O\CSnonsyllabicpreposition
\XeTeXcharclass`\o\CSnonsyllabicpreposition
\XeTeXcharclass`\U\CSnonsyllabicpreposition
\XeTeXcharclass`\u\CSnonsyllabicpreposition
\XeTeXcharclass`\A\CSnonsyllabicpreposition
\XeTeXcharclass`\a\CSnonsyllabicpreposition
\XeTeXcharclass`\I\CSnonsyllabicpreposition
\XeTeXcharclass`\i\CSnonsyllabicpreposition
\XeTeXinterchartoks \CSboundary \CSnonsyllabicpreposition {\CSinterchartoks}
\XeTeXinterchartoks \CSopenpunctuation \CSnonsyllabicpreposition {\CSinterchartoks}
\def\CSnointerchartoks{\let\CSinterchartoks\PreCSpreposition}
\def\PreCSpreposition{\def\next{}%
  \ifnum\catcode`\ =10 % nothing will be done in verbatim
  \ifmmode % nothing in math
  \else
    \let\CSinterchartoks\CSnointerchartoks
    \let\next\ExamineCSpreposition
  \fi \fi
  \next}
\def\ExamineCSpreposition #1{#1\futurelet\next\ProcessCSpreposition}
\def\ProcessCSpreposition{\ifx\next\xevlnaXeTeXspace\nobreak\fi}
\futurelet\xevlnaXeTeXspace{ }\CSnointerchartoks

% Enabling and disabling
\def\xevlnaDisable{\def\CSinterchartoks{}}
\let\xevlnaEnable\CSnointerchartoks