3
$\begingroup$

Using Print[], I know it is possible to print out "helping text" to better understand a solution:

Print["The solution is: ", x]

if x holds some value. Now, this text is displayed using typewriter's font and OutputForm (I think: correct me if I'm wrong...). Is it possible, and if so, how, to display this outcome using TraditionalForm for x and using non typewriter's font for the text?

"The solution is: " x // TraditionalForm

doesn't give the desired result, as once x holds a value, it is moved to the front of the expression.

Thanks for all help!

$\endgroup$
6
$\begingroup$

This would work:

Text[Row[{"The solution is: ", TraditionalForm[x]}]]

You can Print the above result, too.

$\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.