(* 2018.10.31 
  fancy.m 
  fancy print of pp0 and pp0Dual
  <<tperiod.m 
*)

pp=pp0; 
cfac=z4^(-1/2)/Pi^(1/2);
(* 
  pp=ppDual0;
  cfac=2*z4^(1/2)/Pi^(1/2);
*)
pp=Simplify[pp/cfac];
myformat={z4,Infinity,3};

(* the first element *)
tt1=Series[pp[[1]],myformat];
Print["{\\tilde \\Phi}_1=",TeXForm[cfac],"\\left(",TeXForm[tt1],"\\right)"];

(* the second and the third elements *)
pp2a=Coefficient[pp[[2]],Log[z4]];
pp2b=Simplify[pp[[2]]-pp2a*Log[z4]];
tt2a=Series[pp2a,myformat];
tt2b=Series[pp2b,myformat];
Print["{\\tilde \\Phi}_2={\\tilde \\Phi}_3=",TeXForm[cfac],"(\\phi_{20} + (\\log z_4)\\phi_{21})"];
Print["\\phi_{20}=",TeXForm[tt2b]];
Print["\\phi_{21}=",TeXForm[tt2a]];

(* the 4th element 2018.11.01 *)
pp4a=Coefficient[pp[[4]],Log[z4]];
pp4aa=Coefficient[pp[[4]],Log[z4]^2];
pp4b=Simplify[pp[[4]]-pp4a*Log[z4]-pp4aa*Log[z4]^2];
tt4a=Series[pp4a,myformat];
tt4aa=Series[pp4aa,myformat];
tt4b=Series[pp4b,myformat];
Print["{\\tilde \\Phi}_4=",TeXForm[cfac],"(\\phi_{40} + (\\log z_4)\\phi_{41}+(\\log z_4)^2 \\phi_{42})"];
Print["\\phi_{40}=",TeXForm[tt4b]];
Print["\\phi_{41}=",TeXForm[tt4a]];
Print["\\phi_{42}=",TeXForm[tt4aa]];

