% % stack: subjects % % make sure subjects exist % dup !Xact.Index positive { % % remove current child nodes % *unrootch % % get the strings of subject summaries of xacts % _Xact.Slist execstr _Xact.Index countup { pop *slidrpre 8 countup { ^"gallery" second exch ! } for !gallery % % process this subjects xacts % execstr % % prefix a subject tag for tree name display % dup !Shooter.Subject ^"subj " root\ newchild "Subject" \!Type _Shooter.Subject \!Subject % % run through the xacts attached to this subject % 0 !counter _\ !anchor { isnull ? !Xact % % create an image in the gallery of xacts/subject % +:counter 9 countup { dup 9 eq { empty *slidrfil "___Index___" _counter replall _counter 1 gt { ^"," } if pop2nd "gallery" ^: } { dup letter lower *slidrfil "___Index___" _counter replall _counter 1 gt { ^"," } if exch ^"gallery" ^: } ifelse } for % % create a xact child of the subject % _anchor !\ "xact " &_Xact newchild "Xact" \!Type _Xact \!Xact } loop pop % % go back through the xacts of this subject % place the product galleries in each xact of subject % %%% "histe.xml" oflist Tree.Save pop % % for the individual galleries collected xacts % add the gallery terminator % 9 countup { dup 9 eq { "gallery" } { dup ^"gallery" } ifelse " ] " exch ^: } for % % implant the subject xacts gallery into each xact % _anchor Tree._First { !\ \_Xact !Xact 9 countup { dup 9 eq { "gallery" } { dup ^"gallery" } ifelse _ exch letter ^"gal_Subject_" text!xact } for final\? ? } loop pop } for } if