I want to achive a text effect like this:

enter image description here

It is the "gap" between the word and the shadow.

I understand I have to use two layers to create shadow and word. But I don't know how to clip the shadow layer (adding a layer between word and shadow using white wouldn't help if using a background image.)

This is, how I would create the "word-layer" and the "shadow-layer":

\begin{tikzpicture}[remember picture, overlay]
    \node [inner sep=0pt, xshift=0.78cm, yshift=7.48cm, anchor=south] at (current page.center) {\fontspec{Arial Bold}\color{gray}Effect};
    %A "clipping layer" here
    \node [inner sep=0pt, xshift=0.8cm, yshift=7.5cm,  anchor=south] at (current page.center) {\fontspec{Arial Bold}\color{black}Effect};

Could anyone help with the clipping part?


I would draw it three times since the shapes are nontrivial

\foreach\y/\x in{0/gray,.4/white,0.5/blue}{\node[shift={(\y pt,\y pt)},text=\x] {Effect};}

enter image description here

| improve this answer | |
  • This is a very elegant solution if used on white background. I would like to the the background between the word and the shadow (if there is a backgroundimage). – schmendrich Nov 23 '15 at 11:04
  • Sorry, I meant "see the background" instead of "the the background" – schmendrich Nov 23 '15 at 11:59
  • @schmendrich That requires to unpaint the pixels painted by the shadow. and requires quite some effort – percusse Nov 23 '15 at 15:35
  • If even you (as a TikZ-Expert) say it's much effort ... :-( I thought there would be an relatively "easy" way, since I saw clipping examples like this: tex.stackexchange.com/questions/249717/… – schmendrich Nov 23 '15 at 16:07
  • 1
    @schmendrich Well expert no but the linked answer yes. However note that you have to punch through the shadow too to see the background through the white layer. That's the complicated part in my understanding. But you never know we have a lot of clever clever people here. – percusse Nov 23 '15 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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