名前: しっぽ愛好家 日時: 2002-02-08 11:45:48 IPアドレス: 202.224.196.*
>>6369 こういう処理はいかがでしょうか. 単に \footnote{...}/\footnotemark の直後の文字を読んで 処理を変えているだけですが. %%% したがって,\footnote{...}/\footnotemark は句読点の前に %%% 置くことを前提としています. \def\footnote{% \@ifnextchar[% \@xfootnote {\stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}% \@footnote}} \long\def\@footnote#1{% \@footnote@check@next@token{\@footnotetext{#1}}} \long\def\@xfootnote[#1]#2{% \begingroup \csname c@\@mpfn\endcsname #1\relax \unrestored@protected@xdef\@thefnmark{\thempfn}% \endgroup \@footnote@check@next@token{\@footnotetext{#2}}} \def\@footnote@check@next@token#1{% \def\@footnote@check@next@token@next{#1}% \futurelet\let@token\@footnote@check@next@token@} \def\@footnote@check@next@token@{% \leavevmode \let\@tempa\@firstofone \@tfor\@tempb:=,.、。,.\do{% \expandafter\ifx\@tempb\let@token \let\@tempa\@adjust@footnotemark \fi}% \global\let\@footnote@adjust@next@letter\@empty \@tempa{\@footnotemark}\kern\z@% \@footnote@check@next@token@next \@footnote@adjust@next@letter} \def\@adjust@footnotemark#1{% \begingroup \setbox\z@\hbox{#1}% \ifdim .5zw>\wd\z@ \rlap{\box\z@}% \else \xdef\@footnote@adjust@next@letter##1{% \kern-\the\wd\z@\noexpand\rlap{##1}% \kern\the\wd\z@\relax}% \box\z@ \fi \endgroup} \def\footnotemark{% \@ifnextchar[% \@xfootnotemark {\stepcounter{footnote}% \protected@xdef\@thefnmark{\thefootnote}% \@footnote@check@next@token\@empty}} \def\@xfootnotemark[#1]{% \begingroup \c@footnote #1\relax \unrestored@protected@xdef\@thefnmark{\thefootnote}% \endgroup \@footnote@check@next@token\@empty}
この書き込みへの返事: