<< | Page list | >>
Back-of-envelope calculations using instant preview.
The calculyx package enables the numerical evaluation of mathematical expressions in LyX dynamically by means of instant preview. Such expressions can be created in the LyX math editor with considerable ease. With instant preview turned on, it also displays them elegantly. The LaTeX package
A zipped archive of the calculyx package can be found at calculyx. The package contains the LaTeX file
Version 2.0 of the package requires LyX 2.2.2 or later for all commands to function as described, although much will work in LyX 2.1.3 or later. For users of version 1, note that there have been many small changes in usage for v.2 to enhance uniformity across the different commands, and one big change, \clyxtabulate, which has been completely reworked.
Calculyx accepts LaTeX expressions including: decimals; constants (\pi, e, \deg); arithmetic operations +, -, *, /, ^ (or **) and LaTeX variants like \times and \div; \frac and variants; \sqrt and \surd; trigonometric and hyperbolic functions and inverses; natural logarithm and exponential functions, \max, \min and \gcd; binomial coefficients and factorials; sums and products (including to infinity!); limits; derivatives (orders one and two, ordinary and partial, explicit d-notation or primes or dots); and definite integrals in one variable. Variables can be essentially any single token (Latin, Greek, ...), including (for roman letters) primed and subscripted tokens.
As well as the basic \clyx command which evaluates expressions, the package includes the command \clyxtabulate to construct tables of functions (including multi-column tables with, e.g., maximum values highlighted), the command \clyxiterate to iterate functions (as in chaos theory), and \clyxrecur to calculate the terms of a recurrence relation (like the Fibonacci sequence).
The package tries to accept LaTeX expressions 'as is', without demanding 'calculator formatting' or extra parentheses. A screenshot of a one-page document containing the LaTeX on the left and the pdf on the right of a number of different calculations can be found at screenshot.