From f78a0e52306951f8e4031bf6db9fbfba83982fcf Mon Sep 17 00:00:00 2001
From: Christian Soffke <christian.soffke@gmail.com>
Date: Wed, 8 Dec 2021 14:01:39 +0100
Subject: Manual (HTML): fix image aspect ratio and size

Change-Id: If7c680badcb1a493e2a2059d84ea5b154382bad2
---
 manual/preamble.tex | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

(limited to 'manual/preamble.tex')

diff --git a/manual/preamble.tex b/manual/preamble.tex
index 2d49623a57..187f7c1f3a 100644
--- a/manual/preamble.tex
+++ b/manual/preamble.tex
@@ -178,19 +178,21 @@
     \newcommand{\seriesimg}{\specimg}
 \fi
 
+\newcommand{\includescreenshot}{\Ifpdfoutput{\includegraphics[width=\screenshotsize]}{\includegraphics}}
+
 \newcommand{\screenshot}[3]{
   \begin{figure}[H]
     \begin{center}
       \IfFileExists{#1-\genericimg-\specimg.png}
-        {\includegraphics[width=\screenshotsize]{#1-\genericimg-\specimg.png}
+        {\includescreenshot{#1-\genericimg-\specimg.png}
          \typeout{Note: device specific image used}}
         {\IfFileExists{#1-\genericimg-\seriesimg.png}
-          {\includegraphics[width=\screenshotsize]{#1-\genericimg-\seriesimg.png}
+          {\includescreenshot{#1-\genericimg-\seriesimg.png}
            \typeout{Note: series specific image used}}
           {\IfFileExists{#1-\genericimg.png}
-            {\includegraphics[width=\screenshotsize]{#1-\genericimg.png}}
+            {\includescreenshot{#1-\genericimg.png}}
             {\IfFileExists{#1}
-              {\includegraphics[width=\screenshotsize]{#1}
+              {\includescreenshot{#1}
                \typeout{Warning: deprecated plain image name used}}%
               {\typeout{Missing image: #1 (\genericimg) (\specimg)}%
                \color{red}{\textbf{WARNING!} Image not found}%
-- 
cgit v1.2.3

