SetDirectory["C:\\drorbn\\AcademicPensieve\\Talks\\Greece-1607\\TeXAttempt"]

Make

Make::usage = "Make[targets, sources, Hold[action]] makes a target, or a list of targets, given sources, or a list of sources, in the style of the unix 'make' command.";
Make[target_String, sources_, action_Hold] := Make[Evaluate@{target}, sources, action];
Make[targets_, source_String, action__Hold] := Make[targets, Evaluate@{source}, action];
Make[targets_List, sources_List, action_Hold] := Module[{},
If[
(And @@ ((FileType[#] =!= None)& /@ sources)) &&
Or[
Or @@ ((FileType[#]===None)& /@ targets),
Min[AbsoluteTime[FileDate[#]]& /@ targets] < Max[AbsoluteTime[FileDate[#]]& /@ sources]
],
Print["Making ",targets, " ..."];
ReleaseHold[action]
]
];

BHP.png

dpi=400;
Make[{"BHP.png","BHP_800.jpg"}, {"BHP.pdf"}, Hold[
Print["Talks/Greece-1607: Making BHP.png, BHP_800.jpg ..."];
Read["!convert -scene 1 -density "<>ToString[dpi]<>" -background white -alpha remove BHP.pdf BHP.png"];
Read["!convert +append BHP-*.png BHP.png"];
Read["!convert -geometry 800x800 -gamma 0.75 BHP.png BHP_800.jpg"];
DeleteFile[FileNames["BHP-*.png"]];
]]

index.html

{
"CleanTeX" -> True
}

Archive