Initiation and printing a line of list of examples

Mathematica program

(* Initiation and printing a line of list of examples *)

name = names[[nser]];
enex = exact[name];
func = coeff[name];
nm = Length[func];
(* ! *) (*nm = Min[nm, 46];*)
cls = class[name];
If[cls === "", cls = " "];
expprint = 
  ToString[func[[1]] + func[[2]] z + func[[3]] z^2 + func[[nm]] z^(nm - 1)];
sp = Last[StringPosition[expprint, {"+", "-"}]];
sgn = StringTake[expprint, sp];
rpl = If[sgn === "+", "+ ... +", "+ ... -"];
expprint = StringReplacePart[expprint, rpl, sp];
sb = StringPosition[expprint, "\n"];
If[sb =!= {},
  nb = sb[[1, 1]];
  sp1 = sp - nb;
  expprint = StringReplacePart[expprint, "       ", sp1]];
namel = StringReplace[ToLowerCase[name], "+" -> "-"];
dir = ToFileName[dirhtml, namel];
If[FileType[dir] =!= Directory, Print["Creating parent HTML-directory ", dir];
   CreateDirectory[dir]];
syst = system[name];
giffile = ToFileName[dir, "name.gif"];
Export[giffile, 
  StyleBox[syst, FontFamily -> "Times", FontSize -> 16], "GIF",
  ConversionOptions -> {"ColorReductionPalette" -> {GrayLevel[0], GrayLevel[1]}, "Transparency" -> GrayLevel[1]} ];
a = Import[giffile, "GIF"];
{gifh, gifw} = ToString /@ Dimensions[a[[1, 1]]];

of = indf;
"<TR ALIGN=\"LEFT\" VALIGN=\"MIDDLE\" BGCOLOR=\"#FFFFFF\"><TD WIDTH=\"13%\"><A HREF=\"" <>
      namel <> "/index.htm\">" <> name <> "</A></TD>" <>
      "<TD WIDTH=\"13%\"><IMG SRC=\"" <> namel <> "/name.gif\" WIDTH=" <>
      gifw <> " HEIGHT=" <> gifh <>
      " ALT=\"" <> name <> "\"></TD>" <>
      "<TD WIDTH=\"8%\">" <> cls <> "</TD>" <>
      "<TD><PRE>" <> expprint <> "</TD></TR>" // p;
(* Create table of indexes of approximants *)
mindlist = 10;
indlist = {};
Do[Do[
      n123 = n1 + n2 + n3 + 2;
      If[n1 < 0 || n2 < 0 || n3 < 1 || n123 > nm,
        Continue[]];
      If[Abs[n1 - n2] > 1 || Abs[n2 - n3] > 1 || Abs[n3 - n1] > 1,
        Continue[]];
      ind = {n1, n2, n3};
      prior = 1.2^n123;
      If[n1 == n2 == n3, prior = 10 prior];
      prior = 2^(n2 - n1) 3^(n3 - n2) prior;
      indlist = Append[indlist, {ind, prior, n123}];
      , {n2, n1 - 1, n1 + 1}, {n3, n1 - 1, n1 + 1}], {n1, 0, nm}];
indlist = Sort[indlist, #1[[2]] > #2[[2]] &];
mi = Length[indlist];
If[mindlist < mi, indlist = Take[indlist, mindlist]; mind = mindlist, mind = mi];
indlist = Sort[indlist, #1[[3]] > #2[[3]] &];

printprogr["indline"];

All Mathematica programs used to study M. - P. series Blank Work in UMassD BlankWaste icon Unpublished reports

Designed by A. Sergeev.