An image forming apparatus includes an alignment pattern and an alignment
pattern detector that detects the alignment pattern. The alignment
pattern is formed in such a manner that a line image of a reference color
and a line image of a color other than the reference color are superposed
on each other with a predetermined shift amount. An acceptance width of
the alignment pattern detector is determined so that the acceptance width
satisfies a relation with a writing density of the image forming
apparatus and a line width of the alignment pattern, as follows:
[acceptance width]>[line width]/(5.0627.times.[writing
density(dpi)].sup.-0.5331).