Pensieve header: The Splash Program of Figure 3.1, computing $z_0$.

SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\PPSA\\PPSA-170103"];

Splash Demo

CF[ω_.𝔼[Q_]] := Simplify[ω]𝔼[Simplify[Q]];
𝔼 /: 𝔼[Q1_]𝔼[Q2_] := CF@𝔼[Q1+Q2];
(Subscript[N, (Subscript[u, i_])(Subscript[c, j_])->k_])[ω_.𝔼[Q_]] := CF[ω 𝔼[(E^(-γ))β (Subscript[u, k])+γ (Subscript[c, k])+(Q/.(Subscript[c, j])|(Subscript[u, i])->0)]/.{γ->(∂_(Subscript[c, j]))Q,β->(∂_(Subscript[u, i]))Q}];
(Subscript[N, (Subscript[w, i_])(Subscript[c, j_])->k_])[ω_.𝔼[Q_]] := CF[ω 𝔼[(E^γ)α (Subscript[w, k])+γ (Subscript[c, k])+(Q/.(Subscript[c, j])|(Subscript[w, i])->0)]/.{γ->(∂_(Subscript[c, j]))Q,α->(∂_(Subscript[w, i]))Q}];
(Subscript[N, (Subscript[w, i_])(Subscript[u, j_])->k_])[ω_.𝔼[Q_]] := CF[ν ω 𝔼[-b ν α β+ν β (Subscript[u, k])+ν δ (Subscript[u, k])(Subscript[w, k])+ν α (Subscript[w, k]) +(Q/.(Subscript[w, i])|(Subscript[u, j])->0)] /. ν-> (((1+b δ))^(-1)) /. {α->(∂_(Subscript[w, i]))Q/.(Subscript[u, j])->0, β->(∂_(Subscript[u, j]))Q/.(Subscript[w, i])->0, δ->(∂_((Subscript[w, i]),(Subscript[u, j])))Q}];
(Subscript[m, i_,j_->k_])[ω_.𝔼[Q_]] :=CF[Module[{x},(ω 𝔼[Q] // (Subscript[N, (Subscript[w, i])(Subscript[c, j])->x])//(Subscript[N, (Subscript[u, i])(Subscript[c, x])->x])//(Subscript[N, (Subscript[w, x])(Subscript[u, j])->x])) /. {(Subscript[c, i])->(Subscript[c, k]),(Subscript[w, j])->(Subscript[w, k]),(Subscript[y_, x]):>(Subscript[y, k])}]]

(Subscript[R, i_,j_]^(+)):=𝔼[b (Subscript[c, j])+(b^(-1))((E^b)-1)(Subscript[u, i])(Subscript[w, j])];
(Subscript[R, i_,j_]^(-)):=𝔼[-b (Subscript[c, j])+(b^(-1))((E^(-b))-1)(Subscript[u, i])(Subscript[w, j])];

z=(Subscript[R, 12,1]^(-))(Subscript[R, 2,7]^(-))(Subscript[R, 8,3]^(-))(Subscript[R, 4,11]^(-))(Subscript[R, 16,5]^(+))(Subscript[R, 6,13]^(+))(Subscript[R, 14,9]^(+))(Subscript[R, 10,15]^(+));
Do[z=z//(Subscript[m, 1,n->1]),{n,2,16}];
CF@z /. ω_.𝔼[Q_]:>(ω^(-1))/. b->Log[t]

Exporting the above as PDF files

The below is adapted from pensieve://2016-04/GaussGassner/GaussGassnerDemo.nb.

ConditionalExport[fname_String, rest___] := Module[{temp, exists},
temp="ConditionalExportTemporary"<>"."<>FileExtension[fname];
exists=FileExistsQ[fname];
Export[temp, rest];
If[exists && FileByteCount[fname]===FileByteCount[temp],
DeleteFile[temp],
(* else *) Print["Exporting "<>fname<>"..."];
If[exists, DeleteFile[fname]];
RenameFile[temp, fname]
];
fname
]

SetOptions[$FrontEndSession,PrintingStyleEnvironment->"Working"];
TagProperties[_] := {};
TagProperties["ct-def"] = {PageWidth ->5/0.66};
Options[CellExport] = {
PageWidth -> 3.2/0.66*4.2/3.8, CellFilter -> Identity, ExportDirectory -> "Snips", ExportBaseFilename -> Automatic, ExportFormat -> ".pdf", ExportOptions -> {}, Split -> False
};
CellExport[tag_String, opts___Rule] := CellExport[
NotebookGet[EvaluationNotebook[]],
tag, opts
];
CellExport[nb_Notebook, tag_String] := CellExport[nb, tag, TagProperties[tag]];
CellExport[nb_Notebook, tag_String, OptionsPattern[]] := Module[
{cells, cell, filename, format},
filename = FileNameJoin[{
OptionValue[ExportDirectory] /. Automatic -> Directory[],
OptionValue[ExportBaseFilename] /. Automatic -> tag
}];
format=OptionValue[ExportFormat];
cells=OptionValue[CellFilter][Cases[
nb, c_Cell /; FreeQ[List@@c, Cell] && !FreeQ[c, CellTags->tag],
Infinity
]];
If[!OptionValue[Split],
If[Length[cells]≥1,
If[Length[cells]==1,
cells=Join[First[cells], Cell[PageWidth ->1.2 72OptionValue[PageWidth], Background->{White, Opacity[0]}]],
cells=Cell[CellGroup[cells], PageWidth -> 72OptionValue[PageWidth]]
];
ConditionalExport[
filename<>format,cells,
ImageResolution -> 300,
OptionValue[ExportOptions]
]
],
k=0;
Table[
++k;
ConditionalExport[
filename<>"-"<>ToString[k]<>format,
Append[cell, PageWidth -> 72OptionValue[PageWidth]],
ImageResolution -> 300,
OptionValue[ExportOptions]
],
{cell, cells}
]
]
];

ExportCells:=(
nb=NotebookGet[EvaluationNotebook[]];
tags=Cases[nb, (CellTags->tag_String) :> tag, Infinity ] // Union;
Print[tags];
CellExport /@ tags;
Print["Done."]
);

ExportCells