作者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