Module Py2TeX
source code
|
dict2TeX(d,
name_dict,
lhs_form='%s',
split_terms=False,
simpleTeX=False) |
source code
|
|
|
|
|
_ast2TeX(ast,
outer=AST._FARTHEST_OUT,
name_dict={},
adjust=0)
Return a TeX version of an AST. |
source code
|
|
|
_EMPTY_MUL = Mul((None, None))
|
Imports:
Slice,
Const,
Raise,
For,
AssTuple,
Mul,
Invert,
RightShift,
AssList,
Add,
Dict,
flatten,
UnaryAdd,
Import,
Print,
Ellipsis,
Sliceobj,
Decorators,
Subscript,
Name,
Node,
Assert,
Return,
Power,
Exec,
CO_VARKEYWORDS,
GenExprFor,
Stmt,
Or,
Break,
CO_VARARGS,
Bitand,
FloorDiv,
Tuple,
Bitxor,
TryExcept,
Not,
nodes,
EmptyNode,
With,
Class,
Mod,
Printnl,
Function,
TryFinally,
GenExprIf,
While,
AssAttr,
Keyword,
GenExpr,
Module,
AugAssign,
List,
Yield,
IfExp,
AssName,
From,
Continue,
Backquote,
Discard,
Div,
Expression,
Assign,
Lambda,
And,
LeftShift,
Compare,
GenExprInner,
CallFunc,
Global,
Getattr,
ListCompIf,
Sub,
ListCompFor,
flatten_nodes,
Pass,
UnarySub,
Bitor,
ListComp,
If,
os,
AST
Return a TeX version of a python math expression.
name_dict: A dictionary mapping variable names used in the expression to
preferred TeX expressions.
|
_ast2TeX(ast,
outer=AST._FARTHEST_OUT,
name_dict={},
adjust=0)
| source code
|
Return a TeX version of an AST.
outer: The AST's 'parent' node, used to determine whether or not to
enclose the result in parentheses. The default of _FARTHEST_OUT will
never enclose the result in parentheses.
name_dict: A dictionary mapping variable names used in the expression to
preferred TeX expressions.
adjust: A numerical value to adjust the priority of this ast for
particular cases. For example, the denominator of a '/' needs
parentheses in more cases than does the numerator.
|