Re: Theoremあとのドットマーク

名前: しっぽ愛好家
日時: 2004-08-15 01:36:18
IPアドレス: 210.234.44.*

>>30920 amsthm パッケージを使用すると,(デフォルトでは)そのような体裁になります. また,自力でやるのでしたら,\@begintheorem および \@opargbegintheorem を然るべく再定義します. e.g. \documentclass{article} \newtheorem{thm}{Theorem}[section] \makeatletter %%% latex.ltx における定義を変更(#2 の後にピリオドを追加) %%% #1: 環境の見出し文字列(番号部分を除く) %%% #2: 環境の番号 %%% #3: 環境の開始時に与えたオプション文字列 \def\@begintheorem#1#2{% \trivlist \item[\hskip \labelsep{\bfseries #1\ #2.}]% \itshape} \def\@opargbegintheorem#1#2#3{% \trivlist \item[\hskip \labelsep{\bfseries #1\ #2.\ (#3)}]% \itshape} \makeatother \begin{document} \section{Sample} Sample text. \begin{thm} Sample. \end{thm} \end{document} theorem パッケージを使用した場合は,\@begintheorem および \@opargbegintheorem を再定義すればいいという点には変わりありません. しかし,theorem パッケージ自身の処理により定理型環境の開始時に \@begintheorem と \@opargbegintheorem が再定義されるため, いくぶん面倒です. e.g. \documentclass{article} \usepackage{theorem} \newtheorem{thm}{Theorem}[section] \makeatletter %%% thp.sty での記述を変更 \gdef\th@plain{% \normalfont\itshape \def\@begintheorem##1##2{% \item[\hskip\labelsep \theorem@headerfont ##1\ ##2.]}% \def\@opargbegintheorem##1##2##3{% \item[\hskip\labelsep \theorem@headerfont ##1\ ##2.\ (##3)]}} \makeatother %%% 実際に使用したスタイルごとに thp.sty などにおける %%% \th@<style> の定義を変更することになります. \begin{document} \section{Sample} Sample text. \begin{thm} Sample. \end{thm} \end{document}

この書き込みへの返事:

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