LaTeX forum ⇒ Presentations and Postersinsert 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

Postby NELLLY » Mon Jan 02, 2017 1:11 am

Hello,
I need to insert a graphic in a block of my beamer presentation. I used the following code
  1. \documentclass[xcolor={dvipsnames}, 10pt]{beamer}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{marvosym} %
  4. \usepackage{hyperref} %
  5. \usepackage{transparent} %
  6. \usepackage{ragged2e, siunitx, xcolor,caption}
  7. \usepackage{adjustbox, amsmath,booktabs,threeparttable}
  8. \usepackage{tabularx,graphicx,rotating,subfigure,multirow,colortbl}
  9. % \usepackage{enumitem}
  10. \newcommand{\Min}{\operatornamewithlimits{Min}}
  11. \captionsetup{
  12. %format=hang,
  13. %width=15cm,
  14. aboveskip=4pt,
  15. belowskip=1pt
  16. }
  17. %\usepackage{etoolbox}
  18. % \apptocmd{\frame}{\justifying}{}{}
  19. \let\olditem\item
  20. \renewcommand\item{\olditem\justifying}
  21. \usepackage[english]{babel}
  22. \usetheme{Warsaw}
  23. \setbeamertemplate{caption}[numbered]
  24. \hyphenpenalty 10000
  25. \justifying
  26. %\setbeamertemplate{footline}{\insertframenumber/\inserttotalframenumber}
  27. \setbeamertemplate{footline}[frame number]
  28.  
  29. \title{On Economic Design of Dynamic Control Charts for Attribute Data}
  30.  
  31.  
  32. \date{}
  33. %%%%%Mes cdes%%%%
  34. \newcommand{\makepart}[1]{ % For convenience
  35. \part{Title of part #1} \frame{\partpage}
  36. \chapter{Chapter}\begin{frame} Chapter \end{frame}
  37. }
  38. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  39. \begin{document}
  40.  
  41. \begin{frame}
  42. \begin{block}{Operation of the chart}
  43. %\vspace*{-0.5cm}
  44. \begin{figure}[H]
  45. \centering
  46. \centering\vspace*{-0.5cm}
  47. \includegraphics[width=0.9\textwidth]{D:/MESIMAGES/VSSchart}\vspace{-2.5cm}
  48. \caption{Chart's partition}
  49. \end{figure}
  50. \end{block}
  51. \end{frame}
  52. \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 67 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 8734
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Tue Jan 03, 2017 6:32 pm

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
Site admin


Return to “Presentations and Posters”

Who is online

Users browsing this forum: No registered users and 1 guest