def latex(self, **kwargs): if self.getStyle('division')=='fraction': # only fence if forceFence=True (a fraction within an exponentiation is an example of when fencing should be forced) kwargs['fence'] = kwargs['forceFence'] if 'forceFence' in kwargs else False return maybeFencedLatex(r'\frac{'+self.numerator.latex()+'}{'+self.denominator.latex()+'}', **kwargs) else: return Operation.latex(**kwargs) # normal division
def latex(self, **kwargs): # only fence if forceFence=True (a fraction within an exponentiation is an example of when fencing should be forced) kwargs['fence'] = kwargs[ 'forceFence'] if 'forceFence' in kwargs else False return maybeFencedLatex( r'\frac{' + self.numerator.latex() + '}{' + self.denominator.latex() + '}', **kwargs)
def latex(self, **kwargs): return maybeFencedLatex('-' + self.operand.latex(fence=True), **kwargs)