THIS DOES NOT WORK ON SOME 64 BIT SYSTEMS I think it's OK on machines with 32 bit pointers and 64 bit ints but not 64+64. Don't use it until I've had a chance to tidy that aspect up. Fortunately my web-hosting system is of the variety that breaks. (My home x86 linux isn't) [I also need to find the bug-fixed version of debugf and delete all the broken ones] Until I get soap80 working, and make any modifications needed for Imp77, this may be useful. Use it for one-off reformatting jobs, not general tidying after an edit. Caveat: it doesn't yet handle tables. You'll probably want to replaced the 'formatted' tables with the original formatting by cut&paste. Output is to stdout so as not to clobber your original file. If soap fails to parse an Imp statement it just stops dead without any attempt at recovery. Send me the input so that I can modify imp.e to handle the overlooked construct. It's based on ERCC Imp, even predating Imp80, so I've recently just brought it up to date a little by adding some Imp77 constructs such as %predicate ... Undoubtedly there are more that it doesn't yet understand. It's based on a very old parser generator I wrote. I have much better ones now but this old code isn't worth updating so the parser generator is included here too. It compiles with a lot of warnings - which have been turned off... Graham Toal 4 Jan 2022.