Fix calcul of output format for ebook