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

Availability as common e-book formats #3

Open
StrScr opened this issue Dec 27, 2017 · 7 comments
Open

Availability as common e-book formats #3

StrScr opened this issue Dec 27, 2017 · 7 comments
Assignees

Comments

@StrScr
Copy link

StrScr commented Dec 27, 2017

Hello. I think this resource is great, but it is a bit inconvenient that to read it offline it is necessary to run a server. Could it be possible for you to offer it in some e-book format such as PDF or EPUB? It is not necessary, but some people, like myself, find it very convenient. Thank you for your time & effort.

@triska
Copy link
Owner

triska commented Dec 27, 2017

Hi Oscar,

yes, I will eventually offer this as a PDF. I will send you a note as soon as it becomes available.

Thank you for your feedback!
Markus

@kozross
Copy link

kozross commented Feb 23, 2018

I too would like to hear when it becomes available for offline reading as a PDF or ebook of some other kind.

@triska
Copy link
Owner

triska commented Feb 25, 2018

Thank you very much for your interest! I will prominently announce the PDF of the book once it is available.

Until then, I would like to fill a few remaining gaps and establish a more solid basis. Currently, I am still making changes almost every week, and I would also like to incorporate more feedback until then.

@triska triska self-assigned this May 18, 2018
@NJBS
Copy link

NJBS commented Jan 6, 2019

Hey, any update on this? It seems development has become somewhat more stable.

@triska
Copy link
Owner

triska commented Jan 6, 2019

Yes, there are good news regarding this issue: Some instructions to create such a file have generously been submitted as a pull request, please see #7 for more information.

Please let me know how they work for you, and if anything is missing. If possible, please file such comments directly in #7.

@medovina
Copy link

You can convert The Power of Prolog to a PDF using the command-line utility ebook-convert from Calibre. To do this, you first need to modify the top-level file prolog.html so that it contains actual relative links to the various subpages, so that ebook-convert can find them. For example, instead of

<li><a href="/prolog/introduction"><b>Introduction</b></a></li>

it needs to look like this:

<li><a href="introduction.html"><b>Introduction</b></a></li>

Once you've done that, you can convert from HTML to EPUB and then from EPUB to PDF. This worked well for me:

ebook-convert prolog.html prolog.epub --chapter-mark "none" --page-breaks-before "/" --flow-size 0  --level1-toc '//h:h1' --level2-toc '//h:h2'

ebook-convert prolog.epub prolog.pdf --chapter-mark "none" --pdf-page-margin-top 20 --pdf-page-margin-bottom 20

I also tried converting from HTML to PDF directly, but found that the generated PDF looks better if you go through EPUB as a separate step.

The generated PDF looks pretty good, but not all the embedded hyperlinks work. Again, that's because they don't appear as proper relative links in the source HTML pages. Markus, perhaps you'd like to update these links in the HTML source. (That would also make the site work better when using a Web browser to browse the site offline.)

By the way I also tried using Pandoc to perform this conversion, but I found that the result was far superior using ebook-convert.

triska added a commit that referenced this issue Mar 16, 2019
The videos are work in progress and may be replaced by newer versions
at any time. Hence, if possible, please use the stable links to refer
to these videos, since they will always point to the latest version.

For example, to link to the Sudoku video, please use:

    https://www.metalevel.at/prolog/videos/sudoku

This will automatically redirect to the latest version. See also #3.
@triska
Copy link
Owner

triska commented Mar 16, 2019

Thank you Adam for looking into this and for sharing these instructions!

I also greatly appreciate the interest from you all in in e-book version, and therefore I would like to add a general note to this discussion:

The videos will form an integral part of the book in the sense that many important features of Prolog can be most efficiently conveyed by sequences of editing operations, changes to queries, and animations of search processes. To illustrate this, I have now added a few of the videos I am currently working on, please see 3542ee4.

Here are a few links to some of the videos, for your enjoyment:

The videos are always work in progress and may be replaced be newer versions at any time.

An important feature of the web-based setup is that it lets me flexibly redirect to the latest versions of these videos. Therefore, if possible, please use these stable links to refer to these videos. They will always point to the latest version.

I would like to revise some of these videos, and also add more, before I can comfortably provide an e-book version of the entire book.

Bonus videos:

Stay tuned!

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

5 participants