blob: d0ccf63280a74a430d6394de8b2d83c437b3b29b (
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
|
%%
%% This is file `inputnormalization.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% inputnormalization.dtx (with options: `tex-package')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from inputnormalization.tex.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file inputnormalization.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% Copyright (C) 2020--2021 by Marcel Krueger
%%
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any later
%% version. The latest version of this license is in:
%%
%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
\ifx\directlua\undefined
\ifx\XeTeXinputnormalization\undefined
\begingroup
\ifx\PackageError\undefined
\def\PackageError#1#2#3{\errhelp{#3}\errmessage{#1: #2}}
\fi
\PackageError{inputnormalization}{LuaTeX or XeTeX required}%
{inputnormalization requires LuaTeX or XeTeX.
Maybe you forgot to switch the engine in your editor?}
\endgroup
\else
\let\Uinputnormalization\XeTeXinputnormalization
\fi
\else
\ifx\newluafunction\@undefined
\input ltluatex
\fi
\newcount\Uinputnormalization
\directlua{
local getcount = tex.getcount
local function ident(buf) return buf end
local uni_normalize = require'lua-uni-normalize'
local normalize = {[0] = ident, uni_normalize.NFC, uni_normalize.NFD}
luatexbase.add_to_callback('process_input_buffer', function(buf)
return normalize[getcount(\the\allocationnumber)](buf)
end, 'inputnormalization')
}
\fi
\Uinputnormalization=1
\endinput
%%
%% End of file `inputnormalization.tex'.
|