Using Text in External Files to Assign Long Descriptions to Images in Word
Use the ImageLongDescByRef marker to assign long descriptions to images using text in external files. To assign a long description to an image, your Stationery and template must have the ImageLongDescText marker type configured. Your output format must also support this feature.
The following procedure provides an example of how to use text in external files to assign long descriptions to images in Microsoft Word source documents using Microsoft Word 2003. Steps for using text in external files to assign long descriptions to images in Microsoft Word may be different in other versions of Microsoft Word.
To assign a long description to an image using marker text in a Microsoft Word source document
1. Create a .txt
file that contains each image long description.
2. Place each image long description text file in a folder in the ProjectName\Formats\
TargetName\Files
folder for your project, where ProjectName is the name of your ePublisher project and TargetName is the name of your target.
For example, place the each image long description in the following location:
ProjectName\Formats\
TargetName\Files\
longdescriptions\
imagelongdescription.txt
where ProjectName is the name of your ePublisher project, TargetName is the name of your target, longdescriptions is the name of the folder where you placed the image long description, and imagelongdescription is the name of the .txt
file that contains the image long description.
3. In your Microsoft Word source document, locate the image to which you want to assign a long description.
4. Right-click the image, and then click Format Picture or Format Object.
5. Change the layout setting of the image to Top and Bottom by completing the following steps:
Note: By default when you insert images into Microsoft Word, Microsoft Word inserts the image using the Inline with text layout setting. In order to specify the image scale for image output files, you must group the image and the text box that contains the ImageLongDescByRef marker. However, you cannot group images using the In line with text layout setting in Microsoft Word. To work around this known Microsoft Word issue, if you have an image that uses an In line with text layout setting, use the Top and Bottom layout setting for the image while you insert the ImageLongDescText marker, and then reapply the In line with text layout setting after you group the image and the ImageLongDescText marker.
a. On the Layout tab, click Advanced.
b. On the Text Wrapping tab, click Top and Bottom.
c. Click OK, and then click OK again to close the window.
6. Select your image.
7. On the Insert menu, click Text Box, and then click to the right of your image. Microsoft Word inserts a text box.
8. Insert your cursor into the text box, and then complete the following steps:
a. On the WebWorks menu, click Markers.
b. In the Markers field, select ImageLongDescByRef from the list of markers.
c. In the Value field, type the path to the .txt
file that contains the long description you want to assign to the image.
For example, type:
./
longdescriptions/
imagelongdescription.txt
where longdescriptions is the name of the folder where you placed the image long description, and imagelongdescription is the name of the .txt
file that contains the image long description.
d. Click OK. ePublisher inserts the ImageLongDescText marker into the text box.
e. Select the text box.
f. Right-click the selected text box, and then click Format Text Box.
g. On the Colors and Lines tab, in the Fill area, in the Color field, select No Fill.
h. In the Line area, in the Color field, select No Line.
i. Click OK.
9. Drag and drop the text box onto the image.
10. Select the text box and the image.
11. Right-click the selected text box and image, and then click Grouping > Group.
Note: When you select Group, the location of the image in your Microsoft Word source document may change in relation to the text in your source document. For example, the image may move up or down in your Microsoft Word source document. This is known Microsoft Word behavior. You may need to scroll up or down in your source document to the new location of the image to find the image.
12. If your image previously used the In line with text layout setting for the image, reassign this style to your image by completing the following steps:
a. Right-click only the image, and then click Format Object.
Note: You must ensure you right-click only the image, and not on the text box or the grouped text box and image. If you right-click on the text box or the grouped text box and image, Microsoft Word does not display the Format Object menu option on the context menu.
b. On the Layout tab, click In line with text.
c. Click OK, and then click OK again to close the window.
13. Save your Microsoft Word source document.
15. In Output Explorer, verify ePublisher assigned the long description to the image using the long description in the external file when it generated output by completing the following steps:
a. On the View menu, click Output Directory.
b. In the TargetName\
ProjectName folder, open the page that contains the image to which you assigned the long description using an external file in Notepad and verify that the longdesc
attribute references the external text file that contains the long description for the image, where TargetName is the name of your target, and ProjectName is the name of your project.