mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-17 10:07:27 +00:00
de5e348727
Actually, the test case showed several problems: - ERT insets did use layout "Standard", not "Plain Layout" - The font scale was read correctly, but tex2lyx claimed that it did ignore the option "scaled=0.95" - If a third argument of the CJK environment was given, it caused the whole environment to be put in ERT with a broken encoding. This is now fixed for the bug test case by using the \font_cjk header variable, but the encoding problem still exists for unsupported encodings. I'll file a separate bug for that. - The CJKutf8 package was not handled in the preamble parsing. Therefore the chinese comment in the preamble was read with a wrong encoding, and guessing the document language did not work. The new file CJKutf8.tex was created by copying and modifying CJK.tex, but unfortunately it is impossible to tell git to inherit the history of CJK.tex for the new file (search the web for git svn copy if you want to know details).
40 lines
934 B
TeX
40 lines
934 B
TeX
\documentclass[english]{article}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{CJKutf8}
|
|
\usepackage{babel}
|
|
|
|
% It is impossible to get the document language because the document could start with a command,
|
|
% whitespace, and English word or whatever and the rest is in Japanese. Checking for the first CJK
|
|
% environment is no solution because the document could be English and contain only some Japanese.
|
|
|
|
\begin{document}
|
|
|
|
\begin{CJK}{UTF8}{}%
|
|
Japanese \end{CJK} \begin{CJK}{UTF8}{}Chinese traditional\end{CJK} \begin{CJK}{UTF8}{}
|
|
Japanese \end{CJK}
|
|
hello
|
|
\begin{CJK}{UTF8}{}%
|
|
Chinese simplified \end{CJK}\begin{CJK}{UTF8}{hei} Japanese \end{CJK} \begin{CJK}{UTF8}{}Chinese simplified
|
|
\end{CJK}
|
|
|
|
\begin{CJK}{UTF8}{}
|
|
Big5 文鼎楷書
|
|
\end{CJK}
|
|
|
|
\inputencoding{latin9}%
|
|
\selectlanguage{english}%
|
|
English
|
|
|
|
\begin{CJK}{UTF8}{}
|
|
日本語の文章
|
|
\end{CJK}
|
|
|
|
hello
|
|
|
|
\begin{CJK}{UTF8}{}%
|
|
Korean
|
|
\end{CJK}
|
|
|
|
\end{document}
|