Structure of organic and metal-organic networks based on a bifunctional m-terphenyl carboxylic acid.