名前: 北見 けん 日時: 2009-04-28 17:50:37 IPアドレス: 211.128.71.*
>>53106 お遊びですがやってみました。 英文字を全部アクティブ文字にして、文字毎に空白を入れています。 その一方で、書体変更などのコントロールシークエンスが使えるようにしようなどと 無茶なこともやっています。(でも中途半端ですが) 実用的ではありませんが、参考程度に。 \documentclass{article} \makeatletter \def\makeUpperLettersActive{% \@tfor\letter:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{\catcode\expandafter`\letter=\active}} \def\makeLowerLettersActive{% \@tfor\letter:=abcdefghijklmnopqrstuvwxyz\do{\catcode\expandafter`\letter=\active}} \def\makeSpaceActive{\catcode`\ =\active} \def\makeEscapeActive{\catcode`\\=\active} \def\makeLettersActive{\makeUpperLettersActive\makeLowerLettersActive\makeSpaceActive} \def\fixCatcode#1{\begingroup#1\expandafter\endgroup\@firstofone} \fixCatcode{\catcode`\_=10\makeSpaceActive}{% \def {\penalty0\hskip\fontdimen2\font_plus\fontdimen3\font_minus\fontdimen4\font}% }% \fixCatcode\makeUpperLettersActive{ \@tfor\letter:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{% \expandafter\edef\letter{% \expandafter\string\letter\nobreak\noexpand\sidebearingskip\nobreak}} \lowercase{ \@tfor\letter:=ABCDEFGHIJKLMNOPQRSTUVWXYZ\do{% \expandafter\edef\letter{% \expandafter\string\letter\nobreak\noexpand\sidebearingskip\nobreak}} } } \makeatother \fixCatcode{\catcode`\$=0\makeEscapeActive}{ $def\{$csname$gatherLetters} } \def\gatherLetters#1{% \ifnum`#1>`\@ \ifnum`#1<`\{% \ifnum`#1>`\Z \ifnum`#1<`\a \else \string#1\escapeA \fi \else \string#1\escapeB \fi \else \fi \else \fi \endcsname #1% } \def\escapeA#1\endcsname#2{\fi\fi\fi\fi\gatherLetters} \def\escapeB#1\endcsname#2{\fi\fi\fi\gatherLetters} \def\Stretch{% \makeLettersActive\makeEscapeActive \edef\restoreblank{% \fontdimen2\font=\the\fontdimen2\font \fontdimen3\font=\the\fontdimen3\font \fontdimen4\font=\the\fontdimen4\font } \fontdimen2\font=1.5\fontdimen2\font \fontdimen3\font=1.5\fontdimen3\font \fontdimen4\font=1.5\fontdimen4\font \def\sidebearingskip{\hskip1pt} } \def\endSTRETCH#1{\restoreblank\end{Stretch}} \begin{document} This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. \begin{Stretch} This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a{\bfseries test}. This is a test. \endSTRETCH? This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. \end{document}
この書き込みへの返事: