A capital gain is usually generated upon disposal of an asset like shares or a property. The difference between the price the asset was bought and sold is the capital gain, upon which captial gains tax is levied.
On the other hand, one would normally think "Capital Gains" when writing software for "Startup Ltd." with sale or IPO of the company as the exit plan.
Yes, capital gains are generated when shares in a company are sold but this is unrelated to the revenue the business earns. Shareholders will pay capital gains tax when they dispose of shares, not the business.
I learnt today that if an author assigns copyright of his book to a publisher for a fee, the net revenue is taxed as income, not as capital gains.
This is just revenue for the business or him/her, so yes, if the author is self-employed then this will just be part of his/her regular income, and taxed as such. There is no asset that has been disposed where a capital gain is realised.
What is it that differentiates the author and the startup in the eyes of HMRC? Surely not just the corporate shell?
A startup doesn't pay capital gains taxes... it doesn't pay any taxes until it is profitable, and then it's corporation tax.
As you mentioned the HMRC I'm assuming you're in the UK - so here is some relevant information about capital gains.