Question on PDF conversion in PG epub maker

I have made some printed books based on Project Gutenberg texts. One example: https://www.amazon.com/Mahabharata-Book-I-Beginning/dp/1492299227/ What I ended up doing was importing the HTML version into Libre Office, saving it in the native format, adding styles, moving footnotes from the back of the texts to the bottoms of pages, etc. It was a lot of tedious work but the results were excellent. I would like to make books like this from my own PG donations, which were done as RST files. I noticed that the PDF generated from my RST was surprisingly good. For one thing, the footnote were already at the bottoms of pages. There were things I didn't like about the PDF, but with a little work whatever generated it might make something suitable for publishing through Create Space, These are the kinds of changes I would make: 1. The page size should be 6" by 9", a standard trade paperback size. 2. The fonts should be larger, maybe 12 pt. I'd like to choose the fonts used, and add custom fonts for title pages, etc. 3. Margins should be suitable for Create Space (or whatever Amazon is calling it now). I program computers for a living, so I could make these changes for myself with a few hints on what software is used to convert the RST to PDF format. I have found a utility that does that: https://rst2pdf.org However, this does not give the result I want. It puts the footnotes at the end of the book, and there are other issues with it. The manual explains how to deal with some of them, but not the footnotes. So I am looking for some explanation of how the PG epub maker does this. Thanks. James Simmons

Hi, James. If you are interested in seeing how ebookmaker works, all the code is here: https://github.com/gutenbergtools/ebookmaker Contributions, issue reports, and other input is most welcome! Project Gutenberg isn't planning on accepting hand-crafted EPUB or PDF files. Instead, we want to maintain just a small number of master formats, from which derivatives are made automatically. The master formats are HTML, plain text, RST, and TeX (sometimes also TEI). Derived formats include EPUB, MOBI, and HTML (only when plain text is the only master). I would value the ability to automatically create PDF as a derived format, preferably via modification to the ebookmaker application referenced above. Your general specifications for PDF seem reasonable to me. There are relatively few RST master files in Project Gutenberg (perhaps 700, versus 56,000+ HTML), so conversion to PDF would be most useful if it targeted all master formats, or minimally HTML as well as any others. Those are some thoughts on your inquiry. In general, I would consider the possibility of conversion from EPUB to PDF, not only from RST to PDF. The EPUB conversion seems to work fairly well, though I don't know that it meets all of your requirements. We are planning on integrating Calibre with ebookmaker for various conversions, and this might be a stepping stone to other functionality. - Greg Newby On Sun, May 17, 2020 at 03:09:10PM -0500, nicestep@gmail.com wrote:
I have made some printed books based on Project Gutenberg texts. One example:
https://www.amazon.com/Mahabharata-Book-I-Beginning/dp/1492299227/
What I ended up doing was importing the HTML version into Libre Office, saving it in the native format, adding styles, moving footnotes from the back of the texts to the bottoms of pages, etc. It was a lot of tedious work but the results were excellent.
I would like to make books like this from my own PG donations, which were done as RST files. I noticed that the PDF generated from my RST was surprisingly good. For one thing, the footnote were already at the bottoms of pages. There were things I didn't like about the PDF, but with a little work whatever generated it might make something suitable for publishing through Create Space, These are the kinds of changes I would make:
1. The page size should be 6" by 9", a standard trade paperback size.
2. The fonts should be larger, maybe 12 pt. I'd like to choose the fonts used, and add custom fonts for title pages, etc.
3. Margins should be suitable for Create Space (or whatever Amazon is calling it now).
I program computers for a living, so I could make these changes for myself with a few hints on what software is used to convert the RST to PDF format. I have found a utility that does that:
However, this does not give the result I want. It puts the footnotes at the end of the book, and there are other issues with it. The manual explains how to deal with some of them, but not the footnotes. So I am looking for some explanation of how the PG epub maker does this.
Thanks.
James Simmons
_______________________________________________ gutvol-d mailing list gutvol-d@lists.pglaf.org https://lists.pglaf.org/mailman/listinfo/gutvol-d Unsubscribe: https://lists.pglaf.org/mailman/options/gutvol-d

Greg (and other volunteers), I managed to get ebookmaker installed on my Fedora desktop and successfully generated a PDF from one of my RST files. It looks exactly like the one that PG generated for my submission. So far, so good. I notice that what seems to be happening is that a Python program runs a docutils program called xetext to translate the RST to a LaTex .tex file and that is run through another utility to create the PDF. By changing what is in this .tex file I should be able to create the PDF I want. I am familiar with the concepts behind Tex but I don't know how to use it. Any reference that could get me up to speed would be helpful. Much about the PDF is good, but for publication as a print on demand book I'd want to do the following: 1. Change page size from A5 to 6" by 9".2. Change margins so that there are left and right pages with an inner margin of .88" and an outer margin of .5", top margin of .4" and bottom margin of .3".3. Change TOC to one with page numbers and no hyperlinks.4. Use hyphenation for body text but NOT in headings, titles, etc.5. Eliminate pages coming before the title page, plus Project Gutenberg text at the back.6. Have a place on the Verso to put ISBN and ISBN-13 numbers for print on demand publishing. I believe that most of this would be easy to do if I knew more about how Tex works. Anyone who can point me in the right direction will be appreciated. James Simmons On Mon, 2020-05-18 at 05:52 -0700, Greg Newby wrote:
Hi, James. If you are interested in seeing how ebookmaker works, all the code is here: https://github.com/gutenbergtools/ebookmaker
Contributions, issue reports, and other input is most welcome! Project Gutenberg isn't planning on accepting hand-crafted EPUB or PDF files. Instead, we want to maintain just a small number of master formats, from which derivatives are made automatically. The master formats are HTML, plain text, RST, and TeX (sometimes also TEI). Derived formats include EPUB, MOBI, and HTML (only when plain text is the only master). I would value the ability to automatically create PDF as a derived format, preferably via modification to the ebookmaker application referenced above. Your general specifications for PDF seem reasonable to me. There are relatively few RST master files in Project Gutenberg (perhaps 700, versus 56,000+ HTML), so conversion to PDF would be most useful if it targeted all master formats, or minimally HTML as well as any others. Those are some thoughts on your inquiry. In general, I would consider the possibility of conversion from EPUB to PDF, not only from RST to PDF. The EPUB conversion seems to work fairly well, though I don't know that it meets all of your requirements. We are planning on integrating Calibre with ebookmaker for various conversions, and this might be a stepping stone to other functionality. - Greg Newby On Sun, May 17, 2020 at 03:09:10PM -0500, nicestep@gmail.com wrote:
I have made some printed books based on Project Gutenberg texts. Oneexample: https://www.amazon.com/Mahabharata-Book-I-Beginning/dp/1492299227/
What I ended up doing was importing the HTML version into Libre Office,saving it in the native format, adding styles, moving footnotes fromthe back of the texts to the bottoms of pages, etc. It was a lot oftedious work but the results were excellent. I would like to make books like this from my own PG donations, whichwere done as RST files. I noticed that the PDF generated from my RSTwas surprisingly good. For one thing, the footnote were already at thebottoms of pages. There were things I didn't like about the PDF, butwith a little work whatever generated it might make something suitablefor publishing through Create Space, These are the kinds of changes Iwould make: 1. The page size should be 6" by 9", a standard trade paperback size. 2. The fonts should be larger, maybe 12 pt. I'd like to choose thefonts used, and add custom fonts for title pages, etc. 3. Margins should be suitable for Create Space (or whatever Amazon iscalling it now). I program computers for a living, so I could make these changes formyself with a few hints on what software is used to convert the RST toPDF format. I have found a utility that does that: https://rst2pdf.org
However, this does not give the result I want. It puts the footnotes atthe end of the book, and there are other issues with it. The manualexplains how to deal with some of them, but not the footnotes. So I amlooking for some explanation of how the PG epub maker does this. Thanks. James Simmons _______________________________________________gutvol-d mailing listgutvol-d@lists.pglaf.org https://lists.pglaf.org/mailman/listinfo/gutvol-d Unsubscribe: https://lists.pglaf.org/mailman/options/gutvol-d

On 5/22/2020 4:37 PM, nicestep@gmail.com wrote:
I managed to get ebookmaker installed on my Fedora desktop and successfully generated a PDF from one of my RST files. It looks exactly like the one that PG generated for my submission. So far, so good.
I notice that what seems to be happening is that a Python program runs a docutils program called xetext to translate the RST to a LaTex .tex file and that is run through another utility to create the PDF. By changing what is in this .tex file I should be able to create the PDF I want. I am familiar with the concepts behind Tex but I don't know how to use it. Any reference that could get me up to speed would be helpful.
Much about the PDF is good, but for publication as a print on demand book I'd want to do the following:
1. ... 5. Eliminate pages coming before the title page, plus Project Gutenberg text at the back.
What do you intend to do with your print-on-demand books? Will you be offering them for a fee somewhere? It sounds like you are planning to redistribute PG books, but without the PG license information (the pages before the title page, and the PG text at the back). If so, that is certainly legal, but I'm curious why any of us should want to help you with your efforts. -- Walt
participants (4)
-
Greg Newby
-
mthsnwslttr@riseup.net
-
nicestep@gmail.com
-
Walt Farrell