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