A method for forming first and second linear structures of a first composition that meet at right angles, there being a gap at the point at which the structures meet. The liquid-repellent film includes a layer containing a resin composition containing at least one of polyurethane and polyrotaxane disposed on the discharge port-forming member and a layer containing a fluorine compound and having a thickness of 10 nm or less disposed on the resin composition-containing layer. The substrate is then transferred to the patterning system and subjected to a second round of patterning. Optionally, the retention plate may be movable. The metal layer contains Ni as a principal constituent and Co, and the metal layer contains Au as a principal constituent.