2

I am using xelatex and want to use the xeCJK package, but without indenting the first paragraph of a section. I tried the setup directive below, which should do the trick. But it does not. The manual is in Chinese ...

\documentclass{article}


\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\xeCJKsetup{indentfirst=false}


\begin{document}

\section{Section 1}

I want to have a paragrpah without indentation.

This one should be indented.

\subsection{Section 2}

Same here.

This one should be indented.


\end{document} 
4

In the log file you find this warning:

*************************************************
* xeCJK warning: "option-invalid"
* 
* The `indentfirst' option only can be set in the optional argument to the
* \usepackage command when xeCJK is being loaded.
* 
* Please do not set it via the \xeCJKsetup command.
*************************************************

which is self-explanatory: do

\usepackage[indentfirst=false]{xeCJK}

Be warned that languages loaded with Polyglossia may revert the setting (Italian, for instance).

3

Thanks for the answer! I got into the same problem. Because there is something different now, I put the new situation here. In the new package, it gives the new warning as follow.

*************************************************
* xeCJK warning: "option-deprecated"
*
* The `indentfirst' option is deprecated.
* You may load the package `indentfirst' after xeCJK to use its function.
*
*************************************************

So the setting should be changed. Now, it suggests using the indentfirst package instead of the setting in xeCJK. The following code is advised now.

\usepackage{xeCJK}
\usepackage{indentfirst}
\setlength{\parindent}{2em}  % setting the indentation to be two Chinese characters size.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.