home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / f / formulate / !Formulate / Docs / !Manual / Manual < prev    next >
Text File  |  1994-09-24  |  6KB  |  140 lines

  1. FORMULATE
  2.  
  3. Formulate is a program to convert formulae in textual format into draw files.
  4. It may be used as a DDE tool or from the command line.
  5.  
  6. WARNING
  7.  
  8. This text file is necessarily incomplete, as pictures can't be included in it. Please use the Impression document, or view the file ‘ManuExRes’ to see the results of the examples. The file ‘Docs.SymbTab’ is a list of all special characters available.
  9.  
  10. COMMAND LINE SYNTAX
  11.  
  12. formulate [−f fontsize][−l linespace] [−i] infile [−o] outfile
  13.  
  14. fontsize is the basic fontsize in pt (1/72").
  15. linespace is the spacing between consecutive lines in pt. (This is not the spacing between baselines, but the actual amount of vertical white space.)
  16. infile is the file containing the formulas.
  17. outfile is the Drawfile to be created.
  18.  
  19. FORMULA SYNTAX
  20.  
  21. infile consists of one or more lines separated by one or more newlines. If lines are separated by a single newline only, they are considered to be part of one formula. This has a consequence for the horizontal alignment; see under the // command. Lines may be either formula lines, or command lines, starting with ‘#’.
  22.  
  23. A formula line consists of one or more tokens; a token is one of the following:
  24.  
  25. − a sequence of digits, ‘-’ (minus) and ‘.’ (dot) forming a number, eg. ‘35’, ‘-13.6’.
  26. − a sequence of letters forming a word, eg. ‘sin’, ‘Brontë’.
  27. − the character ‘@’ followed by a letter: a greek letter, eg. ‘@m’ for ‘µ’.
  28. − the character ‘$’ followed by any character: an italic character.
  29. − the character ‘£’ followed by any character: a bold character.
  30. − the character ‘%’ followed by two hexadecimal digits: an explicit ascii character, eg ‘%4d’ for ‘M’
  31. − the character ‘`’ (back-quote) followed by one character: a special character, eg. ‘`x’ for ‘×’.
  32. − the character ‘"’ (double quote) followed by two characters: a special character, eg. ‘"$$’ for ‘§’.
  33. - the character ‘"’ followed by a digit 1..9: a character from a user font, eg ‘"3H’ for the ‘H’ in user font 3.
  34. - the character ‘"’ followed by a digit 1..9, followed by ‘%’ and two hexadecimal digits: an explicit ascii character from a user font, eg ‘"3%48’ for the ‘H’ in user font 3.
  35. − the character ‘\’ followed by one or more characters: a structure.
  36. − the character ‘~’ followed by an accent and any token: an accentated token, eg. ‘~:a’ for ‘ä’.
  37. − the character ‘^’ followed by any token: a superscript, eg. ‘a^2’ for ‘a2’
  38. − the character ‘_’ followed by any token: a subscript, eg. ‘a_x’ for ‘ax’
  39. − a single space, which is ignored.
  40. − two spaces, resulting in a space about as wide as the letter n.
  41. − a number of tokens enclosed in ‘[’...‘]’
  42.  
  43. ‘@’ and ‘£’ may be combined with ‘$’. Such a combination may in turn be combined with ‘`’, ‘"’ or ‘%’, eg. ‘$@m’ (for ‘µ’, ‘$"ss’ (for ‘ß’), but not with ‘"1’..‘"9’. ‘@’, ‘£’, ‘$’ and ‘"1’..‘"9’ stay in operation until the next space or special character.
  44.  
  45.  
  46. COMMAND LINES
  47.  
  48. A command line is a line starting with ‘#’. Currently the following commands are defined:
  49.  
  50. - #f<number> <string>: add a user font. This may only occur before any formulae. <number> must be in the range 1..9. <string> is a font name.
  51. - #s <number>: change the font size. <number> is in points.
  52. - #l <number>: change the line spacing. <number> is in points.
  53. - ## <string>: comment; this line is completely disregarded by Formulate.
  54.  
  55. Further commands may be added in future versions, upon request.
  56.  
  57.  
  58.  
  59. ACCENTS
  60.  
  61. Accents are:
  62.  
  63.  \  grave        ' or .  dot            >  vector
  64.  /  aigue        " or :  double dot        <  reversed vector
  65.  ^  circonflex          -     overscore        |  slash
  66.  ~  tilde          _     underscore
  67.  
  68.  
  69. STRUCTURES
  70.  
  71. All structures are given below. Compare the files ‘Docs.ManuEx’ and ‘Docs.ManuExRes’ to see the results. In the list, a, b, ... denote any number of tokens, whereas x denotes a single token. () denote optional items.
  72.  
  73. name         syntax
  74.  
  75. Integral     \I a; b ]
  76. Circulation  \C a ]
  77. Summation    \S a; b ]
  78. Product      \P a; b ]
  79. Root         \s a (; b) ]
  80. ‘Addit’      \A a; b; c (; d (; e)) ]
  81. Division     \/ a; b ]
  82. Matrix       \M a;b;c (;...) \; d;e;f (;...) (\; ...) ]
  83. Vector       \V a;b (;...) ]
  84. Small        \-x
  85. Above        x\a a ]
  86. Below        x\b a ]
  87. Over         x\o a ]
  88. Under        x\u a ]
  89.  
  90.  
  91. SPECIAL STRUCTURES
  92.  
  93. ‘\’ followed by a number of braces and ‘\H’ followed by a number of braces are special. The number of arguments they take is the number of braces minus one. Braces are: ‘(’, ‘)’, ‘{’ , ‘}’, ‘[’, ‘]’, ‘<’, ‘>’, ‘|’, ‘=’ and ‘.’. The last one, ‘.’, is an invisible brace; ‘=’ acts as || (for ||x||).
  94.  
  95. Examples:
  96.     \<|>f;f]
  97.  
  98.     \H()x]
  99.  
  100. Finally ‘\\’ specifies alignment. Alignment applies to all lines in a formula. Formulas are separated by double newlines. An example is:
  101.  
  102. [(a+ib)]^2  \\=  a^2  +  2aib  +  [(ib)]^2
  103. \\=  a^2  `−  b^2  +  i 2ab
  104.  
  105. GENERAL EXAMPLES
  106.  
  107. \<>$A]  \\=  \<||>@y;$A;@y]
  108. \\=  \I−“00;”00]~−[@y($x)]  $A@y($x)  $d$x
  109.     
  110.  
  111. \I0;½@p]$x sin($x) $d$x  \\=  \H.} \.|`− $x cos($x)]_0^[½@p] ]\u=0]  `−  \I0;½@p]`−cos($x) $d$x
  112. \\=  \.|sin($x)]_0^[½@p]
  113. \\=  1
  114.     
  115.  
  116. \==x]  =  \s\<>x,x]]
  117.  
  118. For more examples, and their resulting output, see the files ‘ManuEx’ and ‘ManuExRes’.
  119.  
  120. AND FINALLY...
  121.  
  122. The examples in this document where created using:
  123.  
  124.     formulate −f 11 −l 8 −i ManuEx −o ManuExRes
  125.  
  126. The source file ManuEx may be found in the Formulate directory.
  127.  
  128. I welcome any comments, ideas for improval, etc. You can reach me at:
  129.  
  130. Daniel Wagenaar
  131. Van Eeghenlaan 10
  132. 1071 EL  Amsterdam
  133. The Netherlands
  134. e-mail: wagenaar@phys.uva.nl
  135.  
  136. If you find this manual insatisfactory, which I can well imagine, as it is very brief indeed, you may still be able to work out how Formulate works by examining the examples, or you may write (mail) me for explanation...
  137. If you sent me a self addressed envelope with about £1 to cover photocopying and postage, I will send a four page printed version of the manual.
  138.  
  139. If you find this program useful, any contribution is gratefully received. :-)
  140.