The 'trick' is that car-makers are just starting to do it in a car. Years after loco makers implemented it.
What made me realize it was, of all things, a Challenge in a recent Top Gear. The boys were callenged to make an electric car. After a bit of faffing around with just batteries, James May eventually added a small diesel generator, with the comment that that's how trains do it.
Some of the other non-Prius hybrids made a bit of a point that the internal combustion engine only powers a generator, but (typically) the motoring journalists haven't twigged as to why this is such a good idea. Yet. Clarkson was full of genuine praise for May's addition and this may be enough to wake some of them up.
Wade.