# Create a command that centers output in its cell [duplicate]

How would I create a command,Centering, which would center output within the cell in which it is displayed. For example, I would like

 Plot[x^2, {x, 0,1}] // Centering


to center the plotin the cell resulting from its evaluation.

• Ok Corey979, my question is not far from the suggested one but what I do not understand clearly is how to transform the answers in suhc a way to use it as I suggest --- since parameters must be added Nov 18 '16 at 18:31

centering := CellPrint[ExpressionCell[#, "Output", TextAlignment -> Center]] &

 Plot[x^2,{i, 1, 10}]// centering