目的
箱の幅に合うように文字を等間隔で並べたい.
解決方法
\hfill を使う
\noindent\centering\framebox[0.8\textwidth][l]{ 幅{\hfill}い{\hfill}っ{\hfill}ぱ{\hfill}い{\hfill}使{\hfill}う }
さすがにめんどくさいのでマクロを組んでみた.
\def\wrapstrut{\vrule height 1zw depth 4pt width 0pt} \def\expandtextfirst#1{\ifx#1\relax\let\next\allowbreak\else \def\next{{#1}\allowbreak\expandtextinside}\fi\next} \def\expandtextinside#1{\ifx#1\relax\let\next\allowbreak\else \def\next{{\hfill}#1\allowbreak\expandtextinside}\fi\next} \def\expandtext#1{\noindent\centering\wrapstrut\expandtextfirst#1\relax}
\noindent\centering\framebox[0.8\textwidth][l]{ \expandtext{幅いっぱい使う} }
wrapstrut は箱枠とのスペース調整用なので別になくてもいい.
