Unlike some other answers, the result is not in a box, and so it can work across line-breaks, paragraph breaks, and page breaks.
In that sense, it is somewhat like Karl's answer. But unlike Karl's answer, it can be interspersed with normal text on a word by word basis. Ligatures are, however, lost.
The settable options are:
\setlength\shadowHoffset{.3pt}
\setlength\shadowVoffset{-.2pt}
\def\primarycolor{white}
\def\secondarycolor{black}
Here is the MWE:
\documentclass{article}
\usepackage{stackengine,xcolor}
\newcommand\shadowfy[1]{\expandafter\shadowfypars#1\par\relax\relax}
\long\def\shadowfypars#1\par#2\relax{%
\ifx#1\relax\else
\shadowfywords#1 \relax\relax%
\fi%
\ifx\relax#2\else\par\shadowfypars#2\relax\fi%
}
\def\shadowfywords#1 #2\relax{%
\ifx#1\relax\else
\shadowfyletters#1\relax\relax%
\fi%
\ifx\relax#2\else\ \shadowfywords#2\relax\fi%
}
\def\shadowfyletters#1#2\relax{%
\shadow{#1}%
\ifx\relax#2\else\shadowfyletters#2\relax\fi}
\newlength\shadowHoffset
\newlength\shadowVoffset
\setlength\shadowHoffset{.3pt}
\setlength\shadowVoffset{-.2pt}
\def\primarycolor{white}
\def\secondarycolor{black}
\def\shadow#1{\kern\shadowHoffset%
\raisebox{\shadowVoffset}{%
\stackinset{c}{-\shadowHoffset}{c}{-\shadowVoffset}%
{\textcolor{\primarycolor}{#1}}{\textcolor{\secondarycolor}{#1}}}%
\kern-\shadowHoffset}
\begin{document}
\def\mytext{%
Problem is, there doesn't appear any shadow next to the text. Any idea how to
setup shadows to a string on a way that really works?
And for my second paragraph, the problem is, there doesn't appear any shadow
next to the text. Any idea how to setup shadows to a string on a way that
really works?
}%
\shadowfy{\mytext}
\def\primarycolor{black}%
\def\secondarycolor{black!30}%
\setlength\shadowHoffset{.3pt}
\setlength\shadowVoffset{-.3pt}
\shadowfy{\mytext}
\def\shadowVoffset{-1pt}%
And it should line up with text: \shadowfy{\mytext}
\LARGE\sffamily%
\def\primarycolor{blue!70!black}%
\def\secondarycolor{cyan!25}%
\def\shadowHoffset{.5pt}%
\def\shadowVoffset{-.8pt}%
And color: \shadowfy{\mytext}
\end{document}
Here is somewhat of a zoom on the result:

Here I demonstrate line and paragraph breaking.

Here is a mid-line transition from normal to shadow text, exaggerated shadowing to demonstrate that the primary baselines line up.

And here is color:

latex+dvips
. If you are using TeXShop, add% !TEX TS-program = latex
as the first line of your document. ` – Alan Munn Apr 26 '12 at 1:59! Undefined control sequence.
errors most of the time. Don't understand why there are two tools to interpret latex. But okay, I'll use TeXShop from now on, because it works. – Marc Apr 26 '12 at 2:37% !TeX program = latex
. PSTricks uses Postscript commands that cannot be processed bypdflatex
which is why you need to uselatex
when you compile this code. – Alan Munn Apr 26 '12 at 3:37