作者linesx3 (小李)
看板LaTeX
标题Re: [问题] 如何把目录的chapter改成中文
时间Sat May 19 23:51:27 2012
※ 引述《linesx3 (小李)》之铭言:
: 目前我使用的是 miktex 2.9 + cjk
: 我是成功的把小章节的英文chapter改好了
: 如下
: \renewcommand\chaptername{第\arabic{chapter}章}
: \renewcommand\thechapter{}
: \renewcommand\thesection{\arabic{chapter}.\arabic{section}}
: 但我去看目录的时候发现,怎麽会只显示出chpater而已,而不是秀出我想的
: 第一章:
: 第二章:
: .
: .
: .
: 之类的,试了蛮多方法像,改title之类的,但都不行
: 不知版上的大大,是否可以帮我一下,谢谢。
我有照推文所教授的资讯做了一些修改,我加入了
\newcommand{\zhMynumber}[1]
{\ifcase#1\or壹\or贰\or参\or肆\or伍\or陆\or柒\or捌\or玖\or拾\fi}
\newcommand{\Mynumber}[1]
{\ifcase#1\or一\or二\or三\or四\or五\or六\or七\or八\or九\or十\fi}
\newcommand{\Mysubnumber}[1]
{\ifcase#1\or甲\or乙\or丙\or丁\or戊\or己\or庚\or辛\or壬\or癸\fi}
%% 设置之後可以修正中文目录当中子目录出现错误的 bug
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}
%% 使用 book 的时候各级标题设置
\titleformat{\chapter}[hang]{\bf\Huge\normalfont}{第
\CJKnumber{\arabic{chapter}}章}{1em}{}
\titleformat{\section}{\bf\Large\normalfont}{第\CJKnumber{\arabic{section}}节
}{1em}{}
\titleformat{\subsection}{\bf\large\normalfont}{\zhMynumber{\arabic{subsection}}
、}{1em}{}
\titleformat{\subsubsection}{\bf\normalsize}{\arabic{(subsubsection})}{1em}{}
% 换索引的 title
\titlecontents{chapter}
[0em]
{}
{\large第\CJKnumber{\thecontentslabel}章\quad}
{}{\titlerule*{$\cdot$}\contentspage}
\titlecontents{section}
[32pt]
{}
{第 \CJKnumber{\thecontentslabel} 节\quad}
{}{\hspace{.5em}\titlerule*[6pt]{$\cdot$}\contentspage}
\titlecontents{subsection}
[48pt]
{}
{\zhMynumber{\thecontentslabel}、\quad}
{}{\hspace{.5em}\titlerule*[6pt]{$\cdot$}\contentspage}
然後在Chapter的地方打上
\chapter{绪论}
但我发现,在目录的地方,就会变成
第一章 Chapter 绪论
不知道有没有办法可以把Chapter去除,麻烦请版上的大大再帮帮忙,谢谢。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.120.1.70
2F:→ CCY0927:我是没遇到你说的那种情况 05/20 00:48
3F:→ linesx3:感谢你,我终於解决了,是我们学校的sty档内的问题,谢谢 05/20 15:26