<pre> styling and doc generation function