APPLICATION NOTE #215 Formatting Lists of PT Numbers in XyWrite This application note describes two programsÄPTLIST.PGM and PTPICK.PGM. These programs enable you to display a list of available typefaces, and then easily incorporate the typeface you want into a document. PTLIST.PGM and PTPICK.PGM can both be used in XyWrite III Plus, Version 3.54 and later. PTLIST.PGM is a program that searches through a printer file and builds a list of PT numbers and their corresponding font names. This list can then be accessed by running PTPICK.PGM which brings up a typeface menu. From this menu you can choose a typeface. The program embeds the corresponding PT number in the document. If you choose a landscape typeface, a prompt reminds you to embed your PC or PB code. PTLIST.PGM must be run prior to executing PTPICK.PGM. INSTALLATION After you have obtained a copy of both PTLIST.PGM and PTPICK.PGM (which are available through XYQUEST's Technical Services Department), copy each from disk to the directory in which you have installed XyWrite. RUNNING PTLIST.PGM When you run PTLIST.PGM, you must specify the name of the printer file you are using. The form of the command is: CM°run ptlist.pgm,d:\path\printerfile°° Each time you execute the command, the program creates a new list of PT numbers and stores it in a programming Save/Get (see Note #2). When the list is complete, the message ``List successfully built'' displays on the prompt line. You may then run PTPICK.PGM to store the list on a Save/Get key. If you use the same printer file regularly, you can include the command to run PTLIST.PGM in STARTUP.INT. We recommend putting it at the end of STARTUP.INT, immediately before the ending BC. RUNNING PTPICK.PGM Once you have run PTLIST.PGM to create the list of PT numbers and associated typeface names, you use PTPICK.PGM to display a menu of typefaces. The first step in using PTPICK.PGM is to load it onto a Save/Get key. For example: Type: F5°ldpm ptpick.pgm,p°° This loads the program onto Save/Get P. You can use any available Save/Get key (A-Z, 0-9). When you press Alt°P (or the key you assigned), the program displays a typeface menu from which you can select the typeface you want to use. To use the typeface menu to enter PT commands in your file: 1. Be sure window 9 is available. (The program uses this window to display the menu.) 2. Call the file you want to format. 3. Move the cursor to where you want to enter a PT (Print Type) command. 4. Press the Save/Get key that contains PTPICK.PGM. For example: Type: Alt°P Result: A list of available typefaces appears. 5. Highlight the typeface you want and press °. Result: The PT command associated with the typeface you selected is entered at the current location in the file. The menu is cleared from the screen. 6. Repeat steps 4 and 5 at each point in the file where you want to enter a PT command. Note #1 Printer Files. Before you print, be sure to load whichever printer file has been identified in conjunction with PTLIST.PGM. Note #2 Save/Gets. Typeface lists are saved to user programming Save/Get 101. If one of your programs already accesses 101, you may change all references in one or both programs to a Save/Get of your choice. PROGRAM CONTENT PTLIST.PGM and PTPICK.PGM are reproduced below. Remember, if you plan to recreate these programs yourself, you must follow the rules for creating a XyWrite program file. For more information, refer to Chapter 5 of the XyWrite III Plus Reference Guide. PTLIST.PGM: ˙AElb-START˙AF˙AEsx01,˙AEis00˙AF˙AF˙AESV02,˙AEMDBO˙AFAvailable fonts˙AEMDNM˙AF˙AF˙AESV03,˙AEMDBO˙AFfor˙AEMDNM˙AF˙AF ˙AEsv04,˙AEMDBO˙AF---------------------------- ˙AEMDNM˙AF˙AF˙AEsx05,˙AEva$nw˙AF˙AF˙AEsx06,˙AEva$wn˙AF˙AF˙AEsx07 , ˙AEvaep˙AF˙AFBC d nw=1XC BC d ep=0XC ˙AEgl-BLDLST˙AF ˙AElb-BLDLST˙AF˙AEsv100,˙AF˙AEPRBuilding PT list..˙AFDX BC ES 1XC BC re ˙AEPV01˙AFXC ˙AEif˙AEer˙AF˙AF˙AEgl-NOPRN˙AF ˙AEei˙AF˙AEsx01,˙AEva$fi˙AF˙AFBC SE /˙08PT=WW ˙08MD NM+/XC ˙AEif˙AEer˙AF˙AF˙AEgl-NOPT˙AF˙AEei˙AFEL CU DL DL ˙AEsv100˙AFXD ˙AEsx101,˙AEis100˙AF˙AF˙AElb-LP1˙AFXC ˙AEIF˙AEER˙AF==TRUE˙AF ˙AEgl-FORMAT˙AF˙AEEI˙AFCU EL DL DL ˙AEsv100˙AFXD ˙AEsx101,˙AEis101˙AF+˙AEis100˙AF˙AF˙AEgl-LP1˙AF ˙AElb-FORMAT˙AFBC ABXC BC NE FONTLISTXC ˙AEGT02˙AF ˙AEGT03˙AF ˙AEGT01˙AF ˙AEgt04˙AF ˙AEgt101˙AFTF BC CI /˙08MD NM+/˙09/XC BC CI /=/ /XC BC CC TF DF BF DF ˙AEsv101˙AFXD ˙AEgl-END˙AF ˙AElb-NOPRN˙AFBC d nw=˙AEpv05˙AFXC BC d ep=˙AEpv07˙AFXC BC ES 0XC DO BC window ˙AEpv06˙AFXC BC ˙AEPRPrinter file not found˙AF˙AEex˙AF ˙AElb-NOPT˙AFBC abXC BC d nw=˙AEpv05˙AFXC BC d ep=˙AEpv07˙AFXC BC ES 0XC DO BC window ˙AEpv06˙AFXC BC ˙AEPRNo PT tables found˙AF˙AEex˙AF ˙AElb-END˙AFBC abXC BC d nw=˙AEpv05˙AFXC BC d ep=˙AEpv07˙AFXC BC ES 0XC DO BC window ˙AEpv06˙AFXC BC ˙AEPRList successfully built˙AF˙AEex˙AF PTPICK.PGM: ˙AElb-PTSEL˙AF˙AEsx07,˙AEva$nW˙AF˙AF˙AEsx08,˙AEva$ws˙AF˙AF ˙AEif˙AEpv08˙AF==0˙AF˙AEgl-nofile˙AF˙AEei˙AF˙AESV01,Put cursor on desired PT and press return.˙AF˙AEsx58,˙AEvaep˙AF˙AFBC D NW=1XC BC D ep=0XC BC WINDOW 9XC ˙AEsx06,˙AEva$ws˙AF˙AF˙AEif˙AEpv06˙AF==1˙AF ˙AEgl-NOWIN˙AF˙AEei˙AFBC WINDOW 9,50,1,27,20XC BC NE FONTLISTXC ˙AEGT101˙AFBC ˙AEPV01˙AFTF CD CD CD ˙AElb-LP1˙AF˙AESV02, ˙AF˙AEsv03,˙AF˙AESX04,˙AERC˙AF˙AF˙AEIF˙AEIS04˙AFî˙AEIS02˙AF==0˙AF ˙AEgl-end˙AF˙AEEI˙AF˙AEif˙AEis04˙AFî˙AEis03˙AF==0˙AF ˙AEgl-ABORT˙AF˙AEei˙AF˙AEPV04˙AF˙AEgl-LP1˙AF ˙AElb-end˙AFLB DF NW NW CL DF ˙AESV05˙AFXD DL ˙AEsv11˙AFXD BC window 9,0,0,80,22XC BC AB XC BC ˙AEPV05˙AFXC ˙AEsv10,L-˙AFBC D NW=˙AEPV07˙AFXC BC D ep=˙AEpv58˙AFXC BC GT ˙AEif˙AEis10˙AFî˙AEis11˙AF=>0˙AF ˙AEPRRemember the landscape PC or PB code˙AF˙AEEX˙AF˙AEei˙AF˙AEex˙AF ˙AElb-NOWIN˙AFAS BC D NW=˙AEPV07˙AFXC BC D ep=˙AEpv58˙AFXC BC GT ˙AEPRWindow 9 in use˙AF˙AEex˙AF ˙AElb-nofile˙AFBC ˙AEPRNo open file in this window˙AF˙AEex˙AF ˙AElb-ABORT˙AFBC ABXC BC D NW=˙AEPV07˙AFXC BC D ep=˙AEpv58˙AFXC BC GT ˙AEPRAborted˙AF˙AEex˙AF