I’m facing an issue with the exported ePub files using the Web Book as EPUB command. I receive the following error message when I open the generated book in Apple Books: It is formatted incorrectly, or is not a format that Apple Books can open.
The sample collection Trip Book - Sample works fine when exported to ePub but my own collections do not.
I have a separate metadata file for ePub for each collection.
I have even used the same metadata file from the sample collection - but still face the same issue.
First note does not have Seq field as suggested by the Knowledge Base.
All notes have Seq field as suggested by the Knowledge Base.
By the way, when I open the ePub file in Calibre viewer, I see that ToC of the generated ePub has 3 levels. I wonder if there is a way to change this to unlimited levels, or user set levels?
Sorry you’re having problems. Any chance you can send me the collection you’re trying to export? You can zip it up and email it to me at hbowie@mac.com, if you would like me to look at it.
Two of these were reported with the following message:
The element type “br” must be terminated by the matching end-tag “</br>”.
I checked one of these, and it was some code you had inserted directly, not anything that Notenik had generated. Looked like you used <br> instead of <br />, which is required for XHTML. (See here for reference.) EPUB still requires strict XHTML.
The other three errors were reported with the following message:
The entity name must immediately follow the ‘&’ in the entity reference.
These were all caused by bugs in Notenik.
I’ve been able to supply a quick fix for one of these problems, responsible for two of the error messages, and the 16.5.6 beta should incorporate this fix. If you can test and validate, that would be great.
It will take me a little longer to look into the other error (perhaps a day or two or three). In the meantime, though, it seems to arise with cases where an ampersand is used without a following space – as in B&L and M&D.
Beta worked fine—at least Apple Books could open it.
1. I replaced <br> with <br /> in the Markdown files, which fixed the rendering error.
2. I’m still seeing some weird layout issues in Apple Books: some pages have smaller fonts, the text doesn’t reflow properly onto the next page, and in some cases, parts of the text seem to be missing.
I’ll wait for you to address the issue on Notenik’s side before checking further into the layout problems.
See the 16.5.7 beta for a fix to the other problem you ran into, which was a failure to replace an ampersand with a valid entity character reference.
See if the Text Edit Note... and Show in Finder commands are working now. I’m not sure what the problem might have been previously, but those commands are working for me now.
In terms of your formatting issues, I wonder if Apple Books is trying to apply justified paragraph formatting to your text (meaning it’s trying to provide a nice neat straight right margin to all of the lines in your paragraphs other than the last)?
On certain pages, the text appears smaller, and when navigating back and forth between pages, the font resets to the default size.
Layout issues and missing content occur when the window size is set to display two pages side by side. Increasing the window size resolves this, and the missing text becomes visible. Reducing the size to show a single page also fixes the issue.
I’m not sure whether this is a bug with the Books app or related to the EPUB export.
Checked with the iPad (18.3.2) and layout issue is similar. Single page has no issues, two-page larger font has missing text, two-page smaller font has no missing text, By the way I’m on Sequoia 15.3.2.
Oddly, the text in Books does not take full width even though the margins are set to zero in the setting. Text is set to aligned left in Books. I think I have some properties in CSS that are causing the issue.!?
Please let me know if you need any additional information.
Well, first of all… thanks for doing this! It’s pretty cool to see what you’re doing, and to see your Notenik-generated EPUB file open within Apple Books! I have a hard time thoroughly testing all of the functions I’ve added to Notenik, so this is great!
Next, glad the fixes made so far are working. Thanks for confirming.
In terms of your page layout issues, you may want to look at the CSS you are using. In general, for EPUBs, you probably want to provide the absolute minimum CSS needed, so that your CSS doesn’t get in the way of anything your EPUB reader is trying to do.
One thing in particular that might be messing with font sizes is the use of the em unit of measure for sizing, as opposed to rem units. The em sizing is always relative to the element’s context, so it can mess you up if the context changes (which it might well do within an E-Book reader).
There’s a couple of ways that should work for making adjustments to the CSS used for the EPUB.
One way would be to preserve the EPUB folder generated as part of the process, and then change the CSS file in there. Then when you rerun the export, the process should respect the existing CSS file and use it without any changes.
Another way might be to create a css folder for your collection, and then a CSS file in there named something like epub.css. Then you can select that file within your Collection settings before performing the EPUB export, and easily switch back and forth between your EPUB css and your regular css, right within Notenik. (But then make sure not to preserve the aforementioned css file, since that would override this one when generating the EPUB file.)
Let me know if further questions, and if any of this helps.
Thanks for your response and guidance. I started tweaking the css file, and will experiment with different outputs. After some trial and error I’ll report the outcome.
By the way, I still have the same issue with text editing and revealing the file in finder commands. Neither of them work. I did clean install of the software, but it did not fix the problem. Somehow the problem is resolved now. [quote=“hbowie, post:7, topic:667”]
See if the Text Edit Note... and Show in Finder commands are working now. I’m not sure what the problem might have been previously, but those commands are working for me now.
[/quote]