ruby in LaTeX
確か奥村先生の作。
%%%%%%% ruby{body}{rb} \makeatletter \def\kanjistrut{\vrule \@height0.88zw \@depth0.12zw \@width\z@} \newdimen\mytempdima \newcommand{\ruby}[2]{% \leavevmode \setbox0=\hbox{#1}% \mytempdima=\f@size\p@ \setbox1=\hbox{\fontsize{0.5\mytempdima}{0pt}\selectfont #2}% \ifdim\wd0>\wd1 \dimen0=\wd0 \else \dimen0=\wd1 \fi \hbox{% \kanjiskip=0pt plus 2fil \xkanjiskip=0pt plus 2fil \vbox{% \hbox to \dimen0{% \fontsize{0.5\mytempdima}{0pt}\selectfont \kanjistrut\hfil#2\hfil}% \nointerlineskip \hbox to \dimen0{\kanjistrut\hfil#1\hfil}}}} \makeatother