Presentations and Postersinsert a graphic in a block

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

insert a graphic in a block

Post by NELLLY »

Hello,
I need to insert a graphic in a block of my beamer presentation. I used the following code

Code: Select all

\documentclass[xcolor={dvipsnames}, 10pt]{beamer}
  \usepackage[utf8]{inputenc}
  \usepackage{marvosym} %
 \usepackage{hyperref} %
 \usepackage{transparent} %
  \usepackage{ragged2e, siunitx, xcolor,caption}
  \usepackage{adjustbox, amsmath,booktabs,threeparttable}
  \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}{\insertframenumber/\inserttotalframenumber}
  \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
(36.78 KiB) Downloaded 518 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10358
Joined: Mon Mar 10, 2008 9:44 pm

insert a graphic in a block

Post by Stefan Kottwitz »

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
LaTeX.org admin
Post Reply