I'm trying to better understand the concept of active and passive components, mainly with respect to capacitors and batteries.
I found that - according to Wikipedia - there are two definitions of passivity, one that focus on the inability of have power gain, and one that looks at the inability to generate power.
In this answer the answerer says that it depends on the linearity of the controlling function, and the subsequent ability to control current and/or voltage, so a diode is active because of its ability to control current (while it would be passive if we look at its ability to generate power).
With all this in mind, I was wondering about capacitors and batteries: capacitors are passive elements, while I have seen batteries categorized as active, as direct generators; but capacitors can be used to power a circuit, so I was trying to understand the difference between them: are batteries active? If so, can capacitors used as batteries be seen as active? If not, what's the difference?