Tips for eBook, structure and format

Embarking on my first Scrivener project, I reach out to experienced users for advice. I hope this is not too broad for the forum. Here is my project: I am writing a “guide book” based on my ancestors’ whereabouts in Norway. Here is the general structure:

· 15 Chapters, one for each of Norway’s counties

· In each chapter, several Sections for the relevant municipalities (about 200 sections total )

· Each section has text, a few images, and in some cases sub-headings (within the same file)

The texts will refer to ancestors by name and to names of locations (farm names, street addresses etc.) all embedded in general prose. The end result shall be an Ebook (EPUB), to be read while sightseeing in a locality.

These are my preliminary choices for Scrivener:

· Start with the General Non-fiction template

· Chapter: Type = Chapter Heading; Section: Type = Section

· Use file/folder names as headers for chapters and sections

· Any imported files from Word “cleaned” by Documents->Convert->Text to default formatting. Check that both main section header and all header numbering have been deleted

· Regular text with No Style, but using Bold or Italics for emphasis. Sub-headings within sections defined with style Heading 2. Captions for pictures in style Caption.

· Chapter folders have no text, but may hold an image

· Scale down most images to reasonably small size (whatever that is). Make each image a separate “paragraph”, and the same for captions. Center both image and caption.

In Compile, I am looking at these adaptations:

· Use Compile for ePub3 and, initially, the eBook format

· Redefine Chapter and Section layouts to get appropriate font, size, and color. Check boxes for both ‘title’ and ‘text’ in the Chapter header layout. Define color and font for Heading 2 and Caption.

· Save as “my eBook” format

· No table of contents (the eBook reader should provide this)

My initial tests raised these questions:

· Are there ways to make the Chapter front pages (header + image) a little more fanciful than just a one-word header and an image below? E.g. the title superimposed on an image?

· Each place name and address could be linked to Google Maps. What is the best way to do this and maintain readability of the eBook? Or maybe drop the whole idea?

· There will be an appendix with a comprehensive “Ahnentafel” (structured list of ancestors). A way to cross-reference from a person in this appendix to where in the book he/she appears could be interesting. The same in the other direction, from name in text to the appendix. Or is it easier to rely on the standard search function in the eBook reader?

· What is the best way to ensure that images and captions appear without disturbing the flow when reading the eBook?

Any other tips?

one suggestion would be using image placeholders and you can set screen width for various ebook readers. you can even create using photoshop or similar software and image and superimpose the chapter title if you wanted. (in that situation you might uncheck the title). If your placeholders are custom metadata then you could have a different image for each chapter.

Look at this article on my website- How to include images when Compiling in Scrivener — My Writing Journey

This article discussing compiling images with examples and step by step guides. Compiling with Images — My Writing Journey

If these help, please sign up for a future newsletter on my site. I am add articles all the time. (Not recently as doing the first draft of the second book in a horror series up to 69,000 words towards a target of 90-95,000 words.

Superimpose: No, You should place the title inside the image.

Google maps: Yes, just create links

Appendix: Yes, look up Glossary. (Mastering Scrivener has a chapter about it)

Images: Just center the images, floating left or right could cause issues in some e-readers.

Scrivener won’t export Publisher Fonts, but you can embed them using Sigil if you want.

For a non-fiction book, a Contents page inside the e-book would be helpful. Scrivener can also create such a page.

You may need graphic design software for the final layout. Remember, Scrivener is for writing…

2 Likes

Thanks, AntoinDol, those were useful comments. I will look into the use of Glossary for my cross-referencing.

As for the ToC, the eBook readers I use, both on PC and iPad, show a Contents page without it being generated in Scrivener. To me that seems sufficient.

Thanks, GoalieDad. Your articles are now on my reading list. Always good to stand on the shoulders of experienced users.

Yes, in fact we demonstrate the basic concept of how one can do that, in our stock “Ebook” compile format:

  1. Double-click the “Ebook” compile Format in the left sidebar to edit it.

  2. In the CSS pane, expand the window a bit if necessary, and have a look through the “Custom Stylesheet” column. At the top you will find two declarations for the .bordered-title selector, and the .bordered-title + subtitle selector. These will add a single-pixel rule above and below the heading block, and manage internal spacing a bit for two-line headings.

  3. How do we get these classes being referred to? Click on the Styles pane for that, and note there are two styles in this list that match the above:

    • “Bordered Title”
    • “Subtitle”

    So by default Scrivener makes the style name CSS-friendly (bordered-title) and uses it on assigned text in the HTML, meaning you can then write CSS to change how it looks directly, implementing designs that the basic Section Layout and Styles features themselves do not support—such as adding rules, or compositing text with a background image. For example, since Bordered Title is set to function as a Heading 2 element, in the Format Bar, we would expect to see HTML something like this being used for it:

    <h2 class="bordered-text">Chapter Twelve</h2>
    

    Also of note here, in the Styles pane, is the CSS Class Name field on the right. Left empty it works like I described above, but you can give your own class name if you already have stylesheets written, or just want to use your own naming convention, whatever.

  4. Now for how those styles themselves are used, go into Section Layouts, and select any of the layouts ending in “(Bordered)”. For example, with “Chapter Heading (Bordered)”, I click into the “CHAPTER ONE” sample text in the Formatting tab, then the Styles button, and see it is assigned to the “Bordered Title” style. So now any binder item with a Section Type that is assigned to use this layout will be given a predictably classed heading that I can add advanced custom CSS for.

    Of course, you are not limited to using the compiler for style management. Styles assigned to text in your writings will also get CSS class names (whether they are in the Format’s style list or not), and this is how you can do such things as adding call-out boxes.

  5. In an abstract way, I would also draw your attention to the Settings tab in the Section Layouts area, where the ideas was to add a CSS class to the whole section (around the title and all content, as well as child binder item content), which puts it into a div in order to do so, nesting divs if different binder items use Layouts with this setting). So that would be useful if you want to implement larger-scale designs. But unfortunately it was never implemented, and all we have this label in the GUI. I mean it does kind of do something, but in a way that isn’t at all useful. I point it out though because someday that will be fixed.

What is the best way to ensure that images and captions appear without disturbing the flow when reading the eBook?

I’m not sure what this means. Back in the “Custom Stylesheet” column, you will see that we do add some CSS to keep caption and figure glued together, so they don’t break across pages. If that’s all you mean, you’re all set.

Each place name and address could be linked to Google Maps. What is the best way to do this and maintain readability of the eBook? Or maybe drop the whole idea?

Yeah I wouldn’t say that would be particularly good, you’d want maps that are designed to display well on black and white devices, for eInk readers for one thing, but probably also with a little control over what is on the map.

I would suggest looking into OpenStreetMap utilities, which is a global project to create open and free maps (this link is to the main page, which does have a map browser, but generally you will want to find a packaged “app” that adds familiar features). Better to support efforts like that, in my opinion. It wouldn’t surprise me if there is a tool or workflow for making its map data look better for eink screens. Since you can download the tiles yourself and edit them locally, you don’t necessarily need external tools to help with that.

Search the forum for specific questions! We have years and years of discussions on specific implementations like glossaries, floating boxes, drop caps, etc. The ebooks tag is often used for such queries, and can help with narrowing down searches.

3 Likes

Wow, Custom Stylesheets/CSS - there is another rabbit hole to jump into :grin: Thank you for showing me that possibility. I will file that for later and play around with CSS in a test file before I compile my project. And if I run into problems (which I’m sure I will) I will definitely search the forum for specific suggestions. I have already found some good answers there.

1 Like

Perhaps use your project to do this. and in the course of your project compile frequently and often. do not wait till the end.

1 Like

Generally I agree with that, but there is definitely something to be said for designing in an environment made for it. In Sigil for example, in the lower left of the preview split you can click a code button which opens a typical webkit browser development environment. In the CSS sidebar—which features code completion, arrow key value nudging, colour pickers and other conveniences—all changes made are reflected in the previewer in real time. Furthermore the way it presents formatting shows the cascade, helping you identify why something may not be responding the way you thought it did.

Not sure if you want 0.78em padding or 0.72em? You’ll know immediately in Sigil.

And when you’re done you paste all of the refinements and design back into your compile format’s CSS tab.

And that’s for geeks that know web design. You don’t have to, and there are tools for generating CSS from friendlier controls that could also be used to copy and paste the results.

1 Like

… which does not include me. You lost me a while ago, but made me aware of some of the tools available if and when I need them. Thanks.

1 Like

I looked at your “Compiling with Images” article. Many good hints! In item 4 in your initial list, you write “When compiling to Epub or Mobi make sure your image name does not contain any special characters in it.” What constitutes a special character in this case? Non-English letters like Ø and Æ? Spaces? What about hyphens (-), underscore (_), any other characters?

I ask because in my initial tests, compiling to Epub wreaks havoc on my images. Some images are not shown (only referenced by file name and a “broken link” icon). Others end up in the wrong place of the document, where another image is supposed to be. The same project compiled to pdf looks just fine. I have included my images first as “Image Linked to Document” in the Research folder, where all these png files are located. Secondly I tried to convert them to Embedded Image and recompile. Same result in the Epub, which tells me that the file name is not the problem in my case.

All my images are scaled to 300 points width. I would prefer not to use <$img:imageName> placeholders for the images, but one of the Insert Image commands if possible. Which ones are safe for Epub compilation?

1 Like

This sounds like User error to me. Both methods should work just fine.

I’d unzip the e-pub file to check its structure and repair the links.

Also, check if your filenames are capitalized, ‘cause Case sensitive.

Run a Validator to find the issues with your files or links.

1 Like

If you want to see the images rather than tags consider placing the image in the Inspector notes so it is available, but won’t be compiled unless decide to include notes. You will see what will be included, but the placeholders have the ability to to give more control and if the image appears too small or large, you adjust placeholder settings rather than resizing the image which does not change the file size.

It seems the issue is with some of the image files themselves (but only in epub). I now tried using the <$img:xxx> command (without parameters) for these images, and the same thing happened: broken link icon where the image should be, and images being misplaced. Is there anything with such .png files I should be aware of, like size, resolution, color profile or anything else? They are generated by Save as Picture (.png) from a Word document, then moved to the Research folder. PDF accepts them, EPUB does not.

Where do I find the Validator? You are probably right that this is caused by a user error, which is why I am grateful for this forum.

Actually, their is a cap in file size from the platform Scrivener is build on. Try smaller versions.

Look for epub-Checker by German company Pagina for a Validator. Needs a Java runtime.

Sigil has a Validator built in.

1 Like

If you can snapshot a picture of the image titles you are using and the size of the image, with some specific titles and show us a list of some image tags you are using may help. Not providing a size parameter may be an issue for the ereader. try this format. The issue can be names with letters not recognized by the HTML formatting, which does not effect PDF outputs.

<$img:Portait of Dickens.jpg;w=468h=Height;ebook=50%> (Portrait of Dickens is the name of the jpg file. You must match capitalization as well. Give a pixel dimension for width (in this example) or height and do not need both. I would an ebook percentage to help for various ereaders.

1 Like

Yes, I would simply produce a JPG cover using whatever design/image program you use and then import it into ePub using Sigil, which makes it easy.

Make it 1600 x 2560 pixels in size as that is the size recommended for Kindle. All the different readers I have tried (about 6 including Apple Books—I’m on a Mac—Readest, Yomu, FBReader and others) all work well with that size.

:slight_smile:
Mark

1 Like

Before preparing screen-shots etc., I tried deleting all images and reinsert them using Insert - Image Linked to Document. And now all images suddenly appear where they should, with no issues. I have no idea what was different on this second attempt.

By the way: My images varied in size from 35 kB to 9 MB. I scaled down the largest one using Scale Image after Insert, but left the others unchanged. All of them are shown reasonably well. Thanks for offering good advice along the way, both of you.