The light-induced and tip-induced polymerization of two diacetylene derivatives has been investigated at the air/solid interface by scanning tunneling microscopy (STM). One molecule is an isophthalic acid derivative with one diacetylene group, while the other one, a terephthalic acid derivative, contains two diacetylene functions. The design of the molecules (symmetry, presence of alkyl chains and hydrogen bonding moieties) leads to the formation of highly ordered two-dimensional patterns where the diacetylene groups stack in an optimal fashion. Both diacetylene derivatives can be polymerized by UV light irradiation, and locally the polymerization can be initiated and controlled by the STM tip. In addition to the formation of one-dimensional organic structures, it was possible to create two-dimensional organic nanostructures.