You are here: Conditional Text and Attributes > Specifying Conditional Text

Specifying Conditional Text

There is more to single-source authoring than merely converting documents to the appropriate format. This is particularly true when designing a Help system for both online and print media. In many cases creating unique content for different platforms would better suit your audience. Here are some examples in which deviating from the single-source philosophy has its advantages:

      You use graphics in the printed manual, but omit them from the online Help to conserve screen real estate and minimize the time needed to load pages.

      You provide links to related topics in the online Help, but omit them from the printed manual to avoid disrupting the narrative flow.

      You need to describe a set of procedures, each of which shares a common set of preliminary steps. In the online Help, you include the preliminary steps at the beginning of each procedural topic to provide adequate context for the reader. In the printed manual, you describe the preliminary steps once, immediately before the procedural topics, to keep them from becoming tedious and repetitive.

Fortunately, Doc-To-Help’s conditional text feature can help resolve design issues such as these. By allowing you to designate entire source documents or just portions of them for individual platforms, Help targets or attributes (or combinations thereof), Doc-To-Help gives you full control over the content of each one—without sacrificing the benefits of having a single-source project.

Doc-To-Help implements conditional text in Microsoft Word using Doc-To-Help Markup Language (D2HML) comments or D2HML styles. Conditional text may consist of more than one paragraph and require style formatting. Microsoft Word does not allow you to apply style formatting to text already formatted with a conditional text style, so Doc-To-Help formats conditional text as a comment, by default. Then you can apply styles within the conditional text. You also have the option of formatting conditional text using D2HML styles. This is recommended for smaller ranges of conditional text not spanning multiple paragraphs and not containing style formatting.

Note: You can also specify conditional text in Word documents using the classic, non-D2HML method, but this is not the recommended method. It has been kept for compatibility with older Doc-To-Help projects. See Using Classic Doc-To-Help Conditional Text for more information.

In HTML documents, all conditional text can be specified using D2HML styles since HTML has no limitations on style formatting within conditional text. To specify conditional text:

      Using D2HML Comments in Word documents

Select a range of text and click the Conditional Text button  on the D2HML Styles toolbar. Then, in the Condition window, choose the platform, Help target or attribute in which you want the range to be visible. Doc-To-Help applies the conditional text comment to the selected text.

      Using D2HML Styles in Word or HTML documents

Select a range of text and click the Conditional Text button  on the D2HML Styles toolbar in Word, FrontPage or Dreamweaver. Then, in the Condition window, choose the platform, Help target or attribute in which you want the range to be visible.

Note: If using Word documents, you must uncheck the Apply as Comment checkbox so that Doc-To-Help formats the text as a style rather than a comment.

Doc-To-Help applies the C1H Conditional character style to the selected text. The Behavior property of this style is set to Conditional Text, telling Doc-To-Help to treat it as such. If you are using an HTML editor other than FrontPage or Dreamweaver, you can apply the C1HConditional style or use HTML code (usually done by advanced HTML users). See Doc-To-Help Markup Language (D2HML) for more information.

Doc-To-Help also gives you the option of applying conditions to whole topics in both Word and HTML source documents by using the Topic.Condition property. To apply a condition to a topic using D2HML, click anywhere within the topic (or page, if using a single topic document) where you want to apply the condition (no specific text must be selected) and press the Topic Properties button on the D2HML Styles toolbar. You can then use the dialog box to apply the condition. For more information, see Topic Properties Hot Spot.

Alternatively, you can use the Doc-To-Help Project editor to apply conditions. Select the topic in the project editor, click the Condition ellipsis button and choose the platform, Help target or attribute in which you want the range to be visible. The condition is applied to the entire topic.

If you want to apply a condition to an entire Word or HTML source document, you can use the Document.Condition property. Simply select the document in the Doc-To-Help project editor, and use the Condition dialog box to specify the condition.