(1) The election commissioner or county clerk shall place the names of all partisan candidates certified to him or her by the Secretary of State and of those partisan candidates filing in his or her office on a primary election ballot headed with the political party designation. The names of each nonpartisan candidate certified by the Secretary of State and of each nonpartisan candidate filing in the office of the election commissioner or county clerk shall be placed on the primary election ballot headed by the words Nonpartisan Ticket.
(2) If any office is not subject to the upcoming election, the office shall be omitted from the ballot and the remaining offices shall move up so that the same relative order is preserved. The order of any offices may be altered to allow for the best utilization of ballot space in order to avoid printing a second ballot when one ballot would be sufficient if an optical-scan ballot is used. All proposals on the ballot submitted by a political subdivision shall follow all offices on the ballot for such political subdivision.
(3) The election commissioner or county clerk shall follow the order of precincts or wards as set out in the official abstract book on file in his or her office in preparing the official ballots. At the primary election, on the first set of ballots for the first precinct or ward shall be the names of candidates filing by date and hour as certified by the Secretary of State and for local candidates the names of candidates shall be listed in the order of filing by date and hour with the election commissioner or county clerk. When there are more candidates than vacancies for the same office, the names of all partisan and nonpartisan candidates at a primary election shall be rotated precinct by precinct in each office division in the order in which the precincts are set out in the official abstract book. In making the changes of position, the printer shall take the line of type at the head of each office division and place it at the bottom of that division, shoving up the column so that the name that was second shall be first after the change.