summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/inputnormalization
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-05 20:58:35 +0000
committerKarl Berry <karl@freefriends.org>2021-07-05 20:58:35 +0000
commit6c9b8dd7551fa92ce3d5eaf8136475d25581d8cc (patch)
treedf3be15f6707e24428451855262fc7faafa016e8 /Master/texmf-dist/tex/latex/inputnormalization
parente1dafecb06e75d448cec3ba54b3fcd7868ee060c (diff)
inputnormalization (5jul21)
git-svn-id: svn://tug.org/texlive/trunk@59850 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/inputnormalization')
-rw-r--r--Master/texmf-dist/tex/latex/inputnormalization/inputnormalization.sty64
1 files changed, 64 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/inputnormalization/inputnormalization.sty b/Master/texmf-dist/tex/latex/inputnormalization/inputnormalization.sty
new file mode 100644
index 00000000000..d35ec6dc525
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/inputnormalization/inputnormalization.sty
@@ -0,0 +1,64 @@
+%%
+%% This is file `inputnormalization.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% inputnormalization.dtx (with options: `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.sty.
+%%
+%% 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.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage
+ {inputnormalization}
+ [2021/07/05 v0.2 Unicode input normalization]
+\ifx\directlua\undefined
+\ifx\XeTeXinputnormalization\undefined
+\PackageError{inputnormalization}{LuaTeX or XeTeX required}%
+ {inputnormalization requires LuaTeX or XeTeX.
+ Maybe you forgot to switch the engine in your editor?}
+\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.sty'.