2

Imagine I want to do the following:

\documentclass{beamer}

\usetheme{default}
\usecolortheme{rose}
\usecolortheme{seahorse}

\usepackage{tikz}

\begin{document}
    \begin{frame}
        \begin{block}{A braiding}
            \begin{tikzpicture}[braiding/.style={thick,preaction={draw,white,line width=2.3pt}}]
                \draw[braiding] (0,0) -- (1,1);
                \draw[braiding] (1,0) -- (0,1);
            \end{tikzpicture}
        \end{block}
    \end{frame}
\end{document}

enter image description here

In the braiding style, I actually want the preaction not in white, but in the background colour. Well of course I could dive into the beamer source code, find the colour and plug it in, but I want a general solution.

3

Like this?

\documentclass{beamer}

\usetheme{default}
%\usecolortheme{rose}
%\usecolortheme{seahorse}
\usecolortheme{albatross}

\usepackage{tikz}

\begin{document}
    \begin{frame}
        \begin{block}{A braiding}
            \begin{tikzpicture}[braiding/.style={thick,preaction={draw,bg,line width=2.3pt}}]
                \draw[braiding] (0,0) -- (1,1);
                \draw[braiding] (1,0) -- (0,1);
            \end{tikzpicture}
        \end{block}
    \end{frame}
\end{document}

The colour is bg.

enter image description here

3
  • Spot on! I tried background and background color before. Is this documented anywhere?
    – Turion
    Sep 27 '15 at 16:28
  • @Turion Yes, in the beamer manual. Sep 27 '15 at 19:02
  • @HenriMenke, oh, then it's not TikZ-specific? How would I do it in TikZ without beamer?
    – Turion
    Sep 27 '15 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.