Class to handle display of expressions using LaTeX notation.
This is a very non-local bit of logic, in the sense that it will try to look around the property assignments in order to figure out the best way to print any given object. See the DisplayTeX::dispatch method to see how this works in more detail.
|
void | print_multiplier (std::ostream &, Ex::iterator, int mult=1) |
|
void | print_opening_bracket (std::ostream &, str_node::bracket_t, str_node::parent_rel_t) |
|
void | print_closing_bracket (std::ostream &, str_node::bracket_t, str_node::parent_rel_t) |
|
void | print_parent_rel (std::ostream &, str_node::parent_rel_t, bool first) |
|
void | print_children (std::ostream &, Ex::iterator, int skip=0) |
|
std::string | texify (std::string) const |
|
virtual void | dispatch (std::ostream &, Ex::iterator) override |
| For every object encountered, dispatch will figure out the most appropriate way to convert it into a LaTeX expression. More...
|
|
void | print_productlike (std::ostream &, Ex::iterator, const std::string &inbetween) |
| Printing members for various standard constructions, e.g. More...
|
|
void | print_sumlike (std::ostream &, Ex::iterator) |
|
void | print_fraclike (std::ostream &, Ex::iterator) |
|
void | print_commalike (std::ostream &, Ex::iterator) |
|
void | print_arrowlike (std::ostream &, Ex::iterator) |
|
void | print_powlike (std::ostream &, Ex::iterator) |
|
void | print_intlike (std::ostream &, Ex::iterator) |
|
void | print_equalitylike (std::ostream &, Ex::iterator) |
|
void | print_commutator (std::ostream &str, Ex::iterator it, bool comm) |
|
void | print_components (std::ostream &, Ex::iterator) |
|
void | print_conditional (std::ostream &, Ex::iterator) |
|
void | print_relation (std::ostream &, Ex::iterator) |
|
void | print_indexbracket (std::ostream &, Ex::iterator) |
|
void | print_wedgeproduct (std::ostream &, Ex::iterator) |
|
void | print_tableau (std::ostream &, Ex::iterator) |
|
void | print_ftableau (std::ostream &, Ex::iterator) |
|
void | print_other (std::ostream &str, Ex::iterator it) |
|
bool | children_have_brackets (Ex::iterator ch) const |
|
bool | reads_as_operator (Ex::iterator obj, Ex::iterator arg) const |
| Determine whether the indicated object 'obj', when acting on the single argument 'arg', reads as an operator, and therefore 'arg' does not need to be wrapped in brackets. More...
|
|
bool DisplayTeX::needs_brackets |
( |
Ex::iterator |
it | ) |
|
|
overrideprotectedvirtual |
Determine if a node needs extra brackets around it.
Uses context from the parent node if necessary. Has to be implemented in a derived class, because the answer depends on the printing method (e.g. (a+b)/c needs brackets when printed like this, but does not need brackets when printed as {a+b}{c}).
Implements cadabra::DisplayBase.
bool DisplayTeX::reads_as_operator |
( |
Ex::iterator |
obj, |
|
|
Ex::iterator |
arg |
|
) |
| const |
|
private |
Determine whether the indicated object 'obj', when acting on the single argument 'arg', reads as an operator, and therefore 'arg' does not need to be wrapped in brackets.
Example: the tree \partial{A} can be displayed as '\partial A' (or rather, '\partial{A}', instead of '\partial(A)'.