| 1 |
\expandafter\ifx\csname ProvidesPackage\endcsname\relax % No identification in plain XeTeX |
| 2 |
\else % Identification for XeLaTeX |
| 3 |
\ProvidesPackage{xevlna}[2016/09/05 vlna for both XeLaTeX and plain XeTeX] |
| 4 |
\PackageInfo{xevlna}{$Id: xevlna.sty 533 2016-09-07 00:22:25Z zw $\@gobble} |
| 5 |
\fi |
| 6 |
|
| 7 |
\edef\CSat{\the\catcode`\@} % in order to work in plain XeTeX |
| 8 |
\catcode`\@=11 |
| 9 |
\ifdefined\e@alloc@intercharclass@top |
| 10 |
\chardef\CSboundary=\e@alloc@intercharclass@top |
| 11 |
\else |
| 12 |
\ifdefined\XeTeXinterwordspaceshaping |
| 13 |
\chardef\CSboundary=4095 % |
| 14 |
\def\newXeTeXintercharclass{% |
| 15 |
\e@alloc\XeTeXcharclass\chardef |
| 16 |
\xe@alloc@intercharclass\m@ne\@ucharclass@boundary} |
| 17 |
\else |
| 18 |
\chardef\CSboundary=255 |
| 19 |
\fi |
| 20 |
\fi |
| 21 |
\catcode`\@=\CSat |
| 22 |
|
| 23 |
\XeTeXinterchartokenstate 1 |
| 24 |
\newXeTeXintercharclass\CSopenpunctuation |
| 25 |
\newXeTeXintercharclass\CSnonsyllabicpreposition |
| 26 |
\XeTeXcharclass`\(\CSopenpunctuation |
| 27 |
\XeTeXcharclass`\[\CSopenpunctuation |
| 28 |
\XeTeXcharclass`\„\CSopenpunctuation |
| 29 |
\XeTeXcharclass`\»\CSopenpunctuation |
| 30 |
\XeTeXcharclass`\K\CSnonsyllabicpreposition |
| 31 |
\XeTeXcharclass`\k\CSnonsyllabicpreposition |
| 32 |
\XeTeXcharclass`\S\CSnonsyllabicpreposition |
| 33 |
\XeTeXcharclass`\s\CSnonsyllabicpreposition |
| 34 |
\XeTeXcharclass`\V\CSnonsyllabicpreposition |
| 35 |
\XeTeXcharclass`\v\CSnonsyllabicpreposition |
| 36 |
\XeTeXcharclass`\Z\CSnonsyllabicpreposition |
| 37 |
\XeTeXcharclass`\z\CSnonsyllabicpreposition |
| 38 |
\XeTeXcharclass`\O\CSnonsyllabicpreposition |
| 39 |
\XeTeXcharclass`\o\CSnonsyllabicpreposition |
| 40 |
\XeTeXcharclass`\U\CSnonsyllabicpreposition |
| 41 |
\XeTeXcharclass`\u\CSnonsyllabicpreposition |
| 42 |
\XeTeXcharclass`\A\CSnonsyllabicpreposition |
| 43 |
\XeTeXcharclass`\a\CSnonsyllabicpreposition |
| 44 |
\XeTeXcharclass`\I\CSnonsyllabicpreposition |
| 45 |
\XeTeXcharclass`\i\CSnonsyllabicpreposition |
| 46 |
\XeTeXinterchartoks \CSboundary \CSnonsyllabicpreposition {\CSinterchartoks} |
| 47 |
\XeTeXinterchartoks \CSopenpunctuation \CSnonsyllabicpreposition {\CSinterchartoks} |
| 48 |
\def\CSnointerchartoks{\let\CSinterchartoks\PreCSpreposition} |
| 49 |
\def\PreCSpreposition{\def\next{}% |
| 50 |
\ifnum\catcode`\ =10 % nothing will be done in verbatim |
| 51 |
\ifmmode % nothing in math |
| 52 |
\else |
| 53 |
\let\CSinterchartoks\CSnointerchartoks |
| 54 |
\let\next\ExamineCSpreposition |
| 55 |
\fi \fi |
| 56 |
\next} |
| 57 |
\def\ExamineCSpreposition #1{#1\futurelet\next\ProcessCSpreposition} |
| 58 |
\def\ProcessCSpreposition{\ifx\next\xevlnaXeTeXspace\nobreak\fi} |
| 59 |
\futurelet\xevlnaXeTeXspace{ }\CSnointerchartoks |
| 60 |
|
| 61 |
% Enabling and disabling |
| 62 |
\def\xevlnaDisable{\def\CSinterchartoks{}} |
| 63 |
\let\xevlnaEnable\CSnointerchartoks |