https://tex.stackexchange.com/questions/17611/how-does-one-type-chinese-in-latex
TODO: use "ctex" if the document language is Chinese.
Remove "\clearpage" workaround from documents
(not required after fix for #5386 in [
5ebc0b3f432f468/lyxgit]).
# the name of the day in English instead of Japanese.
export/examples/ja/multilingual_lyx.*
-# No localization of auto-strings with Chinese language (LyXHTML is OK)
+# No localization of auto-strings with Chinese language under 8-bit TeX
+# (ctex font issue with texlive-lang-chinese (from Debian) under pdflatex):
export/export/latex/CJK/zh_CN-toc.*
-export/doc/zh_CN/(Intro|Tutorial)_(dvi|pdf).*
+export/doc/zh_CN/(Intro|Tutorial)_(dvi|pdf).?
# Missing Chinese characters in the DVI (LuaTex)
export/doc/zh_CN/(Intro|Tutorial)_dvi3_systemF
\origin /systemlyxdir/doc/zh_CN/
\textclass article
\begin_preamble
-\usepackage{ifxetex}
-\ifxetex
-\usepackage{xeCJK}
-\fi
-
-% proper line breaking, punctuation kerning and font switching
-% features with LuaTeX
-% see https://tex.stackexchange.com/questions/222980/how-to-use-chinese-with-lualatex
-\usepackage{ifluatex}
-\ifluatex
- \usepackage{luatexja-fontspec}
- \setmainjfont[Mapping=tex-text]{WenQuanYi Micro Hei}
- \setsansjfont[Mapping=tex-text]{WenQuanYi Micro Hei}
-\fi
+% 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 true
\maintain_unincluded_children false
无论你修改文档的想法是什么,只要它能够改善文档质量,我们都是乐于接受的。
\end_layout
-\begin_layout Standard
-\begin_inset Note Note
-status open
-
-\begin_layout Plain Layout
-The following clearpage is required to avoid compilation errors at some
- installations for an unknown reason.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Newpage clearpage
-\end_inset
-
-
-\end_layout
-
\end_body
\end_document
\origin /systemlyxdir/doc/zh_CN/
\textclass book
\begin_preamble
-%\usepackage{fontspec}
-%\setromanfont{AR PL ShanHeiSun Uni}%字体来自Adobe Reader 8.0 OpenType,可以选用任何系统已有的字体
-%中文断行
-%\XeTeXlinebreaklocale "zh"
-%\XeTeXlinebreakskip = 0pt plus 1pt
-\usepackage{ifxetex}
-\ifxetex
- \usepackage{xeCJK}
- %\setCJKmainfont{WenQuanYi Micro Hei}
- %\setCJKmonofont{WenQuanYi Micro Hei Mono}
-\fi
-
-% proper line breaking, punctuation kerning and font switching
-% features with LuaTeX
-% see https://tex.stackexchange.com/questions/222980/how-to-use-chinese-with-lualatex
-\usepackage{ifluatex}
-\ifluatex
- \usepackage{luatexja-fontspec}
- \setmainjfont[Mapping=tex-text]{WenQuanYi Micro Hei}
- \setsansjfont[Mapping=tex-text]{WenQuanYi Micro Hei}
-\fi
+% Chinese localization
+\@ifpackageloaded{fontspec}%
+{\usepackage{ctex}}% ctex with non-TeX fonts
+{%\usepackage[UTF8]{ctex}% error with font setup (missing font?)
+}
\end_preamble
\options cjk
\use_default_options true
错误信息。
\end_layout
-\begin_layout Standard
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-clearpage
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
\end_body
\end_document