# Is it possible to set Mathematica output to be in InputForm by default?

Mma's output cells are by default in StandardForm. While this has obvious advantages, sometimes it can get annoying, for example when I wish to copy paste the output. When this happens, I usually manually right-click the cell and convert it to InputForm.

But is it possible to set these output cells to be in InputForm by default? Because under Preferences -> Evaluation -> Format type of new output cells I can only see three possibilities: StandardForm, TraditionalForm and OutputForm.

• Why not just use Copy As > Input Text, either from the Edit menu or the (left-click) context menu? – m_goldberg Mar 13 '15 at 17:26
• @m_goldberg First, because, for example, the constant Pi gets copied as \[Pi] this way, as opposed to converting it to InputForm, when it gets copied as Pi. Second, because I was wondering if there is any auto solution, that wouldn't require any extra clicking... – gaazkam Mar 13 '15 at 17:29

You can use $PrePrint to achieve this: $PrePrint = InputForm;

Now every output will be preprocessed by InputForm before it is printed.
$PrePrint =.;  to restore the default behavior. You could also use $Post instead of $PrePrint. However, when $Post is used you'll get Null as an output when there normally is no output, e.g. if the input ended with ;.
• Many thanks! Out of curiosity: what's the difference between $PrePrint and $Post? Because from what I read in the documentation, they seem pretty much the same... – gaazkam Mar 13 '15 at 17:36
• @gaazkam I thing $PrePrint is the better choice. Please see my edit why. – Karsten 7. Mar 13 '15 at 17:54 I think a cleaner way to achieve this would be: SetOptions[$Output, FormatType -> InputForm];

• This method produces an odd placing of the output (example), as it's printed before the Outs, which appear empty. Nevertheless +1. – Karsten 7. Oct 4 '15 at 16:38