To quote a dictum in Chinese in a new page before my thesis in English, I would like to combine the answers to the two post Add a quote to a blank page centered and How does one type Chinese in LaTeX?. I have used \documentclass{report}
, and just want to typeset only a few Chinese charecter. I chose xeCJK with XeLaTeX. My code is as follows. When I compile it, it gives me some errors:
you should not be loading the inputenc package
XeTeX expects the source to be in UTF8 encoding
some features of other encodings may conflict, resulting in poor output.
! Missing $ inserted.
Could somebody help me out. I have been struggling against this problem for a long time. Please note that in this example I include all the necessary characters of concern, such as a bold dot between 语文 and 长城.
\documentclass[12pt,a4paper,twoside]{report}
\usepackage[latin1]{inputenc}
\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\usepackage{lmodern}%for quote page
\newlength\longest
\begin{document}
\clearpage
\thispagestyle{empty}
\null\vfill
\settowidth\longest{\huge 我正在认真学习的中文。}
\centering
\parbox{\longest}{%
\raggedright{\huge%
我正在认真学习的中文。\\
北京;\\
彩虹;\\
柔中带刚。 \par\bigskip
}
\raggedleft\Large 《语文$\bm{\cdot}$长城》 \par%
}
\vfill\vfill
\clearpage
\end{document}
\usepackage[latin1]{inputenc}
, the engine already expects UTF8. Actually, as the error message says you "should not" load inputenc.standalone
, producing a cropped PDF file and including it as graphics.