]> git.lyx.org Git - lyx.git/commitdiff
ctests: update Korean tests, add "language default" test including Chinese.
authorGünter Milde <milde@lyx.org>
Sun, 3 Feb 2019 21:16:35 +0000 (22:16 +0100)
committerGünter Milde <milde@lyx.org>
Tue, 5 Feb 2019 10:24:53 +0000 (11:24 +0100)
Set suitable non-TeX fonts in the test document.
Use "kotex" language package.

autotests/export/latex/CJK/en-de-el-ru-zh_CN_language-default.lyx [new file with mode: 0644]
autotests/export/latex/CJK/ko_default.lyx
development/autotests/useSystemFonts.pl
lib/examples/ko/splash.lyx

diff --git a/autotests/export/latex/CJK/en-de-el-ru-zh_CN_language-default.lyx b/autotests/export/latex/CJK/en-de-el-ru-zh_CN_language-default.lyx
new file mode 100644 (file)
index 0000000..44de5fb
--- /dev/null
@@ -0,0 +1,205 @@
+#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 unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding auto
+\font_roman "libertine" "default"
+\font_sans "default" "default"
+\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 gbsn
+\use_microtype false
+\use_dash_ligatures true
+\graphics default
+\default_output_format pdf2
+\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 1
+\use_minted 0
+\index 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 english
+\dynamic_quotes 0
+\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 Standard
+For multi-lingual document, with parts in European languages and parts in
+ Chinese, Korean, or Japanese, you can use the CJK LaTeX bundle.
+\end_layout
+
+\begin_layout Enumerate
+The main language of this document is English.
+\end_layout
+
+\begin_layout Enumerate
+Set Language>Encoding to 
+\begin_inset Quotes eld
+\end_inset
+
+utf8-cjk
+\begin_inset Quotes erd
+\end_inset
+
+ and Fonts>CJK to 
+\begin_inset Quotes eld
+\end_inset
+
+gbsn
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+gkai
+\begin_inset Quotes erd
+\end_inset
+
+.
+\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; Приветы; χαιρετισμός.
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+However, this does not work for CJK characters (unless they are from the
+ main document language) 
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+迎接
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+For longer text parts, it is recommended to set the correct language, for
+ CJK languages this is required:
+\end_layout
+
+\begin_deeper
+\begin_layout Description
+
+\lang chinese-simplified
+Chinesisch: 就是说我们都已经习惯于关心字符排版的细枝末节,几乎所有的字处理软件也都是这种理念。人们还在使用 Tab 键创建空白;你还需要关心什么东西
+应该出现在页面上的什么位置;强调某处文本就是改变一下字体
+\end_layout
+
+\begin_layout Description
+English: Greetings from Österreich 5
+\begin_inset space ~
+\end_inset
+
+µm snow.
+\end_layout
+
+\begin_layout Description
+
+\lang ngerman
+Griechisch:
+\lang greek
+ Η 
+\series bold
+Ελλάδα
+\series default
+ (στην καθαρεύουσα Ελλάς), συνταγματικό όνομα Ελληνική Δημοκρατία, είναι
+ χώρα της νοτιοανατολικής Ευρώπης στο νοτιότερο άκρο της Βαλκανικής χερσονήσου.
+\end_layout
+
+\begin_layout Description
+
+\lang ngerman
+Russisch:
+\lang russian
+ Привет с 
+\series bold
+новым
+\series default
+ годом! У нас эсть 5
+\begin_inset space ~
+\end_inset
+
+µm Снег.
+\end_layout
+
+\begin_layout Description
+
+\lang ngerman
+Deutsch: Grüße aus Österreich 5
+\begin_inset space ~
+\end_inset
+
+µm Schnee.
+\end_layout
+
+\end_deeper
+\end_body
+\end_document
index 16c5b29d191c7128356bc5c2d1d7df86f22e272f..c6a767a48d35bd933cf0c09dc4569a5d487c077b 100644 (file)
@@ -11,9 +11,9 @@
 \language_package default
 \inputencoding auto
 \fontencoding default
-\font_roman "default" "NanumMyeongjo"
-\font_sans "default" "NanumGothic"
-\font_typewriter "default" "NanumGothicCoding"
+\font_roman "default" "UnBatang"
+\font_sans "default" "UnJamoNovel"
+\font_typewriter "default" "default"
 \font_math "auto" "auto"
 \font_default_family default
 \use_non_tex_fonts false
 \paragraph_indentation default
 \is_math_indent 0
 \math_numbering_side default
-\quotes_style english
+\quotes_style cjkangle
 \dynamic_quotes 0
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
+\bullet 0 0 9 -1
 \tracking_changes false
 \output_changes false
 \html_math_output 0
@@ -97,7 +98,66 @@ LyX 는 훌륭한 문서를 동반합니다 - 사용하세요!
 자습서
 \family default
 를 통해 LyX 사용법을 익히세요.
+\end_layout
+
+\begin_layout Itemize
+The CJK default font for Korean (mj) works with CJKutf8 but fails with the
  
+\begin_inset Quotes eld
+\end_inset
+
+KS
+\begin_inset Quotes erd
+\end_inset
+
+ legacy input encoding (Debian/stable with TeXLive17).
+\end_layout
+
+\begin_layout Itemize
+The Debian documentation for the 
+\begin_inset Quotes eld
+\end_inset
+
+latex-cjk-common
+\begin_inset Quotes erd
+\end_inset
+
+ package (/usr/share/doc/latex-cjk-common/examples/KS.tex ) tells:
+\end_layout
+
+\begin_deeper
+\begin_layout Quote
+% ko.tex-extra
+\end_layout
+
+\begin_layout Quote
+% Works: ph bm jsr jmj jnv sh pg yt gs pn
+\end_layout
+
+\begin_layout Quote
+% ko.tex-extra-hlfont
+\end_layout
+
+\begin_layout Quote
+% Does not work: dn [tries outdn* Unicode fonts, fails] pga [tries outpga*
+ Unicode fonts, fails]
+\end_layout
+
+\begin_layout Quote
+% Standard
+\end_layout
+
+\begin_layout Quote
+% Does not work: mj gt [do not seem to be packaged anymore]
+\end_layout
+
+\begin_layout Standard
+However, also the ko.tex-extra fonts fail here (with Debian/stretch).
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+Recommendation: Make utf8 the default language encoding for Korean!
 \end_layout
 
 \end_body
index 502e0712c88cc8707b17c297c1a821c8bf4a6e89..eca4508d2725a78d692788eb15ca63b8876f9d3c 100644 (file)
@@ -6,8 +6,8 @@
 # 2.) While copying,
 #   2a.) searches for relative references to files and
 #        replaces them with absolute ones
-#   2b.) In order to be able to compile with luatex or xetex
-#        changes default fonts to use non-tex-fonts instead
+#   2b.) Changes default fonts to use non-tex-fonts
+#   2c.) Changes the non-tex fonts setting if it is "default" (see below).
 #
 # Syntax: perl useSystemFonts.pl sourceFile destFile format
 # Each param represents a path to a file
@@ -101,11 +101,11 @@ if ($fontT eq "systemF") {
     $font{sans} = "FreeFarsi";
     $font{typewriter} = "FreeFarsi Monospace";
   }
-  elsif ($lang eq "ko" ) {
-    $font{roman} = "NanumGothic"; # NanumMyeongjo, NanumGothic Eco, NanumGothicCoding
-    $font{sans} = "NanumGothic";
-    $font{typewriter} = "NanumGothic";
-  }
+  elsif ($lang eq "ko" ) {
+    $font{roman} = "NanumGothic"; # NanumMyeongjo, NanumGothic Eco, NanumGothicCoding
+    $font{sans} = "NanumGothic";
+    $font{typewriter} = "NanumGothic";
+  }
   elsif ($lang eq "ar" ) {
     # available in 'fonts-sil-scheherazade' package
     $font{roman} = "Scheherazade";
index 7506f0ace2ac5eb9536904403b9ee541b537a6c5..79cb89eb2651a775acf1e09cf4546434b02b7eb3 100644 (file)
@@ -5,15 +5,18 @@
 \save_transient_properties true
 \origin /systemlyxdir/examples/ko/
 \textclass article
+\begin_preamble
+\usepackage[cjk,hangul]{kotex}
+\end_preamble
 \use_default_options false
 \maintain_unincluded_children false
 \language korean
 \language_package default
 \inputencoding utf8-cjk
-\fontencoding OT1
-\font_roman "default" "Noto Serif CJK KR"
-\font_sans "default" "Noto Sans CJK KR"
-\font_typewriter "default" "Noto Sans Mono CJK KR"
+\fontencoding global
+\font_roman "lmodern" "UnJamoBatang"
+\font_sans "default" "UnJamoNovel"
+\font_typewriter "default" "UnTaza"
 \font_math "auto" "auto"
 \font_default_family default
 \use_non_tex_fonts false
@@ -171,7 +174,7 @@ arg   "buffer-view"
  장을 읽어주세요.
  (해당되지 않는 모든 사람들: 걱정 마시압, \SpecialChar LyX
  사용을 위해 \SpecialChar LaTeX
-를 꼭 알아야할 필요는 없습니다.) 
+를 꼭 알아야할 필요는 없습니다.)
 \end_layout
 
 \begin_layout Enumerate
@@ -247,13 +250,13 @@ For example on the Linux distributions
 \family sans
 Debian
 \family default
- the package name for the German language is 
+ the package name for the Korean language is 
 \begin_inset Quotes eld
 \end_inset
 
 
 \family typewriter
-texlive-lang-german
+texlive-lang-korean
 \family default
 
 \begin_inset Quotes erd