.. |checkbox| raw:: html =================== Publishing a book =================== Described here are the last steps before a book is published. Prerequisites ============= The final version of the PDF has been approved by the authors. Currently, only the PDF version is given to the authors for approval, not the online version or the EPUB. If a hardcopy is planned, a test print is ordered from the print on demand service to check the quality of the printed book. During the last steps before the final version, also the EPUB and Online versions have been created and any new features have been programmed. It is useful to also go through these version, as some mistakes are better visible in one format than in the others. Approved PDF means no more changes to any format! ================================================= It seems tempting to correct minor errors after the PDF has been approved is about to be sent to the printer. However, this creates incongruencies in the formats to be published, and the version given to the printer must be the version that is used for the other formats. To ensure this, it makes sense to tag the specific commit that was used for the publishable version. Currently, the tagging function is not available in Github Desktop. How to assign a tag or release on the Github webpage, consult https://help.github.com/en/github/administering-a-repository/managing-releases-in-a-repository. A rough checklist ================= - |checkbox| the test print is ok - |checkbox| the PDF version is ok - |checkbox| the EPUB version is ok - |checkbox| the online version is ok - |checkbox| all required data has been entered in the ``publication.cfg`` file File structure ============== - In the project directory, create a directory called ``upload`` PDF for print on demand service =============================== - Open the final PDF version in Adobe Acrobat Pro - Rotate all pages to portrait - Create the cover taking in account the thickness of the spine (can be calculated with tools provided by the print on demand service) - Create preflight version: Convert to PDF/X-1a (Coated FOGRA 39) - Send to the print on demand service, along with the cover - Done PDF for download ================ - Open the final PDF version in Adobe Acrobat Pro - Check if all bookmarks jump to the right locations, otherwise adjust manually - If the size of the PDF exceeds around 30 MB, save a version of it with reduced images (File -> Save As... -> Reduced Size PDF...) - Otherwise, simply save the PDF in the ``upload`` directory, the filename follows the pattern ``series`` + ``number`` + ``.pdf``, e.g. ``sources13.pdf``. - Done PDF chapters for download ========================= - Keep working with the file from the previous section in Adobe Acrobat Pro in order to split the book by chapters. - If the book has parts, flatten the layout of the bookmarks, that is mark all the chapters of a part and drag them to the same level as the part, then delete the part bookmark. Repeat for all parts. - Split the document: (Tools/Pages/Split Document -> Top-level bookmarks, Output Options: Use label "chap", select the ``upload`` directory for as Target Folder) .. image:: /_static/split_document_options.png :scale: 50 % :alt: Acrobat split document options :align: center - In the ``upload`` directory, go through the files and discard the frontmatter and those files that are merely pages that show the title of a part. Open each file and remove blank pages at the end. - In the ``upload`` directory, rename the files after the pattern ``series`` + ``number`` + ``_`` + ``chap`` + ``chapternumber, zero-padded, two digits`` + ``.pdf``, e. g. ``sources13_chap02.pdf``. NB, the chapter number is not the actual number of the chapter, but a consecutive number, starting from 1. For list of contributors and similar chapters names like these are also possible: ``studies10_listofcontributors.pdf`` - Done EOASkripts workflow =================== The ``process_tei.py`` or ``process_eoa_latex.py`` scripts from the dockered ``EOASkripts`` service are used to create the versions for EPUB and the publication platform. EPUB version ============ - ``imxml2epub.py`` creates the EPUB file. In the output directory both the unzipped version and the ``.epub`` file are available. - You can use `epubcheck `__ to check the validity. - The last steps happen in `Calibre `__: Fix EPUB metadata in Calibre ---------------------------- - Enter the subtitle in the title field, separated by a colon. - Fix the Author field: the authors are to be separated by the ``&`` character. - Enter series and number information - Add the ISBN of the EPUB - Adjust the publication date .. image:: /_static/calibre_edit_metadata.png :scale: 50 % :alt: Edit metadata in Calibre :align: center Edit books tool --------------- Use the `Edit book` tool built into Calibre for some more tweaks on the EPUB. - Open the editor by selecting ``Edit book`` in the menu or by pressing ``t``. - ``Check book`` (key ``F7``). Mostly, the errors shown can be fixed automatically by the program. - Ignore warnings of too big files. Otherwise links between the different files would not work anymore. - In the ``Tools`` menu, run the following commands: - ``Compress images losslessly`` - ``External links/Check external links``: Faulty links would need to be corrected also in the other formats. - Optional: ``Reports`` shows some nice statistics - Fix the table of contents by selecting ``Edit Table of Contents`` - Delete the existing table of contents by selecting all entries and pressing backspace. - Generate a new one by using ``Generate ToC from XPath``. First line: ``//h:h1`` (Level 1 ToC), second line ``//h:h2`` (Level 2 ToC). These settings can also be saved by selecting ``Save settings`` bottom left. .. image:: /_static/calibre_edit_toc.png :scale: 50 % :alt: Edit table of contents in Calibre :align: center - Edit the resulting table of contents by moving the chapters into the respective parts and by deleting the first entry. - Save all changes Export book ----------- - Back in Calibre, export the EPUB into the ``upload`` directory and rename it to ``series`` + ``number`` + ``.epub``, e.g. ``sources13.epub``. - Done Django version ============== - ``imxml2django`` creates the files used for the publication platform. - Use a local platform (e. g. set up with Docker) to test the book before uploading it. - For ingesting the book the following files and directories are required: - ``publication.cfg`` - ``Cover.jpg`` - ``Django.xml`` - ``images`` - The function ``pimp15`` in the ``eoa.rc`` file (found at https://github.molgen.mpg.de/EditionOpenAccess/eoa-utilities/blob/master/eoa.rc#L66-L88) will automate the following steps: - Create an import directory in the publication platform at the level of the file ``manage.py`` that is named after the pattern ``import_`` + ``series`` + ``number``, e.g. ``import_studies15``. The files above are copied there. - Call the script to import the publication into the platform: e. g. ``python manage.py publicationimport import_studies15``. - Done Metadata on the platform ======================== - On the administration interface in Django, authors are created and linked to the publication. The numbers of the authors have to be assigned manually. - Check all other metadata of the book. - Upload the PDF and EPUB files created earlier. - We'll cover the chapter PDFs later. Additional metadata =================== For the handling of additional metadata, the tool ``eoa_metadator`` (https://docs.edition-open-access.de/eoa_metadator/index.html) is used. Based on the metadata entered in the Django database, several metadata formats will be created: - Bibliographical metadata for the `Suggested Citation` fields - JSON files for the registering of DOIs - A cover page for the chapter PDFs Suggested Citation ------------------ After having created the files with ``eoa_metadator`` copy the formatted citation from the generated file to the Suggested Citation field in the Django admin interface. DOI Generation -------------- If a DOI prefix is present in the settings of the Django platform, new DOIs for new publications and their chapters will be created during the publication import. That does not mean they are registered yet, but since the scheme is based on the ISBN of a publication it can easily be derived. The ``eoa_metadator`` tool is used to create JSON files that can be uploaded to DataCite using ``curl``. It is advisable to first upload them to the test repository and check the metadata and create the data for the proper DOIs. See https://docs.edition-open-access.de/eoa_metadator/index.html#doi-creation for details. Chapters ======== For each chapter do the following - Upload the PDF file for the chapter - Copy the formatted citation created in the step Suggested Citation above into the field - Use the script ``metadator.py -p $series$number`` to create the frontmatter pages for the chapter PDFs. The PDFs are not replaced automatically, but a shell script is created by the script to copy the new files. See https://docs.edition-open-access.de/eoa_metadator/index.html#chapter-frontmatter for details. Final steps =========== - Set the ``Published`` checkmark to publish the book - If the ``eoaforthcoming`` app was used to announce the new publication, remove it from there - Done. Now spread the word!