3

Follow-up question to How can I tikz the equivalence (i.e. $\Leftrightarrow$) as arrow?

What if I want to draw the equivalence arrow over a (non-white) background color? The fill option seems to have no effect.

\documentclass{beamer}
\usetheme{Madrid}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows}
\begin{document}

\begin{frame}
  \begin{definition}[How to fill the following arrow with background color?]
    \begin{tikzpicture}
      \draw[implies-implies,double equal sign distance,fill=bg] (2,1) -- (3,2);
    \end{tikzpicture}
  \end{definition}
\end{frame}

\end{document}

enter image description here

jpb
  • 501

2 Answers2

7

You want the double key, not fill. Also note that the arrows.meta library has superseded the arrows library.

\documentclass{beamer}
\usetheme{Madrid}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}

\begin{frame}
  \begin{definition}[How to fill the following arrow with background color?]
    \begin{tikzpicture}
      \draw[Implies-Implies,double equal sign distance,double=bg] (2,1) -- (3,2);
    \end{tikzpicture}
  \end{definition}
\end{frame}

\end{document}
Torbjørn T.
  • 206,688
5

You have to specify the double styling :

\draw[implies-implies,double equal sign distance,double=bg] (2,1) -- (3,2);
Dorian
  • 628