3
$\begingroup$

How can one change the default output alignment from left to center?

$\endgroup$
2
$\begingroup$

You can change the stylesheet of the notebook to style all output cells accordingly:

You can find several questions on how to permanently install such stylesheets or how to programmatically change it in the official documentation and on this site, for example here and here.

$\endgroup$
2
$\begingroup$

You can use $PrePrint to add the option TextAlignment -> Center to all output cells in the current session:

$PrePrint = Style[#, "Output", TextAlignment -> Center] &;

enter image description here

To restore $PrePrint to the default value use

$PrePrint =.

If the notebook contains output cells created before $PrePrint is invoked, you can use

Scan[SetOptions[#, TextAlignment -> Center] &, Cells[CellStyle -> "Output"]]

to change their alignment.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.