MIA: Volunteer: eBook Production Guidelines
eBook Production Guidelines
Many of the HTML documents on the Marxists Internet Archive are being converted to ebooks by volunteers. Any volunteer who produces an eBook can send it to the eBooks Administrator on the MIA Admin Ctee as an email attachment and it will be added to our eBook Collection.
There are two sections below. The first, Production Guidelines, gives guidance on what is required of a MIA ebook. You can of course use any editor to create an ebook, but in the second section below, Creating an eBook Using Calibre, we give tailored guidance on using this free open-source ebook editor-manager to create an ebook from MIA web pages.
Production Guidelines
The following guidelines should be followed:
- Please check the existing eBook Collection to make sure you don’t duplicate a book.
- Please produce the book in epub format, and if possible also as a pdf and in a Kindle-compatible format such as mobi or azw3.
- Please only convert substantial books. If you are interested in smaller works, please bundle articles together in sensible collections so we have at least about 200,000 words, or 1.5Mb of text, up to a file size of 10Mb.
- Please use only material already available on marxists.org as HTML. If you have other material, not already on MIA, please contribute this to the MIA first. There may be very good reasons, such as copyright restrictions, for us not having it already. If all is well, we will process it and upload it as HTML. See “Transcribing Text.”
- Your book will not be proofed or corrected by anyone else. We strongly recommend that you carefully proofread the source material before converting. Much of the material on marxists.org is in need of proofreading, so if you need to make any corrections, we would appreciate notice of all the errors, and we will implement the corrections.
- HTML headers and footers should not be carried over into our eBooks, which should be clean, and resemble hard copy books. The only hyperlinks should be from a Table of Contents and to endnotes and footnotes. It is preferable to convert footnotes to endnotes, either at chapter-end or document-end.
- Please place in smaller print under the main title (book title, author and date) the full bibliographical data for the source. This must include the URL of the source HTML on marxists.org as well as the bibliographical information given in the HTML source: date written and first published, author, translator, transcriber, copyleft status, etc. Include your own name as “Converted to eBook format by: ...” in the same format, font-size, etc., as the other credits.
- Please create an ebook table of contents (a toc.ncx file in epub format) and include the same information in a Table of Contents before the main text.
- Metadata:
- Title: Exactly as it appears on MIA
- Author: Exactly as it appears on MIA
- Publisher: Marxists Internet Archive
- IDs: Usually just the MIA url, no ISBN
- Language: As appropriate, if not English
- Tags: as appropriate, eg 'Non-fiction, Politics, Marxism, Hungary'
- Comments: Include a brief description of the book
- Publishing date: Date of your conversion
- Cover image: Optional. You can use the original cover for very old books, ie where there is no copyright, or create a cover yourself, but again beware of using copyright images.
- Adult only: Do not use
- Demo: Do not use
- Review: Do not use
- Suggested price: Do not use
- Territory: Do not use
Please notify us before starting work, just in case other volunteers are already working on your projects.
Creating an eBook from MIA web files using Calibre
Calibre is an open source ebook manager which includes a very effective editor. It is available for Windows, Mac and Linux. There is general guidance for using Calibre on the Calibre website.
The following guidance shows how to use Calibre to create an ebook in epub format, which is the open standard, and then convert it to mobi (for Kindle) and pdf.
1 Create Empty Book
- Open Calibre.
- Click on: Toolbar → Add Books → Add Empty Book
- Set Author and Title, leave Format as EPUB
2 Set Metadata
2.1 Edit metadata
Click on: Toolbar → Edit Metadata
- Set metadata tags as appropriate - see 'Metadata' above.
- It's good to add a cover, but as noted above beware of copyright. You can use an image of the original cover if it's very old, or create a cover yourself as a jpeg or png file using any graphics editor, eg Gimp or Paint. Wikipedia and Wikimedia Commons are good sources for copyright-free photos.
- Save your changes.
2.2 Polish book
Click on: Toolbar → Polish Books
In the Polish Book dialog check 'Update Metadata in the book files' and 'Update the cover in the book files', then click OK.
NOTE: Once it is polished Calibre will normally have created an 'Original_epub' format version. It is essential that you delete this otherwise you risk losing all your work on the book if you 'polish' again at any time in the future. Delete it by right-clicking on ORIGINAL_EPUB on Formats at the right bar and select 'Delete ORIGINAL_EPUB format' – or use the Remove Books menu list option. You can stop Calibre creating the ORIGINAL_EPUB file by clicking on Preferences → Change Calibre Behaviour → Tweaks, search for polish and change the setting to: save_original_format_when_polishing = False
3 Add Content to Book
Click on: Toolbar → Edit Book
3.1 Create stylesheet
Either
- Import the original .css stylesheet with File → Import files into book. To find it on the MIA website, its address will be in the header of each file. Unfortunately some MIA books use different css files on different chapters: you could replicate this, but it is bad practice, so you should really pick the most commonly used one and if there is a missing class then put it into the one css file.
or
- Import a stylesheet which you like or create a new stylesheet with File → New file – call it eg styles.css and click OK. Either way you'll need to make sure all the class= entries throughout the html files are correct, and possibly change many of them, so it could be a lot more work.
3.2 Create a sample html file
- Create a sample html file so you can use the header in the imported files. Use File → New file. Call it test.html and click OK.
- Make any changes to the header so it complies with MIA's eBook Production Guidelines.
3.3 Add html files
- Use File → Import files into book to import the files singly or in a batch.
- Re-order the files into the right order, by dragging them up or down the list.
- Smarten the code up with Tools → Beautify all files. You can also beautify files individually.
- In each html file replace the header from the start up to and including the <body...> tag with the header from test.html.
- In each html file you will probably need to remove quite a bit of material at the top of the page – typically html 'breadcrumbs' and the author and book name. You may be able to combine this with stage 4 – ie replace not just the html header but also the visible page headings.
Also remove any extraneous material at the bottom of the page, eg a 'top of page' link or 'last updated' info.3.4 Web addresses
Web addresses need checking and correcting.
Relative addresses: Relative addresses to other MIA content need to have the full address given, ie starting with www.marxists.org.
Footnotes: Footnotes in html in an online page may have links with the web address. If so then the web address element needs to be deleted from the footnote links, both in the text and the footnote, just leaving the '#' reference (plus the local html file if the footnote reference is to/from a different file in the ebook). For instance:
<a href="../../history/somebook/chap3.htm#f52" name="n52">52.</a>
or
<a href="../chap3.htm#f52" name="n52">52.</a>might be replaced with
<a href="#f52" name="n52">52.</a>
Other Internal Links: Most other internal links can be removed, eg to the next chapter, top of page etc. Those which need to be kept will need amending as per Footnotes above, ie to point to a file within the book. Calibre will help you by suggesting possible files/references when you start typing the href.
4 Edit Book
4.1 Correct the layout
Go through the book a file at a time correcting layout issues – typically removing excess headings etc which are needed in the web pages (because people can jump straight there from anywhere on the web), rather than each page being part of a book, as here.
4.2 Fix any code errors
Click Run check at the right of the Check Book section at the top of the editor.
Click on each of the errors shown at the left to correct them.
4.3 Create a Table of Contents, and Contents page
- Click on: Tools → Table of Contents → Edit Table of Contents
- Auto-generate a table of contents with one of the options at the right. Generate ToC from major headings is the one to try first. If that doesn't work well try one of the others. You can then edit it as you wish.
- Auto-generate a Contents page with Tools → Table of Contents → Insert inline Table of Contents. This creates a toc.xhtml file as the first file. Drag it to the correct place for the Contents page, and edit it as you wish. You will need to replace the header with the standard header (which you used for all the other files in 3.3.4 above).
5 Proof-read the Book
Proof read the book, ideally on a PC/Mac and also an eBook reader/tablet/phone, so you can see how it looks in large and mobile format. You may well need to make quite a few formatting changes as the requirements for a well laid out eBook are not necessarily the same as for a web book.
NB If you need to make any text corrections then these should be replicated in the MIA web pages – contact the MIA Admin Committee.
6 Create Other Formats and Upload to MIA
Once you are happy with the book, create mobi (for Kindle) and pdf versions of it with the toolbar Convert books button.
They should then be uploaded to MIA: contact the eBooks Administrator on the MIA Admin Committee.
7 Example
This guidance was used to convert the web version of State Capitalism in Russia into an ebook (epub, mobi and pdf).
Contact the Marxists Internet Archive Admin Committee for further information