Can I have interactive SVG image files created with doxygen in CHM files?

馋奶兔 提交于 2019-12-11 19:51:01

问题


I want to use interactive svg image files in my documentation created with doxygen. Opening the html help files in a browser shows no error.

When I open the page in windows chm help file viewer I get an error:

An error has occurred in the script on this page.
Line: 9
Char: 1
Error: "init" is undefined.
Code: 0
URL: mk:@MSITStore some_long_address.svg

What can I do to use interactive svg image files?


回答1:


Please try adding the names of the *.svg files to the [FILES] list in your project (.hhp) file. This will ensure that the .svg files are compiled into the help file, which may not be the case at present.

If you're using HTML Help Workshop, the procedure for adding the file names to the [FILES] section is as follows:

  1. Open the .hhp file in HTML Help Workshop.
  2. Click the Add/Remove Topic Files button on the Project tab.
  3. Click Add.
  4. In the File Name field, type *.svg.
  5. Click Open, select the files to add to the list, and then click Open again.

Having some experience with help authoring and CHM files you can go the short way by editing your *.hhp file with a text editor. Add a new wildcard line for all SVG files in the [FILES] section like:

[FILES]
svg\*.svg
design.css
...

You should check the HTML code too. You'll need HTML Code like:

<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=9">
  <title>SVG - Example 2</title>
</head>

<body>
  <embed src="../svg/svg-sample-Circle.svg" type="image/svg+xml">
</body>
</html>

You may want to test compiling a CHM file including SVG's for your needs. So I uploaded some files and a CHM project file Download CHM SVG sample files.

Please note, to open the files right-click the saved *.zip or *.chm file, click Properties, and then click Unblock.



来源:https://stackoverflow.com/questions/22664600/can-i-have-interactive-svg-image-files-created-with-doxygen-in-chm-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!