Printing head of list of examples

Mathematica program

 ```(* Printing head of list of examples *) Get["\\sergeev\\purdue\\math\\packages\\printing.m"]; << Graphics`Graphics`; << Graphics`MultipleListPlot`; rndm := ToString[Random[Integer, {0, 999999}]]; p[s_String] := Write[of, s]; Discriminant[p_?PolynomialQ, x_] := With[{n = Exponent[p, x]}, Cancel[((-1)^(n(n - 1)/2)Resultant[p, D[p, x], x])/ Coefficient[p, x, n]^(2n - 1)]]; (* Printing navigation line at bottom of each table or figure *) printnav := ( "  Top of the page    " // p; If[nser != 1, namem = names[[nser-1]]; nameml = StringReplace[ToLowerCase[namem], "+" -> "-"]; ref = "../" <> nameml <>"/index.htm#" <> sect; "     ref <> "\">   ref <> "\">Prev. (" <> namem <> ")" // p]; "     sect <> "\"> entity <> "\" ALIGN=\"MIDDLE\">   sect <> "\">Top of this " <> entity <> " (" <> name <> ")" // p; If[nser != mser, namep = names[[nser+1]]; namepl = StringReplace[ToLowerCase[namep], "+" -> "-"]; ref = "../" <> namepl <>"/index.htm#" <> sect; "     ref <> "\">   ref <> "\">Next (" <> namep <> ")" // p]; "    " // p; "     sect <> ".htm\">   sect <> ".htm\">Mathematica program" // p; "

" // p; ); (* Printing Mathematica program in HTML-format *) htmlrepl[s_String] := StringReplace[s, {"<"->"<", ">"->">", "&"->"&", "\""->"""}]; flankblank[s_String]:= Module[{s0,s9}, If[s=="",s, If[s0=StringTake[s,1];s0==" "||s0=="\n",flankblank[StringDrop[s,1]], If[s9=StringTake[s,-1];s9==" "||s9=="\n",flankblank[StringDrop[s,-1]],s]]] ]; printprogrs = {}; printprogr[sect_String] := If[!MemberQ[printprogrs, sect], progfile = ToFileName[dirhome, sect <> ".m"]; progtext = Import[progfile, "Text"]; sp1 = StringPosition[progtext, "(*"]; sp2 = StringPosition[progtext, "*)"]; progtitle = If[sp1 =!= {} && sp2 =!= {}, StringTake[progtext, {sp1[[1, 2]] + 1, sp2[[1, 1]] - 1}], ""]; {progtext,progtitle} = htmlrepl/@flankblank/@{progtext,progtitle}; outfile = ToFileName[dirhtml, sect <> ".htm"]; of1 = OpenWrite[outfile, PageWidth -> Infinity, FormatType -> OutputForm]; proghtml = "\n \n " <> progtitle <> "\n \n \n \n \n

" <> progtitle <> "

\n

Mathematica program

\n
" <> progtext <> "
\n \n
\n
All Mathematica programs used to study M. - P. seriesWork in UMassDUnpublished reports
\n \n \n \n \n \n \n

Designed by A. Sergeev.

\n \n "; Write[of1, proghtml]; Close[of1]; plist = "
sect <> ".htm\">" <> sect <> "" <> progtitle <> "
(* Display results for each example of series in HTML - format *)\n Clear["@"];\n itest = 0; (* 1 for testing *)\n newabc = True;  (* re - calculate parameters a, b, c *)\n newfigure = True;  (* re - create figure files *)\n dirhtml = "C:\\html\\files\\umassd\\mollerpl";\n dirser = "C:\\sergeev\\umassd\\dgoodson\\projects\\qsum\\series";\n dirhome = "C:\\sergeev\\umassd\\math\\internet";\n If[FileType[dirhtml] =!= Directory,\n     Print["Creating HTML-directory ", dirhtml]; CreateDirectory[dirhtml]];\n Get["\\sergeev\\umassd\\math\\series\\read.m"];\n SetDirectory[dirhome];\n \n << indhead.m;\n Do[\n     << indline.m;\n     << head.m;\n     << ctable.m;\n     << cplot.m;\n     << cplots.m;\n     << errors.m;\n     << sings3.m;\n     << foot.m,\n     {nser, mser}];\n << indfoot.m;
If[EvenQ[Length[printprogrs]],"FFFFFF","E0E0E0"] <> "\">\n \n "; Write[oproglist, plist]; printprogrs = Append[printprogrs, sect]; ]; (* Starting list of Mathematica programs *) proglistfile = ToFileName[dirhtml, "proglist.htm"]; oproglist = OpenWrite[proglistfile, PageWidth -> Infinity, FormatType -> OutputForm]; plist = " \n \n \n Programs to display results of summation of Moller-Plesset perturbation series as web-pages\n \n \n \n \n \n

Mathematica programs to display results of summation of Moller-Plesset perturbation series as web-pages

\n \n

Main program

\n \n \n \n

Sub-programs

\n \n
" <> c <> "
"; Write[oproglist,plist]; plt0 = ListPlot[{{0, 0}}, PlotStyle -> {PointSize[0]}, DisplayFunction -> Identity]; names = Select[names, exact[#] != 0 &]; mser = Length[names]; mrul = mser; (* to shrink ruler, decrease to ~20 *) names1 = names; ruler = ""; While[(m = Length[names1]) != 0, ruler = ruler <> ""; Do[ c = If[nrul <= m, name = names1[[nrul]]; namel = StringReplace[ToLowerCase[name], "+" -> "-"]; " namel <> "/index.htm\">" <> name <> "", " "]; ruler = ruler <> "" , {nrul, mrul}]; ruler = ruler <> ""; names1 = Drop[names1, Min[m, mrul]]]; ruler = ruler <> ""; indfile = ToFileName[dirhtml, "index.htm"]; indf = OpenWrite[indfile, PageWidth -> Infinity, FormatType -> OutputForm]; of = indf; "" // p; "" // p; "Examples of Moller-Plesset perturbation theory for different molecules" // p; "" // p; "" // p; "" // p; "

Examples of Moller-Plesset perturbation theory

" // p; "" // p; "
List of examples. " <> "To view details for each example, follow a link to its name
NameSystemClassMoller-Plesset perturbation series
" // p; "" <> "" // p; printprogr["indhead"];```

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

Designed by A. Sergeev.