% % replace the global parts % "_OriginalDocRoot_" __OriginalDocRoot_ replall "_PrimaryName_" __PrimaryName_ replall "_SourceWidth_" __SourceWidth_ replall "_TargetWidth_" __ButtonWidth_ __ButtonCount_ mul replall "_SourceHeight_" __SourceHeight_ replall "_TargetHeight_" __ButtonHeight_ __ButtonCount_ mul replall "_Pwidth_" __ButtonWidth_ 4 sub replall "_Pheight_" __ButtonHeight_ 4 sub replall "_ButtonWinset_" __ButtonWidth_ 1 sub replall "_ButtonHinset_" __ButtonHeight_ 1 sub replall "_ButtonCount_" __ButtonCount_ replall "_SourceLeft_" __SourceLeft_ replall "_SourceTop_" __SourceTop_ replall "_ButtonHeight_" __ButtonHeight_ replall "_ButtonWidth_" __ButtonWidth_ replall "_BaseDocName_" __BaseDocName_ jpg replall "[[" slice "]]" slice empty % % stack: pre-prin-gen prin-gen post-prin-gen builder % __ButtonCount_ countup { !_prin_ third "_prin_" __PrimaryName_ &__prin_ replall "_ButtonHeight_" __ButtonHeight_ replall "_ButtonWidth_" __ButtonWidth_ replall "_prinf_" ".jpg" __TargetDocName_ __prin_ ^"_" & ^ replall "_prinhref_" __PrimaryName_ &__prin_ html replall "_prinx_" __prin_ - __ButtonWidth_ mul replall "_priny_" __prin_ - __ButtonHeight_ mul replall & } for % % stack: pre-prin-gen prin-gen post-prin-gen builder % pop3rd ^ & % % stack: builder %