I want to draw a tikz node that has as its baseline the baseline of the text around and have a drop shadow. My code however causes the drop shadow to be misplaced.
\documentclass[]{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\newcommand{\propbox}[1]{
\hspace{-.125cm}\tikz[baseline=(A.base)]{\node[
fill = red,
blur shadow={shadow blur steps=5}] (A) {#1};}
}
\begin{document}
This is \propbox{some} sample text.
\end{document}
Compare this to the correct shadow, where the baseline for the node is not specified:
How can I fix the shadow?




\hspace, add a%at the end of the\newcommand{\propbox}[1]{line, to remove the space caused by the newline in the code. – Torbjørn T. Nov 17 '17 at 18:31