]> git.lyx.org Git - features.git/blob - lib/examples/ja/Multilingual_Typesetting_with_CJKutf8.lyx
Centralize cancelation of export
[features.git] / lib / examples / ja / Multilingual_Typesetting_with_CJKutf8.lyx
1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
2 \lyxformat 600
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/ja/
7 \textclass bxjsarticle
8 \begin_preamble
9 % line breaking, punctuation kerning and font switching features
10 % for CJK with non-TeX fonts requires additional packages
11 % currently without GUI support:
12
13 % with XeTeX, https://ctan.org/pkg/xecjk
14 \usepackage{ifxetex}
15 \ifxetex
16   \usepackage{xeCJK}
17   \setCJKmainfont{IPAexMincho}
18   \setCJKsansfont{IPAexGothic}
19 \fi
20
21 % with LuaTeX, https://www.ctan.org/pkg/luatexja
22 % see https://tex.stackexchange.com/questions/222980/how-to-use-chinese-with-lualatex
23 \usepackage{ifluatex}
24 \ifluatex
25   \usepackage{luatexja-fontspec}
26   % use Mainfont (DejaVu) for Greek and Cyrillic:
27   \ltjsetparameter{jacharrange={-2}}
28   %\usepackage[match]{luatexja-fontspec}
29   %\setmainjfont[Mapping=tex-text]{WenQuanYi Micro Hei}
30   %\setsansjfont[Mapping=tex-text]{WenQuanYi Micro Hei}
31   %\setmonojfont{WenQuanYi Micro Hei Mono}
32 \fi
33 \end_preamble
34 \use_default_options true
35 \begin_modules
36 logicalmkup
37 ruby
38 \end_modules
39 \maintain_unincluded_children no
40 \language japanese-cjk
41 \language_package auto
42 \inputencoding utf8
43 \fontencoding auto
44 \font_roman "DejaVuSerif" "DejaVu Serif"
45 \font_sans "DejaVuSans" "DejaVu Sans"
46 \font_typewriter "DejaVuSansMono" "DejaVu Sans Mono"
47 \font_math "auto" "auto"
48 \font_default_family default
49 \use_non_tex_fonts false
50 \font_sc false
51 \font_sans_osf false
52 \font_typewriter_osf false
53 \font_roman_osf false
54 \font_sf_scale 100 100
55 \font_tt_scale 100 100
56 \font_cjk min
57 \use_microtype false
58 \use_dash_ligatures false
59 \graphics default
60 \default_output_format default
61 \output_sync 0
62 \bibtex_command default
63 \index_command default
64 \float_placement class
65 \float_alignment class
66 \paperfontsize default
67 \spacing single
68 \use_hyperref false
69 \pdf_bookmarks false
70 \pdf_bookmarksnumbered true
71 \pdf_bookmarksopen false
72 \pdf_bookmarksopenlevel 1
73 \pdf_breaklinks false
74 \pdf_pdfborder true
75 \pdf_colorlinks false
76 \pdf_backref false
77 \pdf_pdfusetitle true
78 \papersize default
79 \use_geometry false
80 \use_package amsmath 1
81 \use_package amssymb 1
82 \use_package cancel 1
83 \use_package esint 1
84 \use_package mathdots 1
85 \use_package mathtools 1
86 \use_package mhchem 1
87 \use_package stackrel 1
88 \use_package stmaryrd 1
89 \use_package undertilde 1
90 \cite_engine basic
91 \cite_engine_type default
92 \biblio_style plain
93 \use_bibtopic false
94 \use_indices false
95 \paperorientation portrait
96 \suppress_date false
97 \justification true
98 \use_refstyle 0
99 \use_minted 0
100 \use_lineno 0
101 \index 索引
102 \shortcut idx
103 \color #008000
104 \end_index
105 \secnumdepth 3
106 \tocdepth 3
107 \paragraph_separation indent
108 \paragraph_indentation default
109 \is_math_indent 0
110 \math_numbering_side default
111 \quotes_style cjk
112 \dynamic_quotes 1
113 \papercolumns 1
114 \papersides 1
115 \paperpagestyle default
116 \tablestyle default
117 \tracking_changes false
118 \postpone_fragile_content false
119 \output_changes false
120 \html_math_output 0
121 \html_css_as_file 0
122 \html_be_strict false
123 \end_header
124
125 \begin_body
126
127 \begin_layout Title
128
129 \lang english
130 Multilingual typesetting with the CJK package
131 \end_layout
132
133 \begin_layout Date
134 \begin_inset Info
135 type  "moddate"
136 arg   "long"
137 \end_inset
138
139
140 \end_layout
141
142 \begin_layout Standard
143
144 \lang english
145 For multi-lingual documents with parts in European languages, you can use
146  the CJK LaTeX bundle:
147 \end_layout
148
149 \begin_layout Itemize
150
151 \lang english
152 Use one of the 
153 \begin_inset Quotes bld
154 \end_inset
155
156 Japanese (
157 \begin_inset CommandInset href
158 LatexCommand href
159 name "BXJS"
160 target "https://www.ctan.org/pkg/bxjscls"
161 literal "false"
162
163 \end_inset
164
165 )
166 \begin_inset Quotes brd
167 \end_inset
168
169  classes or a standard document class.
170  The other 
171 \begin_inset Quotes bld
172 \end_inset
173
174 Japanese
175 \begin_inset Quotes brd
176 \end_inset
177
178  document classes require pLaTeX.
179 \end_layout
180
181 \begin_layout Itemize
182
183 \lang english
184 Set the document language to 
185 \begin_inset Quotes bld
186 \end_inset
187
188 Japanese (CJK)
189 \begin_inset Quotes brd
190 \end_inset
191
192  and the encoding to 
193 \begin_inset Quotes bld
194 \end_inset
195
196 Unicode (utf8)
197 \begin_inset Quotes brd
198 \end_inset
199
200 .
201 \end_layout
202
203 \begin_layout Itemize
204
205 \lang english
206 Select a Japanese CJK-font, e.g.
207  
208 \begin_inset Flex Code
209 status collapsed
210
211 \begin_layout Plain Layout
212
213 \lang english
214 \begin_inset Quotes bld
215 \end_inset
216
217 min
218 \begin_inset Quotes brd
219 \end_inset
220
221
222 \end_layout
223
224 \end_inset
225
226 .
227 \end_layout
228
229 \begin_layout Itemize
230
231 \lang english
232 Some fonts are substituted with fallback 
233 \begin_inset Quotes bld
234 \end_inset
235
236 CM roman regular
237 \begin_inset Quotes brd
238 \end_inset
239
240  (
241 \emph on
242 DejaVu
243 \emph default
244  and 
245 \emph on
246 Libertine
247 \emph default
248  work).
249 \end_layout
250
251 \begin_layout Itemize
252 \noindent
253
254 \lang english
255 Alternatively, you can use non-TeX fonts with 
256 \begin_inset Quotes bld
257 \end_inset
258
259 xeCJK
260 \begin_inset Quotes brd
261 \end_inset
262
263  (XeTeX) or 
264 \begin_inset Quotes bld
265 \end_inset
266
267 luatexja
268 \begin_inset Quotes brd
269 \end_inset
270
271  (LuaTeX).
272  See the document preamble for an example.
273 \end_layout
274
275 \begin_layout Standard
276
277 \lang english
278 Then, the following should work:
279 \end_layout
280
281 \begin_layout Enumerate
282 Japanese text, of course: \SpecialChar LyX
283 は優秀な取扱説明書を同梱していますので、これをお使いください!まずは
284 \family sans
285 ヘルプ\SpecialChar menuseparator
286 はじめの一歩
287 \family default
288 から始めてください。これは、各取扱説明書を簡潔に紹介しています。つぎに
289 \family sans
290 ヘルプ\SpecialChar menuseparator
291 入門篇
292 \family default
293 をお読みになれば、\SpecialChar LyX
294 の使い方を学ぶことができます。
295 \end_layout
296
297 \begin_layout Enumerate
298 Short texts may be written without setting the language (hyphenation will
299  be missing and spell-checking complain): Greetings; Grüße; Приветы; χαιρετισμός
300 \end_layout
301
302 \begin_layout Enumerate
303 For longer text parts, it is recommended to set the correct language:
304 \end_layout
305
306 \begin_deeper
307 \begin_layout Description
308
309 \lang english
310 English: Hello Mr.
311  Sandman!
312 \end_layout
313
314 \begin_layout Description
315
316 \lang ngerman
317 Deutsch: Grüße aus Österreich!
318 \end_layout
319
320 \begin_layout Description
321
322 \lang ngerman
323 Griechisch:
324 \lang greek
325  χαιρετισμός!
326 \end_layout
327
328 \begin_layout Description
329
330 \lang ngerman
331 Russisch:
332 \lang russian
333  Привет с 
334 \series bold
335 новым
336 \series default
337  годом!
338 \end_layout
339
340 \end_deeper
341 \begin_layout Enumerate
342
343 \lang english
344 Japanese characters, e.g., 介 し
345 \family sans
346  門
347 \family default
348 , may also be used in text parts set to other languages.
349 \end_layout
350
351 \begin_layout Enumerate
352
353 \lang english
354 Ruby (ルビ, furigana) with the help of the Ruby module:
355 \lang japanese-cjk
356  
357 \begin_inset Flex Ruby
358 status collapsed
359
360 \begin_layout Plain Layout
361 東 京
362 \begin_inset Argument post:1
363 status open
364
365 \begin_layout Plain Layout
366 とう きょう
367 \end_layout
368
369 \end_inset
370
371
372 \end_layout
373
374 \end_inset
375
376
377 \end_layout
378
379 \begin_deeper
380 \begin_layout Itemize
381
382 \lang english
383 Select D
384 \family sans
385 ocument\SpecialChar menuseparator
386 Settings\SpecialChar menuseparator
387 Modules\SpecialChar menuseparator
388 Annotation&Revision\SpecialChar menuseparator
389 Ruby
390 \family default
391 .
392 \end_layout
393
394 \begin_layout Itemize
395
396 \lang english
397 Select 
398 \family sans
399 Edit\SpecialChar menuseparator
400 Custom Text Styles\SpecialChar menuseparator
401 Ruby
402 \family default
403  for the base character(s).
404 \end_layout
405
406 \begin_layout Itemize
407
408 \lang english
409 Select 
410 \family sans
411 Insert\SpecialChar menuseparator
412 Ruby text
413 \family default
414  for the reading aid.
415 \end_layout
416
417 \end_deeper
418 \end_body
419 \end_document