home *** CD-ROM | disk | FTP | other *** search
/ Lighthouse Design Suite / LIGHTHOUSE.mdf / FrameMaker_3.2 / FrameExtras / Equations.ma next >
Text File  |  1994-07-07  |  6KB  |  107 lines

  1. (*^
  2.  
  3. ::[paletteColors = 128; 
  4.     fontset = title, "Times-Bold", 24, L2, center, bold, nohscroll;
  5.     fontset = subtitle, "Times-Bold", 18, L2, center, bold, nohscroll;
  6.     fontset = subsubtitle, "Times-Bold", 14, L2, center, bold, nohscroll;
  7.     fontset = section, "Times-Bold", 18, L2, bold, nohscroll, grayBox;
  8.     fontset = subsection, "Times-Bold", 14, L2, bold, nohscroll, blackBox;
  9.     fontset = subsubsection, "Times-Bold", 12, L2, bold, nohscroll, whiteBox;
  10.     fontset = text, "Times-Roman", 12, L2, nohscroll;
  11.     fontset = smalltext, "Times-Roman", 10, L2, nohscroll;
  12.     fontset = input, "Courier-Bold", 12, L2, bold, nowordwrap;
  13.     fontset = output, "Courier", 12, L2, nowordwrap;
  14.     fontset = message, "Courier", 12, L2, R21845, G21845, B21845, nowordwrap;
  15.     fontset = print, "Courier", 12, L2, nowordwrap;
  16.     fontset = info, "Courier", 12, L2, nowordwrap;
  17.     fontset = postscript, "Courier", 12, L2, nowordwrap;
  18.     fontset = name, "Times-Italic", 11, L2, italic, R21845, G21845, B21845, nowordwrap, nohscroll;
  19.     fontset = header, "Times", 10, L2;
  20.     fontset = footer, "Times", 12, L2, center;
  21.     fontset = help, "Times-Roman", 14, L2, nohscroll;
  22.     fontset = clipboard, "New York", 12, L2;
  23.     fontset = completions, "Courier", 16, L2, nowordwrap;
  24.     fontset = network, "Courier", 10, L2, nowordwrap;
  25.     fontset = graphlabel, "Courier", 12, L2, nowordwrap;
  26.     fontset = special1, "New York", 12, L2, nowordwrap;
  27.     fontset = special2, "New York", 12, L2, center, nowordwrap;
  28.     fontset = special3, "New York", 12, L2, right, nowordwrap;
  29.     fontset = special4, "New York", 12, L2, nowordwrap;
  30.     fontset = special5, "New York", 12, L2, nowordwrap;]
  31. :[font = input; ]
  32.  
  33. :[font = title; inactive; ]
  34. FrameMaker & Mathematica
  35. :[font = text; inactive; ]
  36. This document gives a short tutorial on using the sample definitions for transferring 
  37. equations between FrameMaker & Mathematica. The definitions are not 
  38. complete, but allow simple equations to be sent between FrameMaker and 
  39. Mathematica. Users are encouraged to copy and complete the definitions.
  40. Frame Technology makes no guarantees as to the quality of the definitions, and
  41. does not support the definitions. The definitions were created by a rookie 
  42. Mathematica user, and have not yet been reviewed by a proficient user. There may
  43. be glaring inefficiencies. 
  44. :[font = subsection; inactive; ]
  45. This Tutorial assumes the files from the installation optical have been copied into directory /glc.
  46. To load the output procedures, execute the line below. (Command-Return)
  47. :[font = input; startGroup; ]
  48. <</glc/frameout.m
  49. :[font = output; inactive; output; endGroup; ]
  50. "Done Loading FrameMaker Output Functions"
  51. ;[o]
  52. Done Loading FrameMaker Output Functions
  53. :[font = subsection; inactive; ]
  54. Now you can move equations to FrameMaker by using the FrameForm Procedure.
  55. For instance you can send the equation  x^2 + 3x + 1 to Frame just by executing
  56. FrameForm[x^2 + 3x + 1]. You will see a FrameMaker document open with the equation as the only item in the document. Execute the line below.
  57. :[font = input; startGroup; ]
  58. FrameForm[x^2 + 3x + 1]
  59. :[font = print; inactive; ]
  60.  
  61. :[font = output; inactive; output; endGroup; ]
  62. 0
  63. ;[o]
  64. 0
  65. :[font = subsection; inactive; ]
  66. Try the below example for a more interesting Equation.
  67. :[font = input; startGroup; ]
  68. FrameForm[Integrate[Sin[x]Tan[x],x]]
  69. :[font = print; inactive; ]
  70.  
  71. :[font = output; inactive; output; endGroup; ]
  72. 0
  73. ;[o]
  74. 0
  75. :[font = subsection; inactive; ]
  76. You can also Move equations from FrameMaker to Mathematica. When you select an Equation in FrameMaker as an object and copy, an ascii representation of that object is copied to the NeXT Pasteboard. This representation is very close to Mathematica's FullForm. You can paste this equation from the PasteBoard and execute. Since Mathematica does nothing to functions it does not recognize this will produce very similiar results to the pasted equation. Now you can run a procedure to convert the equation into Mathematica input form. FrameConvert[] is the name of  the input conversion procudure.  To load the FrameConvert[] procedure execute the following line.
  77. :[font = input; startGroup; ]
  78. <</glc/framein.m
  79. :[font = output; inactive; output; endGroup; ]
  80. "Done Loading FrameMaker Input Functions"
  81. ;[o]
  82. Done Loading FrameMaker Input Functions
  83. :[font = subsection; inactive; ]
  84. You will find a good sample equation in the Frame document called SampleEquation.frame in this directory. Open this document in Frame, and follow the instructions for copying the equation to the Pasteboard. Then paste and execute like below. 
  85. :[font = input; startGroup; ]
  86. function[optotal[char[x]],cos[id[plus[power[char[x],num[2,"2"]],power[char[y],num[3,"3"]]]]]]
  87. :[font = output; inactive; output; endGroup; ]
  88. function[optotal[char[x]], 
  89.   Cos[id[char[x]^num[2, "2"] + char[y]^num[3, "3"]]]]
  90. ;[o]
  91. function[optotal[char[x]], 
  92.  
  93.                 num[2, 2]          num[3, 3]
  94.   Cos[id[char[x]          + char[y]         ]]]
  95. :[font = input; startGroup; ]
  96. FrameConvert[%]
  97. :[font = print; inactive; endGroup; ]
  98. Derivative[1, x][Cos[x^2 + y^3]]
  99. :[font = title; inactive; ]
  100. Trouble Shooting and Creating New Definitions
  101. :[font = text; inactive; ]
  102. There are alot of  operators which are not mapped in both directions. If a definition is unmapped going from FrameMaker to Mathematica, you will see an see the 
  103. operator show up as a function in Mathematica. If definitions are missing in the reverse direction you will see nothing in the opened FrameMaker file. To create new 
  104. definitions you will need to know how the operators map.   To see Frame's ascii 
  105. representation of an operator, create an equation with just the operator in question, 
  106. select the equation as an object, and paste into Mathematica.  Most operators can be handled by simple mapping rules.  
  107. ^*)