Abstract We consider magnetic oscillations of the critical current in stacks of intrinsic Josephson junctions. Depending on junction lateral size and magnetic field, oscillations may have either the period of half a flux quantum per junction (wide-stack regime) or one flux quantum per junction (narrow-stack regime). For junctions with lateral sizes of the order of several Josephson lengths, the stack crosses over from the wide-stack regime to the narrow-stack regime with increasing magnetic field. This crossover occurs via suppression of the critical-current peaks at the integer-flux-quanta points and enhancement of the critical-current peaks at the half-integer-flux-quanta points. In the narrow-stack regime the lattice structure periodically transforms between rectangular and triangular configurations. The latter configurations is realized only in narrow regions near magnetic-field values corresponding to an integer number of flux quanta per junction.