diff options
author | Gerald Combs <gerald@zing.org> | 2014-08-24 09:13:11 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2014-08-24 17:47:22 +0000 |
commit | 7de88cc147487a6a5b31fce74b35824b347068d2 (patch) | |
tree | 87e88bfe1cc74e893ea46fe35c819e89f74ab469 /docbook | |
parent | a68eab6ab57e2ba3dff5f49a90cdf9bd81a45f0a (diff) | |
download | wireshark-7de88cc147487a6a5b31fce74b35824b347068d2.tar.gz |
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')
-rw-r--r-- | docbook/Makefile.common | 5 | ||||
-rw-r--r-- | docbook/Makefile.nmake | 6 | ||||
-rw-r--r-- | docbook/custom_layer_chm.xsl | 31 |
3 files changed, 38 insertions, 4 deletions
diff --git a/docbook/Makefile.common b/docbook/Makefile.common index 66fa05ae2b..e0216abdfa 100644 --- a/docbook/Makefile.common +++ b/docbook/Makefile.common @@ -206,6 +206,7 @@ WSUG_DIST = \ user-guide.xml \ git_version.xml \ GPL_appendix.xml \ + custom_layer_chm.xsl \ custom_layer_pdf.xsl \ Makefile.common \ $(WSUG_FILES) \ @@ -218,6 +219,7 @@ WSUG_SOURCE = $(WSUG_DIST) $(WSUG_GENERATED_SOURCE) WSDG_DIST = \ developer-guide.asciidoc \ GPL_appendix.asciidoc \ + custom_layer_chm.xsl \ custom_layer_pdf.xsl \ Makefile.common \ $(WSDG_FILES) \ @@ -299,4 +301,5 @@ CHUNKED_XSLTPROC_ARGS = \ --nonet http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl HTMLHELP_XSLTPROC_ARGS = \ - --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl + --nonet custom_layer_chm.xsl +# --nonet http://docbook.sourceforge.net/release/xsl/current/htmlhelp/htmlhelp.xsl diff --git a/docbook/Makefile.nmake b/docbook/Makefile.nmake index b470fc9c88..a4ec094f3b 100644 --- a/docbook/Makefile.nmake +++ b/docbook/Makefile.nmake @@ -233,9 +233,9 @@ developer-guide.chm: $(WSDG_SOURCE) @ echo --- WSDG - MICROSOFT HTML HELP --- if not exist wsdg_chm\wsdg_graphics md wsdg_chm\wsdg_graphics if not exist wsdg_chm\wsdg_graphics\toolbar md wsdg_chm\wsdg_graphics\toolbar - cp wsdg_graphics/*.* wsdg_chm/wsdg_graphics - cp common_graphics/*.* wsdg_chm/wsdg_graphics - cp wsdg_graphics/toolbar/* wsdg_chm/wsdg_graphics/toolbar + -cp wsdg_graphics/*.* wsdg_chm/wsdg_graphics + -cp common_graphics/*.* wsdg_chm/wsdg_graphics + -cp wsdg_graphics/toolbar/* wsdg_chm/wsdg_graphics/toolbar $(XSLTPROC) --stringparam base.dir wsdg_chm/ $(COMMON_XSLTPROC_ARGS) \ $(WSDG_XSLTPROC_ARGS) $(HTMLHELP_XSLTPROC_ARGS) developer-guide.xml -$(HHC_EXE) htmlhelp.hhp 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> |