# Removing spurious parenthesis in TraditionalForm

I don't understand the following behavior (in v 9.0.1) of TraditionalForm regarding insertion of parenthesis.

Let us start with the a definition for myfuncF to make boxes in traditional form:

myfuncF /: MakeBoxes[myfuncF[a_, b_], TraditionalForm] :=
RowBox[{"f(", Sequence @@ Riffle[Map[ToBoxes, {a, b}], ","], ")"}]


Now look at what I get as output for the following two commands:

x myfuncF[a,b] // TraditionalForm
myfuncF[a,b] > 0 //TraditionalForm


Notice that in the first case, an unnecessary pair of parenthesis is inserted for multiplication.

Now I modify the MakeBoxes definition by inserting a small space: (in LHS, change RowBox[{"f(",… to RowBox[{" f(",…):

myfuncF /: MakeBoxes[myfuncF[a_, b_], TraditionalForm] :=
RowBox[{" f(", Sequence @@ Riffle[Map[ToBoxes, {a, b}], ","], ")"}]


Run the two commands again, and look what we get:

Now we get an unnecessary pair of parenthesis in the inequality!

So my questions are:

1. How do I understand this odd behavior (what's going on behind the scenes)?
2. What can I do to get rid of these superfluous parentheses?

Let us inspect the built-in behavior

ToBoxes@TraditionalForm[f[a, b]]

(* TagBox[FormBox[RowBox[{"f", "(", RowBox[{"a", ",", "b"}], ")"}],


So

myfuncF /: MakeBoxes[myfuncF[a_, b_], TraditionalForm] :=
RowBox[{"f", "(", RowBox@Riffle[Map[ToBoxes, {a, b}], ","], ")"}]

x myfuncF[a, b] // TraditionalForm
myfuncF[a, b] > 0 // TraditionalForm


It is because TraditionalForm don't understand you and put parentheses for sure. They are necessary in the following example

plus /: MakeBoxes[plus[a_, b_], TraditionalForm] :=
RowBox@Riffle[Map[ToBoxes, {a, b}], "+"]

x plus[a, b] // TraditionalForm
plus[a, b] > 0 // TraditionalForm


myfuncF /: MakeBoxes[myfuncF[a_, b_], TraditionalForm] :=
RowBox[{"f", "(", RowBox[{ToString@a, ",", ToString@b}], ")"}]

x myfuncF[a, b] // TraditionalForm
myfuncF[a, b] > 0 // TraditionalForm