![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Jun 2019
Device: ehh
|
need help with sigil
so i have a ebook (epub) with over 1000 individual files in it. the problem im having is that not all of it is formatted properly, i have text that is not located within <p></p>. my question is is here a way to place all the non formatted text into <p></p> with out having to do it manually for each chapter
</head> <body> <h1>chapter 1</h1> text <p>text</p> <p>text</p> text |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,761
Karma: 5706256
Join Date: Nov 2009
Device: many
|
You could wrap everything inside the body tag with a "div" or "section" tag if that is more appropriate. Then you use regular expression find and replace to replace the opening body tag with the opening body tag followed by an opening div tag, and then replace the closing body tag with a closing div followed by the closing body tag.
Also why on earth does any ebook have 1000 chapters. Something must be very broken or it is a fixed layout with 1000 pages of text. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
First, lets be clear:
This is NOT a Sigil (or any other editor, caused problem). This is a terrible ('Naked Text') ,coding issue. that can be fixed using a decent editor like Sigil ![]() Code:
</head> <body> <h1>chapter 1</h1> text <p>text</p> <p>text</p> text </p> <<< I assume this is the second case first: Code:
Looks for naked between a /H1 at the end of a line and a P tag at the start of a line Search: </h1>\s+(.+?)\s+<p> Replace: <h1><p>\1</p> <p> Code:
Search: </p>\s+(.+?)\s+<p> Replace: </p> <p>\1</p> <p> ![]() Last edited by theducks; 06-23-2019 at 10:43 AM. Reason: removed stray > |
![]() |
![]() |
![]() |
#4 | ||
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 191
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
|
Please,
Quote:
Code:
Search: </h1>\s+(.+?)\s+<p> Replace: </h1> <p>\1</p> <p> Quote:
Code:
Search: </p>\s+(.+?)\s+<p> Replace: </p> <p>\1</p> <p> |
||
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,048
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,519
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Well, I enjoyed the first three sentences anyhow.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil Error Message: Book File Would Not Open in Sigil | fkustaa | Sigil | 9 | 04-27-2025 05:11 AM |
Sigil-0.8.900 released for testing - Wait for Sigil-0.8.901 | KevinH | Sigil | 106 | 10-04-2015 10:41 AM |
Sigil on Nook vs Sigil on Kobo vs Sigil on iBook | rosshalde | Sigil | 12 | 11-13-2014 09:34 AM |
Sigil 0.3.4 / Sigil 0.4.0 RC1 / Cover in Nook Color | Bertrand | Sigil | 13 | 08-06-2011 04:06 AM |
Sigil 0.3.4 / Problème CSS entre Sigil et iPad | Grivels | Software | 10 | 07-03-2011 09:06 AM |