From 7e120159fc7e92584ee581996bc2048068418d0d Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnter=20Milde?= Date: Wed, 30 Jan 2019 15:43:11 +0100 Subject: [PATCH] ctests: Update Chinese report example. --- autotests/export/latex/CJK/zh_CN-toc.lyx | 80 ++++++++++++++++++++---- development/autotests/invertedTests | 1 + development/autotests/unreliableTests | 3 +- development/autotests/useSystemFonts.pl | 5 -- 4 files changed, 72 insertions(+), 17 deletions(-) diff --git a/autotests/export/latex/CJK/zh_CN-toc.lyx b/autotests/export/latex/CJK/zh_CN-toc.lyx index ceec322188..e9f7f8d282 100644 --- a/autotests/export/latex/CJK/zh_CN-toc.lyx +++ b/autotests/export/latex/CJK/zh_CN-toc.lyx @@ -6,7 +6,11 @@ \origin unavailable \textclass report \begin_preamble - +% Chinese localization +\@ifpackageloaded{fontspec}% +{\usepackage{ctex}}% ctex with non-TeX fonts +{%\usepackage[UTF8]{ctex}% error with font setup (missing font?) +} \end_preamble \use_default_options false \maintain_unincluded_children false @@ -14,12 +18,12 @@ \language_package default \inputencoding utf8-cjk \fontencoding auto -\font_roman "lmodern" "WenQuanYi Micro Hei" -\font_sans "default" "WenQuanYi Micro Hei" -\font_typewriter "default" "WenQuanYi Micro Hei Mono" +\font_roman "lmodern" "default" +\font_sans "default" "default" +\font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default -\use_non_tex_fonts false +\use_non_tex_fonts true \font_sc false \font_osf false \font_sf_scale 100 100 @@ -28,7 +32,7 @@ \use_microtype false \use_dash_ligatures false \graphics default -\default_output_format pdf2 +\default_output_format default \output_sync 0 \bibtex_command default \index_command default @@ -111,7 +115,8 @@ This is a Chinese test document for \SpecialChar LyX with the CJK package. \end_layout -\begin_layout Standard +\begin_layout Itemize +\noindent The \emph on Table of Contents @@ -124,10 +129,44 @@ Contents \begin_inset Quotes erd \end_inset - in the PDF. + with PDF (pdflatex). + This is fixed with +\begin_inset Quotes eld +\end_inset + +non-TeX fonts +\begin_inset Quotes erd +\end_inset + + by use of the +\begin_inset Quotes eld +\end_inset + +ctex +\begin_inset Quotes erd +\end_inset + + package (see preamble). \end_layout -\begin_layout Standard +\begin_layout Itemize +The prefix +\emph on +Chapter +\emph default + in the chapter heading is not translated — not even with +\begin_inset Quotes eld +\end_inset + +ctex +\begin_inset Quotes erd +\end_inset + +. +\end_layout + +\begin_layout Itemize +\noindent Without a \backslash clearpage before closing the @@ -141,19 +180,38 @@ CJK environment, Chinese characters in a section title lead to errors like \end_layout +\begin_deeper \begin_layout LyX-Code +\noindent ! Package inputenc Error: Unicode char 中 (U+4E2D) \end_layout \begin_layout LyX-Code +\noindent (inputenc) not set up for use with LaTeX. \end_layout \begin_layout Standard +\paragraph_spacing single +\noindent (cf. - https://www.lyx.org/trac/ticket/5386). + Test document for part +\begin_inset space ~ +\end_inset + +2 of +\begin_inset CommandInset href +LatexCommand href +name "#5386" +target "https://www.lyx.org/trac/ticket/5386" +literal "false" + +\end_inset + +). \end_layout +\end_deeper \begin_layout Section Section in English \end_layout @@ -163,7 +221,7 @@ This section head is in English. \end_layout \begin_layout Section -Secition in Chinese 中文名 +Section in Chinese 中文名 \end_layout \begin_layout Standard diff --git a/development/autotests/invertedTests b/development/autotests/invertedTests index 209693fa05..225f766a0e 100644 --- a/development/autotests/invertedTests +++ b/development/autotests/invertedTests @@ -296,6 +296,7 @@ export/examples/ar/splash_pdf4_texF # CJKutf8 does not work with XeTeX and LuaTeX (and 8-bit fonts) export/examples/ja/multilingual_.*_texF +export/export/latex/CJK/zh_CN-toc_.*_texF # ================================================ diff --git a/development/autotests/unreliableTests b/development/autotests/unreliableTests index 9376be7e91..9e5cf7d873 100644 --- a/development/autotests/unreliableTests +++ b/development/autotests/unreliableTests @@ -124,7 +124,8 @@ export/templates/acmart_pdf export/examples/ja/multilingual_lyx.* # No localization of auto-strings with Chinese language under 8-bit TeX -# (ctex font issue with texlive-lang-chinese (from Debian) under pdflatex): +# (ctex font issue with texlive-lang-chinese (from Debian) under pdflatex) +# and only partial localization with non-tex-fonts: export/export/latex/CJK/zh_CN-toc.* export/doc/zh_CN/(Intro|Tutorial)_(dvi|pdf).? diff --git a/development/autotests/useSystemFonts.pl b/development/autotests/useSystemFonts.pl index 2cc71a5aa6..502e0712c8 100644 --- a/development/autotests/useSystemFonts.pl +++ b/development/autotests/useSystemFonts.pl @@ -101,11 +101,6 @@ if ($fontT eq "systemF") { $font{sans} = "FreeFarsi"; $font{typewriter} = "FreeFarsi Monospace"; } - elsif ($lang eq "zh_CN") { - $font{roman} = "WenQuanYi Micro Hei"; - $font{sans} = "WenQuanYi Micro Hei"; - $font{typewriter} = "WenQuanYi Micro Hei"; - } elsif ($lang eq "ko" ) { $font{roman} = "NanumGothic"; # NanumMyeongjo, NanumGothic Eco, NanumGothicCoding $font{sans} = "NanumGothic"; -- 2.39.5