Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF is great but ePub is even better (on e-ink devices) #256

Open
Zingam opened this issue Sep 12, 2020 · 14 comments
Open

PDF is great but ePub is even better (on e-ink devices) #256

Zingam opened this issue Sep 12, 2020 · 14 comments

Comments

@Zingam
Copy link

Zingam commented Sep 12, 2020

There are alot of big screen ereaders these days but reading PDF on them is not very comfortable experience. ePub format is supported and much better on e-ink devices. It will be great if there is a epub version of the book with a proper Table of Contents (TOC).

@chriseyre2000
Copy link

I have found out how to use pandoc to generate the epub:

pandoc -o ../out/CategoryTheory.epub ctfp.tex --resource-path=.:images

It does require copying all of the images to an images folder within the src directory.

I will be making this into a proper PR over the next few days.

@andyleejordan
Copy link

@chriseyre2000 Any chance you’ll get to that? I’d love an epub of this too.

@chriseyre2000
Copy link

My nix skills are lacking. I will get back to this.

The above script does work for now.

@MartinSeeler
Copy link

Any progress on this? Would be great to have an epub for downloads. 😍

@drupol
Copy link
Collaborator

drupol commented Feb 13, 2021

It is super easy to do with Github actions and pandoc.

@Glidos
Copy link

Glidos commented May 28, 2021

@drupol would be great if you would expand on that for those less familiar with exactly how Github actions work.

@Glidos
Copy link

Glidos commented May 28, 2021

@chriseyre2000 When I run that command I see many warnings, some "Could not load include file" and "Could not convert TeX math". The resulting file has in many places the rendered TeX followed by the TeX source. Is that what you see too?

@drupol
Copy link
Collaborator

drupol commented May 28, 2021

@Glidos How can I help?

@Glidos
Copy link

Glidos commented May 28, 2021

@drupol have you tried this conversion? If so, I'd be interested to know if you see the same problems I've just posted.

@drupol
Copy link
Collaborator

drupol commented May 28, 2021

@drupol have you tried this conversion? If so, I'd be interested to know if you see the same problems I've just posted.

No, I haven't tried yet, I'm sorry.

@chriseyre2000
Copy link

chriseyre2000 commented May 29, 2021 via email

@Glidos
Copy link

Glidos commented May 29, 2021

I followed that part of the instructions... well I created hard links to all the images in a dir under src called "images". It wasn't image files that were mentioned in the errors. Thanks for the reply, all the same.

@Glidos
Copy link

Glidos commented May 29, 2021

I ended up just adding a new paper size appropriate for my kindle paperwhite, with very small margins, and building a pdf file. Here's the contents of the opt- file in case it's useful to anyone else:

% !TEX root = ctfp.tex

% Options for kindle paperwhite

\def\OPTmodes{oneside,openany,11pt}

% PAGE FORMAT
%
% Page geometry
\def\OPTpaperesize{90mm,120mm} % Page size
\def\OPTtopmargin{5mm}        % Margin at the top of the page
\def\OPTbottommargin{5mm}     % Margin at the bottom of the page
\def\OPTinnermargin{5mm}    % Margin on the inner side of the page
\def\OPToutermargin{5mm}    % Margin on the outer side of the page
\def\OPTbindingoffset{0mm}     % Extra offset on the inner side

\def\OPThidelinks{false}

The very small bottom margin cause the page numbers to be pushed off page. Making that 10mm brings them back, but only just, and in an odd looking position. I couldn't see how to control page number positioning independently.

@tannerntannern
Copy link

in case it's useful to anyone else

Useful to me 3 years later! I have a kobo e-reader of similar size so these settings worked great. Thanks @Glidos 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants