I have written (or co-authored) several. In my experience an author gets ten percent (or their share thereof) of sales. This is standard for text book types things with sales of a few thousand a year. If you're famous and likely to sell more you can start negociating upwards but I am not sure by...