コード例 #1
0
ファイル: divide.py プロジェクト: rmmilewi/Prove-It
 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
コード例 #2
0
ファイル: frac.py プロジェクト: rmmilewi/Prove-It
 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)
コード例 #3
0
 def latex(self, **kwargs):
     return maybeFencedLatex('-' + self.operand.latex(fence=True), **kwargs)