Re: 英文のAppendix

名前: しっぽ愛好家
日時: 2002-11-23 18:40:40
IPアドレス: 210.230.19.*

>>13194 要は,jbook.cls で用いられている \@chapapp,\@chappos に相当するものを \section などの構造に対しても導入し,しかも,それらを \appendix 部分で あるか否かに応じて異なる文字列にできるようにすればよいわけです. というわけで,次のような定義を用いてみるとどうでしょうか. \def\appendix{% \par \setcounter{section}{0}% \setcounter{subsection}{0}% \gdef\thesection{\@Alph\c@section}% %%% article.cls での定義に以下の 2 行を追加しました. \def\@seccnt@prefix@for@section{Appendix\ }% \def\@seccnt@postfix@for@section{:}} \def\@seccntformat#1{% \@nameuse{@seccnt@prefix@for@#1}% \@nameuse{the#1}% \@nameuse{@seccnt@postfix@for@#1}% \quad} \let\@seccnt@prefix@for@section\@empty \let\@seccnt@postfix@for@section\@empty \let\@seccnt@prefix@for@subsection\@empty \let\@seccnt@postfix@for@subsection\@empty \let\@seccnt@prefix@for@subsubsection\@empty \let\@seccnt@postfix@for@subsubsection\@empty \let\@seccnt@prefix@for@paragraph\@empty \let\@seccnt@postfix@for@paragraph\@empty \let\@seccnt@prefix@for@subparagraph\@empty \let\@seccnt@postfix@for@subparagraph\@empty なお,これだけでは \tableofcontents による目次部分では \appendix 部分の \section の項目の番号は単に ``A'',``B'' ... のままになります.これを目次でも ``Appendix A:'' のようにするには, ファイル latex.ltx での \@sect の定義に含まれている \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else \protect\numberline{\csname the#1\endcsname}% \fi #7}% という部分(2 箇所)を \addcontentsline{toc}{#1}{% \ifnum #2>\c@secnumdepth \else \protect\numberline{% \@nameuse{@seccnt@prefix@for@#1}% \@nameuse{the#1}% \@nameuse{@seccnt@postfix@for@#1}}% \fi #7}% のように変更し,また, \numberline の定義を次のように変更します. \def\numberline#1{% \setbox\z@\hbox{#1\ }% \ifdim\wd\z@<\@tempdima \hb@xt@\@tempdima{#1\hfil}% \else \box\z@ \fi} %%% jarticle.cls などのクラスファイルでは \@tempdima の %%% 代わりに \@lnumwidth を用いることになっているので, %%% 使用する状況に応じた調整が必要になるかもしれません. また,``柱'' に用いる文字列も調整したい場合には, \ps@headings などの中で定義されている \sectionmark などの定義を 変更し,\@seccnt@prefix@for@section/\@seccnt@postfix@for@section などを \thesection などの前後に追加します.

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます)