Page 1 of 1

reflowable epub

Posted: Wed Oct 14, 2020 1:49 am
by Amontillado
First up, I don't know much about epub format, but I'm trying to learn.

Is there a way to generate a reflowable epub document with Mellel?

The fixed layout is superior for control of things like tables, but for a text only presentation, reflowable text has some appeal.

Is that an option?

Re: reflowable epub

Posted: Wed Oct 14, 2020 4:30 pm
by Eyal Redler
Yes, it is an option. In fact, it is the only option at the moment. The epub export only supports refloable ePUB.

Re: reflowable epub

Posted: Wed Oct 14, 2020 4:51 pm
by Amontillado
Ok, that's actually better for my purposes, anyway.

I notice that each line in the output I'm getting is bracketed in a "p" tag, and that's why I thought it wasn't reflowable.

The default novel template may help, too. I'll experiment further.

Re: reflowable epub

Posted: Wed Oct 14, 2020 6:29 pm
by Amontillado
Stop the presses, I think I know what must have happened. I used some sample text from Project Gutenberg to test epub export, and I'm morally certain I imported newlines at the end of every line in the text.

I'm not where I can test right now, but thought I'd post this in case anyone thought the fault was Mellel's. I'm pretty sure I just proved the old axiom, garbage in, garbage out.

Many thanks for your reply, Eyal.

Mellel is an awesome tool. It's a lightsaber, not as clumsy and random as Microsoft Word.

Mellel is an elegant weapon for more civilized ages, and I'm very happy with it.

Re: reflowable epub

Posted: Wed Oct 14, 2020 7:28 pm
by Amontillado
That was it. Once I stripped out the extra newlines, all was well in the exported epub.

Redemption in one Python statement, assuming =-= didn't appear in the text of Masque of the Red Death:

open('masque1.txt', 'wt').write(open('masque.txt', 'rt').read().replace('\n\n', '=-=').replace('\n', ' ').replace('=-=', '\n'))

Now, if only my prose was less confused than my code. Sigh.