示例#1
0
 def style_options(self):
     '''
     Returns the StyleOptions object for this Relation.
     '''
     options = Operation.style_options(self)
     options.add_option(
         name='direction',
         description="Direction of the relation (normal or reversed)",
         default='normal',
         related_methods=('with_direction_reversed', 'is_reversed'))
     return options
示例#2
0
 def style_options(self):
     '''
     Return the StyleOptions object for this Div.
     '''
     options = Operation.style_options(self)
     options.add_option(name='division',
                        description=("'inline': uses '/'; 'fraction': "
                                     "numerator over the denominator "
                                     "(also see 'frac' function)"),
                        default='fraction',
                        related_methods=('with_inline_style',
                                         'with_fraction_style'))
     return options
示例#3
0
 def style_options(self):
     '''
     Return the StyleOptions object for this Neg expression.
     '''
     options = Operation.style_options(self)
     options.add_option(
         name='notation_in_add',
         description=("When contained in an Add, use 'subtraction' "
                      "or 'explicit_negation': "
                      "For example, 'a - b' versus 'a + (-b)'."),
         default='subtraction',
         related_methods=('with_subtraction_notation',
                          'without_subtraction_notation'))
     return options
示例#4
0
 def style_options(self):
     '''
     Return the StyleOptions object for this And expression.
     '''
     style_options = Operation.style_options(self)
     try:
         self._check_total_ordering_applicability()
         style_options.add_option(
             name="as_total_ordering",
             description=("When 'True', style the conjunction as a "
                          "total ordering (e.g. x < y < z from "
                          "(x < y) and (y < z))"),
             default=None,
             related_methods=('with_total_ordering_style', ))
     except (TypeError, ValueError):
         pass  # total ordering is not applicable
     return style_options