我想在章节前面添加一个日文字符。但是显示错误,拉丁字母和数字都可以。
\documentclass{book}
\usepackage{CJKutf8} %for japanese characters
\begin{document}
\begingroup
\renewcommand\thechapter{\begin{CJK}{UTF8}{min}
的 % character to appear before the chapter title
\end{CJK}}
\titleformat{\chapter}[display] %error here: Undefined control sequence. Argument of
%\@xdblarg has an extra }.
{\normalfont\huge\bfseries}{}{20pt}{\Huge}
\chapter{Introduction}
\endgroup
\end{document}
我想要的输出是
答案1
把事情简单化。
\documentclass{book}
\usepackage{CJKutf8} %for japanese characters
\usepackage{lipsum} % let's show the headers
\NewDocumentCommand{\nihonchars}{m}{\begin{CJK}{UTF8}{min}#1\end{CJK}}
\begin{document}
\tableofcontents
\chapter*{\nihonchars{的} Introduction}
\markboth{\nihonchars{的} \MakeUppercase{Introduction}}
{\nihonchars{的} \MakeUppercase{Introduction}}
\addcontentsline{toc}{chapter}{\nihonchars{的} Introduction}
\lipsum
\end{document}