# Raise text out of the paper plane (with shadows as well)

How would one achieve an "raised-text-box-effect (with added shadows)" like in the picture below for G(V, E) (the \raisebox command apparently isn't meant for this task):

-
@adn Thank you for allowing the image! – courteous Jan 3 '12 at 8:46
You can use a simple LaTeX-Command \shadowbox. Alternativ you use tikz or pstricks. – Marco Daniel Jan 3 '12 at 9:11
@MarcoDaniel You've meant \shadowbox from the fancybox package? Because (using MikTeX 2.7 and TeXworks) I can only use \shabox (not \shadowbox) from the \usepackage{shadow}. Also, even with \shabox "working", I don't know how to set, say, the box's size. – courteous Jan 3 '12 at 9:43
The package fanycybox uses only simple rule commands to provide the shadowbox-command. This was the command I meant. Here an example: \documentclass[12pt]{article} \usepackage{fancybox} \begin{document} Text \shadowbox{$G(V,e)$} Text \end{document} – Marco Daniel Jan 3 '12 at 10:47
fancybox has no option to "soft" the shadow. You can define your own shadobox with tikz to set such an environment. An example is given on texample. In relation to the link (UNTESTED):\documentclass[12pt]{article} \usepackage{tikz}\usetikzlibrary{shapes,arrows,shadows} \tikzstyle{shadownode}{draw,fill=blue!20,dropshadow,anchor=west} \begin{document}Text\tikz[baseline=current bounding box.west]\node[shadownode]{$G(V,e)$};\end{document} – Marco Daniel Jan 3 '12 at 12:35

\documentclass{article}
\usepackage{tikz}

\newcommand{\raisedtext}[1]{%
\begin{tikzpicture}
[baseline=(X.base)]\node [drop shadow,fill=white,draw,very thin] (X) {#1};
\end{tikzpicture}}

\begin{document}
Text \raisedtext{Hello World!} Text
\end{document}


-
No document class? – doncherry Jan 3 '12 at 15:10
@doncherry Whatever one likes, actually; I added one. – egreg Jan 3 '12 at 15:11
Replaced the image with one that is not jagged, and removed related comment. – Peter Grill Jan 3 '12 at 15:13
@PeterGrill Thanks – egreg Jan 3 '12 at 15:15
Very useful snippet, thank you. – courteous Jan 3 '12 at 16:18