#### 4.1.7 Producing print output selectively

DITA topicref attribute @print (with value yes, no, or printonly) allows you to specify whether the referenced topic is to be included in print output, excluded from print output, or included only in print output.

By default, DITA2Go includes topics referenced with @print="printonly" in RTF output for Word or WordPerfect, but in no other output type. To include topics for which @print="printonly" in other output types:

    [Setup]
    ; PrintProject = No (default) or Yes (override topic inclusion
    ; that is based on value of @print attribute)
    PrintProject = Yes

When PrintProject=Yes, topics for which @print=printonly are included in output.

When PrintProject=No, topics for which @print="printonly" are included only in Word or WordPerfect output; and topics for which @print="no" are included in all outputs, except for Word and WordPerfect.

Table 4-2 shows the effect of the PrintProject setting for different values of the @print attribute.

Table 4-2 Topics included in output based on PrintProject setting

PrintProject | @print attribute | Include topic in output?
    No
| not present | Yes
    yes
| Yes
    no
| No for print RTF, Yes for all others
    printonly
| Yes for print RTF, No for all others
    Yes
| not present | Yes
    yes
| Yes
    no
| No
    printonly
| Yes

Note: You do not need to specify a PrintProject setting at all unless you are trying to override normal expectations for type of output.

Do it with PI markers

If your DITA maps do not include values for the topicref @print attribute, you can achieve the same effect with PI markers inserted in the topicrefs, and a ditaval file. For example:

    <?dtall Print="printonly" ?>

In this example the effect on DITA2Go output is the same as if you had included @print="printonly" in the topicref for each such topic.

Previous Topic: 4.1.6 Checking output type and file extension

Next Topic: 4.1.8 Including element tags and paths in output

Parent Topic: 4.1 Specifying operating settings

Sibling Topics:

4.1.1 Connecting to XML catalogs

4.1.2 Accommodating specializations

4.1.3 Specifying a DITA XML DTD

4.1.4 Generating a map from a DITA topic file

4.1.5 Accommodating paths to network drives

4.1.6 Checking output type and file extension

4.1.8 Including element tags and paths in output

4.1.9 Reusing or discarding ASCII DCL files

4.1.10 Specifying how to treat cases, spaces, and wildcards