Modern-CPP-Programming icon indicating copy to clipboard operation
Modern-CPP-Programming copied to clipboard

[FEAT REQ] epub version

Open ivnnv opened this issue 1 year ago • 15 comments

Hi, could it be possible to generate an epub version of each pdf ()or combined) so they can be sent to ebook readers (like Kindle) and take advantages of the extra features of those over plain PDFs, like change font size, etc?

I know there are pdf to epub converters but they arent very good and it would be better to convert from whatever your original source material is.

Thanks.

ivnnv avatar Dec 01 '23 11:12 ivnnv

this seems a common request. Need to figure out how to generate epub from latex

federico-busato avatar Dec 01 '23 18:12 federico-busato

Hi, congratulations for the project! I have the same issue in this project and I am thinking about trying out pandoc in some near future... Have you considered using it?

jorgepz avatar Dec 01 '23 19:12 jorgepz

thanks for the suggestion @jorgepz. I tried with pandoc, but the result is pretty bad. I'm considering tex4ebook

federico-busato avatar Dec 01 '23 22:12 federico-busato

this seems a common request. Need to figure out how to generate epub from latex

Is there a plan to also make the latex files public?

csukuangfj avatar Dec 02 '23 10:12 csukuangfj

Is there a plan to also make the latex files public?

Not for now

federico-busato avatar Dec 03 '23 01:12 federico-busato

I tried tex4ebook but I got many compile errors. I will see if there are simple alternatives

federico-busato avatar Dec 03 '23 01:12 federico-busato

Just to throw some ideas into this, iCloud Pages Online.

~Not sure in which format your source is but~ (Latex, I overlooked it 😅) with an Apple account you can upload and format it with the online version of pages and export it as ePUB. Limited LaTeX support in pages.

Smartis2812 avatar Dec 04 '23 08:12 Smartis2812

fyi epub is just some glorified html put in a zip archive. Maybe some tooling to compile latex to HTML could be used?

Channel59 avatar Dec 04 '23 08:12 Channel59

fyi epub is just some glorified html put in a zip archive. Maybe some tooling to compile latex to HTML could be used?

Could be achived with the Calibre Commandline tools

Smartis2812 avatar Dec 04 '23 08:12 Smartis2812

You can possibly generate HTML using htlatex. Once you have HTML, you can use pandoc to convert to EPUB. Or you can convert to DOCX using pandoc and then use Amazon Kindle Create to generate EPUB. Calibre also has good HTML to EPUB conversion.

indraneel-mondal avatar Jan 26 '24 19:01 indraneel-mondal

I already tried to use make4ht because it is an improved version of htlatex, but I got errors related to unsupported fonts. I could try to remove them one by one until the build passes. Not sure if it is the best solution

federico-busato avatar Jan 26 '24 20:01 federico-busato

Created pull request containing html's for all chapters. These seem to have been generated correctly. https://github.com/federico-busato/Modern-CPP-Programming/pull/60

freakynit avatar Jan 31 '24 05:01 freakynit

@freakynit that's amazing!! 🤯 Could you please tell me how you did this so I can automate the process for future updates?

federico-busato avatar Jan 31 '24 18:01 federico-busato

@federico-busato All thanks to https://cloudconvert.com/pdf-to-html

freakynit avatar Feb 02 '24 05:02 freakynit

I also found the tool pdf2htmlEX that is open source and can be automated. Epub conversion is still problematic. I tried both pandoc and calibre but the result is too bad to publish.

federico-busato avatar Feb 04 '24 07:02 federico-busato