Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
4

InDesign 19.0 incorrect epub output

Explorer ,
Nov 06, 2023 Nov 06, 2023

I've learned that:

 

if there's a single line terminated by a hard return and the text is center-justified,

then upon export to ePub (reflowable) that line will be left-justified.

The fix is to use regular centering, unjustified.

 

If the center-justified section is more than one line (before the hard return) all's well.

 

 

 

 

TOPICS
Bug , EPUB , Import and export
258
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2023 Nov 06, 2023

Center justified always only applies to the last line, regular centering centers all text. So for a single line, center justified makes no sense. What you see is expected.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 06, 2023 Nov 06, 2023

Perhaps I was unclear (and I did say something that wasn't so...namely that if there's more than one line it's OK).

I have a paragraph style that calls for "center justify" in "Alignment," under "Indents and Spacings." When I apply this to text, typically something like the copyright page of a book, the text is centered exactly as I expect, the PDF export is as I expect, and all's well. Never had a problem there, and I've been doing this for more than a decade.

 

But recently, when I go to export an epub, the formatting I see on my screen -- the formatting that exports perfectly for print -- is not exported properly -- in the ePub, pulled to the left margin and thus no longer centered.

 

If I change that style to simply "centered," then the ePub export works properly.

 

Do I need to post screen shots?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2023 Nov 06, 2023

HTML/CSS does not support the elaborate left-center-right justification of the last line that ID does. (I think the statements exist in the compleatist CSS set, but are not supported in most browsers or in any EPUB readers. I'd have to experiment to see exactly what ID exports in this case.)

 

Stay with simple left-center-right text alignment for EPUB export. Even justified text is questionable because most readers offer the user the alternative of ragged-right or fully justified display, regardless of the text coding.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 06, 2023 Nov 06, 2023

Thanks. I knew some of that, having learned it the hard way when setting poetry books and the right margin is OK in print, but not in epub. Fortunately, most people who read poetry don't read ePubs (or so we hear at our press).

 

I only posted because this behavior is new to me. The books (print and epub) I was making over the summer didn't show that behavior. I don't recall changing any part of my workflow.

 

Bottom line is that I'll make sure it doesn't happen again, now that I know how to prevent it.

 

And...off to Amazon to get your book. Learning new stuff is good (and keeps me young...I'm 80).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 06, 2023 Nov 06, 2023
LATEST

Well, thanks (on the last). I hope you find it worthwhile.

 

It's important to keep in mind that not every layout point reaches an EPUB book — sometimes that feature isn't supported at all by the EPUB structure, and sometimes the app just doesn't export it well. This justification issue is, I think, the first case: HTML/CSS/EPUB just doesn't support it fully. But tables and lists, for example, are exported a bit erratically by InDesign, and there is much room to tweak both using CSS export styles. (ID does not export any parameters for <ul> and <ol>, for example, making overall table positioning a bit random; it does not export padding at all, making a number of spacing issues, especially in tables, clunky. But CSS allows override and refinement of both.)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines