Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to reproduce a strange font effect that is normally seen in horror movie trailers. In the trailers, a word will usually be flashed on screen, with 'echos' or 'shadows' of the word around it.

I failed utterly to find an example, but I rigged up an image that looks something like the effect: enter image description here

In some renditions, the shadows overlap the word, in others the shadows don't touch the word; I am not particular.

My question is: How would you achieve this effect on a few words or part of a sentence using LaTeX?

For bonus points: Can the shadow effect be achieved and still leave the surrounding words readable?

[EDIT]For further clarification: I did specify 'LaTeX', but any flavor of tex is A-OK in my book.

share|improve this question
    
See also Blur the text so it's not readable and for chapters Blurred Chapter Title. –  Speravir Mar 12 at 1:29

3 Answers 3

up vote 25 down vote accepted

This solution, using nested stack insets, still has vertical height/depth to the overlay. The relative placement of the insets is controlled by the length parameters (2nd and 4th arguments of \stackinset are (x,y) offsets).

\documentclass{article}
\usepackage{stackengine}
\usepackage{xcolor}
\begin{document}
\def\MyText{not scary}
\newcommand\mytext[1][black]{\textcolor{#1}{\MyText}}
This is 
\stackinset{c}{2ex}{c}{1.4ex}{\mytext[red!90]}{%
\stackinset{c}{-3ex}{c}{3.2ex}{\mytext[black!25]}{%
\stackinset{c}{-1ex}{c}{-1.7ex}{\mytext[black!40]}{%
\mytext%
}}}
text.
\end{document}

enter image description here

At the cost of an additional argument, the echos can be scaled, as well

\documentclass{article}
\usepackage{stackengine}
\usepackage{xcolor}
\usepackage{graphicx}
\begin{document}
\def\MyText{not scary}
\newcommand\mytext[2][black]{\scalebox{#2}{\textcolor{#1}{\MyText}}}
This is 
\stackinset{c}{2ex}{c}{1.4ex}{\mytext[red!90]{.8}}{%
\stackinset{c}{-3ex}{c}{3.2ex}{\mytext[black!25]{.7}}{%
\stackinset{c}{-1ex}{c}{-1.7ex}{\mytext[black!40]{1.1}}{%
\mytext{1}%
}}}
text.
\end{document}

enter image description here

If you wanted the vertical extent eliminated, so as to run into vertically adjacent text, a \smash takes care of that:

\documentclass{article}
\usepackage{stackengine}
\usepackage{xcolor}
\usepackage[nopar]{lipsum}
\begin{document}
\def\MyText{not scary}
\newcommand\mytext[1][black]{\textcolor{#1}{\MyText}}
\lipsum[1]
This is 
\smash{%
\stackinset{c}{2ex}{c}{1.4ex}{\mytext[red!90]}{%
\stackinset{c}{-3ex}{c}{3.2ex}{\mytext[black!25]}{%
\stackinset{c}{-1ex}{c}{-1.7ex}{\mytext[black!40]}{%
\mytext%
}}}}
text.
\lipsum[2]
\end{document}

enter image description here


In ZothiqueDemo font:

enter image description here

share|improve this answer

This is just for demonstration purposes. That is, it is not intended to actually look like something you might use but rather to indicate how to achieve some effects which you might find useful in creating something which you would like to use. I thought I would play around with shadowtext and use the excuse to install the emerald fonts. The 'scary' text is in various fonts from that collection: IntimacyDeux, Teenspirit, Webster, Skeetch, TallPaul and Pookie. rotating is used to rotate one sample without taking up space. xcolor is used so that the shadows' colours can be mixed on the spot.

Font effects

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{emerald,texnames,rotating,xcolor,shadowtext}

\begin{document}
\pagestyle{empty}

\noindent\Huge This is some fairly mundane, absolutely non-terrifying text which could not be less scary if it tried. Gentle as a lamb and good as gold.
\shadowoffsetx{3pt}%
\shadowoffsety{5pt}%
\shadowtext{%
  \shadowoffsetx{-5pt}%
  \shadowoffsety{-3pt}%
  \shadowtext{%
    \shadowoffsetx{15pt}%
    \shadowoffsety{-12pt}%
    \shadowtext{%
      \Huge\ECFIntimacyDeux SCARY}}}
What in \shadowtext{\TeX}'s name was \emph{that}? Is this text trying to scare me or something? At the very least, it is making this page look a mess\dots
\vfill
\Large

This is some more non-frightening text. Friendly, approachable and keen to assist you whatever your needs.
\shadowoffsetx{-10pt}%
\shadowoffsety{-15pt}%
\shadowtext{%
  \shadowcolor{red!60!black}%
  \shadowoffsetx{3pt}%
  \shadowoffsety{5pt}%
  \shadowtext{\shadowtext{\shadowtext{\ECFTeenSpirit Be Afraid\dots Be Veeerrryyy Afraid\dots}}}}
\vfill

\LARGE\noindent This text is just minding its own business, doing no harm to anybody\dots
\begin{rotate}{45}%
    \shadowtext{\ECFWebster Somethin' woz 'ere}
\end{rotate}
said somebody. `Go figure,' said Pooh.
\vfill

\noindent Harmless text for armless times\dots \shadowtext{\Huge\ECFSkeetch SCARY Are you scared yet?}
\vfill

\shadowoffsetx{7.5pt}%
\noindent\Large \shadowoffsety{10pt}%
  \shadowtext{%
    \shadowoffsetx{-10pt}%
    \shadowoffsety{-15pt}%
    \shadowtext{%
      \shadowoffset{3pt}%
        \shadowtext{\ECFTallPaul Maybe this is more SCARY\dots SCARIER\dots?}}} Perhaps, or perhaps not so much?
\vfill

\noindent\Huge Now for some decidedly ordinary text\dots
\shadowtext{%
  \shadowoffsetx{-4pt}%
  \shadowoffsety{-2pt}%
  \shadowcolor{blue!40!black}%
  \shadowtext{\ECFPookie SCARY!!! Or just WEIRD?}}

\end{document}
share|improve this answer

Here is a tikz implementation that underlays the "scary replication" using atbegshi, thus preserving the black overlaid text.

enter image description here

\documentclass{article}
\usepackage{tikz,atbegshi}
\usetikzlibrary{calc}
\newcounter{wordcount}
\newcommand{\scarymacro}[2][10]{%
  \stepcounter{wordcount}%
  \tikz[remember picture, baseline, inner sep = 0pt] \node[anchor = base] (scary\thewordcount) {#2};%
  \begingroup\edef\x{\endgroup\noexpand\AtBeginShipout{\noexpand\AtBeginShipoutAddToBox{
    \noexpand\begin{tikzpicture}[remember picture, overlay]
      \noexpand\foreach \noexpand\x in {1,...,#1}{%
        \noexpand\pgfmathparse{rand}\noexpand\edef\noexpand\xdir{\noexpand\pgfmathresult}% X-direction
        \noexpand\pgfmathparse{rand}\noexpand\edef\noexpand\ydir{\noexpand\pgfmathresult}% Y-direction
        \noexpand\pgfmathparse{100*(0.1+rnd*0.5)}\noexpand\edef\noexpand\scaryshade{\noexpand\pgfmathresult}% Shade
        \noexpand\pgfmathparse{0.5+rnd*0.5}\noexpand\edef\noexpand\scaryscale{\noexpand\pgfmathresult}% Scale
        \noexpand\node[color = red!\noexpand\scaryshade, scale = \noexpand\scaryscale]
          at ($(scary\thewordcount)+\noexpand\xdir*(1cm,0)+\noexpand\ydir*(0,1cm)$) {#2};}
    \noexpand\end{tikzpicture}
  }}}\x%
}

\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis rhoncus cursus 
mi in pretium. Duis faucibus, leo sit amet hendrerit tempor, urna risus elementum 
leo, in tempus metus justo id nisl. Morbi adipiscing sapien venenatis est rutrum 
\scarymacro{scary} egestas. Phasellus commodo odio diam. Aenean a euismod diam. 
Maecenas lacinia tincidunt dolor nec posuere. Praesent accumsan consectetur luctus. 
Maecenas ac lorem at elit egestas scelerisque. Quisque tristique ligula sed nulla 
scelerisque, ut porta dolor faucibus. Sed et dui ac justo ultrices molestie. Sed 
tempus vitae dolor in sodales. Cras molestie elementum turpis in pharetra. Nullam 
turpis metus, iaculis nec \scarymacro[4]{scary} consectetur quis, adipiscing eleifend 
massa. Quisque blandit nisl id nisl fringilla commodo. Phasellus non faucibus 
tellus. Morbi non justo mauris.
\end{document}

...a close-up something scary:

enter image description here

The scary text is replicated 10 times by default when using \scarymacro{<stuff>}, but an optional argument can also be used to adjust the number of replications. Replication is printed in colour ranging from red!10 to red!60, scaled between 50% and 100%, and randomly placed within a 1cm x 1cm proximity of <stuff>.

share|improve this answer
    
I really like the ghostly effect of this. –  cfr Mar 15 at 1:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.