1.5 Pretty Output

Beautifying NCAlgebra

WARNING: The command SetOutput is now deprecated. Please use NCSetOutput instead.

In[104]:= NCSetOutput[ All -> True ];  
In[105]:= inv[ tp[k] ]  
             T -1  
Out[105]= (k)  
 
In[106]:= NCSetOutput[ All -> True ];  
In[107]:= rt[x - inv[y + aj[z]]] + tp[x]  
            T              * -1 1/2  
Out[107]=  x  + (x - (y + z )  )  
 
In[108]:= NCSetOutput[ All -> True, inv -> False ];  
In[109]:= inv[1 + tp[1-x]]  
 
                   T  
Out[109]= inv[2 - x ]

TEXOutput

WARNING: The TEX commands in this version of NCAlgebra have been updated to use the new package NCTeX. Please see Section ?? for more details.

 
In[110]:= mat = {{a + tp[b],aj[c]},{inv[d],e}}  
Out[110]= {{a + tp[b], aj[c]}, {inv[d], e}}  
 
In[111]:= NCTeX[mat]

The above command takes the Mathematica matrix mat, converts it to LATEX, outputs the string and surrounding LATEX to a file, LATEXs the file and displays the LATEXed pdf output to the screen. If you are in a notebook environment, the resulting pdf file is imported back to the notebook. Refer to Section ?? for more details. If you are in a text environment then it opens a pdf viewer with the following formula in its display.

(           )
  a + bT  c*
   d-1    e

The command

In[113]:= NCTeX[Sum[a[i],{i,1,50}], ImportPDF -> False, DisplayPDF -> True];

generates a window which contains the following formula in its display.

a(1)+a(2)+a(3)+a(4)+a(5)+a(6)+a(7)+a(8)+a(9)+a(10)+a(11)+a(12)+a(13)+a(14)+

a(15)+ a(16) + a(17)+ a(18) + a(19)+ a(20) + a(21)+ a(22) + a(23)+ a(24) + a(25)+ a(26)+

a(27)+ a(28) + a(29)+ a(30) + a(31)+ a(32) + a(33)+ a(34) + a(35)+ a(36) + a(37)+ a(38)+
a(39)+  a(40)+ a(41) + a(42)+  a(43)+ a(44) + a(45)+  a(46)+ a(47) + a(48)+  a(49)+ a(50)

The above examples in this chapter demonstrate the most commonly used features in NCAlgebra.