checking that everything is closed at the end of document

This file is copyright © 2004,2005,2006,2011 by Panu Kalliokoski and released under the stx2any license.

End a document.

Try to make sure everything is closed. (This is not perfect; for example the sectioning system of docbook-xml is not invoked. Docbook-xml sections don't play nicely with diversions anyway.)

w_newindent(0)`'w_setblocktype(n)`'w_softpara`'dnl

Close the default environment begun in begin.m4 and check everything went as should. Then, prepare for the actual output (the template).

w_end(n)`'w_check_env`'w_enddiv(body)`'w_check_div`'divert(0)dnl