Is there a nice way to overlay text in the space of one character?
So if text is overlaid as I described it would almost result in a black square.
Is there a nice way to overlay text in the space of one character?
So if text is overlaid as I described it would almost result in a black square.
You could use soul, for example:
\documentclass{article}
\usepackage{soul}
\makeatletter
\def\SOUL@soeverytoken{\rlap{\the\SOUL@token}}
\makeatother
\newcommand{\stack}[1]{%
\let\space\relax% no space desired
\so{#1}}
\begin{document}
\stack{S}
\stack{So}
\stack{So if this text}
\stack{So if this text is stacked as I described it would almost result to a black square.}
\end{document}

this is kind of kludgy, and can be handled more elegantly as a loop, but i'll leave that nicety to someone else.
\rlap{a}\rlap{b}\rlap{c}\rlap{d}...z
(where z is the final glyph in the string) will have the effect of setting the successive glyphs on top of one another. (i interpret that as what you mean by "stack", rather than setting the glyphs as a "tower" with one above the other.)
mathtools package provides similar macros to \rlap, \llap and \clap in math mode: \mathrlap, \mathllap and \mathclap. See this post: Can I use \clap, \rlap and \llap in math mode? or consider reading A complement to \smash, \llap, and \rlap.
– Werner
Sep 03 '11 at 17:43
\stack{\input{Text}}but this results to File not found error. – user7630 Sep 03 '11 at 18:21\inputwithin arguments" or "... withinsoularguments". – Stefan Kottwitz Sep 03 '11 at 18:42