We have attempted to install a Super Shark battery in a bike frame that is barely too small many times. The battery will actually fit in the space available in the triangle (see picture below) but there is no room to slide it on and off of its mount. Since the mount cradle requires that you mount it to the water bottle mounts first and then slide on the battery, there is no way to mount the battery. That is, there was no way before Grin Technologies invented the Bottle Bob and Triple Bob. Now it is easy if you don't mind a semi-permanent battery mount where you just leave the battery on the frame all the time. Hey its better than the alternative!
To mount the Triple Bob in the smallest space possible on a frame that has no room to take the battery on and off once it is mounted, first attach the battery mount to the Triple Bob. Then attach the battery to its mount and lock it in place. Then position the battery in the frame and lock it down with hose clamps through the Triple Bob. We do this all the time to install batteries in frames that are a tight fit with no room to take the battery off once mounted. We used to do it with zip ties and holes drilled into the battery mount but Triple Bob's are so much better.
As an alternative, you can also do this with Bottle Bob's. They are a tiny bit shorter and we have on occasion even filed them down a few millimeters in especially tight frames.
Another technique for installing a downtube battery if it won't fit in the triangle like on a lot of full suspension bikes, is to mount it on the bottom of the downtube. Place it as far down toward the mid-drive motor or bottom bracket as possible considering other clearance factors and lock it down with a Triple Bob and hose clamps. If you have a suspension fork, let all the air out of it so you can completely collapse it and check that the tire will not hit the battery if the suspension bottoms out. If it bottoms out going off a jump or hitting a rock or curb it could damage the battery. That said, I have had a few people mount it there anyway and either lock out the fork, or add air pressure and promise to never go off a jump. 😯
For more info on Triple Bob's check out this article.