Created
January 30, 2015 18:54
-
-
Save michal-h21/aa57f226dc78f841dbde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kpse.set_program_name("luatex") | |
local load_enc = function() | |
local f = "t1.tsv" | |
local i = 0 | |
local uni = {} | |
local chars = {} | |
for line in io.lines(f) do | |
local c = string.explode(line,"\t") | |
hex = c[3] | |
if hex then | |
hex = tonumber(hex,16) | |
uni[i] = hex | |
chars[hex] = i | |
i= i + 1 | |
end | |
end | |
return uni, chars | |
end | |
local uni, chars = load_enc() | |
local callback = function(head) | |
lang.hyphenate(head) | |
for n in node.traverse_id(37, head) do | |
n.char = chars[n.char] | |
--n.subtype = 0 | |
end | |
end | |
return callback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
\usepackage[T1]{fontenc} | |
% \usepackage[utf8]{luainputenc} | |
%\usepackage{fontspec} | |
\usepackage{luacode} | |
\begin{luacode*} | |
local clb = require "hyphenate" | |
--local showhyphens = require "showhyphens" | |
luatexbase.add_to_callback("hyphenate", clb, "xxx") | |
local mychar = unicode.utf8.char | |
luatexbase.add_to_callback("pre_linebreak_filter", function(head) | |
for n in node.traverse_id(37,head) do | |
print(mychar(n.char),n.char, n.subtype, n.lang) | |
end | |
return head | |
end,"xxx") | |
--]] | |
\end{luacode*} | |
\usepackage[czech]{babel} | |
\textwidth=3em | |
\begin{document} | |
straße | |
straße | |
Příliš \textit{žluťoučký kůň úpěl} ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
Příliš žluťoučký kůň úpěl ďábelské ódy. | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 | grave | 0060 | |
---|---|---|---|
1 | acute | 00B4 | |
2 | circumflex | 02C6 | |
3 | tilde | 02DC | |
4 | dieresis | 00A8 | |
5 | hungarumlaut | 02DD | |
6 | ring | 02DA | |
7 | caron | 02C7 | |
8 | breve | 02D8 | |
9 | macron | 00AF | |
10 | dotaccent | 02D9 | |
11 | cedilla | 00B8 | |
12 | ogonek | 02DB | |
13 | quotesinglbase | 201A | |
14 | guilsinglleft | 2039 | |
15 | guilsinglright | 203A | |
16 | quotedblleft | 201C | |
17 | quotedblright | 201D | |
18 | quotedblbase | 201E | |
19 | guillemotleft | 00AB | |
20 | guillemotright | 00BB | |
21 | endash | 2013 | |
22 | emdash | 2014 | |
23 | afii61664 | 200C | |
24 | perthousandzero | F023 | |
25 | dotlessi | 0131 | |
26 | dotlessj | 0237 | |
27 | ff | FB00 | |
28 | fi | FB01 | |
29 | fl | FB02 | |
30 | ffi | FB03 | |
31 | ffl | FB04 | |
32 | uni2423 | 2423 | |
33 | exclam | 0021 | |
34 | quotedbl | 0022 | |
35 | numbersign | 0023 | |
36 | dollar | 0024 | |
37 | percent | 0025 | |
38 | ampersand | 0026 | |
39 | quoteright | 2019 | |
40 | parenleft | 0028 | |
41 | parenright | 0029 | |
42 | asterisk | 002A | |
43 | plus | 002B | |
44 | comma | 002C | |
45 | hyphen | 002D | |
46 | period | 002E | |
47 | slash | 002F | |
48 | zero | 0030 | |
49 | one | 0031 | |
50 | two | 0032 | |
51 | three | 0033 | |
52 | four | 0034 | |
53 | five | 0035 | |
54 | six | 0036 | |
55 | seven | 0037 | |
56 | eight | 0038 | |
57 | nine | 0039 | |
58 | colon | 003A | |
59 | semicolon | 003B | |
60 | less | 003C | |
61 | equal | 003D | |
62 | greater | 003E | |
63 | question | 003F | |
64 | at | 0040 | |
65 | A | 0041 | |
66 | B | 0042 | |
67 | C | 0043 | |
68 | D | 0044 | |
69 | E | 0045 | |
70 | F | 0046 | |
71 | G | 0047 | |
72 | H | 0048 | |
73 | I | 0049 | |
74 | J | 004A | |
75 | K | 004B | |
76 | L | 004C | |
77 | M | 004D | |
78 | N | 004E | |
79 | O | 004F | |
80 | P | 0050 | |
81 | Q | 0051 | |
82 | R | 0052 | |
83 | S | 0053 | |
84 | T | 0054 | |
85 | U | 0055 | |
86 | V | 0056 | |
87 | W | 0057 | |
88 | X | 0058 | |
89 | Y | 0059 | |
90 | Z | 005A | |
91 | bracketleft | 005B | |
92 | backslash | 005C | |
93 | bracketright | 005D | |
94 | asciicircum | 005E | |
95 | underscore | 005F | |
96 | quoteleft | 2018 | |
97 | a | 0061 | |
98 | b | 0062 | |
99 | c | 0063 | |
100 | d | 0064 | |
101 | e | 0065 | |
102 | f | 0066 | |
103 | g | 0067 | |
104 | h | 0068 | |
105 | i | 0069 | |
106 | j | 006A | |
107 | k | 006B | |
108 | l | 006C | |
109 | m | 006D | |
110 | n | 006E | |
111 | o | 006F | |
112 | p | 0070 | |
113 | q | 0071 | |
114 | r | 0072 | |
115 | s | 0073 | |
116 | t | 0074 | |
117 | u | 0075 | |
118 | v | 0076 | |
119 | w | 0077 | |
120 | x | 0078 | |
121 | y | 0079 | |
122 | z | 007A | |
123 | braceleft | 007B | |
124 | bar | 007C | |
125 | braceright | 007D | |
126 | asciitilde | 007E | |
127 | hyphen.alt | EB2F | |
128 | Abreve | 0102 | |
129 | Aogonek | 0104 | |
130 | Cacute | 0106 | |
131 | Ccaron | 010C | |
132 | Dcaron | 010E | |
133 | Ecaron | 011A | |
134 | Eogonek | 0118 | |
135 | Gbreve | 011E | |
136 | Lacute | 0139 | |
137 | Lcaron | 013D | |
138 | Lslash | 0141 | |
139 | Nacute | 0143 | |
140 | Ncaron | 0147 | |
141 | Eng | 014A | |
142 | Ohungarumlaut | 0150 | |
143 | Racute | 0154 | |
144 | Rcaron | 0158 | |
145 | Sacute | 015A | |
146 | Scaron | 0160 | |
147 | Scedilla | 015E | |
148 | Tcaron | 0164 | |
149 | Tcommaaccent | 0162 | |
150 | Uhungarumlaut | 0170 | |
151 | Uring | 016E | |
152 | Ydieresis | 0178 | |
153 | Zacute | 0179 | |
154 | Zcaron | 017D | |
155 | Zdotaccent | 017B | |
156 | IJ | 0132 | |
157 | Idotaccent | 0130 | |
158 | dcroat | 0111 | |
159 | section | 00A7 | |
160 | abreve | 0103 | |
161 | aogonek | 0105 | |
162 | cacute | 0107 | |
163 | ccaron | 010D | |
164 | dcaron | 010F | |
165 | ecaron | 011B | |
166 | eogonek | 0119 | |
167 | gbreve | 011F | |
168 | lacute | 013A | |
169 | lcaron | 013E | |
170 | lslash | 0142 | |
171 | nacute | 0144 | |
172 | ncaron | 0148 | |
173 | eng | 014B | |
174 | ohungarumlaut | 0151 | |
175 | racute | 0155 | |
176 | rcaron | 0159 | |
177 | sacute | 015B | |
178 | scaron | 0161 | |
179 | scedilla | 015F | |
180 | tcaron | 0165 | |
181 | tcommaaccent | 0163 | |
182 | uhungarumlaut | 0171 | |
183 | uring | 016F | |
184 | ydieresis | 00FF | |
185 | zacute | 017A | |
186 | zcaron | 017E | |
187 | zdotaccent | 017C | |
188 | ij | 0133 | |
189 | exclamdown | 00A1 | |
190 | questiondown | 00BF | |
191 | sterling | 00A3 | |
192 | Agrave | 00C0 | |
193 | Aacute | 00C1 | |
194 | Acircumflex | 00C2 | |
195 | Atilde | 00C3 | |
196 | Adieresis | 00C4 | |
197 | Aring | 00C5 | |
198 | AE | 00C6 | |
199 | Ccedilla | 00C7 | |
200 | Egrave | 00C8 | |
201 | Eacute | 00C9 | |
202 | Ecircumflex | 00CA | |
203 | Edieresis | 00CB | |
204 | Igrave | 00CC | |
205 | Iacute | 00CD | |
206 | Icircumflex | 00CE | |
207 | Idieresis | 00CF | |
208 | Eth | 00D0 | |
209 | Ntilde | 00D1 | |
210 | Ograve | 00D2 | |
211 | Oacute | 00D3 | |
212 | Ocircumflex | 00D4 | |
213 | Otilde | 00D5 | |
214 | Odieresis | 00D6 | |
215 | OE | 0152 | |
216 | Oslash | 00D8 | |
217 | Ugrave | 00D9 | |
218 | Uacute | 00DA | |
219 | Ucircumflex | 00DB | |
220 | Udieresis | 00DC | |
221 | Yacute | 00DD | |
222 | Thorn | 00DE | |
223 | SS | D800 | |
224 | agrave | 00E0 | |
225 | aacute | 00E1 | |
226 | acircumflex | 00E2 | |
227 | atilde | 00E3 | |
228 | adieresis | 00E4 | |
229 | aring | 00E5 | |
230 | ae | 00E6 | |
231 | ccedilla | 00E7 | |
232 | egrave | 00E8 | |
233 | eacute | 00E9 | |
234 | ecircumflex | 00EA | |
235 | edieresis | 00EB | |
236 | igrave | 00EC | |
237 | iacute | 00ED | |
238 | icircumflex | 00EE | |
239 | idieresis | 00EF | |
240 | eth | 00F0 | |
241 | ntilde | 00F1 | |
242 | ograve | 00F2 | |
243 | oacute | 00F3 | |
244 | ocircumflex | 00F4 | |
245 | otilde | 00F5 | |
246 | odieresis | 00F6 | |
247 | oe | 0153 | |
248 | oslash | 00F8 | |
249 | ugrave | 00F9 | |
250 | uacute | 00FA | |
251 | ucircumflex | 00FB | |
252 | udieresis | 00FC | |
253 | yacute | 00FD | |
254 | thorn | 00FE | |
255 | germandbls | 00DF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment