I'm writing my thesis in Chinese with xeLaTeX and I've to format the chapter name and section name.

The following command works ok:


except that I still need to add Chinese punctuation after the number. e.g

 (一) 第一节

the compiler would complain ! Missing number, treated as zero. if I did so:


Any ideas to work around this ?





I'm able to get chapter name to work now but section number turns out to be (.1 一) instead of (一)

  • 1
    I guess that \CJKnumber{\thechapter}、 should do. – egreg Apr 23 '13 at 8:02
  • @egreg yes it works. would you please elaborate your answer below? How about the section name? – manuzhang Apr 23 '13 at 10:01

The command \CJKnumber has an argument that should expand to a number, so that it can be converted to the Chinese system.

Thus \CJKnumber{1} is legal, as it is \CJKnumber{\thechapter}: the whole lot is "the number".

Since you want the punctuation mark after the number, the construction


is what you're looking for.

You probably want something like this:


  (\CJKnumber{\arabic{chapter}}、 %


enter image description here

  • another issue is to replace section number like 1.1 with (一),what I get with (\CJKnumber{\thesection}) is (.1 一) – manuzhang Apr 23 '13 at 12:11
  • @manuzhang Please, add a minimal example to your question starting with \documentclass and ending with \end{document} so it's possible to play with it. – egreg Apr 23 '13 at 12:21
  • Updated my question – manuzhang Apr 23 '13 at 12:57
  • what does \arabic do here? – manuzhang Apr 26 '13 at 14:15
  • @manuzhang \arabic{section} produces the decimal representation of the counter's value. You can also use \value{section} if you prefer, so \CJKnumber will use the "abstract" value. – egreg Apr 26 '13 at 14:19

You SHOULD read the document of ctex package and follow it. Don't use the low level macros. titlesec is useful for more complex chapter title formats, but it is overkill here.

And further more, CJKnumber option is now somewhat obsolete for new documents, since zhnumber works better than old CJKNumb package. New version of ctex uses zhnumber internally as well.



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.