A/C INTERFACE
Technical Word Processors for Scientific Writers Cyrelle K. Gerson Richard A. Love American Chemical Society
Until recently, authors of scientific manuscripts could not use microcomputer software to prepare and integrate printed text, mathematical equations, chemical structure drawings, and other graphics such as charts, graphs, and spectra into a single document. Most word-processing software offered only the ability to print standard text characters with a few enhancements: superand subscripts, boldfacing, and underlining. During the past three years, however, the proliferation of microcomputer hardware and software has allowed scientists to produce draft and publication-quality documents containing many enhanced manuscript elements. The increasing number of microcomputer programs and rapidly changing technology can make choosing software a confusing and difficult process. To help scientists understand what is available and to assess their needs, this A/C INTERFACE provides an overview of features offered by many software companies for technical manuscript preparation.
Software needs Preparation of scientific manuscripts for publication places a much wider range of demands on computer software than does simple word processing. In addition to normal manuscript control functions, such as correct pagination, hyphenation, and header and footer formatting, scientific document 0003-2700/87/A359-1031 /$01.50/0 © 1987 American Chemical Society
preparation requires special characters such as Greek or other non-Englishlanguage alphabets, diacritical marks, and mathematical symbols. These characters are unavailable on standard 128-character keyboard sets used with simple word-processing systems. Scientific manuscripts often include complex mathematical expressions that have multilevel sub- and superscript characters and unique symbols such as summation or integral signs. Chemistry manuscripts often require an accurate depiction of a chemical structure's stereochemistry and the ability to import graphics from other software packages into the document. There are many approaches to solving these document preparation problems. The simplest solution would be to use a standard word-processing program to output a variety of fonts on a dot matrix or laser printer; a more complex approach would be to completely integrate text, math, and graphics. An intermediate approach might be to combine a specialized program that provides a single capability, such as drawing structures or creating mathematical expressions, with a standard word processor.
Seeing it on the screen Software producers have found two ways to solve the problem of integrating text, math, chemical structure drawings, and graphics. The first approach is more popular, from both the producer's and the user's perspective. It is called "WYSIWYG" (What You See Is What You Get, pronounced "wissywig"), which means that whatever you create on the com-
puter's monitor is what you will get on your printout. WYSIWYG programs are complete word processors with extra features added. A WYSIWYG system displays the special characters on the screen and printout by directly accessing "alternate keyboard" character sets. In effect, the WYSIWYG program assigns a new font character (such as a Greek letter, math symbol, or even a bond fragment) to each regular character key, which can then be accessed by the user. The second approach is to use a mark-up language (ML). An ML system uses in-line codes that are interpreted by a program called a formatter that either instructs the printer to print the special characters or instructs the computer's graphics card to display them on the screen. The ML formatter is an extra program used in addition to a standard word processor. In principle, any word-processing package that can create an ASCII file can create the working file containing the text and ML codes. Two well-known examples of ML languages are T E X and troff. Both systems use a mnemonic set of words and symbols to create complex mathematical expressions that can then be printed. Each program automatically formats the expression or equation when it is printed (Figure 1). In contrast, the Egg, a WYSIWYG system that can create mathematical expressions, displays an equation on the screen as the user This A/C INTERFACE is taken in part from a paper presented during the Symposium on Small Computer Systems Software for Chemists at the 192nd ACS National Meeting in April 1987.
ANALYTICAL CHEMISTRY, VOL. 59, NO. 17, SEPTEMBER 1, 1987 · 1031 A
ΓΕΧ Code: $sum_{\alpha=l}"\infty
l\over{2\alpharl}"2\beta$
Lroff Code: sum from \ ( * a = l
to infinity " 1 over {{( 2 \(*a *-" 1 )} sup 2\(*b}
Figure 1. Equation created using TEX and troff. The in-line ASCII codes are shown below the equation. "Sum" stands for the summation sign in both languages. TEX uses to denote superscripts; troff uses "sup." (Tplus/troff on HP LaserJet Plus)
S_
1
F8 [*"] [*"] [""] A A A a s s ALT-B S P [*"] [*"] A A A z z x ALT-a
(summation sign) (repositions cursor) (adjusts vertical spacing) ( M sign) (repositions cursor) (adjusts vertical spacing) (alpha equals 1)
sp " a * v 9 V s * s [ALT-»] [ALT-»] [ALT-»]
(9 space vaniculum) (adjusts horizontal spacing)
1 [*"] [*"] [*"] [*"] A A A z x x (2 ALT-a - 1) A a 2 ALT-b [-»] [-»]
(1) (repositions cursor) (adjusts vertical spacing) ( (2a-l) ) (adjusts horizontal spacing) (2/9) (repositions cursor)
Figure 2. Equation created on the computer screen using the Egg and then printed. The list below the equation contains the keystrokes used to enter it. (The Egg on HP LaserJet Plus, math J cartridge)
creates it (Figure 2). With the Egg, the user formats the equation by position ing the cursor where he or she wants a symbol to appear in relation to the rest of the equation and then accesses the alternate keyboard character by de pressing the ALT key together with the appropriate keyboard letter. Creating chemical structures There are three ways to prepare chemi cal structures for printing. Two of these—the WYSIWYG systems and specialized graphics programs—dis play the structure on screen first. ML systems use a set of codes to direct the printer to print the structure. Many WYSIWYG systems can cre ate chemical structures. With these packages, users create structures ap proximately the same way they would create a mathematical expression. For a chemical structure, the special char acters accessed by the alternate key board are bond fragments. Figure 3 shows how the chemical structure of adamantane is created with this ap
Figure 3. In Chi Writer, an alternate keyboard character is ac cessed by typing the F7 or F8 function key followed by the appropriate letter or number key. (a) An expanded view of the individual bond fragments and their correspond ing keyboard characters for drawing adamantane. (b) Final output structure for adamantane.
proach using ChiWriter. Here, the user positions the cursor and types the com bination of keys needed to get the bond fragment to appear on the monitor. TechSet is one of the few ML sys tems that can construct chemical struc ture drawings. The bond directions are limited to the 12 directions of a clock face, but with this approach the user can create structures like the cholester ol derivative shown in Figure 4. Undoubtedly the easiest way to pro duce chemical structures is to use a graphics program that has a good user interface for drawing. Programs that closely mimic the drawing process are the easiest to learn and use. Packages like ChemDraw, ChemText, Chemlntosh, PSIDOM, and WIMP use this ap proach, and they have made drawing chemical structures easy. These sys tems use pull-down menus, icons, and a mouse attachment to create chemical structures rapidly. The structure in Figure 5 took about 3-4 min to create using ChemDraw. The graphics capa bilities of these systems allow the user
1032 A · ANALYTICAL CHEMISTRY, VOL. 59, NO. 17, SEPTEMBER 1, 1987
to obtain accurate stereochemical rep resentations, schemes, and reaction di agrams. The graphics created by these programs can then be incorporated into the text of a document. Integrating text with graphics Integration of text with graphics from other files or software packages is an important capability provided by state-of-the-art software developers. Programs that can integrate text with graphics presently take one of two ap proaches: They either incorporate the graphic image into the text file and dis play it as part of a WYSIWYG system or they only print the graphic image with the text. ChemText is among the programs that takes the first approach. It incor porates the graphics and word-process ing programs into a single, integrated package so that the user can switch rapidly between the graphics and text screens and view graphic images mixed with text as they will appear when print ed. ChemText can also import graphics
files from other software products, pro vided that the files are in one of several compatible formats (Figure 6). It is routine for programs that run on the Macintosh, such as ChemDraw and Chemlntosh, to integrate graphics with text. The Macintosh operating system and file structure facilitate the combi nation of text and graphics produced by different programs both on screen and when printed. Some WYSIWYG programs (e.g., T 3 ) and ML programs (e.g., troff) use the second method to bring graphics produced by other programs into the printed document by using callouts in the working text document. Molecular Presentation Graphics includes a printing program that will incorporate its generated structures into the ASCII document created by any word proces sor when it is printed. Although the Lotus Manuscript pro gram uses an ML approach for format ting equations, its method of integrat ing graphics with text is an interesting hybrid of WYSIWYG and ML. The user specifies where in the document the graphic image will be placed, and a preview feature allows the document to be viewed quickly on screen to verify that this placement is satisfactory. Manuscript also can call in or import graphics files created by other Lotus products, such as Lotus 1-2-3 or Free lance Plus, or by other graphics soft ware packages. Lotus Manuscript and other systems that use this importing approach in clude the names of the graphics files in the working text file. The file names are surrounded by tildes (~), back slashes (\), or some other escape sym bol that tells the program to look for and print these files. Of course, the graphics files must be stored in a for mat that is accepted by the ML or WYSIWYG programs. Figure 7 shows the integration of a titration curve (ob tained by Lotus Measure from an in strument reading) into the text of a re port.
.DF\oh = iithsp \nthsp HO\thsp \thsp .DF\:ringl2 =«lB8//B10//B8R'\oh 7/B12 //B2//B4//B6//B-4//B2//B-12//B10//B-8R» .DF\:ring34=«B12//B2//B4//W12R'CH#d3#u' //B6//B8R//B3H//P1//P11//B8HR» .DF\:tail=«Bl//BllR/B3//B+5//B3//BlR//B5//B3R//B7» \:ringl2 \:ring34 \:tail
Figure 4. TechSet uses the ML approach to create chemical structure drawings. (Chemical structure, TechSet, HP LaserJet Plus; text, Tplus/troff, HP LaserJet Plus)
Figure 5. A true graphics interface facilitates drawing chemical structures. (ChemDraw, Apple LaserWriter)
Which system is better?
There are advantages and disadvan tages to both WYSIWYG and ML sys tems. Often, deciding which one to pick comes down to user preference. With either system there is a tradeoff be tween ease of use and hardware capa bilities. WYSIWYG. As a general rule, a WYSIWYG system requires the user to remember which alternate keyboard contains a special character for display on the screen or printout. Many users regard WYSIWYG as easy to learn, but this perception is subject to individ ual tastes. A major advantage of WYSIWYG systems is that they give immediate visual feedback that helps in noticing and fixing errors, and for
Figure β. ChemText can import files created by other programs. This NMR spectrum can be integrated into the working text file. (ChemText, Apple LaserWriter)
1034 A · ANALYTICAL CHEMISTRY, VOL. 59, NO. 17, SEPTEMBER 1, 1987
(a) *PITTCON.DOC
Attr: Normal
Pos: 1
Sect: 2
STRUCTURED EDIT
to the particular component under investigation. \eqn "center 'RESULT'
This calculation is:·*
('CONST' over 'WEIGHT')#[(V * 'CONC')-'BLANK'#]"\*
Another plot can be instantly created to show the relationship between the sample volume and the first derivative (see Figure 2).«
•\picture deriv.pic height=2.25\*
2:
r.ci ·•"• c-i'^iiige icx· 'ts f«d'