APPLICATION NOTE #211 USING XYWRITE III PLUS FILES WITH THE PC VERSION OF PAGEMAKER 4.0 Aldus PageMaker is a desktop publishing package that allows you to electronically lay out the pages of your publication. Most of the text and graphics used by PageMaker are prepared using other applications and then imported into PageMaker 4.0. XYQUEST has developed import and export filters that allow XyWrite III Plus files to be read into and out of PageMaker. This application note describes how to install and use these filters on an IBM PC or compatible. It also includes some tips on how to use XyWrite III Plus (Version 3.54 and later) for the most successful conversions. PROGRAM DESCRIPTION Each application program has its own command language. Each time you ``place'' a file into a PageMaker publication, PageMaker runs the file through the appropriate import filter. The filter converts the application's commands to a format that PageMaker can understand. Similarly, an export filter transforms the PageMaker commands to the format used by the specific application. To ensure that your XyWrite III Plus files are fully compatible with PageMaker 4.0, XYQUEST has developed its own filters. When you import into PageMaker a file with the extension .XY3, PageMaker sends a copy of the file through the import filter, which converts XyWrite embedded commands to PageMaker commands. If the import filter encounters a XyWrite command that is not supported by PageMaker (e.g., Column Tables), it omits that command. (Your original file remains intact, because PageMaker imports a copy of it.) The export filter creates a copy of the PageMaker file and changes the text and commands (graphics are not exported) to XyWrite format. When the export filter encounters a PageMaker command that does not have a XyWrite equivalent, it (optionally) interprets the information and stores the data in an IV (Invisible) command in the XyWrite file. The PC versions of the XyWrite filters are available on request through XYQUEST's Technical Support Department. INSTALLING THE FILTERS This installation procedure assumes you have already installed PageMaker 4.0 and XyWrite III Plus on your PC, and that XyWrite III Plus is loaded. Carry out the following steps to install the XyWrite III Plus filters. 1. Copy the filter files from the XYQUEST-supplied disk to the PageMaker Filters directory on your hard disk. Type: F5copy a:xy3imp.flt c:\aldus\ usenglsh\filters Type: F5copy a:xy3exp.flt c:\aldus\ usenglsh\filters 2. Call the file ALDUS.INI from the ALDUS\USENGLSH\ directory of your hard disk. Type: F5call aldus.ini 3. Move the cursor to the import filters section. Type: F5se /[aldusimports]/ 4. Add the following line to the ALDUS.INI file (at the end of the list of the currently installed filters) to identify the XyWrite import filter: XyWrite 3.54 Import=XY3IMP.FLT,XY3 5. Move the cursor to the beginning of the export filters section of the file. Press: Ctrl Home Type: F5se /[aldusexports]/ 6. At the end of the list of the currently installed filters, add the following line to identify the XyWrite export filter: XyWrite 3.54 Export=XY3EXP.FLT,XY3 7. Store ALDUS.INI. Type: F5store CONVERTING FILES If you use the import filter when placing a XyWrite file into PageMaker, the filter converts every XyWrite formatting command for which there is a PageMaker equivalent. This includes modes, indents, tabs, styles, footnotes, etc. PageMaker ignores commands for top margin (TP), bottom margin (BT), offset (OF), headers (RH), footers (RF), set page number (SP), snaking columns (SN), and column tables (CT). The export filter converts PageMaker commands to their XyWrite equivalent; if there is no XyWrite equivalent, the filter (optionally) stores the data in an IV (Invisible) command in the XyWrite file. This option is selected in the standard PageMaker manner by holding down the Shift key to display a Preferences dialog box. A ``checkbox'' is the only selection available. You must click on this with the mouse in order to invoke the ``invisible'' option. The IV command, which can only be seen in expanded mode, contains the label $PM$ followed by a string of letters and numbers. The characters represent PageMaker values. If you re-import the file through the PageMaker import filter, the filter will restore the information to PageMaker format. If you plan to import your file into PageMaker, be careful not to edit or delete the IV commands. The following paragraphs explain exactly how the import conversions are handled for specific commands. Unless otherwise noted, the export filter reverses the action described for the import filter. File Naming When receiving files from the XyWrite filter, PageMaker will only display, in its Selection Box, those XyWrite files which have the extension .XY3. Therefore, you must use the .XY3 extension when naming XyWrite files which you wish to import into PageMaker. Embedded Commands vs. Default Commands XyWrite allows you to establish format by inserting embedded commands in your document or by using defaults. The XyWrite import filter converts only embedded, not default, commands. Therefore, if you have any formatting commands set up as defaults, you must embed them in your document if you want PageMaker to honor them. For example, let's say your STARTUP.INT file contains the command DEFAULT TS=3,6,9, but your document does not contain a TS command; your imported document will not establish tabs because PageMaker will never see the default tab setting in STARTUP.INT. Consequently, you must explicitly define the XyWrite formatting commands in the documents you want PageMaker to import. In this example, you would embed the command TS 3,6,9 into the file. Display Modes The import and export filters convert the 13 standard XyWrite display modes to (or from) the associated PageMaker display mode. The following table defines the PageMaker mode associated with each XyWrite mode. XyWrite Mode PageMaker Mode Normal (MD NM) Normal Bold (MD BO) Bold Underline (MD UL) Underline Reverse (MD RV) Italic Bold Underline (MD BU) Bold Underline Bold Reverse (MD BR) Bold Italic Superscript (MD SU) Superscript Subscript (MD SD) Subscript Footnote Number (MD FN) Superscript Flashing (MD FL) Normal Flashing Underline (MD FU) Underline Flashing Reverse (MD FR) Italic Underline Standout (MD SO) Italic While in XyWrite, set any text in reverse (MD RV) if you want it to be converted to italic. Set text in bold reverse (MD BR) if it is to be converted to bold italic. Alignment Commands The XyWrite alignment commands FL (Flush Left), FR (Flush Right), and FC (Flush Center) convert to PageMaker's align left, align right, and align center settings. Similarly, XyWrite's JU (Justify On) command turns on PageMaker's justified setting, and the NJ (NO Justify) command turns PageMaker's justification off. Margin Settings The values in XyWrite's margin commands (LM and RM) are added to the values of PageMaker's inside and outside margins. For example, if your XyWrite file contains the command LM 10 (see Note #1), and the PageMaker guide for the left margin is set at 1, your publication will actually have a 2-inch left margin. You should therefore set the margins in one application or the other, but not in both. We generally recommend that you remove the left and right margin commands from the beginning of the XyWrite document before placing it into PageMaker (but keep any subsequent LM and RM commands used for creating indents) and set the margins in PageMaker. This allows you to specify a gutter in PageMaker (for the binding edge), and easily change the margins. If you choose to use XyWrite's commands to set your margins, you need to pass the settings to PageMaker at the beginning of the file. (If PageMaker finds an LM or RM command in any line of the XyWrite file, it adds that value to its margins for all subsequent pages.) Because PageMaker designs a page using indents rather than margin settings, the export filter uses IP (Indent Paragraph) commands rather than the LM (Left Margin) command. For example, the export filter converts a one-inch left margin to IP 10,10 rather than LM 10 (See Note #1). To calculate the right margin, the export filter uses a default value of RM 78, and subtracts from it the value of the right indents established by PageMaker. This default can be changed by holding down the Shift key when the filter starts up. This will bring up a Preferences dialog box in which you can set the default. For example, if in PageMaker there is a right indent of 1 inch, the export filter converts the right margin to RM 68. XyWrite's top and bottom margin commands (TP and BT) are ignored by PageMaker. Note #1 Measurement Units. PageMaker and XyWrite both use inches as the basis of the default unit of horizontal measure. XyWrite, however, uses 10ths of inches, while PageMaker uses whole inches. To create a one-inch margin in XyWrite, you must specify LM 10, not LM 1. Indents XyWrite's IP (Indent Paragraph) command establishes two values (in 10ths of an inch--see Note #1); the first value defines the indent for the first line of each paragraph, while the second value defines the indent for the rest of the paragraph. The values in the IP command are added to the left margin. For example, if your left margin is one inch and your XyWrite file contains the command ÿAEIP10,10ÿAF, all text that follows the command will be indented two inches from the left. Footnotes The import filter passes footnote text that is embedded in a XyWrite FN (Footnote) command to PageMaker. PageMaker, in turn, automatically numbers the footnotes and places the footnotes at the end of the publication as endnotes. If you have a second set of footnotes (marked by an FN2 command), PageMaker uses the first word in the footnote as the footnote marker. You might, for example, type an asterisk (followed by a space) as the first ``word'' in each footnote of set 2. PageMaker would then output the asterisk as the footnote marker. The export filter does not send footnotes from PageMaker to XyWrite as embedded FN commands. Instead, the export filter places a superscript number at the point of each footnote reference, and places the footnote itself at the end of the document. If you then add or delete a footnote, existing footnotes will not automatically be renumbered. Tab Settings Both XyWrite and PageMaker measure tab settings in tenths of an inch, and both support left, right, center, and decimal tabs. The only difference is that PageMaker's tabs are relative to the left margin, while XyWrite's tabs, by default, are relative to the left edge of the paper. You might want to change XyWrite's default setting so that your XyWrite document more closely resembles the PageMaker publication. You do this by embedding the RT (Relative Tabs) command in the document you plan to import. Type: F5rt 1 If necessary, change your tab settings to reflect this. Vertical Spacing XyWrite gives you a variety of options for defining and changing vertical spacing. The fundamental choice involves whether or not you turn on automatic leading. If you do turn on automatic leading (AL ON), PageMaker assumes total control of interline spacing. You can still use the first value in the LL (Line Leading) command to adjust interparagraph spacing, but PageMaker will ignore any attempt to change the interline spacing through XyWrite. If you do not turn on automatic leading, or turn it off at some point in your document (AL OFF), XyWrite formatting commands establish the interline spacing. You can use the LS (Line Spacing) command and the LL (Line Leading) command to control the space between the lines of text and between paragraphs. Because PageMaker defaults to automatic leading, the export filter always sends the command AL ON. Redlining Modes Redlining is a XyWrite feature that lets you keep track of changes that you make to a document. XyWrite does this by marking additions and deletions with special insert and delete character modes. The XyWrite insert and delete modes are: Insert Delete Modes Modes Description MD IN MD DN Normal MD IB MD DB Bold MD IU MD DU Underline MD IR MD DR Reverse MD IL MD DL Bold Underline MD IV MD DV Bold Reverse MD IS MD DS Superscript MD ID MD DD Subscript Notice that the insert and delete modes correspond to the standard text display modes. When the import filter encounters text that is in one of the insert modes, it displays that text in the appropriate PageMaker mode (e.g., normal, bold, etc.). When the filter encounters text that is in one of the delete modes, it erases that text. (See Note #2.) For example, if the XyWrite mode is MD IN (insert normal), the filter converts all text in that mode to PageMaker's normal display; if the XyWrite mode is MD DN (delete normal), the filter deletes all text in that mode. Note #2 File Integrity. The import filter does not alter your original XyWrite files. Instead, it makes a copy of your XyWrite file and modifies the copy by converting commands and erasing text that has been redlined for deletion. Character Substitution If your file uses special characters not normally found on the keyboard, you may need to modify the character substitution file used by the import filter. XyWrite uses the IBM extended ASCII character set, while PageMaker uses the Windows ANSI character set (see Note #3). The import filter automatically converts ASCII characters 128-255 to a PageMaker equivalent, and the export filter converts them back. CHRIMPC.TBL and CHREXPC.TBL are copies of the XyWrite text files that change the ASCII character displayed by XyWrite into an ANSI character for PageMaker, or vice versa. (These files are integrated into the .FLT files.) They do this by associating an ASCII value with its corresponding ANSI value. The tables are set up so that, whenever possible, the same characters are displayed by both application programs. In some cases, there are no equivalents, which means you have to type the ASCII character that is being used to represent the ANSI character. For example, if you want to send a copyright symbol to PageMaker, you must enter an ASCII 187 in your XyWrite text file. (To enter this character, press Alt Shift 187.) In XyWrite you will see an ASCII 187. In PageMaker you will see a copyright symbol. If you call one of the character substitution files (CHRIMPC.TBL or CHREXPC.TBL) to the screen in XyWrite, you will see that each entry is described in detail. There are instructions at the beginning of each of these files which will help you to determine which ASCII character to use in order to represent a given ANSI character. XyWrite cannot display all the ANSI characters. Therefore, you should not be confused by the entries in the left column, which may show a blank space or an unrelated character. Refer to the descriptions to see what character will actually be displayed in PageMaker. Because these character substitution files are straight ASCII files, you can alter the automatic conversions made by the filters, or change the display of other ASCII characters if you wish. If you alter one, or both, of these character substitution files, you must copy the file(s) into the subdirectory where your filter files are located (i.e., d:aldus\usenglish\filters). Likewise, the file that you are importing into (or exporting from) PageMaker must be in the filter files subdirectory in order to use the modified TBL file. (The CHRIMPC.TBL file is used for importing material into PageMaker. CHREXPC.TBL is for exporting from PageMaker.) Note #3 Non-ANSI Screen Fonts. If you are using non-ANSI screen fonts (e.g., Bitstream fonts), the PageMaker display may vary. You can edit the appropriate character substitution files so the correct characters are displayed. USING XYWRITE TO CALCULATE PUBLICATION LENGTH You can use XyWrite to get a close approximation of what your line endings and page breaks will be when PageMaker formats your publication. This is useful if you have to write text to fit in a certain area or number of pages. To calculate your publication length, perform the following steps in XyWrite: 1. Load the appropriate XyWrite printer file (see Notes #4 and #5). For example, if you are using a PostScript printer as your output device from PageMaker: Type: F5load 3post13.prn 2. Call your document to the screen. 3. Turn on the P-L (Page-Line) counter. (See Note #6.) Press: ShiftF9 4. In your document, embed the formatting commands that you plan to use in PageMaker. This includes margin settings, indents, line spacing, etc. (If you prefer, you can define styles with the SS command, and invoke the styles with the US command.) 5. Insert EL (Extra Lead) commands for each graphic you plan to insert in your publication. For example, if you want a 3-inch space (18 lines) for a photograph: Type: F5el 18 Result: The P-L (Page-Line) indicator reflects the specified depth. Note #4 Character Widths. If you are concerned about reviewing line endings in XyWrite, and you are using ASCII characters to represent ANSI characters, you should modify your printer file's width table to include widths for these characters. For example, if you are using ÿ1A to represent an en space, you should enter the width of an en space to the width table in your printer file. Refer to Chapter 6 of the XyWrite III Plus Reference Guide for information on how to modify width tables. Note #5 PT (Print Type) Tables. Be sure your printer file contains the PT (Print Type) tables for the fonts and point sizes you plan to use in PageMaker. Although this information is not passed to PageMaker, it is important if you want to calculate line endings and number of pages for viewing in XyWrite. For information on creating a PT table, refer to Chapter 6 of the XyWrite III Plus Reference Guide or to Application Note #162. Note #6 Vertical Measurement. XyWrite's P-L (Page-Line) function measures vertically, using six lines per inch as a default. Therefore, the converted value of 1-30 means that the cursor is on page 1, five inches from the top of the page (30 ö 6 = 5). Note #7 Measuring in Picas and Points. If you are using a PostScript printer and would prefer to measure in picas and points rather than inches, refer to Application Note #146. Note #8 Machine Types. If you export a file and then want to import it, you must use the same machine type (i.e., Macintosh or PC) for both conversions.