Here is a patch to improve this a bit.  It turns back on making the SVG
images in the HTML output scale with the page size.  I also added some
CSS stuff to make the width 75% on large screens for a more pleasing look.

This fixes it for the gin image.  The pagelayout image still doesn't
scale, presumably for the reasons you identified inside the SVG code.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From e2647f228f7cb4b553e858b61a0e86f7740b627e Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Thu, 4 Apr 2019 13:13:30 +0200
Subject: [PATCH] Better scaling of images in HTML output

---
 doc/src/sgml/stylesheet-html-common.xsl | 3 ++-
 doc/src/sgml/stylesheet.css             | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/stylesheet-html-common.xsl 
b/doc/src/sgml/stylesheet-html-common.xsl
index b105005235..f89f399129 100644
--- a/doc/src/sgml/stylesheet-html-common.xsl
+++ b/doc/src/sgml/stylesheet-html-common.xsl
@@ -13,8 +13,9 @@
 
 <!-- Parameters -->
 <xsl:param name="make.valid.html" select="1"></xsl:param>
+<xsl:param name="formal.object.break.after">0</xsl:param>
 <xsl:param name="generate.id.attributes" select="1"></xsl:param>
-<xsl:param name="ignore.image.scaling" select="1"/>
+<xsl:param name="make.graphic.viewport" select="0"/>
 <xsl:param name="link.mailto.url">pgsql-docs@lists.postgresql.org</xsl:param>
 <xsl:param name="toc.max.depth">2</xsl:param>
 
diff --git a/doc/src/sgml/stylesheet.css b/doc/src/sgml/stylesheet.css
index c355fbecac..8518839bac 100644
--- a/doc/src/sgml/stylesheet.css
+++ b/doc/src/sgml/stylesheet.css
@@ -102,3 +102,9 @@ var         { font-family: monospace; font-style: italic; }
 acronym                { font-style: inherit; }
 
 .option                { white-space: nowrap; }
+
+@media (min-width: 800px) {
+  .mediaobject {
+    width: 75%;
+  }
+}
-- 
2.21.0

Reply via email to