home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / cawf407.zip / 00diffs next >
Text File  |  1993-12-28  |  14KB  |  424 lines

  1.  
  2.         Differences between Cawf and Nroff or Troff
  3.  
  4. ===============================================
  5. 1. Cawf supports some nroff and troff requests.
  6. ===============================================
  7.  
  8. Font and Character Size Control
  9.  
  10.                                       cawf
  11.  
  12.   .ps    Point size                            Yes
  13.   .fz    font F to point size +-N                     No
  14.   .fz    Special Font characters to point size +-N             No
  15.   .ss    Space-character size                         No
  16.   .cs    Constant character                         No
  17.   .bd    Embolden font F by N-1 units                     No
  18.   .bd    Embolden Special Font when current font is F             No
  19.   .ft    Change to font                            Yes
  20.   .fp    Font named F mounted on physical position 1<=N<=4         No
  21.   .pl    Page length                            Yes
  22.   .bp    Eject current page; next page number N                Yes [1]
  23.   .pn    Next page number N                         No
  24.   .po    Page offset                            Yes
  25.   .ne    Need N vertical space                        Yes
  26.   .mk    Mark current vertical place in register R             No
  27.   .rt    Return (upward only) to marked vertical place             No
  28.  
  29. Text Filling, Adjusting, and Centering
  30.  
  31.   .br    Break                                Yes
  32.   .fi    Fill output lines                        Yes
  33.   .nf    No filling or adjusting of output lines                Yes
  34.   .ad    Adjust output lines with mode c                    Yes [2]
  35.   .na    No output line adjusting                    Yes
  36.   .ce    Center following N input text lines                Yes
  37.  
  38. Vertical Spacing
  39.  
  40.   .vs    Vertical base line spacing (V)                    Yes
  41.   .ls    Output N-1 Vs after each text output line            Yes
  42.   .sp    Space vertical distance N in either direction            Yes [3]
  43.   .sv    Save vertical distance N                     No
  44.   .os    Output saved vertical distance                     No
  45.   .ns    Turn no-space mode on                        Yes
  46.   .rs    Restore spacing; turn no-space mode off                Yes
  47.  
  48. Line Length and Indenting
  49.  
  50.   .ll    Line length                            Yes
  51.   .in    Indent                                Yes
  52.   .ti    Temporary indent                        Yes
  53.  
  54. Macros, Strings, Diversion, and Position Traps
  55.  
  56.   .de    Define or redefine macro xx; end at call of yy            Yes [4]
  57.   .am    Append to a macro                         No
  58.   .ds    Define a string xx containing <string>                Yes
  59.   .as    Append <string> to string xx                     No
  60.   .rm    Remove request, macro, or string                Yes
  61.   .rn    Rename request, macro, or string xx to yy            Yes
  62.   .di    Divert output to macro xx                    Yes [5]
  63.   .da    Divert and append to xx                         No
  64.   .wh    Set location trap; negative is w.r.t. page bottom         No [6]
  65.   .ch    Change trap location                         No
  66.   .dt    Set a diversion trap                         No
  67.   .it    Set an input-line count trap                    Yes
  68.   .em    End macro is xx                             No
  69.  
  70. Number Registers
  71.   .nr    Define and set number register R; auto-increment by M        Yes [7]
  72.   .af    Assign format to register R (c=1, i, I, a, A)             No [8]
  73.   .rr    Remove register I                        Yes
  74.  
  75. Tabs, Leaders, and Fields
  76.   .ta    Tab settings; left type, unless t=R (right), C (centered)   Yes [8]
  77.   .tc    Tab repetition character                     No
  78.   .lc    Leader repetition character                     No
  79.   .fc    Set field delimiter a and pad character b             No
  80.  
  81. Input and Output Conventions and Character Translations
  82.  
  83.   .ec    Set escape character                         No
  84.   .eo    Turn off escape character mechanism                 No
  85.   .lg    Ligature mode on if N>0                        Yes [9]
  86.   .ul    Underline (italicize in troff) N input lines             No
  87.   .cu    Continuous underline in nroff; like .ul in troff         No
  88.   .uf    Underline font set to F (to be switched to by .ul)         No
  89.   .cc    Set control character to c                     No
  90.   .c2    Set nobreak control character to c                 No
  91.   .tr    Translate a to b, etc. on output                Yes
  92.  
  93. Local Horizontal and Vertical Motions, and the Width Function
  94.  
  95. Overstrike, Bracket, Line-drawing, and Zero-width Functions
  96.  
  97. Hyphenation
  98.  
  99.   .nh    No hyphenation                             No
  100.   .hy    Hyphenate; I = mode                         No
  101.   .hc    Hyphenation indicator character c                 No
  102.   .hw    Exception words                             No
  103.  
  104. Three Part Titles.
  105.  
  106.   .tl    Three part title                        Yes
  107.   .pc    Page number character                         No
  108.   .lt    Length of title                            Yes
  109.  
  110. Output Line Numbering.
  111.  
  112.   .nm    Number mode on or off, set parameters                 No
  113.   .nn    Do not number next \fIN\fR lines                 No
  114.  
  115. Conditional Acceptance of Input
  116.  
  117.   .if    If condition c true, accept <anything> as input, for        Yes [10] 
  118.     multi-line use <\{anything\}>
  119.   .if    If condition c false, accept <anything>                Yes [10]
  120.   .if    If expression N > 0, accept <anything>                 No
  121.   .if    If expression N <= 0, accept <anything>                 No
  122.   .if    If <string1> identical to <string2> accept <anything>        Yes [10]
  123.   .if    If <string1> not identical to <string2> accept <anything>   Yes [10]
  124.   .ie    If portion of if-else; all above forms (like .if)        Yes [10]
  125.   .el    Else portion of if-else                        Yes
  126.  
  127. Environment Switching.
  128.   .ev    Environment switched (push down)                 No
  129.  
  130. Insertions from the Standard Input
  131.   .rd    Read insertion                             No
  132.   .ex    Exit from nroff or troff                     No
  133.  
  134. Input/Output File Switching
  135.  
  136.   .so    Switch source file (push down)                    Yes [11]
  137.   .nx    Next file                             No
  138.   .pi    Pipe output to program (nroff only)                 No
  139.  
  140. Miscellaneous
  141.   .mc    Set margin character c and separation N                 No
  142.   .tm    Print <string> on terminal (UNIX standard error)        Yes
  143.   .ig    Ignore till call of yy                         No
  144.   .pm    Print macro names and sizes; if t present, print only         No
  145.     total of sizes
  146.   .ab    Print a message and abort                     No
  147.   .fl    Flush output buffer                        Yes
  148.  
  149. Notes
  150.  
  151.   [1]  Can't specify next page number N on .bp.
  152.  
  153.   [2]  Can't specify mode c on .ad.
  154.  
  155.   [3]  Can only space forward vertically with .sp.
  156.  
  157.   [4]  Cannot redefine end of macro call yy for .de.  It is always ``..''.
  158.  
  159.   [5]  Can only divert to /dev/null with .di.
  160.  
  161.   [6]  Some page header and footer handling is built in.
  162.  
  163.   [7]  Auto-increment not supported for .nr.
  164.  
  165.   [8]  Only left adjusted tabs are supported for .ta.
  166.  
  167.   [9] The .i0 (obsolete), .lg and .li (obsolete) requests are silently ignored.
  168.  
  169.   [10] The only .if and .ie conditions supported are numeric comparisons on
  170.        arguments; string comparisons between a macro parameter and a literal;
  171.        n for nroff, always true; and t for troff, always false.
  172.  
  173.        The \{anything\} block construct is not supported for .if or .ie.
  174.  
  175.   [11] The .so push-down stack is limited to five entries.
  176.  
  177.  
  178.  
  179. =====================================================================
  180. 2. Cawf supports some nroff or troff escape sequences for characters,
  181.    indicators, and functions.
  182. =====================================================================
  183.  
  184. Escape
  185. Sequence    Meaning                              cawf
  186.  
  187. \\        Prevent or delay the interpretation of \               Yes [12]
  188. \e        Printable version of the current escape character           Yes [12]
  189. \'        ' (acute accent); equivalent to \(aa               Yes [12]
  190. \`        ` (grave accent); equivalent to \(ga               Yes [12]
  191. \-        - Minus sign in the current font                   Yes [12]
  192. \.        Period (dot) (see .de)                    No
  193. \(space)    Unpaddable space-size space character            No
  194. \0        Digit width space                           Yes [13]
  195. \|        1/6 em narrow space character (zero width in nroff)           Yes [13]
  196. \^        1/12 em half-narrow space character (zero width in nroff)  Yes [13]
  197. \&        Non-printing, zero width character                   Yes [13]
  198. \!        Transparent line indicator                    No
  199. \"        Beginning of comment                       Yes
  200. \$N        Interpolate argument 1<=IN<=9                   Yes
  201. \%        Default optional hyphenation character               Yes
  202. \(xx        Character named xx                           Yes
  203. \*x        Interpolate string x                       Yes
  204. \(*xx        Interpolate string xx                       Yes
  205. \a        Non-interpreted leader character                No
  206. \b'abc...'  Bracket building function
  207. \c        Interrupt text processing                       Yes
  208. \d        Forward (down) (1/l2 em vertical motion (1/2 line in    No
  209.         nroff)
  210. \fx        Change to font named x                       Yes
  211. \f(xx        Change to font named xx                    No
  212. \fN        Change to font position N                    No
  213. \h'N'        Local horizontal motion; move right N (negative left)      Yes [14]
  214. \k        Mark horizontal input place in register x               Yes
  215. \l'Nc'        Horizontal line drawing function (optionally with c)    No
  216. \L'Nc'        Vertical line drawing function (optionally with c)        No
  217. \nx \n(xx   Interpolate number register x or xx                   Yes
  218. \o'abc...'  Overstrike characters a, b, c, ...                No
  219. \p        Break and spread output line                No
  220. \r        Reverse 1 em vertical motion (reverse line in nroff)    No
  221. \sN \s+-N   Point-size change function                    No [15]
  222. \t        Non-interpreted horizontal tab                No
  223. \u        Reverse (up) 1/l2 em vertical motion (1/2 line in nroff)    No
  224. \v'N'        Local vertical motion; move down N (negative up)        No
  225. \w'string'  Interpolate width of <string>                   Yes
  226. \x'N'        Extra line-space function (negative before, positive    No
  227.         after)
  228. \zc        Print c with zero width (without spacing)            No
  229. \{        Begin conditional input                    No
  230. \}        End conditional input                    No
  231. \(newline) Concealed (ignored) newline                    No
  232. \X        X, any character not listed above                   Yes
  233.  
  234. Notes
  235.  
  236.   [12]  These characters are defined in cawf's standard dumb.dev file.
  237.  
  238.   [13]  The characters are defined to be zero-length in cawf's standard
  239.         dumb.dev file.
  240.  
  241.   [14]  Only right horizontal motions (positive N) are permitted with \h.
  242.  
  243.   [15]  \s is silently ignored.
  244.  
  245.  
  246. =========================================================================
  247. 3. Cawf supports some nroff or troff predefined general number registers.
  248. =========================================================================
  249.  
  250. Register
  251. Name      Description                              Cawf
  252.  
  253. \%      Current page number                           Yes
  254. c.      Number of lines read from current input file            No
  255. ct      Character type (set by width function)            No
  256. dl      Width (maximum) of last completed diversion            No
  257. dn      Height (vertical size) of last completed diversion        No
  258. dw      Current day of the week (1-7)                    No
  259. dy      Current day of the month (1-31)                No
  260. hp      Current horizontal place on input line (not in ditroff)    No
  261. ln      Output line number                        No
  262. mo      Current month (1-12)                        No
  263. nl      Vertical position of last printed text base-line        No
  264. sb      Depth of string below base line (generated by width function) No
  265. st      Height of string above base line (generated by width        No
  266.       function)
  267. yr      Last two digits of current year                No
  268.  
  269.  
  270. ==========================================================================
  271. 4. There is no cawf support for nroff or troff predefined read-only number
  272.    registers.
  273. ==========================================================================
  274.  
  275.   Register
  276.   Name        Description
  277.  
  278.   .$        Number of arguments available at the current macro level
  279.   .A        Set to 1 in troff, if -a option used; always 1 in nroff
  280.   .H        Available horizontal resolution in basic units
  281.   .L        Set to current line-spacing (ls) parameter.
  282.   .P        Set to 1 if the current page is being printed; otherwise 0.
  283.   .T        Set to 1 in nroff, if \-T option used; always 0 in troff.
  284.   .V        Available vertical resolution in basic units
  285.   .a        Post-line extra line-space most recently utilized \
  286.   .c        Number of lines read from current input file
  287.   .d        Current vertical place in current diversion; equal to nl,
  288.         if no diversion
  289.   .f        Current font as physical quadrant (1-4)
  290.   .h        Text base-line high-water mark on current page or diversion
  291.   .i        Current indent
  292.   .j        Current adjustment mode and type
  293.   .k        Length of text portion on current partial output line
  294.   .l        Current line length
  295.   .n        Length of text portion on previous output line
  296.   .o        Current page offset
  297.   .p        Current page length
  298.   .s        Current point size
  299.   .t        Distance to the next trap
  300.   .u        Equal to 1 in fill mode and 0 in nofill mode
  301.   .v        Current vertical line spacing
  302.   .w        Width of previous character
  303.   .x        Reserved version-dependent register
  304.   .y        Reserved version-dependent register
  305.   .z        Name of current diversion
  306.  
  307.  
  308. ==========================================================================
  309. 5. Cawf defines some nroff and troff special characters its dumb.dev file.
  310.    Their display is effected with overstrike -- i.e., combinations of
  311.    characters and interspersed backspaces.
  312. ==========================================================================
  313.  
  314.     Character
  315.     Escape Code    Description
  316.  
  317.     \(bu        bullet
  318.     \(sq        square
  319.     \(ru        rule
  320.     \(14        1/l4
  321.     \(12        1/l2
  322.     \(34        3/l4
  323.     \(de        degree
  324.     \(dg        dagger
  325.     \(fm        foot mark
  326.     \(ct        cent sign
  327.     \(rg        registered
  328.     \(co        copyright
  329.     \(pl        math plus
  330.     \(mi        math minus
  331.     \(eq        math equals
  332.     \(**        math star
  333.     \(sc        section
  334.     \(aa        acute accent
  335.     \(ga        grave accent
  336.     \(ul        underrule
  337.     \(sl        slash (matching backslash)
  338.     \(*a        alpha
  339.     \(*b        beta
  340.     \(*g        gamma
  341.     \(*d        delta
  342.     \(*e        epsilon
  343.     \(*z        zeta
  344.     \(*y        eta
  345.     \(*h        theta
  346.     \(*i        iota
  347.     \(*k        kappa
  348.     \(*l        lambda
  349.     \(*m        mu
  350.     \(*n        nu
  351.     \(*c        xi
  352.     \(*o        omicron
  353.     \(*p        pi
  354.     \(*r        rho
  355.     \(*s        sigma
  356.     \(ts        terminal sigma
  357.     \(*t        tau
  358.     \(*u        upsilon
  359.     \(*f        phi
  360.     \(*x        chi
  361.     \(*q        psi
  362.     \(*w        omega
  363.     \(*G        Gamma
  364.     \(*D        Delta
  365.     \(*H        Theta
  366.     \(*L        Lambda
  367.     \(*C        Xi
  368.     \(*P        Pi
  369.     \(*S        Sigma
  370.     \(*U        Upsilon
  371.     \(*F        Phi
  372.     \(*Q        Psi
  373.     \(*W        Omega
  374.     \(sr        square root
  375.     \(rn        root en extender
  376.     \(>=        >=
  377.     \(<=        <=
  378.     \(==        identically equal
  379.     \(~=        approximately =
  380.     \(ap        approximates
  381.     \(!=        not equal
  382.     \(->        right arrow
  383.     \(<-        left arrow
  384.     \(ua        up arrow
  385.     \(da        down arrow
  386.     \(mu        multiply
  387.     \(di        divide
  388.     \(+-        plus-minus
  389.     \(cu        cup (union)
  390.     \(ca        cap (intersection)
  391.     \(sb        subset of
  392.     \(sp        superset of
  393.     \(ib        improper subset
  394.     \(ip        improper superset
  395.     \(if        infinity
  396.     \(pd        partial derivative
  397.     \(gr        gradient
  398.     \(no        not
  399.     \(is        integral sign
  400.     \(pt        proportional to
  401.     \(es        empty set
  402.     \(mo        member of
  403.     \(br        box vertical rule
  404.     \(dd        double dagger
  405.     \(rh        right hand
  406.     \(lh        left hand
  407.     \(bs        Bell System logo
  408.     \(or        or
  409.     \(ci        circle
  410.     \(lt        left top of big curly bracket
  411.     \(lb        left bottom
  412.     \(rt        right top
  413.     \(rb        right bottom
  414.     \(lk        left center of big curly bracket
  415.     \(rk        right center of big curly bracket
  416.     \(bv        bold vertical
  417.     \(lf        left floor (left bottom of big square bracket)
  418.     \(rf        right floor (right bottom)
  419.     \(lc        left ceiling (left top)
  420.     \(rc        right ceiling (right top)
  421.  
  422.  
  423. Vic Abell <abe@cc.purdue.edu>
  424.