Message knows how to convert an expression (taken as an argument) into a string before it is spliced into an actual message:
If I run the following in my terminal and in the front end
temp::mystr = "The symbol: `1`"; Message[temp::mystr, Pi];
Pi is rendered differently:
I would like to directly enter an expression into the message string so that it renders appropriately depending on where it is issued: (in the terminal ->
OutputForm, or in the front end notebook ->
temp::mystr2 = "The symbol: \!\(Pi\)"; doesn't render correctly in the front end, while
temp::mystr2 = "The symbol: \[Pi]"; renders incorrectly in the terminal. Does anyone know how to do it correctly [I need a solution that works in Mathematica 8 through 11]?