rlfi.tex 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. \chapter{RLFI: REDUCE LaTeX formula interface}
  2. \label{RLFI}
  3. \typeout{{RLFI: REDUCE LaTeX formula interface}}
  4. {\footnotesize
  5. \begin{center}
  6. Richard Liska, Ladislav Drska\\
  7. Computational Physics Group \\
  8. Faculty of Nuclear Sciences and Physical Engineering\\
  9. Czech Technical University in Prague, Brehova 7, 115 19 Prague 1 \\
  10. Czech Republic\\[0.05in]
  11. e--mail: liska@siduri.fjfi.cvut.cz
  12. \end{center}
  13. }
  14. \ttindex{RLFI}
  15. The RLFI package provides the printing of \REDUCE\ expressions in
  16. \LaTeX\ format, so it can be used directly for document production.
  17. Various mathematical
  18. constructions are supported by the interface including subscripts,
  19. superscripts, font changing, Greek letters, divide-bars, integral and
  20. sum signs, derivatives etc.
  21. The interface is connected to \REDUCE\ by three new switches and
  22. several statements. To activate the \LaTeX\ output mode the switch {\tt
  23. latex}\ttindex{latex} must be set {\tt on}. This switch causes all
  24. outputs to be written in the \LaTeX\ syntax of formulas. The switch
  25. {\tt VERBATIM}\ttindex{VERBATIM} is used for input printing control.
  26. If it is {\tt on} input to \REDUCE{} system is typeset in \LaTeX{}
  27. verbatim environment after the line containing the string {\tt REDUCE Input:}.
  28. The switch {\tt lasimp}\ttindex{lasimp} controls the algebraic
  29. evaluation of input
  30. formulas. If it is {\tt on} every formula is evaluated, simplified and
  31. written in the form given by ordinary \REDUCE\ statements and switches
  32. such as {\tt factor}, {\tt order}, {\tt rat} etc. In the case when the
  33. {\tt lasimp} switch is {\tt off} evaluation, simplification or
  34. reordering of formulas is not performed and \REDUCE\ acts only as a
  35. formula parser and the form of the formula output is exactly the same as
  36. that of the input, the only difference remains in the syntax. The mode
  37. {\tt off lasimp} is designed especially for typesetting of formulas for
  38. which the user needs preservation of their structure. This switch has
  39. no meaning if the switch {\tt Latex} is {\tt off} and thus is working
  40. only for \LaTeX\ output.
  41. For every identifier used in the typeset \REDUCE\ formula
  42. the following properties can be defined by the statement {\tt defid}:
  43. \ttindex{defid}
  44. \begin{itemize}
  45. \item its printing symbol (Greek letters can be used).
  46. \item the font in which the symbol will be typeset.
  47. \item accent which will be typeset above the symbol.
  48. \end{itemize}
  49. Symbols with indexes are treated in \REDUCE\ as operators. Each index
  50. corresponds to an argument of the operator. The meaning of operator
  51. arguments (where one wants to typeset them) is declared by the
  52. statement\ttindex{defindex}
  53. {\tt defindex}. This statement causes the arguments to be typeset as
  54. subscripts or superscripts (on left or right-hand side of the operator)
  55. or as arguments of the operator.
  56. The statement {\tt mathstyle}\ttindex{mathstyle} defines the style of
  57. formula typesetting. The variable {\tt laline!*}\ttindex{laline"!*}
  58. defines the length of output lines.
  59. The fractions with horizontal divide bars are typeset by using the
  60. new \REDUCE\ infix operator \verb+\+. This operator is not
  61. algebraically simplified. During typesetting of powers the checking on
  62. the form of the power base and exponent is performed to determine the
  63. form of the typeset expression ({\em e.g.\ }sqrt symbol, using parentheses).
  64. Some special forms can be typeset by using \REDUCE\ prefix operators.
  65. These are as follows:
  66. \begin{itemize}
  67. \item {\tt int} - integral of an expression.
  68. \item {\tt dint} - definite integral of an expression.
  69. \item {\tt df} - derivative of an expression.
  70. \item {\tt pdf} - partial derivative of an expression.
  71. \item {\tt sum} - sum of expressions.
  72. \item {\tt product} - product of expressions.
  73. \item {\tt sqrt} - square root of expression.
  74. \end{itemize}
  75. There are still some problems unsolved in the present version of the
  76. interface as follows:
  77. \begin{itemize}
  78. \item breaking the formulas which do not fit on one line.
  79. \item automatic decision where to use divide bars in fractions.
  80. \item distinction of two- or more-character identifiers from the product
  81. of one-character symbols.
  82. \item typesetting of matrices.
  83. \end{itemize}