I have written trade/scientific stuff before but only for glory, not cash.
However, having been a contractor before you could either charge up front (hourly rate based on time spent with him/her) or percentage/absolute later on.
Quote a price and leave the author the dilemma of negotiating a...