|
1 | 1 | package org.matheclipse.core.form.tex; |
2 | 2 |
|
3 | | -import java.math.BigInteger; |
4 | 3 | import java.text.NumberFormat; |
5 | 4 | import java.util.HashMap; |
6 | 5 |
|
7 | | -import org.hipparchus.fraction.BigFraction; |
| 6 | +//import org.hipparchus.fraction.BigFraction; |
8 | 7 | import org.matheclipse.core.basic.Config; |
9 | 8 | import org.matheclipse.core.convert.AST2Expr; |
10 | 9 | import org.matheclipse.core.expression.F; |
@@ -140,24 +139,24 @@ public void convertFraction(final StringBuilder buf, final IFraction f, final in |
140 | 139 | } |
141 | 140 | } |
142 | 141 |
|
143 | | - public void convertFraction(final StringBuilder buf, final BigFraction f, final int precedence) { |
144 | | - boolean negative = f.compareTo(BigFraction.ZERO) < 0; |
145 | | - if (negative && (precedence > plusPrec)) { |
146 | | - buf.append("\\left( "); |
147 | | - } |
148 | | - if (f.getDenominator().equals(BigInteger.ONE)) { |
149 | | - buf.append(f.getNumerator().toString()); |
150 | | - } else { |
151 | | - buf.append("\\frac{"); |
152 | | - buf.append(f.getNumerator().toString()); |
153 | | - buf.append("}{"); |
154 | | - buf.append(f.getDenominator().toString()); |
155 | | - buf.append('}'); |
156 | | - } |
157 | | - if (negative && (precedence > plusPrec)) { |
158 | | - buf.append("\\right) "); |
159 | | - } |
160 | | - } |
| 142 | + // public void convertFraction(final StringBuilder buf, final BigFraction f, final int precedence) { |
| 143 | + // boolean negative = f.compareTo(BigFraction.ZERO) < 0; |
| 144 | + // if (negative && (precedence > plusPrec)) { |
| 145 | + // buf.append("\\left( "); |
| 146 | + // } |
| 147 | + // if (f.getDenominator().equals(BigInteger.ONE)) { |
| 148 | + // buf.append(f.getNumerator().toString()); |
| 149 | + // } else { |
| 150 | + // buf.append("\\frac{"); |
| 151 | + // buf.append(f.getNumerator().toString()); |
| 152 | + // buf.append("}{"); |
| 153 | + // buf.append(f.getDenominator().toString()); |
| 154 | + // buf.append('}'); |
| 155 | + // } |
| 156 | + // if (negative && (precedence > plusPrec)) { |
| 157 | + // buf.append("\\right) "); |
| 158 | + // } |
| 159 | + // } |
161 | 160 |
|
162 | 161 | @Override |
163 | 162 | public void convertComplex(final StringBuilder buf, final IComplex c, final int precedence) { |
@@ -304,10 +303,10 @@ public void convert(final StringBuilder buf, final Object o, final int precedenc |
304 | 303 | convertSymbol(buf, (ISymbol) o); |
305 | 304 | return; |
306 | 305 | } |
307 | | - if (o instanceof BigFraction) { |
308 | | - convertFraction(buf, (BigFraction) o, precedence); |
309 | | - return; |
310 | | - } |
| 306 | + // if (o instanceof BigFraction) { |
| 307 | + // convertFraction(buf, (BigFraction) o, precedence); |
| 308 | + // return; |
| 309 | + // } |
311 | 310 | convertString(buf, o.toString()); |
312 | 311 | } |
313 | 312 |
|
|
0 commit comments