We formulate the abelian six-dimensional N=(2,0) theory perturbatively, in a generalization of the Batalin–Vilkovisky formalism. Using this description, we compute the holomorphic and non-minimal twists at the perturbative level. This calculation hinges on the existence of an L∞ action of the supersymmetry algebra on the abelian tensor multiplet, which we describe in detail. Our formulation appears naturally in the pure spinor superfield formalism, but understanding it requires developing a presymplectic generalization of the BV formalism, inspired by Dirac's theory of constraints. The holomorphic twist consists of symplectic-valued holomorphic bosons from the N=(1,0) hypermultiplet, together with a degenerate holomorphic theory of holomorphic one-forms from the N=(1,0) tensor multiplet, which can be seen to describe the infinitesimal intermediate Jacobian variety. We check that our formulation and our results match with known ones under various dimensional reductions, as well as comparing the holomorphic twist to Kodaira–Spencer theory. Matching our formalism to five-dimensional Yang–Mills theory after reduction leads to some issues related to electric–magnetic duality; we offer some speculation on a nonperturbative resolution.