名前: math 日時: 2002-05-07 19:10:45 IPアドレス: 61.203.198.*
>>8276 連休に入ったため返信が遅くなりまして申し訳ありません。 エラーが出ていた件ですが、しまだ様がご指摘の通り、 ファイル内のマクロの定義を tboxit.sty のままにしていました。 tboxit.sty をmytboxit.sty に変更したら、エラーが出なくなりました。 ただ、box幅を狭くしたいのですが変更箇所が間違っているのか、 思うようにいきません。長くなりますが、下の変更前後の スタイルファイルのどこが間違っているのかご教示願えないでしょうか。 《変更前》 % I would like to have a macro that can be given two parameters, a vbox and a % title, and I would like the macro to draw a "double-box" (i.e. 2 lines, % about 1mm apart) all around the vbox, and have the title appear on the lines % at the top (without the horizontal lines visible under the title). i.e. % % === Title === % || Some || % || Text || % || Here || % ============= % %The following definitions should work: %(You may want to adapt the kern's to the values you prefer!) \def\tboxit#1#2{{\setbox0=\hbox{\kern5pt#1\kern5pt}\edef\titlewidth{\the\wd0}% \setbox2=\vbox{#2} \setbox2=\vbox{% \vbox to1pt{\vss\hbox to\wd2{\strut\hfil#1\hfil}\vskip0pt}% \box2 } \Tboxit{\titlewidth}{\Tboxit{\titlewidth}{\box2}}}} \def\Tboxit#1#2{\vbox{% \setbox0=\hbox{\vrule\kern3pt\vbox{\kern3pt#2\kern3pt}\kern3pt\vrule}% \hbox to\wd0{\hrulefill\kern#1\hrulefill}\nointerlineskip \box0 \hrule }} \endinput %%% Tests: \setbox2=\vbox{\hsize6cm Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! } $$\tboxit{Title}{\box2}$$ \tboxit{New Title}{\vbox{\hsize7cm Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! }} \end %Peter Schmitt a8131dal@awiuni11.edvz.univie.ac.at % schmitt@awirap.bitnet %Institute of Mathematics Strudlhofgasse 4 %University of Vienna A-1090 Wien % Austria 《変更後》 % I would like to have a macro that can be given two parameters, a vbox and a % title, and I would like the macro to draw a "double-box" (i.e. 2 lines, % about 1mm apart) all around the vbox, and have the title appear on the lines % at the top (without the horizontal lines visible under the title). i.e. % % === Title === % || Some || % || Text || % || Here || % ============= % %The following definitions should work: %(You may want to adapt the kern's to the values you prefer!) \def\mytboxit#1#2{{\setbox0=\hbox{\kern3pt#1\kern3pt}\edef\titlewidth{\the\wd0}% \setbox2=\vbox{#2} \setbox2=\vbox{% \vbox to1pt{\vss\hbox to\wd2{\strut\hfil#1\hfil}\vskip0pt}% \box2 } \myTboxit{\titlewidth}{\myTboxit{\titlewidth}{\box2}}}} \def\myTboxit#1#2{\vbox{% \setbox0=\hbox{\vrule\kern1pt\vbox{\kern1pt#2\kern1pt}\kern1pt\vrule}% \hbox to\wd0{\hrulefill\kern#1\hrulefill}\nointerlineskip \box0 \hrule }} \endinput %%% Tests: \setbox2=\vbox{\hsize6cm Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! } $$\mytboxit{Title}{\box2}$$ \mytboxit{New Title}{\vbox{\hsize7cm Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! Test this boxing macro! }} \end %Peter Schmitt a8131dal@awiuni11.edvz.univie.ac.at % schmitt@awirap.bitnet %Institute of Mathematics Strudlhofgasse 4 %University of Vienna A-1090 Wien % Austria
この書き込みへの返事: