Text this: A history of the calculus of variations in the eighteenth century