|
|
|
|
|
|
Oftentimes, you will be creating a source document that is slated for multiple purposes such as online Help and printed PDF; therefore, you will need to utilize variables and conditions in your source document so that ePublisher can determine what content will display in the generated output, and what content will be hidden. By using conditions and variables in your source documents, you are able to control the content that appears in the generated output. Variables are containers for content whose values tend to fluctuate or change, and conditions allow you to set the visibility of certain content within your output, which means that you can choose to hide or show any content that has a condition applied to it. In order to insert conditions in your Microsoft Word document, you will need to utilize the WebWorks Transit menu that is installed in the menu of Microsoft Word.
When you installed Transit, the installer gave you an option to install the Transit menu plug-in for Microsoft Word. If you did not select the option to install the Transit menu, then the Transit menu plug-in will not be added to the main menu in Microsoft Word. Without the Transit menu, you will not be able to apply conditions and embed markers in your output. If you did not choose to install the menu plug-in for Microsoft Word during the installation process, you can still add the menu plug-in manually.
|
2. |
Navigate to: C:\Program Files\WebWorks\Transit. |
|
3. |
Copy transit.dot. |
|
4. |
Navigate to: C:\Documents and Settings\[USERNAME]\Application Data\Microsoft\Word\STARTUP, where username is the name you use to log-in to your computer. |
|
|
If you do not see the Application Data folder, you may need to go to Tools > Folders > View, and under the Hidden files and folders section, select Show hidden files and folders. |
|
5. |
Paste transit.dot into this directory. |
Conditions allow you to set the visibility of certain content within your generated output. You can choose to show or hide certain information in your online output by applying conditions to your source document and setting the visibility for those conditions in your project. Any content that has a condition applied to it is referred to as conditional text.
For example, in your source document, you might have certain information that is used only in the print version and information that is used only in the online version; therefore, in your source document, you need to create conditions specifically for the online content and for the print content. When you create a condition, you need to set the hidden attribute for the condition. If the conditional text will be visible in the source document, then the hidden attribute should not be selected; however, if the conditional text will not be visible in the source document, then the hidden attribute should be selected.
In Microsoft Word, you can create conditions to either show or hide content within your output. These conditions can be set up so that you can tag content to either be visible or not visible when your online output is generated.
|
1. |
From the Transit menu, choose Conditions. |
|
2. |
Click on the Add button |
|
4. |
Select Hidden if you do not want the content to appear in the Microsoft Word document or leave Hidden deselected if you want the text to appear in the source document. |
|
5. |
Choose a color to highlight the conditional text with. By highlight the conditional text, you will be able to easily see exactly where conditional text is located in your source documents. |
After you have created conditions in your source document, you need to determine what content needs to be tagged as conditional text.
|
2. |
From the main menu, choose WebWorks > Conditions. |
|
4. |
Click on the Apply Condition button to apply the condition. |
Using Transit, you set preferences that control how conditional text is used and how it appears in your Microsoft Word document. You can also specify whether the Transit toolbar is displayed.
If you would like all of your conditions to be highlighted in your source document, select Use Highlight. By enabling this option, you will be able to see where conditional text is located in your document.
If a section of your document is marked with more than one condition, one or more of the conditions may be set to Show, while others are set to Hide. Select Give priority to show conditions if you want the content with overlapping conditions to be shown. If you want the content with overlapping conditions to be hidden in Word, de-select this option. By default, this option is selected.
Select Enable Toolbar if you want to display the Transit toolbar among your other Microsoft Word toolbars. By default, this option is selected.
In Adobe FrameMaker, you can create conditions so that you can tag content to either be visible or not visible when your online output is generated.
|
1. |
From the main menu, choose Special > Conditional Text. |
|
2. |
Click on the Edit Condition Tag button. |
|
6. |
Click the Set button to create the condition. |
Within your Transit project, you can set the visibility for conditions. The values that you set here will affect the visibility of conditional text throughout your entire project.
|
1. |
From the main menu, choose Format > Conditions. |
|
a. |
Hidden - Always hide the conditional text. |
|
b. |
Visible - Always shows the conditional text. |
|
c. |
Use document value - Always uses the visibility set for the condition in the source document. |
|
5. |
Click the OK button to apply the settings. |
If you have pass-through code in your source documents that you would not like Transit to process, you can apply a condition to it. For example, if you have embedded multimedia files in your source documents, like avi or flash files, you can apply a condition to the code so that the code will display as it is in the HTML source code (see examples below):
<embed src="sample.avi" width="400"
<embed src="sample.swf" width="400"
http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";>
Pass-through conditions allow you to embed source code into your output. Transit will not process content that is tagged with a pass-through condition.
|
3. |
From the WebWorks Transit menu, choose Conditions. |
|
5. |
Click on the Apply button. |
A variable serves as a placeholder for information that is liable to change. It would be efficient to set up variables for any information whose value fluctuates frequently or whose value is susceptible to change. By setting up variables in the source document, it allows you to have global control over the values contained within those variables.
For example, a date can be set up as a variable; if the date ever needs to be modified, it would be possible to make the change from a single location instead of having to search for and replace all the instances of that date. Another common example is the version of a product. If you define a variable for the product version, when the product version changes, you can change the name of your product version variable in one location to change every instance of the product version in your document.
In Microsoft Word, you can create variables that allow you to control your content globally.
|
1. |
Go to File > Properties. |
|
2. |
Select the Custom tab. |
|
4. |
Select a type for the variable to be created; variables can be text, a date, a number, or a boolean value of yes or no. |
|
5. |
Type in a value for the variable; this is the value that will appear in the Word document whenever the variable is referenced. For example, if the variable is a date, then the value for the variable can be 01/01/2001. |
|
6. |
Click Add. |
|
7. |
Click OK to close the Properties dialog box. |
After you have created variables in your source document, you can insert the variables into your content.
|
1. |
Inside the Word document, choose an insertion point; this is where the variable will be inserted. |
|
2. |
From the main menu, go to Insert > Field. |
|
3. |
Select DocProperty from the Field names list. |
|
5. |
Click OK. |
One of the major benefits of variables is that you can control their values from a single location. In ePublisher, you are able to change the value of any variable for each output target; when you change the value of a variable in ePublisher, it will only affect the value of the variable for the given ePublisher output target. It does not change the value of the variable in your actual source document.