Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 09-13-2014, 10:52 AM   #31
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Quote:
Originally Posted by kovidgoyal View Post
The DOCX plugin only supports keeping the contents of a single paragrpah on the same page, not multiple paragraphs. If you want to keep a set of paragrpahs together in EPUB you need to wrap them in div tags like this

<div style="page-break-inside:avoid">
<p>
<p>
...
</div>
OK, I have done this:

Code:
<div style="page-break-inside:avoid">
	<h3 id="id_RefHeading__5377_1529499100" class="block_31">Title goes here </h3></ol>
	<ol class="list_1">
	<li class="block_10" value="461">Yadda yadda yadda.<sup class="calibre6"><sup id="back_note_97" class="noteref"><a href="index_split_026.html#note_97" title="97" class="calibre2">97</a></sup></sup></li></div>
	<li class="block_10">blah blah.</li>
but the outcome is that the text after the h3 heading (that is including the "blah blah" bit) has disappeared in its entirety, only to reappear at the beginning of the following chapter.
Arkadian is offline   Reply With Quote
Old 09-13-2014, 11:18 AM   #32
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
With EPUB (as opposed to a traditional static layout format like PDF) you are at the mercy of the renderer, different renderers will have different levels of support for avoid, so the best you can do is put it in and hioe that in time the renderers will be fixed.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-13-2014, 11:21 AM   #33
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Hi Kovid,

it would be fine if it did nothing... Instead it made x number of pages disappear, until the following h1

Besides, forgot to say that in the editor it did do nothing (nothing obvious at least)
Arkadian is offline   Reply With Quote
Old 09-13-2014, 11:55 AM   #34
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The editor is a preview, if you read the notes in the preview panel, before opening any file, you will see that it will not show you any page breaks/page margins at all. So naturally, an instruction to avoid page breaks will not do anything.

And I tried the code you posted, it caused nothing to disappear for me.
kovidgoyal is offline   Reply With Quote
Old 09-13-2014, 01:25 PM   #35
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
OK, I am not one for giving up easily

Have tried again here:

Code:
23 <div style="page-break-inside:avoid">
24	<h3 id="id_RefHeading__5353_1529499100" class="block_31">“Senza zucchero aggiunto*”</h3></ol>
25	<ol class="list_1">
26	<li class="block_10" value="342">blah blah</div> <br class="calibre7"/>nonsense, nonsense, nonsense.</li>
When I the try to check the code within the editor with F7 I get this error:
Quote:
ERRORE: Parsing failed: Opening and ending tag mismatch: div line 23 and ol, line 24, column 48****[Zucc_agg_013.html]
What has gone awry?

If I go down the "automatic fix route", the </div> gets moved to the end of the h3 line, but that is not going to be of much use, is it?

If I try and position the end div elsewhere, I get the same error... it wants to be ONLY at the end of the h3 line.
Arkadian is offline   Reply With Quote
Advert
Old 09-13-2014, 01:58 PM   #36
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,871
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
HTML tags have to be nested properly. You cannot insert a closing tag before the closing tag of a child. That means you have to do this:

<div>
<h3></h3>
<ol>
<li>...</li>
</ol>
</div>
kovidgoyal is offline   Reply With Quote
Old 09-13-2014, 04:41 PM   #37
Arkadian
Connoisseur
Arkadian began at the beginning.
 
Posts: 96
Karma: 10
Join Date: Mar 2014
Device: none
Sorry about that. I thought I had allowed for that, but clearly not... I have been more careful now and it works like a charm.
It will be a bit tedious to have to edit all those strings, but there you go

THANKS a lot
Arkadian is offline   Reply With Quote
Old 09-13-2014, 06:21 PM   #38
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Arkadian - I see that Kovid has helped you solve the problem.

I had a look at your OTT file, couldn't find an OTT to DOT(X) converter that worked, so I used brute force, looked at in HEX, and that gave me a clue as to how to wrangle into Word.

Can I ask how 'well' you know Open Office Writer. From what I can see from that test OTT you haven't used Writer's template feature as I suspect it should be used, which I assume is like Word's templates should be used, given Writer is reverse engineered Word.

Don't worry, you're not alone, most people don't use Word's templates as they should be used.

Let me know if you want to take this fork of the thread (fix the problem at source) any further. If you do then I'd probably first suggest you try BobC's suggestions. Then I'd probably suggest you try attaching Writer's default template to the document.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Left border for text within paragraph democrite ePub 7 09-19-2013 03:26 AM
Preventing Page Title from Being Inserted into Article Text buffaloseven Recipes 0 07-25-2013 11:39 PM
Paragraph text alignment in Fixed-Layout EPUB Raja1205 ePub 0 05-11-2013 02:55 AM
Continuous text with no paragraph breaks midlifec Calibre 1 12-26-2010 04:09 PM
Text Analysis & Paragraph Detection ahi Workshop 15 09-14-2009 11:28 PM


All times are GMT -4. The time now is 11:36 AM.


MobileRead.com is a privately owned, operated and funded community.