]> git.lyx.org Git - features.git/blob - autotests/export/latex/en-th_utf8.lyx
Load inputenc after babel with Thai.
[features.git] / autotests / export / latex / en-th_utf8.lyx
1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
2 \lyxformat 573
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin unavailable
7 \textclass article
8 \use_default_options true
9 \maintain_unincluded_children false
10 \language english
11 \language_package default
12 \inputencoding utf8
13 \fontencoding auto
14 \font_roman "lmodern" "Norasi"
15 \font_sans "default" "Garuda"
16 \font_typewriter "default" "Tlwg Mono"
17 \font_math "auto" "auto"
18 \font_default_family default
19 \use_non_tex_fonts false
20 \font_sc false
21 \font_osf false
22 \font_sf_scale 100 100
23 \font_tt_scale 100 100
24 \use_microtype false
25 \use_dash_ligatures true
26 \graphics default
27 \default_output_format default
28 \output_sync 0
29 \bibtex_command default
30 \index_command default
31 \float_placement class
32 \float_alignment class
33 \paperfontsize default
34 \spacing single
35 \use_hyperref false
36 \papersize default
37 \use_geometry false
38 \use_package amsmath 1
39 \use_package amssymb 1
40 \use_package cancel 1
41 \use_package esint 1
42 \use_package mathdots 1
43 \use_package mathtools 1
44 \use_package mhchem 1
45 \use_package stackrel 1
46 \use_package stmaryrd 1
47 \use_package undertilde 1
48 \cite_engine basic
49 \cite_engine_type default
50 \biblio_style plain
51 \use_bibtopic false
52 \use_indices false
53 \paperorientation portrait
54 \suppress_date false
55 \justification true
56 \use_refstyle 1
57 \use_minted 0
58 \index Index
59 \shortcut idx
60 \color #008000
61 \end_index
62 \secnumdepth 3
63 \tocdepth 3
64 \paragraph_separation indent
65 \paragraph_indentation default
66 \is_math_indent 0
67 \math_numbering_side default
68 \quotes_style english
69 \dynamic_quotes 0
70 \papercolumns 1
71 \papersides 1
72 \paperpagestyle default
73 \tablestyle default
74 \tracking_changes false
75 \output_changes false
76 \html_math_output 0
77 \html_css_as_file 0
78 \html_be_strict false
79 \end_header
80
81 \begin_body
82
83 \begin_layout Subsection*
84 Test workaround for Thai language
85 \end_layout
86
87 \begin_layout Standard
88 Up to version 2013/03/31 v1.8, Babel’s “thai.ldf” changes character categories
89  and the definitions for up-/dowcasing of letters (catcode, uccode, lccode)
90  
91 \series bold
92 globally
93 \series default
94 .
95  As a result, high bit characters come out wrong in the output.
96  UTF8 encoded characters are not parsed but interpreted as byte (=character)
97  sequences:
98 \end_layout
99
100 \begin_layout Quotation
101
102 \backslash
103 languagename 
104 \begin_inset ERT
105 status open
106
107 \begin_layout Plain Layout
108
109
110 \backslash
111 languagename
112 \end_layout
113
114 \end_inset
115
116
117 \end_layout
118
119 \begin_layout Quotation
120
121 \backslash
122 familydefault 
123 \begin_inset ERT
124 status open
125
126 \begin_layout Plain Layout
127
128
129 \backslash
130 familydefault
131 \end_layout
132
133 \end_inset
134
135
136 \end_layout
137
138 \begin_layout Quotation
139
140 \backslash
141 f@encoding 
142 \begin_inset ERT
143 status open
144
145 \begin_layout Plain Layout
146
147
148 \backslash
149 makeatletter
150 \backslash
151 f@encoding
152 \backslash
153 makeatother
154 \end_layout
155
156 \end_inset
157
158
159 \end_layout
160
161 \begin_layout Standard
162 and the 
163 \emph on
164 Latin supplement
165 \emph default
166  characters are written
167 \end_layout
168
169 \begin_layout Quotation
170 A0   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯
171 \end_layout
172
173 \begin_layout Quotation
174 B0 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿
175 \end_layout
176
177 \begin_layout Quotation
178 C0 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
179 \end_layout
180
181 \begin_layout Quotation
182 D0 Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß
183 \end_layout
184
185 \begin_layout Quotation
186 E0 à á â ã ä å æ ç è é ê ë ì í î ï
187 \end_layout
188
189 \begin_layout Quotation
190 F0 ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ
191 \end_layout
192
193 \begin_layout Itemize
194 catcode 11 or 12 means, the characters are directly passed to the font and
195  come out wrong when the T1 font encoding differs from latin9.
196 \end_layout
197
198 \begin_layout Itemize
199 uc/lccode changes prevent up/downcasing of high-bit characters
200 \begin_inset Newline newline
201 \end_inset
202
203 (lösen 
204 \begin_inset Formula $→$
205 \end_inset
206
207  
208 \begin_inset ERT
209 status open
210
211 \begin_layout Plain Layout
212
213
214 \backslash
215 MakeUppercase{
216 \end_layout
217
218 \end_inset
219
220 lösen
221 \begin_inset ERT
222 status open
223
224 \begin_layout Plain Layout
225
226 }
227 \end_layout
228
229 \end_inset
230
231 , LÖSEN 
232 \begin_inset Formula $→$
233 \end_inset
234
235  
236 \begin_inset ERT
237 status open
238
239 \begin_layout Plain Layout
240
241
242 \backslash
243 MakeLowercase{
244 \end_layout
245
246 \end_inset
247
248 LÖSEN
249 \begin_inset ERT
250 status open
251
252 \begin_layout Plain Layout
253
254 }
255 \end_layout
256
257 \end_inset
258
259 ).
260 \end_layout
261
262 \begin_layout Standard
263
264 \lang thai
265 Setting the text language to Thai:
266 \end_layout
267
268 \begin_layout Quotation
269
270 \lang thai
271
272 \backslash
273 languagename 
274 \begin_inset ERT
275 status open
276
277 \begin_layout Plain Layout
278
279
280 \backslash
281 languagename
282 \end_layout
283
284 \end_inset
285
286
287 \end_layout
288
289 \begin_layout Quotation
290
291 \lang thai
292
293 \backslash
294 familydefault 
295 \begin_inset ERT
296 status open
297
298 \begin_layout Plain Layout
299
300
301 \backslash
302 familydefault
303 \end_layout
304
305 \end_inset
306
307
308 \end_layout
309
310 \begin_layout Quotation
311
312 \lang thai
313
314 \backslash
315 f@encoding 
316 \begin_inset ERT
317 status open
318
319 \begin_layout Plain Layout
320
321
322 \backslash
323 makeatletter
324 \backslash
325 f@encoding
326 \backslash
327 makeatother
328 \end_layout
329
330 \end_inset
331
332
333 \end_layout
334
335 \begin_layout Standard
336
337 \lang thai
338 Non-ASCII characters are mis-represented because the bytes are passed to
339  the (Thai) font as-is:
340 \end_layout
341
342 \begin_layout Quotation
343
344 \lang thai
345 A0   ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯
346 \end_layout
347
348 \begin_layout Quotation
349
350 \lang thai
351 B0 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿
352 \end_layout
353
354 \begin_layout Quotation
355
356 \lang thai
357 C0 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï
358 \end_layout
359
360 \begin_layout Quotation
361
362 \lang thai
363 D0 
364 \begin_inset Note Note
365 status open
366
367 \begin_layout Plain Layout
368
369 \lang thai
370 Ð
371 \end_layout
372
373 \end_inset
374
375  Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý 
376 \begin_inset Note Note
377 status open
378
379 \begin_layout Plain Layout
380
381 \lang thai
382 Þ
383 \end_layout
384
385 \end_inset
386
387  ß
388 \end_layout
389
390 \begin_layout Quotation
391
392 \lang thai
393 E0 à á â ã ä å æ ç è é ê ë ì í î ï
394 \end_layout
395
396 \begin_layout Quotation
397
398 \lang thai
399 F0 
400 \begin_inset Note Note
401 status open
402
403 \begin_layout Plain Layout
404
405 \lang thai
406 ð
407 \end_layout
408
409 \end_inset
410
411  ñ ò ó ô õ ö ÷ ø ù ú û ü ý 
412 \begin_inset Note Note
413 status open
414
415 \begin_layout Plain Layout
416
417 \lang thai
418 þ
419 \end_layout
420
421 \end_inset
422
423  ÿ
424 \end_layout
425
426 \begin_layout Standard
427 Example text in Thai.
428  Emphasizing works, if 
429 \begin_inset Quotes eld
430 \end_inset
431
432 fonts-tlwg
433 \begin_inset Quotes erd
434 \end_inset
435
436  is loaded 
437 \series bold
438 after 
439 \series default
440 Babel:
441 \end_layout
442
443 \begin_layout Quote
444
445 \series bold
446 \lang thai
447 ภาษาไทย
448 \series default
449  หรือ 
450 \emph on
451 ภาษาไทยกลาง
452 \emph default
453  เป็นภาษาราชการและภาษาประจำชาติของประเทศไทย ภาษาไทยเป็นภาษาในกลุ่มภาษาไท
454  ซึ่งเป็นกลุ่มย่อยของตระกูลภาษาไท-กะได สันนิษฐานว่า ภาษาในตระกูลนี้มีถิ่นกำเนิดจ
455 ากทางตอนใต้ของประเทศจีน และนักภาษาศาสตร์บางส่วนเสนอว่า ภาษาไทยน่าจะมีความเชื่อมโ
456 ยงกับตระกูลภาษาออสโตร-เอเชียติก ตระกูลภาษาออสโตรนีเซียน และตระกูลภาษาจีน-ทิเบต
457 \end_layout
458
459 \end_body
460 \end_document