0

I use the following code to simulate lightning with a red shadow. How can I rotate the whole minipage maintaining the relation between them.

\documentclass{beamer}
\usetheme{PaloAlto}
\setbeamertemplate{navigation symbols}{}
\usepackage{verbatim}
\usepackage{tikz}
\newcommand*{\Lightningdble}[1][]{%
\tikz[
 x=4 * height("H"),% symbol width
 y=4*height("H"),% symbol height
 line width=.1 * height("H"),
 line join=round,]
 \filldraw[{#1}] (0,0) -- ++(27:.6) -- ++(168:.24) -- ++(34:.4) -- ++(168:.24) -- ++(34:.4) -- ++(-152:.56) -- ++(-8:.26) -- ++(-148:.44) -- ++(-8:.24) -- cycle;}
\begin{document}
\begin{frame}[t]
\frametitle{Lightning}
\begin{minipage}[rotate=40]{\textwidth}
{\rotatebox{0}{\Lightningdble[red!70!black, fill=red!40!white, line join=round, xscale=2.25, yscale=2.25, rotate=0]}}
\hspace{-2.11cm}
{\rotatebox{0}{\Lightningdble[red!70!black, fill=yellow!30!white, line join=round, xscale=2.25, yscale=2.25, rotate=0]}}
\end{minipage}
\end{frame}
\end{document} 

enter image description here

  • 1
    minipage is not possible directly to rotate. for rotating it you need to enclose it in \rotatebox. in your case the same you will achieve with remove minipage. with rotation your lightning preserve its size, i.e consequently its vertical and horizontal projection depends on rotation angle. – Zarko Dec 2 '18 at 14:31

Your Answer

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

Browse other questions tagged or ask your own question.