(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(* ::Input::Initialization:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Talks/Toronto-1811"];
Get["../../Talks/Matemale-1804/CellExport.m"];
BeginPackage["Snips`", {"CellExport`"}];
MakeSnips;
Begin["`private`"];
SetOptions[$FrontEndSession,PrintingStyleEnvironment->"Working"];


(* ::Input::Initialization:: *)
MakeSnips[nb_] := (
If[Head[$FrontEnd]===FrontEndObject,
SetOptions[CellExport, ExportFormat -> ".pdf", Split -> True, PageWidth -> 7.12, ExportOptions -> {ImageSize->Scaled[0.75]}],
SetOptions[CellExport, ExportFormat -> ".pdf", Split -> True, PageWidth -> 7.12]
];
SourceNotebook = Get[nb];
DialogTags={};
tags=Cases[SourceNotebook, (CellTags->tag_) :> tag, Infinity ] // Union;
files=Reap[Flatten[Table[
Which[
tag=="817", { (* this is only left here as a demo for how to make an exception *)
Sow@CellExport[SourceNotebook, "817", {CellFilter -> First, ExportBaseFilename -> "Cnips/817-In"}],
Sow@CellExport[SourceNotebook, "817", {CellFilter -> Rest, ExportBaseFilename -> "Cnips/817-Out", PageWidth -> 5.5*0.24/0.16}]
},
MemberQ[DialogTags, tag], {
Sow@CellExport[SourceNotebook, tag, {CellFilter -> First, ExportBaseFilename -> "Cnips/"<>tag<>"-In"}],
Sow@CellExport[SourceNotebook, tag, {CellFilter -> Rest, ExportBaseFilename -> "Cnips/"<>tag<>"-Out"}]
},
True, Sow@CellExport[SourceNotebook, tag, ExportBaseFilename -> "Cnips/"<>tag]
],
{tag, tags}]]];
PutAppend[DateString[], "Cnips/Verification.txt"];
Sort@Flatten[files]
)


(* ::Input::Initialization:: *)
End[]; EndPackage[];
