06-22-2019, 09:46 AM | #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 |
06-22-2019, 10:12 AM | #2 |
Sigil Developer
Posts: 7,637
Karma: 5433388
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. |
06-22-2019, 10:26 AM | #3 |
Well trained by Cats
Posts: 29,785
Karma: 54830978
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 > |
06-23-2019, 06:03 AM | #4 | ||
Groupie
Posts: 183
Karma: 266070
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
|
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> |
||
06-23-2019, 10:42 AM | #5 |
Well trained by Cats
Posts: 29,785
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
06-23-2019, 11:28 AM | #6 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Well, I enjoyed the first three sentences anyhow.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil Error Message: Book File Would Not Open in Sigil | fkustaa | Sigil | 5 | 03-18-2017 12:54 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 |