TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As best as I can understand, there are two ways to load the ctex package: as a document class (i.e. \documentclass{ctexbook} or as a package (i.e. \usepackage{ctex}). As I am using another document class, I have selected the later. This means, however, that the document uses English for titles throughout the document (e.g. table of contents, glossary).

When I try to rename the titles of parts of the documents, using \CTEXoptions, this always fails. E.g.:

    \chapter{This is a chapter title}

This fails to compile:

! Package xkeyval Error: `contentsname' undefined in families `CTEX'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.

l.6 \CTEXoptions[contentsname={目录名}]
  • How can I properly set the names of these items in my document?

contentsname 目录名

listfigurename 表格目录

listtablename 插图目录

figurename 图

tablename 表

abstractname 摘要

indexname 索引

bibname 参考文献

share|improve this question
up vote 5 down vote accepted

Load the ctexcap package instead of ctex. This will automatically redefine the strings you mentioned in your question. The command \CTEXoptions[contentsname={目录名}] will also then work.

P/S: Surely 目录名 is wrong?

share|improve this answer

This is a long comment of LianTze Lim's answer.

  • Load ctexcap package for other document classes. But you should only load ctexcap for those document classes based on standard article, report and book. For example, you can use ctexcap together with extarticle and ltxdoc, but you should NOT use ctexcap with beamer, scrartcl or moderncv. Actally ctexcap is rarely used.
    (EDIT: Well, it doesn't matter)

  • You don't need to use xeCJK and fontspec explictly when you use ctex bundle.

  • 目录名 should be 目录.

  • You are welcome to ask this kind of questions in CTeX forum.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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