View Single Post
Old 11-25-2022, 01:26 AM   #9
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by MgHar View Post
Then I paste text within a <p></p> tag (the text might be 50 to 100 pages long, divided in hundreds of paragraphs)
Are you trying to copy/paste an entire book?

This would be much better if you CONVERTED between formats instead.

- - -

For example, if you have a DOCX of your book:

It wouldn't be smart to:
  • Copy your document + try to paste into Calibre...

Instead, you'd:
  • Use Calibre to convert DOCX->EPUB.

This will carry over all your paragraphs.

Quote:
Originally Posted by MgHar View Post
If my texts had only 10-20 paragraphs, I would add the <br/> tags manually. BUT with hundreds of paragraphs, the process juste becomes too much.
If HTML+CSS seems a little too complicated for you, you may also want to:

Do this in a word processor. (Microsoft Word, LibreOffice, etc.)

You could:
  • paste your text in there
  • do some cleanup
  • then convert that document into EPUB via Calibre.

Watch these 2 amazing videos:

and within <30 minutes, you'll learn how to create very clean documents (which can then be turned into very clean ebooks!).

Quote:
Originally Posted by MgHar View Post
The immediate result (visible in the preview pane of the editor) is that the text loses its paragraphs (which is normal with a p tag) BUT the text will dynamically auto-adjust the wrapping, regardless of the e-reader settings (that's an essential upside) (please see Capture 1 file attached).
Like the others have explained... in HTML:
  • <p> stands for paragraphs.

You do not hit "ENTER ENTER ENTER" to "create empty lines between paragraphs"...

You actually mark each paragraph as paragraphs!

BAD:

Code:
<p>This is paragraph 1.<br/>
<br/>
This is paragraph 2.<br/>
<br/>
This is paragraph 3.</p>
GOOD:

Code:
<p>This is paragraph 1.</p>

<p>This is paragraph 2.</p>

<p>This is paragraph 3.</p>
Quote:
Originally Posted by MgHar View Post
In Capture 2 you'll see that I've added "<br/><br/>" to lines 14, 16 and 18. The result is visible in the preview pane. The paragraphs are now separated AND if I adjust the preview pane width, the wrapping will auto-adjust perfectly, and the paragraphs will remain separated. That's the result I'm looking for.
I think you have to go completely back to the basics.

Do you know the basics of HTML? Do you know (at least a little) CSS?

With CSS, you can adjust the look of your entire book with a few lines.

Do you want your paragraphs to look like a typical book?

Code:
p {
	margin-top: 0;
	margin-bottom: 0;
	text-align: justify;
	text-indent: 2em;
}
Do you want your paragraphs to have a gap between them all?

Code:
p {
	margin-top: 1em;
	margin-bottom: 0;
	text-align: justify;
	text-indent: 0;
}
That's the power of marking your "paragraphs as paragraphs" + using CSS.

The 1st one says: "Hey! Give me an indent + don't put a margin on top!"

The 2nd one says: "Hey! Put a margin on top + don't give me an indent!"

Last edited by Tex2002ans; 11-25-2022 at 01:31 AM.
Tex2002ans is offline   Reply With Quote