# How to pull out negative signs through subscripted variables while displaying output in traditional form?

I am trying to get an expression to display correctly in TraditionalForm, with the negative sign in front of other symbols:

-Conjugate[Subscript["ϵ", "k"]] Subscript["Δ", "k"] // TraditionalForm //TeXForm


$$\Delta _{\text{k}} \left(-\left(\epsilon _{\text{k}}\right){}^*\right)$$

As you can see, the negative sign appears between the delta and epsilon, instead of appearing in front of both. It works as I expect if the delta is not subscripted.

-Conjugate[Subscript["ϵ", "k"]] "Δ" // TraditionalForm //TeXForm


$$-\Delta \left(\epsilon _{\text{k}}\right){}^*$$

Is there a way to force the negative sign to appear before the other symbols, even when using subscripted variables?

HoldForm command can prevent reshuffling of terms.

For example:

HoldForm[-Conjugate[Subscript["\[Epsilon]", "k"]] Subscript["\[CapitalDelta]", "k"]] // TraditionalForm


will result in:

$-(\epsilon_k)^* \Delta_k$

I think this probably should be considered a bug, but support may not agree. At any rate, if you don't mind mucking about with internal functions, you can fix this with the following patch:

TraditionalFormDumpordtimes[Lb_, Lconst_] /; !TrueQ@$Fix := Block[{$Fix=True},
If[negativeRowBox[Lb[[1]]],
Prepend[1 + TraditionalFormDumpordtimes[Rest @ Lb, Lconst], 1],
TraditionalFormDumpordtimes[Lb, Lconst]
]
]

negativeRowBox[{" ", rb_[{"-",__}]}] := StringStartsQ[SymbolName[rb], "myRowBox\$"]
negativeRowBox[_] = False;


Then:

-Conjugate[Subscript["ϵ","k"]] Subscript["Δ","k"] //TraditionalForm //TeXForm


$$-\left(\epsilon _{\text{k}}\right){}^* \Delta _{\text{k}}$$

as desired.

- Conjugate[Subscript["ϵ", "k"]] Subscript["Δ", "k"] /.
Times[a_?InternalSyntacticNegativeQ, b__] :> HoldForm[a Times[b]] //


$$-\Delta _{\text{k}} \left(\epsilon _{\text{k}}\right){}^*$$

• This doesn't work so well with more multiplicands, e.g., -Conjugate[Subscript["ϵ", "k"]] Subscript["Δ", "k"] Subscript[x, k] Oct 4 '18 at 16:13