當前位置:編程學習大全網 - 網站源碼 - latex 問題。將 contents 和chapter 改成漢語總不能實現

latex 問題。將 contents 和chapter 改成漢語總不能實現

將上述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。

  • 上一篇:新視野大學英語網絡驗證碼輸入晚了會怎麽樣?
  • 下一篇:少兒編程可以直接學python嗎?
  • copyright 2024編程學習大全網