improved replace_tex_and_web, allowed .sty-defined elements to contain styles