In beamer, if we demo some code with tkzexample package (refer to this example),sometimes code will run out of the frame box.
- Is it possible to make it auto wrap if code line too long?
- The distance between 2nd and 3rd diagram seems not equal.
example code:
\documentclass[t]{beamer}
\usepackage{tikz}
\usepackage{tkzexample}
\colorlet{graphicbackground}{red!10!white}%
\colorlet{codebackground}{blue!10!white}%
\colorlet{codeonlybackground}{blue!10!white}
\begin{document}
\begin{frame}[fragile]{tikz example}
\begin{tkzexample}[width=2cm]
\begin{tikzpicture}
\draw (0,0) node[circle,
shade,
ball color=orange,
minimum size=2cm]{};
\end{tikzpicture}
\end{tkzexample}
\begin{tkzltxexample}[line frame width=0pt]
\begin{tkzexample}[width=1cm]
\tikz[baseline]
\node [circle,line width=1ex,draw=blue,fill=blue]
{\textcolor{white}{\Large{TikZ}}};
\end{tkzexample}
\end{tkzltxexample}
\begin{tkzexample}[width=1.7cm]
\tikz[baseline]
\node [circle,line width=1ex,draw=blue,fill=blue]
{\textcolor{white}{\Large{TikZ}}};
\end{tkzexample}
\end{frame}
\end{document}
Output:

