diff --git a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/form/tex/TeXFormFactory.java b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/form/tex/TeXFormFactory.java index 56badf37f2..91e550da5e 100644 --- a/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/form/tex/TeXFormFactory.java +++ b/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/form/tex/TeXFormFactory.java @@ -2146,7 +2146,7 @@ private void init() { initTeXConverter(S.GreaterEqual, new TeXFormOperator(this, Precedence.GREATEREQUAL, "\\geq ")); initTeXConverter(S.SubtractFrom, new TeXFormOperator(this, Precedence.SUBTRACTFROM, "\\text{-=}")); - initTeXConverter(S.Subtract, new TeXFormOperator(this, Precedence.SUBTRACT, " - ")); + initTeXConverter(S.Subtract, new TeXFormOperator(this, Precedence.SUBTRACT + 1, " - ")); initTeXConverter(S.CompoundExpression, new TeXFormOperator(this, Precedence.COMPOUNDEXPRESSION, ";")); initTeXConverter(S.DivideBy, new TeXFormOperator(this, Precedence.DIVIDEBY, "\\text{/=}")); diff --git a/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/TeXFormTest.java b/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/TeXFormTest.java index 501d1fb075..268e11bb3a 100644 --- a/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/TeXFormTest.java +++ b/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/TeXFormTest.java @@ -574,6 +574,12 @@ public void testTeXFormRow() { "\\textnormal{1, 2, 3, 4}"); } + @Test + public void testTeXFormSubtract() { + check("TeXForm(Hold(Subtract(1+1/2,3+4/5)))", // + "\\text{Hold}(\\left( 1 + \\frac{1}{2}\\right) - \\left( 3 + \\frac{4}{5}\\right) )"); + } + @Override public void setUp() { super.setUp(); diff --git a/symja_android_library/matheclipse-parser/src/main/java/org/matheclipse/parser/client/Parser.java b/symja_android_library/matheclipse-parser/src/main/java/org/matheclipse/parser/client/Parser.java index 1cd2f3849f..36cb751e97 100644 --- a/symja_android_library/matheclipse-parser/src/main/java/org/matheclipse/parser/client/Parser.java +++ b/symja_android_library/matheclipse-parser/src/main/java/org/matheclipse/parser/client/Parser.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2013 Axel Kramer (axelclk@gmail.com) + * Copyright 2005-2023 Axel Kramer (axelclk@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at