The script to 'Harry Potter and the Cursed Child', co-written by J.K.Rowling, will be published after it opens in London's West End.