Is it possible to use fancyvrb, eso-pic and TikZ simultaneously?
The verbatim settings are not being reset in the page head overlay from eso-pic
as a workaround you could do
\documentclass{article}
\usepackage{fancyvrb}
\usepackage{tikz}
\usepackage{eso-pic}
\AddToShipoutPictureFG{%
\catcode`$=3
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north east] at (current page.north east) {Hello};
\end{tikzpicture}}
\begin{document}
\tikz{\fill[blue](0,0)rectangle(1,1);}
\VerbatimInput{tikzducks.sty}
\end{document}
The error message is here a false positive: Even if the picture would use $
, as they are already tokenized they would work fine. The check from tikz doesn't prevent following errors as it doesn't reset the catcode. I would redefine the tikz command that checks the catcode of the $
either to relax or to a warning. Imho this is quite enough.
\documentclass{article}
\usepackage{fancyvrb}
\usepackage{tikz}
\makeatletter
% or \let\tikz@ensure@dollar@catcode\relax
\def\tikz@ensure@dollar@catcode{%
\ifnum\catcode`\$=3 %
\else
\pgfutil@packagewarning{tikz}{Sorry, some package has redefined the meaning of the
math-mode dollar sign. This is incompatible with tikz and its calc
library and might cause unrecoverable errors}%
% only show warning once:
\global\let\tikz@ensure@dollar@catcode=\relax
\fi
}%
\makeatother
\usepackage{eso-pic}
\AddToShipoutPictureFG{%
\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north east] at (current page.north east) {Hello};
\end{tikzpicture}}
\begin{document}
\tikz{\fill[blue](0,0)rectangle(1,1);}
\VerbatimInput{tikzducks.sty}
\end{document}