3源代码说明41
898899900901902
??ctexcap??}{
???ctexcap|report|book??
\\def\\CTEX@appendixnumber{\\@Alph\\c@chapter}??/ctexcap|report|book????ctexcap??}
\\CTEX@save@appendix
\\appendix
重定义\\appendix命令以改变附录标题
903904905906907908909910911912913914915916917918919
\\let\\CTEX@save@appendix\\appendix??ctexcap??\\ifCTEX@cls{article}{???ctexcap|article??
\\renewcommand*\\appendix{\\CTEX@save@appendix%\\gdef\\CTEX@presection{\\CTEX@appendixname}%\\gdef\\CTEX@thesection{\\CTEX@appendixnumber}%\\gdef\\CTEX@postsection{}}%??/ctexcap|article????ctexcap??}{
???ctexcap|report|book??
\\renewcommand*\\appendix{\\CTEX@save@appendix%\\gdef\\CTEX@prechapter{\\CTEX@appendixname}%\\gdef\\CTEX@thechapter{\\CTEX@appendixnumber}%\\gdef\\CTEX@postchapter{}}%??/ctexcap|report|book????ctexcap??}??/ctexcap|cls??
3.8.2part的标题
A以下一段修改标准LTEX文档类以实现中文标题需要的结构。
part的标题修改,首先是article类:
920921922923924925926927928929930931932933
??ctexcap??\\ifCTEX@cls{article}{
???ctexcap|article??
\\renewcommand\\part{%
\\if@noskipsec\\leavevmode\\fi\\par
%\\addvspace{4ex}%
\\addvspace{\\CTEX@part@beforeskip}%\\@afterindentfalse\\secdef\\@part\\@spart}\\def\\@part[#1]#2{%
\\ifnum\\c@secnumdepth>\\m@ne\\refstepcounter{part}%%\\addcontentsline{toc}{part}{\\thepart\\hspace{1em}#1}%
\\addcontentsline{toc}{part}{\\CTEXthepart\\hspace{1em}#1}%
3源代码说明42
934935936937938939940941942943944945946947948949950951952953954955956957958959960961
\\else
\\addcontentsline{toc}{part}{#1}%\\fi
{\\interlinepenalty\\@M
%\\normalfont\\parindent\\z@\\raggedright
\\normalfont\\parindent\\CTEX@part@indent\\CTEX@part@format\\ifnum\\c@secnumdepth>\\m@ne%\\Large\\bfseries\\partname\\nobreakspace\\thepart\\par\\nobreak
\\CTEX@partname\\fi
%\\huge\\bfseries#2%
\\CTEX@part@titleformat#2%\\markboth{}{}\\par}%\\nobreak%\\vskip3ex
\\vskip\\CTEX@part@afterskip\\@afterheading}\\def\\@spart#1{%
{\\interlinepenalty\\@M%\\normalfont\\parindent\\z@\\raggedright
\\normalfont\\parindent\\CTEX@part@indent\\CTEX@part@format%\\huge\\bfseries#1\\par}%
\\CTEX@part@titleformat#1\\par}%\\nobreak%\\vskip3ex
\\vskip\\CTEX@part@afterskip\\@afterheading}??/ctexcap|article??
然后是report和book类:
962963964965966967968969970971972973974975976
??ctexcap??}{
???ctexcap|report|book??\\def\\@part[#1]#2{%
\\ifnum\\c@secnumdepth>-2\\relax\\refstepcounter{part}%%\\addcontentsline{toc}{part}{\\thepart\\hspace{1em}#1}%
\\addcontentsline{toc}{part}{\\CTEXthepart\\hspace{1em}#1}%\\else
\\addcontentsline{toc}{part}{#1}%\\fi
\\markboth{}{}%
{\\interlinepenalty\\@M%\\normalfont\\centering
\\normalfont\\CTEX@part@format\\ifnum\\c@secnumdepth>-2\\relax
3源代码说明43
977978979980981982983984985986987988989990991
%
\\huge\\bfseries\\partname\\nobreakspace\\thepart\\par\\vskip20\\p@\\CTEX@partname\\fi
%\\Huge\\bfseries#2\\par}%
\\CTEX@part@titleformat#2\\par}%\\@endpart}\\def\\@spart#1{%
{\\interlinepenalty\\@M%\\normalfont\\centering
\\normalfont\\CTEX@part@format%\\Huge\\bfseries#1\\par}%
\\CTEX@part@titleformat#1\\par}%\\@endpart}
??/ctexcap|report|book????ctexcap??}
3.8.3chapter的标题
chapter的标题修改,首先是report类的
992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017
??ctexcap??\\ifCTEX@cls{report}{???ctexcap|report??
\\def\\@chapter[#1]#2{%
\\ifnum\\c@secnumdepth>\\m@ne\\refstepcounter{chapter}%%\\typeout{\\@chapapp\\space\\thechapter.}%
\\typeout{\\CTEXthechapter}%
\\addcontentsline{toc}{chapter}%{\\protect\\numberline{\\thechapter}#1}%
{\\protect\\numberline{\\CTEXthechapter\\hspace{0.3em}}#1}%\\else
\\addcontentsline{toc}{chapter}{#1}%\\fi
\\chaptermark{#1}%
\\addtocontents{lof}{\\protect\\addvspace{10\\p@}}%\\addtocontents{lot}{\\protect\\addvspace{10\\p@}}%\\if@twocolumn
\\@topnewpage[\\@makechapterhead{#2}]%\\else
\\@makechapterhead{#2}%\\@afterheading\\fi}
\\def\\@makechapterhead#1{%%\\vspace*{50\\p@}%
\\vspace*{\\CTEX@chapter@beforeskip}%
%{\\normalfont\\parindent\\z@\\raggedright
3源代码说明44
1018101910201021102210231024102510261027102810291030
{\\normalfont\\parindent\\CTEX@chapter@indent\\CTEX@chapter@format\\ifnum\\c@secnumdepth>\\m@ne%\\huge\\bfseries\\@chapapp\\space\\thechapter\\par\\nobreak\\vskip20\\p@
\\CTEX@chaptername\\fi
\\interlinepenalty\\@M
%\\Huge\\bfseries#1\\par\\nobreak
\\CTEX@chapter@titleformat#1\\par\\nobreak%\\vskip40\\p@
\\vskip\\CTEX@chapter@afterskip}}
??/ctexcap|report????ctexcap??}{}
然后是book类的
103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060
??ctexcap??\\ifCTEX@cls{book}{???ctexcap|book??
\\def\\@chapter[#1]#2{%
\\ifnum\\c@secnumdepth>\\m@ne\\if@mainmatter
\\refstepcounter{chapter}%
%\\typeout{\\@chapapp\\space\\thechapter.}%
\\typeout{\\CTEXthechapter}%
\\addcontentsline{toc}{chapter}
%{\\protect\\numberline{\\thechapter}#1}%
{\\protect\\numberline{\\CTEXthechapter\\hspace{0.3em}}#1}%\\else
\\addcontentsline{toc}{chapter}{#1}%\\fi\\else
\\addcontentsline{toc}{chapter}{#1}%\\fi
\\chaptermark{#1}%
\\addtocontents{lof}{\\protect\\addvspace{10\\p@}}%\\addtocontents{lot}{\\protect\\addvspace{10\\p@}}%\\if@twocolumn
\\@topnewpage[\\@makechapterhead{#2}]%\\else
\\@makechapterhead{#2}%\\@afterheading\\fi}
\\def\\@makechapterhead#1{%%\\vspace*{50\\p@}%
\\vspace*{\\CTEX@chapter@beforeskip}%
%{\\normalfont\\parindent\\z@\\raggedright