]> git.lyx.org Git - features.git/commitdiff
Add example for mulit-lingual Japanese document with CJKutf8.
authorGünter Milde <milde@lyx.org>
Tue, 22 Jan 2019 15:06:37 +0000 (16:06 +0100)
committerGünter Milde <milde@lyx.org>
Tue, 22 Jan 2019 15:06:37 +0000 (16:06 +0100)
development/autotests/ignoredTests
development/autotests/invertedTests
development/autotests/unreliableTests
lib/examples/ja/multilingual.lyx [new file with mode: 0644]

index 69956951e77fbc6bfc515c707aa089d32418834f..7f7b674d49599d6a61348fcebe16223974d48ac3 100644 (file)
@@ -63,14 +63,16 @@ export/.*/zh_CN/.*texF
 # For a discussion of alternatives for Japanese with LaTeX , see also
 # http://www.preining.info/blog/2014/12/writing-japanese-in-latex-part-1-introduction/
 #
-# Exception: ja knitr.lyx and sweave.lyx support only XeLaTeX with system fonts
-# because they use the "bxjsarticle" class.
-#
+# Exceptions: 
+# * Japanese knitr.lyx and sweave.lyx support only XeLaTeX
+#   with system fonts because they use the "bxjsarticle" class.
+# * examples/multilingual.lyx uses "Japanese (CJK)"
 # The "!" means the following:
 #   "Protect these tests from being matched by future patterns in this file".
 !export/.*/ja/(knitr|sweave).*_(lyx.*|xhtml|pdf4_systemF)
 export/.*/ja/(knitr|sweave).*
 #
+!export/.*/ja/multilingual.*
 export/.*/ja/.*_(pdf[245]|dvi3).*
 
 # export of minted documents to 2.2.x is not guaranteed to work (and currently
index 584db9994f788e8c67b627a1f919b56f95ff4995..5b9f41a2ff77eed61eb70dac53494af267366778 100644 (file)
@@ -60,7 +60,6 @@ export/export/latex/iconv-error-nomenclature_pdf2
 check_load/templates/acmart
 export/templates/acmart_lyx23
 
-
 # Failing LyX2LyX conversions for old versions: 
 #
 # "beamer" lyx2lyx fails sometimes for versions < 2.1
@@ -79,6 +78,12 @@ export/examples/(|es/)modernCV_lyx(16|20)
 # (similar to the Greek font encoding LGR).
 export/export/latex/fa-OT1_pdf2
 
+# No "system font" (fontspec) setup for multiple scripts (Japanese+Latin+Greek)
+# -> Missing character (Greek letter omikron with tonos),
+#    suboptimal character spacing in non-Japanese text parts.
+export/examples/ja/multilingual_.*_systemF
+
+
 # input encoding tests
 # --------------------
 # Please test and correct!
@@ -286,6 +291,9 @@ export/templates/es_beamer-conference-ornate-20min_pdf4_texF
 export/examples/ar/splash_(dvi.*|pdf|pdf[^4].*)
 export/examples/ar/splash_pdf4_texF
 
+# CJKutf8 does not work with XeTeX and LuaTeX (and 8-bit fonts)
+export/examples/ja/multilingual_.*_texF
+
 
 # ================================================
 Sublabel: externalissues
index 2e89bb4288495d9feaab60cf1734eb83aacbbb58..f23fc01b86ec58b2a003c9e790017c200f2062a8 100644 (file)
@@ -67,6 +67,9 @@ export/examples/(|fr/)seminar_(dvi|pdf).*
 # See also #9744 allow parallel configuration of TeX and non-TeX fonts.
 export/templates/acmart_pdf[45]_texF
 
+# "UnicodeDecodeError" with Python 2
+export/examples/ja/multilingual_lyx.*
+
 
 Sublabel: wrong_output
 ######################
diff --git a/lib/examples/ja/multilingual.lyx b/lib/examples/ja/multilingual.lyx
new file mode 100644 (file)
index 0000000..ecafcbd
--- /dev/null
@@ -0,0 +1,261 @@
+#LyX 2.4 created this file. For more info see https://www.lyx.org/
+\lyxformat 566
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin /systemlyxdir/examples/ja/
+\textclass article
+\begin_preamble
+% CJKutf8 (4.8.4) maps the Greek letter mu to a mathematical (italic)
+% symbol $\mu$ unless the package "textcomp" is loaded.
+\usepackage{textcomp}
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language japanese-cjk
+\language_package auto
+\inputencoding utf8-cjk
+\fontencoding auto
+\font_roman "DejaVuSerif" "IPAMincho"
+\font_sans "default" "IPAGothic"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\font_cjk min
+\use_microtype false
+\use_dash_ligatures false
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement class
+\float_alignment class
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry false
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 0
+\use_minted 0
+\index 索引
+\shortcut idx
+\color #008000
+\end_index
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style cjk
+\dynamic_quotes 1
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Title
+
+\lang english
+Multilingual typesetting with CJKutf8
+\end_layout
+
+\begin_layout Date
+\begin_inset Info
+type  "moddate"
+arg   "long"
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\lang english
+For multi-lingual documents, with parts in European languages, you can use
+ the CJK LaTeX bundle:
+\end_layout
+
+\begin_layout Itemize
+
+\lang english
+Set a standard document classe (the document classes starting with 
+\begin_inset Quotes bld
+\end_inset
+
+Japanese
+\begin_inset Quotes brd
+\end_inset
+
+ use platex).
+\end_layout
+
+\begin_layout Itemize
+
+\lang english
+Set the language to 
+\begin_inset Quotes bld
+\end_inset
+
+Japanese (CJK)
+\begin_inset Quotes brd
+\end_inset
+
+ and the encoding to 
+\begin_inset Quotes bld
+\end_inset
+
+Unicode (CJK) (utf8)
+\begin_inset Quotes brd
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Itemize
+
+\lang english
+Some fonts are substituted with fallback 
+\begin_inset Quotes bld
+\end_inset
+
+CM roman regular
+\begin_inset Quotes brd
+\end_inset
+
+ (
+\emph on
+DejaVu
+\emph default
+ and 
+\emph on
+Libertine
+\emph default
+ work).
+\end_layout
+
+\begin_layout Standard
+
+\lang english
+Then, the following should work:
+\end_layout
+
+\begin_layout Enumerate
+\SpecialChar LyX
+は優秀な取扱説明書を同梱していますので、これをお使いください!まずは
+\family sans
+ヘルプ\SpecialChar menuseparator
+はじめの一歩
+\family default
+から始めてください。これは、各取扱説明書を簡潔に紹介しています。つぎに
+\family sans
+ヘルプ\SpecialChar menuseparator
+入門篇
+\family default
+をお読みになれば、\SpecialChar LyX
+の使い方を学ぶことができます。
+\end_layout
+
+\begin_layout Enumerate
+Short texts may be written without setting the language (hyphenation will
+ be missing and spell-checking complain): Greetings; Grüße; Приветы; χαιρετισμός
+\lang greek
+
+\begin_inset Foot
+status open
+
+\begin_layout Plain Layout
+
+\lang english
+CJKutf8 (4.8.4) maps the Greek letter 
+\lang greek
+\lang english
+ to a mathematical (italic) symbol 
+\begin_inset Formula $\mu$
+\end_inset
+
+ unless the package 
+\family typewriter
+textcomp
+\family default
+ is loaded.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+For longer text parts, it is recommended to set the correct language:
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+
+\lang english
+English: Hello Mr.
+ Sandman!
+\end_layout
+
+\begin_layout Description
+
+\lang ngerman
+Deutsch: Grüße aus Österreich!
+\end_layout
+
+\begin_layout Description
+
+\lang ngerman
+Griechisch:
+\lang greek
+ χαιρετισμός
+\end_layout
+
+\begin_layout Description
+
+\lang ngerman
+Russisch:
+\lang russian
+ Привет с 
+\series bold
+новым
+\series default
+ годом!
+\end_layout
+
+\end_deeper
+\end_body
+\end_document