aboutsummaryrefslogtreecommitdiffstats
path: root/docbook/custom_layer_chm.xsl
diff options
context:
space:
mode:
authorGerald Combs <gerald@zing.org>2014-08-24 09:13:11 -0700
committerGerald Combs <gerald@wireshark.org>2014-08-24 17:47:22 +0000
commit7de88cc147487a6a5b31fce74b35824b347068d2 (patch)
tree87e88bfe1cc74e893ea46fe35c819e89f74ab469 /docbook/custom_layer_chm.xsl
parenta68eab6ab57e2ba3dff5f49a90cdf9bd81a45f0a (diff)
Try to get HTML Help to render SVG.
Add a custom stylesheet that inserts <meta http-equiv="X-UA-Compatible" content="IE=9" > at the top of our HTML Help output. This *should* convince the WebBrowser control to draw our new SVG images. Change-Id: Iae491128195d3738951f3d19e2f82dd3fc73d1d8 Reviewed-on: https://code.wireshark.org/review/3814 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'docbook/custom_layer_chm.xsl')
-rw-r--r--docbook/custom_layer_chm.xsl31
1 files changed, 31 insertions, 0 deletions
diff --git a/docbook/custom_layer_chm.xsl b/docbook/custom_layer_chm.xsl
new file mode 100644
index 0000000000..9cca5c3997
--- /dev/null
+++ b/docbook/custom_layer_chm.xsl
@@ -0,0 +1,31 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- copied from custom_layer_pdf.xsl -->
+
+<!-- import the main stylesheet -->
+<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl"/>
+
+<!-- use graphics for admons (note, tip, ...)
+<xsl:param name="admon.graphics" select="1"/>
+<xsl:param name="admon.graphics.path">common_graphics/</xsl:param>
+<xsl:param name="admon.graphics.extension" select="'.svg'"/>
+-->
+
+<!--
+ Tell the WebBrowser control to use the IE9 rendering engine if present so
+ that our admonition graphics (which are SVG) show up. We might be able to
+ get away with "IE=8" if needed.
+ http://stackoverflow.com/questions/4612255/regarding-ie9-webbrowser-control/4613025#4613025
+-->
+<xsl:template name="system.head.content">
+ <meta http-equiv="X-UA-Compatible" content="IE=9" />
+</xsl:template>
+
+<!-- reduce the size of programlisting to make them fit the page -->
+<xsl:attribute-set name="monospace.verbatim.properties">
+ <xsl:attribute name="font-size">80%</xsl:attribute>
+</xsl:attribute-set>
+
+</xsl:stylesheet>