Subroutine SYMBOLSYMBOL is a plug in replacement for the SYMBOL routine of pen plotter fame (e.g. Calcomp) with several extensions. Four Roman fonts, two Greek fonts, and a set of special mathematical symbols are available within any call to SYMBOL. In addition, up to ten levels of sub- and super-scripting may be included, again within any one text string. Provision for backspacing over the previous character is given. The structure of SYMBOL is based on the UNIX conventions. Special symbols, font changes, back spacing, and sub- or super-scripting are indicated by preceding certain command strings with the backslash character: 1. Greek letters are indicated by their English names enclosed in backslashes, e.g. \ALPHA\ or \beta\. The case of the Greek letter is determined by the case of the English words and mixed cases within the backslashes are not allowed. The closing backslash must be provided. Note that only the unique number of letters necessary to specify a Greek character need be used, e.g. \A\,\ta\,\omi\ for capital alpha, lower case tau, and lower case omicron. 2. Sub- or super-scripting are indicated by the backslash character followed by the letters 'sub' or 'sup' in either upper or lower case and the quantity to be sub- or super-scripted enclosed in curly brackets. The closing curly bracket must be provided and a closing backslash is not needed. The size of the characters change with each level of sub- and super-scripting and the normal size is restored upon termination. 3. Font changes are obtained by enclosing the name of the font in backslashes, e.g.\SIMPLEX\. The available fonts are simplex (sans serif, light font, including Greek), complex (serif, heavy font, including Greek), italic (serif, heavy font, no Greek), and duplex (sans serif, heavy font, no Greek). Greek characters called when the font is italic and duplex default to the complex and simplex Greek forms, but the font switch is not changed. A font remains in effect until explicitly changed. The default font is simplex. Note that only the unique number of characters (2, or 3 for simplex) are required to indicate the font. 4. Any symbol can be accessed by enclosing its symbol number+1000 in backslashes, e.g.\1393\ gives the integral sign. This is the only way to access the special mathematical symbols. Any character with a keyboard equivalent may be accessed from the keyboard, except backslash and curly bracket, which are reserved for control. 5. The pointer can be backed up over the previous character by enclosing 'BS' in backslashes, e.g. \BS\. SYMBOL keeps track only of the width of the previous character, thus multiple backspacing may produce errors (you may not be where you think you are) since the character width is variable. 6. Twenty-two special centered symbols are provided for plotting data points and are called in the usual way. The usual SYMBOL call convention is used: CALL SYMBOL(XX,YY,HEIGHT,ITEXT,THETA,NTEXT) where XX and YY are the coordinates in inches of the lower left point of the first character in ITEXT. If either XX or YY is set to 999.0 then the saved next character position is used. HEIGHT is the character height in inches. If set to zero, no text is plotted. ITEXT is an integer array containing the ASCII character string to be plotted. THETA is the angle for the string to be plotted at in CCW degrees. NTEXT is the number of characters in ITEXT to be decoded if NTEXT is positive. If NTEXT=0, a single Roman simplex character whose value is given by the first element of ITEXT is plotted. If NTEXT is -1, the special symbol whose value (1-22) is contained in the first element of ITEXT is plotted with the pen up on the move to (XX,YY). If NTEXT is less than -1, the pen is down on the move and the special symbol is plotted at (XX,YY). Note that NTEXT is the number of characters in ITEXT, not the actual number to be plotted, since commands for font changes are included. Some examples of character strings 'ABCDEFGHIJKLMNOPQRSTUV' will produce the upper case Roman simplex letter set '\a\\b\\g\\d\' will produce lower case alpha, beta, gamma, and delta in the simplex letter set. '\DUP\'THIS IS A TEST'\SIM\' will produce 'THIS IS A TEST' in the duplex font, then reset to the simplex font on termination 'e\SUP{-x}' will produce the letter e superscripted with a -x A subroutine to replace the Calcomp routine JUSTFY is also provided. The call is CALL JUSTFY(S,HEIGHT,ITEXT,NTEXT) where S is a REAL*4 array of dimension 4 which contains S(1)=distance in inches to the left edge of the first nonblank character S(2)=distance in inches to center of the string, blanks removed from the ends S(3)=distance in inches to the right edge of the last nonblank character S(4)=distance in inches to the right edge of the last character in the string and the remaining arguments are given for SYMBOL. A previous (to us) version of SYMBOL, with fewer fonts and no centered symbols, was named SPCSMB. The arguments are the same. An ENTRY in SYMBOL allows use of this name. Centering of titles, etc., for that routine were done by calls to LENGTH(XL,HEIGHT,ITEXT,NTEXT), where XL = S(3)-S(1) — see discussion of JUSTFY for definitions. There is an entry for LENGTH as well. Program ./focmec/bin/symdemo produces a SGF file that has been converted to a PDF file ./focmec/doc/symdemo.pdf. The source code, ./focmec/src/symdemo.f, provides a useful supplement to this document. |