From e5a2b692fe0c5130daec80702139465d8fc22556 Mon Sep 17 00:00:00 2001
From: Dominik Riebeling <Dominik.Riebeling@gmail.com>
Date: Sat, 1 Apr 2006 19:16:12 +0000
Subject: Extention of \screenshot to drop a warning if image not found by me.
 This makes it possible to build the manual with missing image files. Use
 \screenshot on all remaining places. Add the \genericimg macro to some
 screenshots (part of FS #4981 by Mark Bright)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9409 a1c6a512-1295-4272-9138-f99709370657
---
 manual/preamble.tex | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'manual/preamble.tex')

diff --git a/manual/preamble.tex b/manual/preamble.tex
index 138d9830ec..fb6fdc2a54 100644
--- a/manual/preamble.tex
+++ b/manual/preamble.tex
@@ -92,8 +92,10 @@
 \newcommand{\screenshot}[3]{
   \begin{figure}[!ht]
     \begin{center}
-      \includegraphics[width=4cm]{#1}
-      \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{
+      \IfFileExists{#1}{\includegraphics[width=4cm]{#1}}{%
+        \typeout{Missing image: #1}%
+        \color{red}{\textbf{WARNING!} Image not found}}%
+      \if\blank{#3}\else{\label{#3}}\fi\if\blank{#2}\else{%
         \caption{#2}}\fi
     \end{center}
   \end{figure}
-- 
cgit v1.2.3

