latex 问题。将 contents 和chapter 改成汉语总不能实现

贰格格的爹 2021-09-18 16:43 217 次浏览 赞 105

最新问答

  • 傻兮兮的呆呆

    这样肯定是不行的,下面的代是可以的。
    最好是去看孙的模板的汉化过程,一劳永逸。
    其实不难的,若是想定制自己的格式是需要多多阅读的。

    浏览 257赞 111时间 2024-03-08
  • 飞天大圣朱七

    将上述CJK环境中的命令:
    \titleformat{\chapter}[hang]{\centering\LARGE\bfseries}{\chaptername}{1em}{}
    \renewcommand{\chaptername}{第\CJKnumber{\thechapter}章}
    \renewcommand{\contentsname}{目\quad 录}
    放入正文的开始部分(注意也放在CJk环境中)。
    我测试了一下,可以解决这个问题。测试代如下:
    \documentclass[12pt,oneside,openany,a4paper]{book}
    \usepackage{CJK}
    \usepackage{amsmath}
    \usepackage{cases}
    \usepackage[bf,small,center,indentafter,pagestyles]{titlesec}
    \usepackage{CJKpunct}
    \usepackage{CJKnumb}
    \hoffset=1cm\voffset=-1cm
    \textwidth=12.5cm \textheight=22cm
    \begin{document}
    \begin{CJK*}{GBK}{song}
    \titleformat{\chapter}[hang]{\centering\LARGE\bfseries}{\chaptername}{1em}{}
    \renewcommand{\chaptername}{第\CJKnumber{\thechapter}章}
    \renewcommand{\contentsname}{目\quad 录}

    \tableofcontents

    \chapter{绪论}

    Blabla……

    \end{CJK*}
    \end{document}

    ps:CJK用起来还是麻烦了点,也有点落伍了,建议改用xetex+ctex。

    浏览 441赞 131时间 2023-07-12

latex 问题。将 contents 和chapter 改成汉语总不能实现