![]() | 1 | initial version |
Here is a hack for this, use the string s = latex( (2*x+3) / (2*x) )
and replace in it each occurrence of \frac
with \dfrac
:
sage: s = latex( (2*x+3) / (2*x) )
sage: s.replace( r'\frac', r'\dfrac' )
'\\dfrac{2 \\, x + 3}{2 \\, x}'
sage: print s.replace( r'\frac', r'\dfrac' )
\dfrac{2 \, x + 3}{2 \, x}
sage: import re
sage: re.sub( r'\frac', r'\dfrac', s )
'\\frac{2 \\, x + 3}{2 \\, x}'
sage: print re.sub( r'\frac', r'\dfrac', s )
\frac{2 \, x + 3}{2 \, x}