|
wxMaxima
|
Pins the LaTeX export to the markup an expression actually needs. More...
#include <wx/app.h>#include <wx/bitmap.h>#include <wx/dcmemory.h>#include <wx/log.h>#include "CellPointers.h"#include "Configuration.h"#include "MathParser.h"#include "cells/Cell.h"#include "cells/GroupCell.h"#include <catch2/catch.hpp>Data Structures | |
| class | TestApp |
Functions | |
| SCENARIO ("Powers and subscripts get braces only where TeX needs them") | |
| SCENARIO ("Operators are typeset as operators, not as big operators") | |
| SCENARIO ("Function names and their arguments carry no extra markup") | |
| SCENARIO ("Delimiters only grow when their contents are taller than a line") | |
| SCENARIO ("A sum carries no \\left. \\right. and the parentheses the worksheet shows") | |
| SCENARIO ("An integral's differential is no group of its own") | |
| SCENARIO ("Maths needs no \\ensuremath{}: it always is math mode") | |
| SCENARIO ("A set's braces are drawn, not used as a TeX group") | |
| SCENARIO ("A code cell with two results exports two equations, and no empty one") | |
| SCENARIO ("An equation that holds only a label contains no empty line") | |
| SCENARIO ("Cell::TeXGroup() leaves single tokens and whole groups alone") | |
| wxDECLARE_APP (TestApp) | |
| int | main (int argc, char **argv) |
Pins the LaTeX export to the markup an expression actually needs.
The cells' ToTeX() used to wrap everything in braces "just in case" ({{x}^{2}}, {x_1}, \sin{(x)}), to use \left( \right) around anything that contained a "+", to make every operator a \mathop{} (which gives "=" the spacing of a \sum), to put \ensuremath{} into what always is math mode and to leave empty equations between two labels that a string replacement then half cleaned up. Each scenario here is one of these.
The maths is hand-written XML of the shape wxMathML.lisp emits, parsed by the real MathParser, so no Maxima is needed.