对于 WPF UI 应用程序,需要创建 CHM 帮助文件。
如何创建 chm 帮助文件?
先在ms word中创建文档并转换成chm帮助文件?或任何其他方法?
请帮忙
谢谢
拉姆
我使用Sandcastle Help File Builder (SHFB)来生成 CHM。
为了编写内容,我遵循了 Sandcastle MAML 指南中的指导和示例,该指南可在 codeplex 上找到。这涉及到我以一种名为“MAML”的格式编写文档,这是一种用于描述帮助文件的 XML 方言。
它看起来像这样:
<?xml version="1.0" encoding="utf-8"?>
<topic id="4e9fd731-fc2f-4bdf-9ca2-3a8755411b2f" revisionNumber="1">
<developerConceptualDocument
xmlns ="http://ddue.schemas.microsoft.com/authoring/2003/5"
xmlns:xlink ="http://www.w3.org/1999/xlink">
<!--
<summary>
<para>Optional summary abstract</para>
</summary>
-->
<introduction>
<!-- Uncomment this to generate an outline of the section and sub-section
titles. Specify a numeric value as the inner text to limit it to
a specific number of sub-topics when creating the outline. Specify
zero (0) to limit it to top-level sections only. -->
<!-- <autoOutline /> -->
<para>
</para>
</introduction>
<!-- Add one or more top-level section elements. These are collapsible.
If using <autoOutline />, add an address attribute to identify it
and specify a title so that it can be jumped to with a hyperlink. -->
<section address="Section1">
<title>Section Title</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>
Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. Integer vulputate, nibh non rhoncus euismod, erat odio
pellentesque lacus, sit amet convallis mi augue et
odio. Phasellus cursus urna facilisis quam. Suspendisse nec
metus et sapien scelerisque
</para>
<para>
Quisque pharetra lacus quis sapien. Duis id est
<externalLink>
<linkText>dictum sed, sapien</linkText>
<linkAlternateText>alt text</linkAlternateText>
<linkUri>http://stackoverflow.com/questions/tagged/chm</linkUri>
</externalLink>
</para>
</content>
</section>
<relatedTopics/>
</developerConceptualDocument>
</topic>
除了在各个页面上创作内容之外,您还需要指定大纲 - 所有页面如何组合在一起。一旦你设置好它就很容易了。然后生成 CHM 只需要运行 SHFB。
不要被标记名“developerConceptualContent”吓到。生成的 .chm 并没有任何东西使它只对开发人员有用。
SHFB 工具是免费的。
使用 word 创建帮助文件是一种选择。为此,您需要获取 Microsoft 的HTML Help SDK(免费),然后将您的文档转换为 HTML 并使用 HTML Help 编译器进行编译。
但是,有一些很好的集成工具可以帮助您大大加快这个过程。我听说过的一个好消息是来自JGSoft的 HelpScribbler。它不是免费的,但可以节省手动操作的计时器。