This minimal example of how to use the CJK package, as instructed here works perfectly on my system:
\documentclass{article}
\usepackage{CJK}
\begin{document}
\begin{CJK}{UTF8}{gbsn}
你好
You can mix latin letters and chinese.
\end{CJK}
\end{document}
However, as I inserted the part with \begin{CJK}{UTF8}{gbsn}
and \end{CJK}
with a short sentence in Chinese in between to my document, the compiler (pdflatex) complained and threw a bunch of Undefined control sequence....
errors pointing to the line right after \end{CJK}
.
The document I'm working on is a slightly tweaked version of classicthesis
(supported by arsclassica
). Most of the content are in French, so I included some more packages (mostly to have guillmets « » and the spacing between the colon, question mark and exclamation mark to be correct.
The packages included with their options are:
\usepackage [%eulerchapternumbers,%eulermath,drafting,
listings,listsseparated,beramono,pdfspacing,%listings,
subfig,parts,dottedtoc]{classicthesis}
\usepackage[french]{arsclassica}
\usepackage[left=3.5cm,right=2.5cm,top=2.5cm,bottom=2cm,includefoot]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[american,french]{babel}
%For French quotation:
\usepackage[french=guillemets]{csquotes}
%For a few chinese words:
\usepackage{CJK}
\begin{document}
\raggedbottom
\selectlanguage{french}
des langues étrangères appliquées et d'effectuer le travail à l'hôtel...
Bien que j'aie rencontré des difficultés car ce sont mes...
\begin{CJK}{UTF8}{gbsn}
文章
\end{CJK}
des langues étrangères appliquées et d'effectuer le travail à l'hôtel...
\end{document}
Error: Undefined control sequence. des langues é
Undefined control sequence. des langues étrangè
EDIT: if the whole content is only in English (i.e. no character with accent á è é à... ) then it compiles without problem. Before CJK environment starts the compiling is all find, but right after the CJK
environment ends, the compiler starts to complain about the French characters with accent:
(in my "complete" version, it did not even export the output -- perhaps it stopped after too many errors)
So I guess the reason is behind the documentclass which classicthesis is based on, or some other settings with the font etc., but I don't know to to fix this. How do I change the options of the included packages or change the .sty files to include a Chinese sentence between the French content?