Export to epub problem

Everything related to our flagship word processor.
Post Reply
Posts: 16
Joined: 2016-02-19 13:26:05

Export to epub problem

Post by Kadah »

Hi, another question from a newbie :-)

So far Nisus really works great for me, its intuitive and allows great customization. But today I tried exporting to epub and noticed the heading problem. My headings are aligned to the center (heading 1) and to the right (heading 2). I use them in the table of contents. But when I export to epub, they are justified. I tried different documents and changing paragraph styles and nothing seems to work. I can later use Sigil to edit the epub document, but why should this be necessary?

One more thing: exporting to pub also makes small caps in headings as well as highlights disappear. How can I change that?

Thanks in advance for your help

Posts: 16
Joined: 2016-02-19 13:26:05

Re: Export to epub problem

Post by Kadah »

Seriously, nobody can help me? It's been a whole week...

Posts: 410
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Export to epub problem

Post by adryan »

G’day, Kadah et al

I am sure someone would help you if they could. A quick search for “EPUB” on the Forum shows that many questions on the subject have never received answers, so I suspect few people here use this feature. I myself have had no experience with EPUB files or iBooks, but I did a quick test and can confirm that Small Caps at least do not get exported correctly to EPUB from NWP.

Unless Martin drops by with some insights, you may be better off consulting an iBooks forum.

Sorry I can’t be of more help.

MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

User avatar
Posts: 349
Joined: 2007-03-31 14:59:22
Location: Frankfurt, Germany

Re: Export to epub problem

Post by Elbrecht »

Hi Kadah –

not used to Export as EPUB – concerning the trick with Small Caps: TWO different kinds of Small Caps get displayed in Nisus. REAL Small Caps are Font generated, "faked" Small Caps are Nisus generated. You got a Font with REAL Small Caps? Otherwise Nisus will "fake" Small Caps for Display for you!

MacBook Pro i5
SSD 840/850 Pro
High Sierra 10.13.6
Nisus Writer Pro 3.2.1

Posts: 323
Joined: 2012-12-19 05:02:52

Re: Export to epub problem

Post by Þorvarður »

Hello Kadah,

If you want highlighted text in Nisus to appear highlighted in programs you export to, then you should use Background Color instead. For the normal eye there is no difference.

I just tested this in iBooks, Clearview, Calibre and BookReader. In all readers the background colors appear as expected. — For further details on the difference between highlighted color and background color see Nisus Writer Pro Help, page 292.

[A note to Martin: On page 292 in Help we can read: "Word only recognizes Highlight colors and ignores Background Colors in RTF." If "recognizes" here means "able to display", then this is incorrect, because MS Word 2011 displays BOTH Highlight colors and Background Colors in RTF. Maybe this should be corrected and updated in the manual.]

I was not able to solve the heading problem.

I usually avoid epub as the plague. The format may not be the best choice if one wants the text to appear exactly as it was written (although bold, underline, italic are rendered correctly.) Apart from different reading modes, the user can also choose between several display fonts (thus overriding the original font), and iBooks allows you to either choose between justifying text to fit columns or breaking lines naturally (see General Preferences in iBooks). All this makes sense from the reader's point of view, but not necessarily from the author's point of view, if he or she wants the text to appear exactly as it was written in NWP.

Not all epub readers display the content in the same way. iBooks, for example, usually shows documents in two columns (unless you choose extra large font size in iBooks), and Heading 1 (treated as a Chapter name?) is at the top of each column, left aligned. Again, this makes sense when you read the text in iBooks, but the output does not look like the original Nisus document. Clearview doesn't have columns; instead you can choose there between a single page, single continuous pages, double pages or double continuous pages.

May I know
  • 1. Which epub reader you use?
    2. Why you prefer epub to PDF?
    3. Why you want heading 2 to align right?

Posts: 467
Joined: 2006-12-08 00:46:44
Location: London or Exeter, UK

Re: Export to epub problem

Post by xiamenese »

To add a bit more to what Þorvarður says—not that I have output anything in ePub, either ...

E-readers give priority to the reader over the author in terms of how the text is displayed. The ePub format seems to be a simplified form of html, and readers come with a very limited set of fonts, none of which has a small caps variant on the e-Reader as far as I know. So, either you would have to find a way to embed the font—and run the risk of IP infringement, unless the font is open software, and even then the reader might not want to use your font—or you'd have to do the work yourself, typing the relevant parts in caps of an appropriate smaller size ... and I have no idea if that would work, but I'd try doing that using Sigil or Calibre anyway.


User avatar
Official Nisus Person
Posts: 4902
Joined: 2002-07-11 17:14:10
Location: San Diego, CA

Re: Export to epub problem

Post by martin »

The replies so far seem to mostly cover everything — thanks everyone! — but I just wanted to summarize:

1. Nisus Writer's "Display as Small Caps" formatting is ignored when exporting to EPUB and HTML. You could instead use the menu Edit > Convert > To Small Caps to manually change the actual characters, so they are exported properly. I'll file a bug on this, as Nisus Writer should handle the conversion for you automatically.

2. The highlight coloring is also incorrectly exported, in that the feature is not supported universally and is lost during the conversion. You can instead use the background color feature, which accomplishes basically the exact same thing. This is again something Nisus Writer should handle automatically, and I'll file it.

3. I had no trouble with centered and right aligned paragraphs displaying properly. I exported an EPUB from Nisus Writer and opened it in iBooks, and text alignment is maintained. What software are you using?

Posts: 323
Joined: 2012-12-19 05:02:52

Re: Export to epub problem

Post by Þorvarður »

martin wrote:I had no trouble with centered and right aligned paragraphs displaying properly.
This inspired me to do some more testing. I finally found out that the wrong heading alignment is related to the TOC.

If a paragraph has a TOC level (where the level is either a part of a style or has been added manually via Tools > Table of Contents > Include in TOC > Level) AND is aligned center or right in Nisus, then the EPUB will wrongly show that paragraph aligned left.

So here is what the original poster has to do before the document is exported:

1) Go to the Style Sheet. Select and delete the TOC level of all heading styles involved.
1.png (24.41 KiB) Viewed 6405 times
2) Use background colors instead of highlight colors

3) Apply "To Small Caps" to heading 2 via Edit > Convert > To Small Caps.

Now EPUB should display the document and all the headings correctly!

If a TOC is created before step 1) is taken, then that TOC will also be exported with the corresponding page numbers, but the numbers will not be active anymore in the EPUB, which of course is a serious drawback.

Post Reply