Re: \def\thesectionを用いた場合の目次表示について

名前: トニイ
日時: 2012-02-13 12:05:27
IPアドレス: 219.99.221.*

>>56654 \appendix がありますが,これは使わないのですか? % pLaTeX2e \documentclass{jarticle} \begin{document} \tableofcontents \section{hoge} \appendix%% ここから付録 \section{fuga} \end{document} 目次の項目で幅を調整するには \l@section を再定義すれば良いのですが,この 変更は文書全体に及びます。 % pLaTeX2e \documentclass{jarticle} \makeatletter \renewcommand*{\l@section}[2]{%% 再定義 \ifnum \c@tocdepth >\z@ \addpenalty{\@secpenalty}% \addvspace{1.0em \@plus\p@}% \begingroup \parindent\z@ \rightskip\@pnumwidth \parfillskip-\rightskip \leavevmode\bfseries \setlength\@lnumwidth{3.5em}% 元は 1.5em \advance\leftskip\@lnumwidth \hskip-\leftskip #1\nobreak\hfil\nobreak\hbox to\@pnumwidth{\hss#2}\par \endgroup \fi} \makeatother \begin{document} \tableofcontents \section{hoge} %%\appendix \renewcommand{\thesection}{\appendixname\Alph{section}} \setcounter{section}{0} \section{fuga} \end{document}

この書き込みへの返事:

お名前
題名 
メッセージ(タグは <a href="...">...</a> だけ使えます。適宜改行を入れてください)