I am creating a title page as follows:
\begin{titlepage}
\vspace*{1in}
\begin{center}
\parbox{0.8\textwidth}[s]{\HUGE%
T\hfill H\hfill I\hfill S\hfill
\hfill\hfill\hfill\hfill %space = 4xhfill
I\hfill S %no hfill after the last character of the line.
}\\
\parbox{0.8\textwidth}[s]{\HUGE%
M\hfill Y\hfill
\hfill\hfill\hfill\hfill
T\hfill I\hfill T\hfill L\hfill E
}\\
\end{center}
\vspace*{\fill}
\vspace*{1in}
\end{titlepage}
\HUGE is defined as follows: \def\HUGE{\fontsize{60}{60}\selectfont}.
I would like to replace the many X\hfill with an automated macro that inserts \hfill after each character automatically and replaces any whitespace with four \hfill, i.e. a macro that would allow me to write:
...
\begin{center}
\titleline{0.8\titlewidth}{THIS IS}\\
\titleline{0.8\titlewidth}{MY TITLE}\\
\end{center}
...
I am using (Xe)LaTeX and would like to make that macro in a package that would work on both systems, on classes such as article and book. I have no experience with other document classes.
Thank you.





soulpackage (texdoc soul-- it's in tex live). this can be used to provide letterspacing and a lot more besides. comment on your code: multiple\hfills in one line can result in some serious warnings. – barbara beeton Jun 30 '12 at 21:49souldoesn't provide me with what I want; however, it is a nice addition to packages that I may find useful in the future. Also, I wasn't aware of any consequences at using multiple\hfills. – Minustar Jun 30 '12 at 22:09\hfillI'd suggest to give a look at the letter spacing features ofmicrotype. I'd add that looking for a macro based solution that automatically inserts spaces is too much, for a title that won't have much more than 20 characters. – egreg Jul 01 '12 at 08:19