Graphics, Figures & Tablesinsert png picture in beamer

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ahmed
Posts: 7
Joined: Fri Nov 21, 2008 11:06 pm

insert png picture in beamer

Post by ahmed »

Hi everybody
I cannot insert png picture in beamer (power point presentation)
it always give me error ,i am building latex in kile with latexpdf .the tex file and log file are attached

I am using kile 2.0.2(using KDE 3.5.10 release 21.11 opensuse)
thank in advance
Attachments
lax.png
lax.png (95.34 KiB) Viewed 39095 times
aa.log
(21.96 KiB) Downloaded 590 times
aa.tex
(432 Bytes) Downloaded 783 times

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

insert png picture in beamer

Post by localghost »

You don't need any package like (x)color because it is loaded by the beamer class. Trying to compile your example on my system it caused an option clash. Use only the graphicx package for graphics inclusion. Avoid any driver option like pdftex or similar. The packages will detect on their own which compiler engine is running. Modify your code as shown below.

Code: Select all

\documentclass[compress,slidestop,smaller]{beamer}
\usepackage{graphicx}
\usetheme{Antibes}   % Beamer theme v 3.0
\usecolortheme{lily} % Beamer color theme

\title{Chapter 3}
\subtitle{yyy}
\author{yyyyyyyy}
\institute{yyyyyyyyy} % Optional, I think

\begin{document}
  \begin{frame}
    \includegraphics{lax}
  \end{frame}
\end{document}
Such simple graphics can be drawn very easy by hand. See the example below.

Code: Select all

\documentclass[english,smaller]{beamer}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{tikz}

\begin{document}
  \begin{frame}
    \begin{tikzpicture}[scale=3,font=\small,thick]
      \draw[help lines](-0.25,0) grid (2.25,1.25);
      \draw(0,1.5) node[left] {$t$} -- (0,0) -- (2.5,0) node[right] {$x$};
      \foreach \y in {0,1}
        \foreach \x in {0,1,2}
          \filldraw[fill=white,very thin](\x,\y) circle (1pt);
      \foreach \x in {0.5,1.5}
        \fill(\x,0.5) circle (1pt);
      \draw (0.5,0) -- (0.5,0.5) -- (1.5,0.5) -- (1.5,0);
      \draw (-0.25,0) node[left] {$n$};
      \draw (-0.25,0.5) node[left] {$n+\frac{1}{2}$};
      \draw (-0.25,1) node[left] {$n+1$};
      \draw (0,0) node[below=2pt] {$j-1$};
      \draw (0.5,0) node[below] {$j-\frac{1}{2}$};
      \draw (1,0) node[below=2pt] {$j$};
      \draw (1.5,0) node[below] {$j+\frac{1}{2}$};
      \draw (2,0) node[below=2pt] {$j+1$};
    \end{tikzpicture}
  \end{frame}
\end{document}
For more information see the pgf/tikZ manual.


Best regards
Thorsten¹
ahmed
Posts: 7
Joined: Fri Nov 21, 2008 11:06 pm

Re: insert png picture in beamer

Post by ahmed »

great thanks for you Thorsten.the latex code for inserting picture is working perfectly.And your code for drawing it is fantastic.
Thanks
Ahmed
Post Reply