1
$\begingroup$

If I arrange output in a Grid, which is nice to summarize work, the output ends up greyed (or not bold?) compared to regular output. Here's an example:

ClearAll[ display, nplus, nminus, theta, phi]

display = {theta -> Subscript[θ, 0], phi -> Subscript[ϕ, 0]} ;
nplus = {E^(-I phi) Cos[theta/2], Sin[theta/2]} ;
nminus = {-E^(-I phi) Sin[theta/2], Cos[theta/2]} ;

{#1, " = ", (#2 // FullSimplify) /. display  // TraditionalForm} & @@@ {
   {"|+>", nplus // MatrixForm},
   {"|->", nminus // MatrixForm}
   } // Grid

(nplus /. display) // MatrixForm // TraditionalForm
(nminus /. display) // MatrixForm // TraditionalForm

Which looks like:

output comparison grid vs default

The greyed output can be almost unreadable once printed (using a print configuation: Printing Settings -> Printing Environment -> Printout).

What is controlling the Grid vs normal output style, and how can I change it to match the default output style?

$\endgroup$

2 Answers 2

1
$\begingroup$

Use Style as shown to obtain darker text. Other options also can be applied to change the appearance of the text (diferent fonts, sizes, etc).

Style[{#1, 
     " = ", (#2 // FullSimplify) /. display  // TraditionalForm} & @@@ {
       {"|+>", nplus // MatrixForm},
       {"|->", nminus // MatrixForm}
       } // Grid, Bold]

enter image description here

Addendum

For further improved clarity, consider

Style[{#1, 
     " = ", ((#2 // FullSimplify) /. display  /. {E -> e, I -> i}) // 
      StandardForm} & @@@ {
       {"|+>", nplus // MatrixForm},
       {"|->", nminus // MatrixForm}
       } // Grid, {Bold, 14, "Text"}]

enter image description here

$\endgroup$
3
$\begingroup$

Another solution is to use the MaTeX package, which, together with TeXForm, allows you to get the equations typesetted directly in LaTeX.

In your example, you would do (after having installed the MaTeX package):

Needs["MaTeX`"]
MaTeX[
   ToString@TeXForm[
     MatrixForm[nplus /. display]
    ], 
    Magnification -> 3
]

which produces

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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