## LaTeX forum ⇒ Presentations and Posters ⇒ insert a graphic in a block

Beamer, Powerdot and KOMA-Script presentations, Conference posters (a0poster, baposter, tikzposter)
NELLLY
Posts: 113
Joined: Thu Nov 26, 2009 2:21 am

### insert a graphic in a block

Hello,
I need to insert a graphic in a block of my beamer presentation. I used the following code
\documentclass[xcolor={dvipsnames}, 10pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{marvosym} %
\usepackage{hyperref} %
\usepackage{transparent} %
\usepackage{ragged2e, siunitx, xcolor,caption}
\usepackage{tabularx,graphicx,rotating,subfigure,multirow,colortbl}
% \usepackage{enumitem}
\newcommand{\Min}{\operatornamewithlimits{Min}}
\captionsetup{
%format=hang,
%width=15cm,
aboveskip=4pt,
belowskip=1pt
}
%\usepackage{etoolbox}
% \apptocmd{\frame}{\justifying}{}{}
\let\olditem\item
\renewcommand\item{\olditem\justifying}
\usepackage[english]{babel}
\usetheme{Warsaw}
\setbeamertemplate{caption}[numbered]
\hyphenpenalty 10000
\justifying
\setbeamertemplate{footline}[frame number]

\title{On Economic Design of Dynamic Control Charts for Attribute Data}

\date{}
%%%%%Mes cdes%%%%
\newcommand{\makepart}[1]{ % For convenience
\part{Title of part #1} \frame{\partpage}
\chapter{Chapter}\begin{frame} Chapter \end{frame}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\begin{frame}
\begin{block}{Operation of the chart}
%\vspace*{-0.5cm}
\begin{figure}[H]
\centering
\centering\vspace*{-0.5cm}
\includegraphics[width=0.9\textwidth]{D:/MESIMAGES/VSSchart}\vspace{-2.5cm}
\caption{Chart's partition}
\end{figure}
\end{block}
\end{frame}
\end{document}

I get the output of the attachment.
I need to have the background of the figure in the same color of the block (grey instead of white), what should I do?
Thanks.
Attachments
essaiforum.pdf

LaTeXguide.org • LaTeX-Cookbook.net

Stefan Kottwitz
Posts: 9878
Joined: Mon Mar 10, 2008 9:44 pm

### insert a graphic in a block

Hi Nellly!

That color is in the graphic, you need to change it or make that area transparent.

Even better: don't use \includegraphics,but create the figure within the beamer LaTeX document instead. You could use TikZ for that.

Stefan