def __format__(self, spec): """Format the weight according to `spec`. Parameters ---------- spec : str, optional a list of letters that specify how the label should be formatted. Supported specifiers -------------------- - 't': use text ASCII syntax (default) - 'u': use text UTF-8 syntax - 'x': use LaTeX syntax - ':spec': pass the remaining specification to the formating function for strings. """ syntaxes = { 't': 'text', 'u': 'utf8', 'x': 'latex', } return _format(self, spec, 'text', syntaxes)
def __format__(self, spec): """Format the expression according to `spec`. Parameters ---------- spec : str, optional a list of letters that specify how the expression should be formatted. Supported specifiers -------------------- - 'd': use Graphviz's Dot syntax to display logical tree - 'D': use Graphviz's Dot syntax to display implementation DAG - 'i': print info - 't': use text ASCII syntax (default) - 'u': use text UTF-8 syntax - 'x': use LaTeX syntax - ':spec': pass the remaining specification to the formating function for strings. """ syntaxes = { 'd': 'dot', 'D': 'dot,physical', 'i': 'info', 't': 'text', 'u': 'utf8', 'x': 'latex', } return _format(self, spec, 'text', syntaxes)
def __format__(self, spec): """Format the automaton according to `spec`. Parameters ---------- spec : str, optional a list of letters that specify how the automaton should be formatted. Supported specifiers -------------------- - 'd': use Daut syntax (default) - 'D': show implementation details for debugging - 'e': use EFSM syntax - 'f': use FAdo syntax - 'g': use Graphviz's Dot syntax - 'i': print info - 'I': print detailed info - 'r': use Grail syntax - 'x': use TikZ syntax - ':spec': pass the remaining specification to the formating function for strings. """ syntaxes = {'d': 'daut', 'D': 'debug', 'e': 'efsm', 'f': 'fado', 'g': 'dot', 'i': 'info', 'I': 'info,detailed', 'r': 'grail', 'x': 'tikz'} return _format(self, spec, 'daut', syntaxes)