2 THE MAGAZINE FOR PROTEXT USERS Number 9 Editorial 269 Styles 270 The Protext v6.5 status line 285 Promerge Corner 286 FAQs from our technical helpline 288 Did you know ...? 290 Readers' Letters 290 Short Story 296 Printing Crop Marks for A5 pages on A4 paper 299 Some Quick Macros 300 In the Next Issue 300 6 Editorial So we're back again in record time with Exfile 9. Please don't expect issues to continue at quite this rapid pace, but this keeps us on course to issue number 10 before Christmas. That will be a good time to update the Exfile disk which was last distributed with issue 5. We will add all the listings from issues 6 to 10 so if you are having any difficulty typing them in (or are just feeling lazy) then hang on for issue 10. Some of you have expressed concern that Exfile might be covering Protext 6.5 only to the exclusion of 6.0/6.1. I can understand how that impression may have been given but fear not; the new features in 6.5 are mainly separate operations (preview, Auto-Correct, search files) and so the vast majority of articles will apply to all versions since 6.0. We will try to note any differences as appropriate. We will however tend to assume that you are using at least 6.0 as this release introduced some fundamental changes. Where possible Promerge listings will be written to work on earlier versions but this cannot always be done. Half of this issue is devoted to styles, an important subject which the Protext manual covers fairly briefly. The promised article on editing printer drivers has been deferred because the author is currently working on an urgent project, but it should appear in the next issue. Mark Tilley The address for letters and articles (on disk please) is: Exfile Arnor Ltd. 611 Lincoln Road + Peterborough PE1 3HA or by E-Mail to mtilley@cix.compulink.co.uk. Styles Mark Tilley Styles first appeared in Protext 6.0 and some improvements have been made since then. Any differences between versions will be noted but in general this article applies to 6.0 and 6.1 as well as 6.5. Styles have much in common with document settings which I covered in Exfile 8: Both are information which affect the appearance of a document Both are stored in individual documents Both can be also stored in files to change the initial defaults Both can be stored in named files for different uses What is a document? That sounds like a silly question, but perhaps a rough definition of 'document' would be helpful here. A Protext 6 document is a data file which contains text together with any style codes, control codes and stored commands. Also contained within the file, but separate from the text, are the document settings, the style definitions and the name of the printer driver. This last item is important. A document is linked to the printer driver that will be used to print out. The styles are linked to the printer driver because they are defined using a specific printer's fonts. A Protext 5 document contains only the text with any control codes and stored commands. It is not tied to a particular printer. Q. I found Protext 5.5 simpler. Why do I need styles? Time for another history lesson. A long time ago when we were first writing Protext, printers were very simple machines. Laser printers cost more than ... sorry I seem to be repeating myself. I hope the point is made, though. Just as with document settings which I covered in Exfile 8, the introduction of styles to Protext was to allow us to make the best use of today's printers. That's not the only reason, but it is the most important. Suppose you are using a simple dot matrix printer, as you probably would have been ten years ago. This printer will offer a few different variations of printing such as boldface, italic, subscript, superscript and underlining. It will also print in different sizes by stretching or squashing the letters (elite, enlarged and condensed). Primitive printers would have done little more than this, but soon most provided a 'near letter quality' (NLQ) option and a single proportional font. The need to support these features was the basis of Protext's control codes. Since Protext 1.0 these have been entered into the text by pressing CTRL-X followed by a letter (the menu alternative appeared later). Certain letters were assigned particular uses which were common to most printers. You will have seen this list in any Protext manual since 1985: b bold c condensed e elite i italic l enlarged n pica (normal) p proportional q NLQ s subscript t superscript u underlined The allocation of letters worked remarkably well for these simple printers. Some printers added some extra facilities, such as another typeface or shadow print. This was no problem because there were plenty of unused control code letters and when printer drivers were written for these printers more codes were used. As printers diversified these additional features inevitably varied from printer to printer and the use of the new control codes was not completely standard. Some common uses were: a shading f fifteen pitch m mono-directional printing o outline v inverse w shadow And then there are colour printers. Some drivers use control codes for colour selection, but as there were insufficient free control code letters for this purpose the allocation was not entirely standard. Up until version 4.3, everything had to be done with these control codes. Only one proportional font could be used because a printer driver contained only a single character width table. We now come to Protext 5. As more complex printers were becoming cheaper we had to provide for the use of several different proportional fonts. As there were insufficient control codes to use a different letter for every font we combined control codes. For example if 'r' was used for Times Roman 10 point, we might use: rl a larger point size, say 15 point rc a smaller point size, say 8 point ri the italic version ric 8 point italic This system worked reasonably well, but there were several limitations. Whenever a font change occurred within a document, a string of control codes had to be entered. Although this was easily done by selecting from the Style menu it meant that it was difficult to alter when you changed your mind. When styles are used you can change a font throughout the text just by editing the style. A second and bigger problem was the difficulty of using fonts other than those we set up in the printer driver. Printer drivers had become too complicated for the user to modify. Styles allow the use of any font that the printer supports. The Protext 5 system has no support for scalable fonts. Many laser printers and dot matrix printers now offer fonts which are either fully scalable (you can choose any point size) or offer a range of sizes. It would be impossible to write a PostScript driver for Protext 5. Styles provide the means to use scalable fonts. And so to Protext 6 and styles. Control codes are not now used to select fonts; it is recommended that their use is now restricted to adding attributes to the text: bold, underlining, italic, subscript, superscript and where available, others such as outline, shadow and inverse. A new type of control code (the 'style code') was introduced. A style code has much in common with a control code as this table shows. Control code Style code Enter with CTRL-X + letter Enter with SHIFT-CTRL-X + letter Or F7 + letter Or select from style menu Or select from style menu Displayed as reverse video Displayed as reverse video lower case letter upper case letter Attribute turned off by Style changed by another style code repeating the control code Code defined in printer driver Default styles defined in printer driver Styles may be created within a file and stored with each document Up to 26 styles (A to Z) may be used in a single document, which should easily be sufficient. Each style has a name which is shown in the style menu. When editing a document the name of the currently active style is shown on the status line. A style code represents a font which may be modified by attributes, colour and line spacing. A linguistic interlude. Fonts and typefaces. The word 'font' is misused so often that its correct meaning is in danger of being lost. Arnor themselves are not innocent in this respect. Quoting from Collins Concise English Dictionary: Typeface: The style or design of the character on the type. Font or fount: a complete set of type of one style and size. These meanings date from the old printing technology using metal type, but carry over to today's computerised methods. A font refers to a typeface of a particular size. So in the style editor the list heading 'Font' should more accurately read 'Typeface'. Perhaps we will change it in future releases. To go back to where we were, a style code represents a font which may be modified by attributes, colour and line spacing. The font is desig- nated by typeface name and either point size or Cpi. The size of a proportional font is always given by point size, fixed pitch fonts usually use Cpi (characters per inch). Within a document a style code can be used for each different font. Let me summarise again the main advantages this gives over the old (before version 6) methods: 1. Access to all of a printers fonts, not just a selection supported by a printer driver. Scalable font support. 2. A style definition can be altered using the style editor and this will effect the change throughout the document. Previously, changing a font used in a document meant going through editing every occurrence. 3. Uses a single style change code rather than a string of control codes. 4. More consistency between different printer drivers. 5. Access to colours if using a colour printer. Q. Please remind me what you mean by 'proportional font'. We mean a font with characters (letters and symbols) of varying widths. A 'W' is much wider than an 'i', as on the page you are reading. A 'fixed pitch font' is one in which every character takes up the same space. When you type a document and request different fonts to be used, Protext has to work out how much space your text will occupy on the paper when printed. It does this to see how much text will fit on a line and wrap the text to the next line at the correct place. With fixed pitch fonts this is simple, just a question of multiplying the number of characters by the width of one character. If a proportional font is being used, Protext needs to know the individual width of every character. It gets this information from a character width table in the printer driver. Q. What about colour printing? At the same time as style codes came into Protext, new control codes were introduced for colour printing. If you have a colour printer, colours will be selectable from the Style menu. Standard codes are used for the primary and secondary colours: red, green, blue, cyan, ma- genta, yellow and black. Q. So there's a good reason for styles, but how do I use them? First, the simple use of styles that are pre-defined in the printer driver. I assume here that you are using a single printer and a single printer driver. Let me take as an example the HP LaserJet 4L. I have chosen this printer as an example because it has scalable fonts and so can be used to illustrate most uses of styles. This is also the printer used for printing Exfile. Even if you do not have a LaserJet it would be helpful to use the printer driver while following this article. Use Config and from the Printer Driver options menu select 'Generate extra driver'. Find 'HP LaserJet 4L' in the list and press Return. This will create the driver LJ4L. If you load the LJ4L driver (Print menu, load printer driver) and look at the style menu you will see a few styles already listed. These are pre- defined within the printer driver to give a useful selection. The output of the command 'LS' (list styles) is shown, listing style letter and name, typeface, point size, cpi, control codes and font spacing. STYLE N "Courier 10cpi" "Courier" 12 10 1 STYLE O "Courier 12cpi" "Courier" 10 12 1.2 STYLE P "Line Printer" "Letter Gothic" 8.5 16.94 1.2 STYLE Q "CG Times 12" "CG Times" 12 PS 1.2 STYLE R "CG Times 10" "CG Times" 10 PS 1.2 STYLE S "CG Times 8" "CG Times" 8 PS 1.2 STYLE T "Univers 12" "Univers" 12 PS 1.2 STYLE U "Univers 10" "Univers" 10 PS 1.2 STYLE V "Univers 8" "Univers" 8 PS 1.2 STYLE W "Univers 15B" "Univers" 15 PS b 1.2 You will see that in each case the name of the style tells you the typeface and size. This will always be the case with pre-defined styles, but for you own you may prefer to use names like 'Heading', 'Subheading' and 'Body Text'. The choice of letters for these pre- defined styles is not arbitrary; there is a great deal of compatibility between printer drivers. Having the LJ4L driver loaded you can now enter any of these styles into a document by pressing F7 (which will call up the menu) and then the required style letter. For example press F7 Q. The message on the status line which previously said 'No markers set' will change to say 'Q:CG Times 12'. Type some text and then another code and you will see the status line change to show the new style letter and name. This is all there is to using the pre-defined styles. You will see that Protext will format the text according to the size of the font being used. Both the number of characters on a line and the number of lines on a page will vary with the font size and this is all handled behind the scenes. Print preview (v6.50 and above only) will show each page just as it will be printed, with fonts shown in their correct relative sizes. Q. What are the pre-defined styles? For laser printers there are 10 standard pre-defined styles, using letters N to W. The first three are fixed pitch fonts in three sizes, the next three are in a proportional serif font (Times Roman, Dutch or equiva- lent), and the last four are in a proportional sans-serif font (Helvetica, Swiss or equivalent). The precise fonts used will vary depending on a printer's capabilities, some examples are listed showing only the standard use of styles. HP LaserJet 3 or 4 N Courier 10 cpi (Font Spacing 1.0) O Courier 12 cpi P Line Printer (Letter Gothic) 17 cpi Q CG Times 12 point R CG Times 10 point S CG Times 8 point T Univers 12 point U Univers 10 point V Univers 8 point W Univers 15 point bold PostScript N Courier 10 cpi (Font Spacing 1.0) O Courier 12 cpi P Courier 17 cpi Q Times 12 point R Times 10 point S Times 8 point T Helvetica 12 point U Helvetica 10 point V Helvetica 8 point W Helvetica 15 point bold Kyocera F series N Courier 10 cpi (Font Spacing 1.0) O Gothic 12 cpi P Line Printer 17 cpi R Dutch 10 point S Dutch 8 point V Swiss 8 point The present release of the ESCP/2 printer drivers (Epson LQ570, Citizen ABC and others) do not follow this pattern and they ought to be updated to do so. In the meantime I suggest that you define your own styles as follows: ESCP/2 compatible suggested styles N Courier 10 cpi (Font Spacing 1.2) O Courier 12 cpi P Courier 17.14 cpi Q Roman 12 point R Roman 10 point S Roman 8 point T Sans serif 12 point U Sans serif 10 point V Sans serif 8 point W Sans serif 14 point bold Q. Why does style N have font spacing 1.0 when all the rest use 1.2? A. 1.2 is the normal font spacing. Style N is Courier 10 cpi, the standard dot matrix printer font traditionally printed at 6 lines per inch. On many laser printers this is a 12 point font and the font spacing of 1.0 ensures that this is printed at the expected 6 lines per inch. Q. So how do I create my own styles? A. By using the style editor (Style menu, Create/edit style). First decide on the font you wish to use. Look at the style menu (press F7) to see if your chosen font, or a sufficiently similar one is already defined as a style. Don't create new styles if a pre-defined styles is suitable. If your font is not already available you will need to create a style. Decide which letter you are going to use for your style. All the pre- defined styles are between N and W and for compatibility it is a good idea to leave these unchanged unless you need more than 13 styles. The letters A to M and X to Z are free for your new styles. Start with A for your first style and work downwards. The Style Editor Dialogue When using the style editor work as follows: 1. Set the 'Style' to the letter you have decided to use. You can use  and to scan through the styles. 2. Select your font from the list. You can use the mouse or the  and  keys. Scalable fonts are denoted '(scal)' in the list. 3. Press P and choose the point size from the list. If you have chosen a scalable font you can click on the number box under the list and type in the size you require. Or using the keyboard press TAB to activate the number box (Amiga: press T instead). If you enter a size which is not allowed Protext will correct it to the nearest valid size. 4. A style name must be typed into the 'name' text box. Protext 6.5 will have generated one for you, which you can edit if you wish. The remaining steps are all optional. 5. If you wish to modify the font with one or more attributes, enter the appropriate letters in the Control Codes text box. For example if you type a 'b' in this box the font will always be printed bold. 6. If you are using a colour printer and wish to print the font in a colour other than black, enter the colour letter in the Colour text box. The colour letters are: r=red, g=green, b=blue, c=cyan, m=magenta, y=yellow. 7. The font spacing defaults to 1.2. You would not usually change this but it can be decreased to squash lines together and increased to spread them out. Q. Can I make one word bold without using another style? Yes. The control codes you put in the style definition are used for all the text printed in that style, but you can still use control codes within the text to emphasise individual words, use superscripts and so on. Q. How do I use the Wingdings font on my laser printer? A. Wingdings is a font containing special symbols. The HP LaserJet 4 and compatible printers include a scalable Wingdings font and this may be seen in the font list in the style editor. To use the Wingdings font you will need to define a style, say X. Select the Wingdings font and your chosen point size. Sample 18 pt Wingdings: $(J8'þ To enter Wingdings symbols in the text first put in the style code (F7 X). You will then need to consult the symbol set tables in your printer manual. The Wingdings symbol set will show which character code corresponds to each symbol. Note the code number for the symbol you wish to use. Now look at the PC-8 symbol set table and see which symbol has the same code. You can press the key for this character (or, if not available on the keyboard, use Edit menu/Choose character). Use F7 and a different style code (with v6.5 you can use F7 &) to revert to normal. On a PC you can also enter the code with ALT and the number pad, for example ALT-0171 for a 5 pointed star («). The Wingdings symbols will not be displayed on the screen, but will print correctly. Q. Why does the line spacing increase when I use a Wingdings symbol? A. Suppose you use a 24 point Wingdings font as the above sample. If you use a symbol on the same line as normal text, the gap between that line and the line above will be increased to be 1.2 times the Wingdings point size. This is because the line spacing is the font spacing of the largest font used on the line. But it is common to want to use a symbol on a line which is in a larger font size, but using the normal spacing for the text. For example something like this E. To do this set the font spacing for the Wingdings style to a small number, say 0.1. Now the spacing for the Wingdings font will be 24 times 0.1 or 2.4 points. This is less than the spacing for the text and so the font spacing for the text will be used. Q. How do I use the same styles for all my documents? A. You need to save a printer driver style file. Remember that styles are intimately linked to a given printer because they are defined in terms of the printer's fonts. As we have seen, each printer driver comes with a number of pre-defined styles built in. Of course each person has their own particular preferences and requirements so it has to be possible to change these pre-defined styles. These changes could be made by editing the printer driver itself, but for two reasons this is not advised. The first is that a printer drivers are somewhat abstruse and not at all easy to edit. The second reason is that upgrades to Protext often include updated printer drivers and you would then have to make the same changes to the new version. So instead of editing the printer driver you can save your own customised styles in a file known as a printer driver style file. This is 'attached' to a printer driver in the sense that it has the same name as the printer driver, is stored in the same directory and the styles are automatically used whenever the printer driver is loaded. If your printer driver is LJ4L.PPD the style file is called LJ4L.STY. So the effect is the same as if your own styles were defined in the printer driver. Creating the printer driver style file is easy. From the style editor click on the 'Files' button (or press 'I'). The style files dialogue will appear. Press 'S' to save the file. That's it. Each time you start Protext your customised styles will be available from the style menu. Q. If I change my default styles will this change documents already written? A. No, each document carries a copy of its own styles. The printer driver styles are used only to give a set of styles when you start a new document. Q. What if I want to update the styles in an old document? A. Suppose you have changed your 'house style'. It has been deemed by "the powers that be" that you must print all letters in CG Times 11 point instead of 12 point. So, starting with a blank document, you use the style editor to change style 'Q' from 12 point to 11 point. Then you save the printer driver style file. This will now be used for all new documents. If you have an old document which you want to print again using the new styles, proceed as follows. Load the document, go into the style editor (F7, Return) and thence into the style files dialogue. Press 'M' to merge the printer driver style file. This will update any styles that have been changed but not affect any extra styles that the document might have. ('Load printer driver style file' would replace all styles). Save the document to retain the changes to the styles. Q. Can I have different sets of styles? A. Yes, by saving user style files. The second row of buttons in the style files dialogue allows you to create and use style files with different names. There are also commands to do the same (LDS, SVS, RES). This is one of Protext's more specialised facilities and most would never need it. The Style Files Dialogue Q. I'm confused by the different ways of saving styles. Can you help? A. Here comes a quick recap. The simplest use is to define the styles you want for each separate document when editing it. Save the document and the styles are saved with it. You need do no more. The next stage is to save your customised styles in the printer driver style file. These will be used for each new document you start and allows you to have a standard set of styles. If a given document requires some special styles of its own, just create them within the document. When you save the document both the standard styles and any extra ones will be saved in the file. User style files can be used, but this is mostly for the power user. You can safely ignore this feature if you wish. Q. How can I copy all the styles from one document to another? A. (i) For Protext 6.07 or later (PC/ST), 6.13 or later (Amiga). Go into the style editor (F7, Enter). Go into the style files dialogue (press 'I'). Use 'Load user style file' (press 'O'). With the file selector, locate the document containing the styles and press Enter. The styles will be extracted directly from the document. (ii) For Protext 6.00 to 6.06 and 6.10 to 6.12. Load the document with the styles. Go into the style files dialogue and use 'Save user style file' (press 'A'). Choose a name, e.g. 'MYSTYLE'. The styles will be saved in the file MYSTYLE.STY. Now load or swap to the new document, go back to the style files dialogue and use 'Load user style file' (press 'O'). Locate and select the style file that you just saved. The styles will be loaded into the new document. Q. Can I do this from command mode instead? A. Yes, use LOADSTYLES (LDS) and SAVESTYLES (SVS). Again, with the more recent versions of Protext you can use LDS with the name of the document containing the styles. With the earlier versions you will need to use SVS to save a style file and LDS to load it into the new document. Q. How do I copy a individual style from one document to another? A. There is a quick and easy way to do this. Suppose you defined and used style A in a document and wish to use this in a new document without saving and loading style files. Load the document containing the style you wish to transfer. Mark a block around an occurrence of the style code A in the document. (Press F4 first if the style codes are not visible). Press CTRL-Y to swap to your new document and copy the block over with CTRL-O. The style code and its definition will be transferred, as long as style A was not already defined in the new document. Q. Why can't I get scalable fonts on my printer? Protext always prints using the fonts built into a printer. You can only get scalable fonts if your printer has this facility. Some software generates scalable fonts inside the computer and prints a graphical image. Protext does not do this, but relies on the printer's fonts for the best quality and speed. We endeavour to keep updating our printer driver library to support all the features of new printers as they are released. I have compiled a list of Protext printer drivers that support scalable fonts. No doubt there are other scalable font printers for which we do not yet have information, so if you have one please let us know. PCL printers with scalable fonts Brother HL-10V/DV, HL-10h, HL-6V Canon LBP-4i HP DeskJet 1200C, PaintJet XL300 HP LaserJet 3, 3P, 3Si HP LaserJet 4, 4L, 4Si, 4M, 4ML, 4P, 4MP, 4 Plus, 4M Plus Mannesmann Tally T9005PS, T9008 OKI OL410, OL810 Panasonic KX-P4430, KX-P4451 Ricoh LP1200i Star LaserPrinter 4 III, LaserPrinter 8 III, LS-5EX PostScript printers (or printers with PostScript add-ons) Any PostScript printer using the generic drivers PS, PS13, PS17 Brother HL-4PS HP LaserJet 3Si, 4, 4M, 4ML, 4MP, 4 Plus, 4M Plus, 4Si HP DeskJet 1200C Mannesmann Tally MT904PS, MT906PS, MT911PS OKI OL830, OL850 Other laser and inkjet printers with scalable fonts Canon LBP-4, LBP-8 (III and later), BJC-880 Epson GQ5000, EPL4100, EPL7100, EPL8100, EPJ 20 ESCP/2 printers with scalable fonts (limited scalability) Citizen Swift 240, ABC Epson LQ-100, LQ-570, LQ-570+, LQ-870, LQ-1070, LQ-1170, Epson SQ-870, SQ-1170 Epson ActionPrinter 3250, 5000, 5500 Epson Stylus 300, 800, 1000 NEC P62, P72 Q. Someone has given me a document formatted for a different printer. I keep getting strange messages. What do I do? A. This opens up a new subject which I will postpone to a later issue, before the whole magazine is taken up with styles. When I return to the subject I will cover creating compatible style files for different printers, converting documents from one printer to another and using multiple printers connected to different ports. In summary, though, you need to convert the document to your own printer driver. When you load a document which was created for another printer driver, Protext will warn you about this (the exact message depends on your Protext version). You should load your own printer driver (Print menu, Load printer driver, and select the driver from the list of files). If you are then asked 'Convert document to xxxx printer driver and styles?", reply 'Y' and save the file. This will stop any warning messages appearing. If any styles are used in the document you will need to check that suitable styles are defined with your own printer driver. ÷ ÷ ÷ ÷ ÷ The Protext v6.5 Status Line It has been pointed out more than once that the messages on the status line were changed for v6.5 and are not now exactly as documented in the User Manual (PC/ST page 61, Amiga page 57). The changes were made to be able to indicate whether Auto- Correct is active. Old message New message Meaning AutFm AF Auto-reformatting on - AC Auto-Correct on Promerge Corner Mark Tilley In Exfile 8 I mentioned using a macro and exec file which I use when writing letters. I press a key (F8 as it happens) and this changes to my letters directory, loads the document settings file I use for headed letter paper and inserts the date and my name in the document. I am asked to type the name of the addressee and this is used as the filename, with the file extension being an encoded form of the date. The first character of the file extension represents the month, using the digits 1 to 9 for January to September and then 'O', 'N' and 'D' for October, November and December. The last two characters are the date, between '01' and '31'. I have a directory C:\LETTERS for my letters. A subdirectory EXEC contains the files used by this procedure. This example is not particu- larly elegant but illustrates how macros, exec files and mail merge routines can be used in conjunction. When I want to write a letter I press F8, so we first look at the macro assigned to F8: 1. The macro assigned to F8: ^766^c:^13^cd\letters^13^exec \letters\exec\doletter^13^ ^766^ start in command mode c:^13^ change to drive C cd\letters^13^ change to letters directory exec \letters\exec\doletter^13^ exec a file 2. The exec file 'doletter': swap 0 doc load c:\protext\letter.set ps \letters\exec\makehdg merge letter.hdg del letter.hdg ps \letters\exec\namefile This exec file swaps to a new document, makes sure we are in document mode and loads the document settings file which has previ- ously been set up with the letter paper layout. Note the use of the LOAD command to load a document settings file. It then uses PS to start a Promerge program 'makehdg'. This writes a file called 'letter.hdg' which contains today's date, a few blank lines and the conclusion of the letter (see 3, below). This file is then merged into the current document. MERGE is used so that the document settings just loaded are used, LOAD would lose them. The temporary file is then deleted, its job done. Finally PS is used again to start another Promerge program (see 4, below). 3. The Promerge file 'makehdg': >wf letter.hdg >wm >wm &sys_date& >wm >wm >wm >wm >wm >wm Yours sincerely, >wm >wm >wm >wm Mark Tilley >wc 4. The Promerge file 'namefile': >dp 0 >if sys_month[1]="0" >sv month=sys_month[2] >el >sv month=sys_date[w2] >sv month=month[1] >ei >sv date=sys_date[w1] >if date<10 >sv date="0" $+ date >ei >av "Name of addressee: ",filename,8 >sv filename=filename+"."+month+date >ex NAME &filename& The variable 'month; is set to the single character representing the month (1-9,O,N,D) and the variable 'date' is made up to contain the two digit date number. The '>av' line prompts for the name of the person to whom the letter will be addressed (limiting it to 8 characters as I run this on a PC) and then 'filename' is constructed from these three parts. Finally '>EX NAME' used the Protext command 'NAME' to change the name of the document from 'letter.set' to something like 'SMITH.927', the correct name ready for saving my letter. ÷ ÷ ÷ ÷ ÷ FAQs from our technical helpline An FAQ is a 'frequently asked question'. Here are a few. Q. Why do the columns in my forms align on the screen but not in my printout? A. This was mentioned by Brian Elliott in Exfile 8 but bears repeating as it is important. Always use tabs to align columns. If you press the space bar to line them up they will look correct when editing but as soon as you use a proportional font to print you will get a mess. This is because the each character in a proportional font is a different size. In particular the spaces you used to align the text will be much smaller when printed. Use tabs and Protext will do it all for you, whatever font you are using. Set the tab positions you want by editing the ruler or in document settings. Use the minimum number of tabs, one for each of your text columns. Q. Why does my ruler line sometimes disappear and I can no longer get page breaks? A. You have pressed CTRL-P to take Protext out of page mode. Press CTRL-P again to restore these functions. Q. (PC) Why do I get the message `Too many files open'? A. The setting of FILES in CONFIG.SYS is too low. Edit the file C:\CONFIG.SYS and find the line starting 'FILES='. The number here should be at least 20 (at least 40 if using Windows). Q. I can't get Protext to spell check. Every time I try to spell check either with CTRL-S or Spell from command mode I get the message 'Error opening ENGPHON.ENV' or 'No Dictionary'. I'm certain when I installed Protext the Dictionary Disk copied across OK. I have reinstalled again since but I still get the same message. What am I doing wrong? A. If you run Config you will probably find that in the Spelling options your Spell Checking Language is set wrongly, usually to US English. Just press the right arrow key until you get to UK English and then save your new Config settings. Amiga note: When installing, Protext picks up the language from your Locale Preferences. If you have not set the locale it may have the default value, which is American. It would be a good idea to alter this to avoid similar problems in future. Click on Preferences, then on Locale. Set the country to 'United Kingdom'. PC Note: The PC version of Protext picks up the language from the COUNTRY variable in CONFIG.SYS. This should be set to your country's international telephone prefix (44 for the U.K.). This is only used when installing Protext to initialise certain options, you can then change them to your preferred options if necessary. Q. Why do the page breaks in my document come out in different places when printed? A. This may occur if you have edited document settings, changed printer driver, changed styles or edited a ruler line. Whatever the cause the solution is the same. Reformat the whole text (Format menu/Format text). This will usually sort everything out. Q. I am using landscape printing, so why is preview in portrait? A. If you are setting landscape with the stored command '>LA ON', preview will not take this into account. You need to set Landscape in document settings and then preview will be shown correctly. ÷ ÷ ÷ ÷ ÷ F Did you know ... ? You can add a column of figures by running the cursor over it. Position the cursor at the top of the column. Press F3, T, A. Move the cursor down over the numbers to be added. The total will be shown at the top right of the screen. To insert the result into the text, place the cursor where you want it to appear. Press F3, T, R. Compatibility: Protext 5.50 or later. Readers' Letters This section is up to you. The response to my pleas for contributions for this issue was a little disappointing, though we did receive a few letters. Compliments about the magazine are appreciated, though we'll not waste space by repeating them here (well perhaps you'll forgive just one!). Now you have had the chance to read two new issues, we hope to receive more feedback this time. Letters addressed to Exfile are assumed to be for publication (in full or in part) unless you say otherwise. From Tim Mills, East Ham @I am writing to express my appreciation for the excellent material contained in Exfile and to ask if you could include more articles on printing from Protext. I have used the program for six years and, although not a computer expert, I can generally achieve the results I require. I have, however, found it difficult to master the new fonts and print styles and would find basic advice on how to proceed to set up the document settings and files (as well as styles) very useful. Last week I bought a new HP LaserJet 4L printer and want to use it in Economode for some of my work. Looking at the program on page 266-7 in Exfile 8, I am not sure where to place the program once I have written it and would be grateful for some help with this. I have never written a program of this complexity before and need some simple instructions on what to do with it. Have Arnor produced a new printer driver for the LJ4L with this feature? z Editor's Reply: I hope you found that the Document Settings article in Exfile 8 and the Styles article in this issue covered many of your questions. Doubtless there are other points that I missed out, so please let me know. These subjects take a little mastering, but believe me, it's worth it. I am sure that following up the articles with discussion and questions from readers could be beneficial to all of us. The Economode program should be typed in and saved as 'ECONOMOD'. Please read the letter below first. Save the file in your Protext search path directory (the directory containing the Protext program, or the program disk on a floppy disk system). Then, in the document in which you wish to use Economode, type as the first line: >IN ECONOMOD Protext looks on the search path for files to be 'included'. When you print, Economode will be used unless you choose quality printing. If you have any difficulty typing the program in then wait for Exfile 10 (due in December) which will be accompanied by the Exfile disk. At present this program is the best way to use Economode, as it is not possible to write a printer driver to work in this way with the current Protext release. I expect a future version to have this feature built in. From D C Binks, Eastleigh @Re: ECONOMODE switching for PCL5e printers in Exfile 8. On line 131 of this program the first character after '>cc' should be a closing quote, not an opening quote as printed. This might be a quirk of Protext/symbol sets since I know Exfile is printed on a LaserJet. @I suggest that, for future code publication, you - Ÿ differentiate between opening and closing quotes Ÿ warn readers about possible confusion between lower case L and 1 (Letter Gothic is admittedly a superior fixed-pitch typeface to Courier in this regard), since these published programs can be both very valuable, as in this case, and educational. z Editor's Reply: Thank you for pointing this out. The wrongly printed quote was caused by Protext converting to 'proper quotes', that is changing the neutral quote to opening and closing quote symbols. In future we will make sure this feature is disabled in program listings by using the stored command '>SQ OFF' before the listing. (The double quotes came out correctly because the neutral form is always used in a fixed pitch font). Line 126 in the Economode program contains a lower case L followed by a number 1. You can distinguish these most easily by noting that the 1 has a horizontal line at its foot. From Jeremy Joel, Mallorca. (Amiga v6.13) @I am having problems saving macros in 6.13 as I cannot find a PROTEXT.KEY file, does this not now exist? The explanation on page 147 on saving macros is far from clear. In the macro edit create file window I have tried putting Protext.key in the pattern space, dh2 for the drawer, and macro for the file to save, but this doesn't work either. It was so much easier with Protext 5.5. z Editor's reply: The Amiga version of Protext 6.1 was the first release to use the new look Workbench requesters (in Workbench 2.0 and above). These were designed by the Amiga system developers to allow different applications to look and work in a similar way and to make the Amiga easier to use. Inevitably following the Amiga style guidelines means some changes to the way that Protext works, though we try to minimise these. The requester used for saving the macro file is used for all save or create file operations and is similar to the one used for loading files. The 'save file' requester is visibly different as the list of files is shown with a dark background. As Mr Joel mentioned, there are three input boxes in the requester: Pattern: This determines which files will be shown and uses wildcards (see Protext 6 Reference Manual page 18). In the case of saving a macro file the pattern will be set up as '#?.KEY' to show just macro files. This can be changed to a different pattern to show a different selection of files. Changing this to '#?' will show all files. Drawer: The current drawer (directory), whose files are shown in the list. This is also the directory in which the file will be saved unless the filename includes a full path. File: The filename to be saved. When saving a macro this will often be set to 'work:protext/protext.key' because this is the normal file in which macros will be saved. If this filename is shown all you need to do is click on 'OK' to save your macros. This will be saved in the 'work:protext' directory, not the one shown in the 'Drawer' box, because the full pathname is included. You can change this name to save a different macro file. From Jeremy Joel, Mallorca. (Amiga v6.13) @On my hard disk I use separate partitions: dh0 for Workbench, dh1 to store information letters etc., dh2 for my programs, i.e. Protext. When I press F2 up comes dh2 whereas I want dh1. I have been into Config, into 'Initial Installation, Disk Configuration' but here the only choice is 'hard disk', or 'floppy'. How can I configure such that F2 will open dh1? z Editor's Reply: Protext has loaded from dh2, so when you list the file by pressing F2 it shows the current directory, which is the one containing the Protext program. You need to change the current directory after starting Protext. To do this you will need to use an 'Autoexec file'. Start a new document and type this one line into it: CD DH1: Save this file as 'exfile' in your Protext directory, in your case this will be 'dh2:protext/exfile'. Now, when you start Protext the directory will be changed to DH1 and when you press F2 it will show DH1. From D E G Peckham, Victoria, Australia. @The recent receipt of Exfile no. 8 was most welcome after the long delay, although I was sorry to learn of the need for a change in editorship. The cause of the delay in production of issue no. 8 is now apparent but I hope that the "side effects" of the delay will not penalise Protext users like myself. My concern is that version 6.5 has emerged during this hiatus, a fact emphasized in the editorial and subsequent articles. Consequently the main purpose of this letter is to ask that future issues do not fail to provide adequate cover of any differences between 6.5 and the earlier marks of version 6. Can you also mention what is happening about revision to and reissue of an updated "Exfile disk"? z Editor's reply: the majority of articles will apply to version 6.0 and 6.1 as well as 6.5. The differences in version 6.5 are mainly separate facilities like Print Preview and Auto-Correct. Promerge utilities print- ed in the magazine will be written to work on as many versions as possible and the notes will document the minimum version needed. An update to the Exfile disk will be sent with Exfile 10, including the listings from issues 1 to 10. From Max Malzer, Waterloo, Belgium @The COUNT command shows the number of characters which is of course a variable. Can the information be sent to a file? z Editor's Reply: Yes, you can send the information to a file and read it with some Promerge instructions. First save the following lines as a file called CTF (Count to file). del count.spl spool count.spl count spoff This is an Exec file which will send the output of the COUNT command to a file. To use this go into command mode and type: exec ctf Then this Promerge program can be used to read the information: >zm >df count.spl >rl a b c >cf >sv nc=c[w-1] >sv x=":" in nc >sv x=x+1 >sv nc=nc[&x&:] There are &nc& characters in the file From Anthony Campbell, acampbell@cix @1. Avoiding Widows and Orphans. Protext gives you the option to do this, but there is a problem with paragraphs headings such as the one I've just made. Because there's a carriage return at the end of the heading Protext thinks it is the end of a paragraph, and you may get an unwanted page break at this point. You can of course go through the text with the invaluable Preview before printing, but sometimes you forget to do so. One way of avoiding this is to insert a stored command >PA 2 above each heading. I've used key redefinition to make SHIFT-ALT- Return produce this. 2. Someone in a newsgroup asked about word processors that would allow files to be printed from the end forwards; this would obviate the need to reshuffle pages after printing. This struck me as a good idea, since if you need to reorder a number of booklets each containing 50 pages or more it can take quite a long time. So far as I know Protext does not provide this facility directly. However one way of getting it is to make an Exec file to load the file to be printed and then list the pages in reverse order, e.g. load book.txt ppq 50 ppq 49 ppq 48 etc. This works satisfactorily; you can of course test it out first by changing ppq to pps to print to screen first. z ÷ ÷ ÷ ÷ ÷ Regina v Computer and Ward-Pro Sessor A short story, the second of two parts by Wamba [The conclusion of Lord Chief Justice Goddard's summing-up in the above case. He was referring in detail to the instruments used by the accused when committing the alleged offences.] "Let us turn to the Spelling-checker. Leaving aside the implied insult to the user that his schooling was so inadequate that he cannot spell, when as a test the spelling-checker was given the word 'document', intention- ally misspelled as 'documnet', it offered, among others equally useless, such words as 'diaconate', 'detonate', 'decant', 'dogmata' and 'dogmatic'. Needless to say 'document' was not offered. "As regards the words suggested by this obviously increasingly desper- ate contrivance, 'detonate' might be of use to a member of a terrorist group. 'Decant' might have a limited use in the wine-growing regions of France or to an alcoholic. A diaconate, my dictionary tells me, is a body of deacons and dogmata, a body of religious beliefs. These words seem to be of little use to anyone not a character in an Anthony Trollope novel. I think I could find a use for 'dogmatic' however as I am absolutely sure that the spelling-checker is worthless! "Let us turn to the Thesaurus. This is not, as one might understandably be led to believe, a extinct giant reptile, although employing a flesh- tearing monster, for the purpose, could hardly be of less use that this program appears to be. I judge from the results of my experience! I selected the word 'gallows', a word I often use in my correspondence. There was "no information available" on this most commonly used of words! 'Execution' however produced a proliferation of words too many for consideration within a reasonable time. [At this point the defendants became faint and had to be revived with a glass of water] "Thus the user in pursuit of the illusive word finds himself hindered and hampered at every turn until his original purpose is lost! Obviously an instrument purposefully designed to destroy the morale of the British people and British industry! "The third charge is an allegation of a treasonous attack on the very health of our citizens many of whom are widows or widowers and very probably orphans. Neither small children, old folk, pregnant women nor the unborn are spared in the defendants' merciless campaign! One can visualise their hapless victims locked in cages of their own making, staring madly at the one-eyed monster, unshaven, unkempt, caring only, in their drug-like dream, for the next image appearing on their monitor. Some of these innocents are mere infants lured by Mr Computer by the prospect of innocent fun, into playing games on his vile machines. These precious ones, especially the children of city- dwellers, should not be indoors! They should be with their fellows in the healthy outdoor air of the streets. In any case should they indeed be playing? Should they not be studying to prepare themselves for the stern tasks they will face as adults in the future? Mr Computer and Mr Sessor, we do not come on to this Earth to have 'fun' as, I am sure, this noble jury will quickly cause you to become aware! "The danger from monitors to pregnant mothers is obvious. Who knows the long-term danger to the eye-sight of other users? "It is plain that a plot has been uncovered to subvert the people of England. 'This little world. This precious stone set in the silver sea'. The Swan of Avon defied 'the three corners of the world to come and we will shock them'. If the defendants have their way it is obvious that, for reasons they would perhaps be unwilling publicly to admit, they intend any defence we mount today, to say the least, to be most seriously handicapped! We may draw our own conclusions as to their reasons from the fact that the defendants are clearly not dismayed by the prospects of the boots of the soldiery of foreign oppressors defiling the fair soil of England. But no doubt they intend to be elsewhere counting their ill-gotten gains with that received from their foreign pay- masters when this occurs! "Of course Mr Typewriter will not stoop to associate himself with any such attack on the health, independence and liberty of the free-born Englishman! "Finally the planet itself is in danger from the defendants. Mr Typewriter prints directly on to the paper perhaps not always with the best results from the aesthetic point of view of Nancy-Boys! But in any case this can be corrected! The use of typewriter rubbers, Tipp-Ex etc. will accomplish an adequate correction. Even in the extreme case of a hole appearing in the paper due to the over-zealous application of a rubber, we can be sure that an astutely placed piece of Sellotape will be sufficient to remedy the matter. "Compare the results of Computer's and Sessor's work. Their infernal machines work indirectly on to a printer and with uncertain conse- quences. And we all know the inevitable results of this method of procedure: waste of mounds of paper. This paper, Mr Computer and Mr Sessor, we will have you know, is not unlimited and I think we can fairly lay the blame for a large portion of the destruction of the rain- forest on your shoulders! "As I have stated earlier one objective of the defendants is to render redundant the citizens first of this country - and then the whole world. The disaster of world-wide unemployment is not too high a price, seemingly, to pay to ensure the prosperity of Mr Computer and Mr Sessor. "No one in all his years of service has dreamt of holding Mr Typewriter to blame for causing universal economic collapse and endangering the planet! "What has been the response of the defendants to these hellish charges? As you have heard they have thought it sufficient to repeat to this court "syntax error" together with other unhelpful phrases such as "program too big to fit into memory", "bad command or file name", "file not found" etc. etc. "Members of the Jury I will shortly ask you to commence your deliberations. You must discharge this duty in a impartial and unpreju- diced way and I would not try to influence you in any way. However you may bear in mind that on your decision and your decision alone is the fate of these blackguards determined. Freeing them will necessarily involve the continuance and increase of their activities. Doubtless you will be aware that the fate of your loved ones: your wives, sisters, children and that of generations yet unborn must be safeguarded. "Members of the Jury I ask you to consider your verdict." ÷ ÷ ÷ ÷ ÷ Printing Crop Marks for A5 pages on A4 paper Gavin Every The list of page sizes in document settings includes 'A5 on A4 paper'. This is used to print A5 text in the centre of the printer's A4 paper and is useful when printing booklets like the one you are reading. This is achieved by a pre-defined set of margins (top and bottom margin 2.21", left and right margin 1.71"). To help the printing company it is useful to print 'crop marks', small lines outside the text area which indicate the precise positioning of the A5 page edges. They look like this: The program will print the crop marks on every page of a document. Save it as 'CROPA5A4' and use by including (>IN CROPA5A4) at the start of the text. It works by defining an 'auto overlay macro' which is then invoked for every page. CROPA5A4 should work on most LaserJet compatibles (PCL 4 and above), but not on DeskJets other than the 1200C). >>> CROPA5A4: 31 Aug 94 (GME) >>> Prints crop marks for A5 size on A4 paper (LaserJet PCL4 or later) >>> It ought to work on just about any version of Protext >>> Needs to be included before the end of the first page >>> >sv mm=300/25.4 ; dots per millimetre >dp 0 ; this is the easiest way to get whole numbers >sv croptop=43.55*mm cropleft=30.78*mm >sv cropheight=210.2*mm cropwidth=148.65*mm >sv croplen=50 cropgap=10 cropwid=1 ; in dots >>> >>> draw a vertical crop line >sv cropvert='27,"*c&cropwid&a&croplen&b0P"' >>> draw a horizontal crop line >sv crophoriz='27,"*c&croplen&a&cropwid&b0P"' >oc 27,"&f32123y0X" ; define some arbitrary macro number >oc 27,"&f0S" ; save cursor pos >oc 27,"&l0E" ; set temporary top margin 0 >sv cropminsm=71 cropmintm=0 ; offsets of (0,0) from top left of page >sv crx=cropleft-cropminsm cry=croptop-cropmintm-croplen-cropgap >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &cropvert& >sv crx=crx + cropwidth >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &cropvert& >sv cry=cry+croplen+cropgap+cropheight+cropgap >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &cropvert& >sv crx=crx - cropwidth >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &cropvert& >sv cry=cry-cropheight-cropgap >sv crx=crx-croplen-cropgap >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &crophoriz& >sv cry=cry+cropheight >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &crophoriz& >sv crx=crx+croplen+cropgap+cropwidth+cropgap >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &crophoriz& >sv cry=cry-cropheight >oc 27,"*p&crx&x&cry&Y" ; move to crx,cry >oc &crophoriz& >oc 27,"&f1S" ; restore cursor pos >oc 27,"&f1X" ; end macro defn >oc 27,"&f4X" ; auto overlay macro >dp 2 ÷ ÷ ÷ ÷ ÷ Some Quick Macros ALT-H for editing key help: KEY H ^765^^520^4 ALT-L for letters directory: KEY L ^766^c:^13^cd\letters^13^ ALT-S to save file: KEY S ^765^^926^ ALT-V for preview: KEY V ^765^^1084^ In the Next Issue Topics planned for Exfile 10 include: Protext questions and answers; Readers' letters; Editing your own printer drivers; Complete summary of Promerge system variables; PCLBOX revisited; The Exfile disk, release 2. Of course if you have any better ideas ... :& Any opinions expressed in this magazine are those of the individual authors and do not necessarily represent the views of the publishers. No liability can be accepted for any mistakes. Copyright = October 1994 Arnor Ltd. and the individual authors. Created with Protext 6.5 and a Hewlett Packard LaserJet 4L. Printed from camera ready copy by Sushima Printing of Whittlesey, Cambridgeshire. Published by Arnor Ltd., 611 Lincoln Road, Peterborough PE1 3HA. Telephone +44 (0) 1733 68909. Fax +44 (0) 1733 67299.