0
$\begingroup$

This has certainly been asked on MSE somewhere before. Where it is has eluded me the past 50 or so minutes.

I'm formatting some boolean expressions using Interpretation and Defer to provide access to the expression without evaluation difficulties or formatting to deal with.

Problem is, I want to format, e.g. And[a,b] as a\[And]b not a&&b. I know I could get away with a Row since I'm using Interpretation, but I know there has to be some way at the Style level to specifiy that And should be formatted as \[And].

Does anyone know where such a thing would be?

Just as a rehash, I'm looking for a Style (or similar) option to format And as \[And] instead of &&.

$\endgroup$
3
$\begingroup$

Assuming this is a StandardForm question, you could do:

Unprotect[And];
And /: MakeBoxes[And[a__], StandardForm] := RowBox[
    BoxForm`MakeInfixForm[And[a],"\[And]",StandardForm]
]
Protect[And];

Or you could use TraditionalForm.

$\endgroup$
  • $\begingroup$ Forgot that Style doesn't take TraditionalForm as an argument. TraditionalForm and SingleLetterItalics -> False gets the job done. $\endgroup$ – b3m2a1 Mar 9 '17 at 0:35

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.