nextuppreviouscontents
Next:Installation. Up:Generation of LaTeX documents. Previous:User defined LaTeX syntax.   Contents

examples.

cst 2 rInfix[4] x "|->" y.
tex_syntax $|-> rInfix[4] x "\\hookrightarrow" y.
Will imply the \[ A |-> B \] gives $ A \hookrightarrow B $ in your LaTeX document. You should note that you have to double the \ in strings.

Cst Prefix[1.5] "Sum" E "for" \E\ "=" a "to" b
  : (Term -> Term) -> Term -> Term -> Term.
tex_syntax $Sum Prefix[1.5]
  "\\Sigma" "_{" ! \E\ "=" a ! "}^{" ! b ! "}" E %as $Sum E a b.
Will imply that \[Sum f i for i = n to p\] gives $\Sigma_{i = n}^{p} f
i$ in your LaTeX document. We have separated the "\\Sigma" from the "_{" so that "\[$Sum\]" just produces a single $\Sigma$ and we used "%as" to modify the order of the arguments (because E comes last in the LaTeX syntax and first in the syntax).

More complete examples can be found by looking at the libraries and examples distributed with .



Christophe Raffalli 2005-03-02