123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <!DOCTYPE html>
- <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="utf-8" />
- <meta name="author" content="Francis Wright" />
- <title>REDUCE Typeset Mathematics Display</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css"
- integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous" />
- <!-- The loading of KaTeX is deferred to speed up page rendering -->
- <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js"
- integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
- <!-- To automatically render math in text elements, include the auto-render extension: -->
- <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js"
- integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
- onload="renderMathInElement(document.body);"></script>
- <style>
- body {
- font-family: "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
- font-size: 12pt;
- max-width: 640px;
- margin-right: auto;
- margin-left: auto;
- }
- code {
- font-family: "Lucida Console", "Lucida Sans Typewriter", monospace;
- }
- h1, h2, h3 {
- font-family: "Lucida Bright", Georgia, Times, "Times New Roman", serif;
- }
- table {
- margin-right: auto;
- margin-left: auto;
- }
- td, th {
- padding-right: 10px;
- padding-left: 10px;
- text-align: left;
- }
- </style>
- </head>
- <body>
- <h1>REDUCE Typeset Mathematics Display</h1>
- <h2>Francis Wright, October 2020</h2>
- <p>
- This is an attempt to document the options that are readily
- available to users for controlling the <code>tmprint</code>
- package, which is used internally by the CSL REDUCE GUI and the
- REDUCE TeXmacs interface to generate TeX markup for typeset
- maths display. Closely related code is used for the same
- purpose by Run-REDUCE.
- </p>
- <h3>Enable and disable</h3>
- <p>
- Typeset maths display can be turned on and off using the
- switch <code>fancy</code>, so <code>on fancy</code> turns it on
- (the default) and <code>off fancy</code> turns it off. (But do
- not do this in Run-REDUCE; use the <em>Typeset Maths</em> check
- item in the <em>View</em> menu.)
- </p>
- <h3>Derivatives</h3>
- <p>
- The (shared) variable <code>fancy_print_df</code> can be set to
- one of the values <code>partial</code>, <code>total</code>
- or <code>indexed</code> to control the display of derivatives.
- The default value is <code>partial</code>. From REDUCE revision
- 5418 onward, typeset maths supports the <code>dfprint</code>
- switch, and if this switch is on then
- <code>fancy_print_df</code> is ignored. For example, with the
- following settings, derivatives are displayed as follows
- (assuming <code>depend f,x,y</code> and <code>operator
- g</code>):
- </p>
- <table>
- <tr>
- <th><code>Setting</code></th>
- <th><code>df(f,x,2,y)</code></th>
- <th><code>df(g(x,y),x,2,y)</code></th>
- </tr>
- <tr>
- <td><code>fancy_print_df := partial</code></td>
- <td>\(\frac{\partial^3 f}{\partial x^2 \partial y}\)</td>
- <td>\(\frac{\partial^3 g(x,y)}{\partial x^2 \partial y}\)</td>
- </tr>
- <tr>
- <td><code>fancy_print_df := total</code></td>
- <td>\(\frac{d^3 f}{d x^2 d y}\)</td>
- <td>\(\frac{d^3 g(x,y)}{d x^2 d y}\)</td>
- </tr>
- <tr>
- <td><code>fancy_print_df := indexed</code></td>
- <td>\(f_{x,x,y}\)</td>
- <td>\(g(x,y)_{x,x,y}\)</td>
- </tr>
- <tr>
- <td><code>on dfprint</code></td>
- <td>\(f_{x,x,y}\)</td>
- <td>\(g_{x,x,y}\)</td>
- </tr>
- </table>
- <h3>Operators</h3>
- <p>
- An operator declared <code>print_indexed</code> has its
- arguments displayed as indices, e.g. after <code>print_indexed
- a;</code> the operator value <code>a(i,2)</code> is displayed as
- \(a_{i,2}\). You can also declare several operators together to
- be indexed, e.g.
- </p>
- <pre>print_indexed b, c;</pre>
- <p>
- (In REDUCE versions before revision 5417 the display of indexed
- operators is slightly different and possibly incorrect, and
- parentheses are required around multiple arguments of
- <code>print_indexed</code>)
- </p>
- <h3>Digits in identifiers</h3>
- <p>
- The (shared) variable <code>fancy_lower_digits</code> can be set
- to one of the values <code>t</code>, <code>nil</code>
- or <code>all</code> to control the display of digits within
- identifiers. The default value is <code>t</code>. Digits in an
- identifier are typeset as subscripts if <code>fancy_lower_digits
- = all</code> or if <code>fancy_lower_digits = t</code> and the
- digits are all at the end. For example, with the following
- values assigned
- to <code>fancy_lower_digits</code>, <code>ab12cd34</code>
- and <code>abcd34</code> are displayed as follows:
- </p>
- <table>
- <tr>
- <th><code>fancy_lower_digits</code></th>
- <th><code>ab12cd34</code></th>
- <th><code>abcd34</code></th>
- </tr>
- <tr>
- <td><code>t</code></td>
- <td>\(ab12cd34\)</td>
- <td>\(abcd_{34}\)</td>
- </tr>
- <tr>
- <td><code>all</code></td>
- <td>\(ab_{12}cd_{34}\)</td>
- <td>\(abcd_{34}\)</td>
- </tr>
- <tr>
- <td><code>nil</code></td>
- <td>\(ab12cd34\)</td>
- <td>\(abcd34\)</td>
- </tr>
- </table>
- <p>
- (However, CSL REDUCE currently displays identifiers with more
- than one letter in roman rather than italic font style, and
- Run-REDUCE currently displays implicit subscript digits in
- italic rather than normal font style, but I hope to have that
- fixed soon!)
- </p>
- </body>
- </html>
|