I created a newcommand like this: \newcommand{\txtDBC}[1]{\contour{white}{#1}} and I want to apply it on all text and math formula in a tikzpicture.
The first was to declare a specific font using font keyword:
\begin{tikzpicture}[font=\small]
...
\end{tikzpicture}
But my \txtDBC command need one parameter. How can I rewrite it for using it as the \small command? Maybe another solution can be used.
MWE:
\documentclass[]{standalone}
\usepackage{esvect,tikz}
\usepackage[outline]{contour}
\newcommand{\vecteur}[1]{\protect\vv{#1}}
\newcommand{\txtDBC}[1]{\contour{white}{#1}}
\begin{document}
\begin{tikzpicture}
\node[fill=blue]{\txtDBC{$\vecteur{aa}$}};
\end{tikzpicture}
\end{document}
Result:

Expected syntax:
...
\begin{document}
\begin{tikzpicture}[font=\txtDBC]
\node[blue]{$\vecteur{aa}$};
\end{tikzpicture}
\end{document}
\pgfnodeparttextbox? otherwise I am afraid there is no such macro because\tikz\node{\verb|%|};compiles. – Symbol 1 Mar 01 '15 at 17:17\pdfliteralwhich is not drawing contours of a box and therefore catching a content of a node is useless: https://www.overleaf.com/read/zcbnnkbgnhsz. It might help. – Malipivo Mar 21 '15 at 14:42