Re: demobox マクロ

名前: 角藤
日時: 2004-07-06 21:34:22
IPアドレス: 61.27.203.*

>>30145 Typo です。以下ならうごくでしょう tex sample とします。 % sample.tex %%%%%%%%%%%%% p.419 \def\dolist{\afterassignment\dodolist\let\next= } \def\dodolist{\ifx\next\endlist \let\next\relax \else \\\let\next\dolist \fi \next} \def\endlist{\endlist} \def\hidehrule#1#2{\kern-#1% \hrule height#1 depth#2 \kern-#2 } \def\hidevrule#1#2{\kern-#1{\dimen0=#1 \advance\dimen0 by#2\vrule width\dimen0}\kern-#2 } \def\makeblankbox#1#2{\hbox{\lower\dp0\vbox{\hidehrule{#1}{#2}% \kern-#1 % overlap the rules at the corners \hbox to \wd0{\hidevrule{#1}{#2}% \raise\ht0\vbox to #1{}% set the vrule height \lower\dp0\vtop to #1{}% set the vrule depth \hfil\hidevrule{#2}{#1}}% \kern-#1\hidehrule{#2}{#1}}}} \def\maketypebox{\makeblankbox{0pt}{1pt}} \def\makelightbox{\makeblankbox{.2pt}{.2pt}} \def\\{\expandafter\if\space\next\ \else \setbox0=\hbox{\next}\maketypebox\fi} \def\demobox#1{\setbox0=\hbox{\dolist#1\endlist}% \copy0\kern-\wd0\makelightbox} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \makeblankbox{8pt}{2pt} This is Tough exercise \makeblankbox{0pt}{1pt} \makeblankbox{4pt}{1pt} \maketypebox \makelightbox This is Tough exercise \demobox{Tough} here . \bye

この書き込みへの返事:

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