# HoldForm behaviour for product of a Graph and an expression

Suppose I have a list of pairs each containing an expression and an associated Graph object:

list={{G^4/48,Graph[List[1,2],List[UndirectedEdge[1,2],UndirectedEdge[1,2],UndirectedEdge[1,2],UndirectedEdge[1,2]],List[Rule[EdgeStyle,List[Thickness[Large]]],Rule[FormatType,TraditionalForm]]]},{G^4/16,Graph[List[1,2],List[UndirectedEdge[1,1],UndirectedEdge[1,2],UndirectedEdge[1,2],UndirectedEdge[2,2]],List[Rule[EdgeStyle,List[Thickness[Large]]],Rule[FormatType,TraditionalForm]]]}}


Now, I want to obtain a product of the each pair. I tried:

Times @@@ list


But, the problem is that of formatting, the expression gets completely mixed with the Graph object:

I want simple product without any further mixing:

How to achieve this? I tried playing around with HoldForm and Print, but I failed to get them to work.

• Wrap the factor in HoldForm. – Szabolcs May 11 '18 at 17:32
• @Szabolcs Cool! It worked – Subho May 11 '18 at 17:48
• If it is just for displaying purposes then Row@*Reverse /@ list would also work. – Henrik Schumacher May 12 '18 at 7:15

With[{x = #[[1]], y = #[[2]]}, HoldForm[x] y] & /@ list