Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-28-2020, 04:16 PM   #16
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Best advice is in #12

What you have now in sigil is probably too messed up to fix.

STOP using sigil STOP using regex.

Go back to a good quality word document , save that as docx, then add it to calibre and let calibre convert it to epub. That will give an error free epub
stumped is offline   Reply With Quote
Old 03-28-2020, 04:31 PM   #17
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,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by LittleMissS View Post
I am not sure why I can see an emoji inserted within the code above when I preview my reply to your reply! Would that be in the code in Sigil / epub - or only in here, maybe because I used the bold?
That's a MobileRead thing. It automatically changes :p into .

In order to disable that:

1. Press the "Go Advanced" button to get into Advanced posting mode.

2. Below your post, and the "Submit Reply" + "Preview Post" buttons, there's a checkbox for "Disable smilies in text". Check that box.

Sadly, you have to check the box each time, but you only need to check the box if you see smilies you don't intend.

Quote:
Originally Posted by LittleMissS View Post
I don't want to remove all the incidents of p> unless I know that is what I must do.
As others have already put their fingers on, this was definitely a bad Find&Replace job.

Quote:
Originally Posted by LittleMissS View Post
Do you know if there is an extensive list of code to search for and swap / remove?
If converting from Word's DOCX format, a better choice is:

1. Go back and create a clean Word document (using Styles).

2. Convert using tools so you won't get all the garbage Word code in the first place!

In 2019, I wrote a bit about this and linked to a few resources.

On Styles, I really like these two videos:

Word 2013: Use Quick Styles
How to REALLY use Microsoft Office: Word Styles 101

And on super clean conversion, I recommend Toxaris's EPUBTools. This is a add-on for Microsoft Word (Windows only), that outputs extremely clean EPUBs. All you'll have left is your basic HTML: <h1>, <p>, <i>, [...].

Note: Or you can use Calibre, or for more advanced users, DiapDealer's DOCXImport Sigil plugin, or even as a last resort, Word's "Clean HTML".

Once you have the clean Styles in the first place, all future cleanup is MUCH easier no matter the conversion methods.

Quote:
Originally Posted by LittleMissS View Post
So far, code I have either deleted or swapped has been
about 700 lines of a hgue bock of code following Cubbon Sigil video. https://www.youtube.com/watch?v=A_Z8aQeEMmg
Do not follow that video.

Regular Expressions (Regex), while extremely helpful and powerful, are much more intermediate/advanced.

* * *

For example, let's say you wanted to "find all the numbers in the book and replace them with 999":

Code:
2 doctors, 3 horses, 678 toys.
With normal Find&Replace, you would have to individually search for:

Find: 678
Find: 3
Find: 2

then replace all with:

Replace: 999

and you'd probably make mistakes, errors, miss lots of numbers.

With regular expressions, special symbols can be used to search for entire groups/categories/multiples of things:

Find (Regex): \d+
Replace: 999

In regular expressions, \d is a special symbol for "any number" and + is a symbol for "1 or more".

So in plain English, what the regex is saying is "Look for 1 or more of any number, then replace with 999".

* * *

What that video is giving you, are a lot of symbols (/[]*>), which are very easy to mistype/break... ESPECIALLY if your initial document is full of gunk.

Another common error is people accidentally forget to switch of Regex mode, then continue doing their normal Search/Replace, but it's too late, they already used a special symbol and replaced a lot more than they intended (only recognizing the broken <p>p> an hour later... and who knows what else they accidentally deleted).

Last edited by Tex2002ans; 03-28-2020 at 04:38 PM.
Tex2002ans is offline   Reply With Quote
Old 03-28-2020, 09:20 PM   #18
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by stumped View Post
Best advice is in #12

What you have now in sigil is probably too messed up to fix.

STOP using sigil STOP using regex.

Go back to a good quality word document , save that as docx, then add it to calibre and let calibre convert it to epub. That will give an error free epub
A good quality Word document is using Styles and not select and apply non-style stuff. So if it's not properly using styles, it's not a god quality Word document.
JSWolf is offline   Reply With Quote
Old 03-29-2020, 12:26 AM   #19
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,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by stumped View Post
What you have now in sigil is probably too messed up to fix.

STOP using sigil STOP using regex.
Agreed.

In the least worst case, it may have just changed a:

Code:
<p class="something">This is an example.</p>
into a

Code:
<p>p>This is an example.</p>
and was a simple copy/paste or typing error.

More likely, the complex regex accidentally deleted text you haven't noticed:

Code:
<p class="something">The boy crossed the road.</p>
Code:
<p>p>he boy crossed the road.</p>
As you + my post mention, probably best to go back to the original Word document, do a clean conversion, and avoid using regex for now. Regex is a more intermediate/advanced tool, and you should be very careful when using them (and NEVER blindly "Replace All" unless you have fully tested the regex and become familiar with how they work).

Last edited by Tex2002ans; 03-29-2020 at 02:48 PM.
Tex2002ans is offline   Reply With Quote
Old 03-29-2020, 01:51 AM   #20
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by JSWolf View Post
A good quality Word document is using Styles and not select and apply non-style stuff. So if it's not properly using styles, it's not a god quality Word document.

in this context "good quality" simply means " well written".

The OP has had enough contradictions and headaches inflicted by posters here already and does not also need god quality [sic] "advice" on how to use Word

I am saying < to All > stop telling the OP to acquire new skills and tools.

Do the writing, and editing in word. When you are happy with the final product, us calibre to convert word ( docx) into epub, automatically. Calibre will not introduce epub errors.

if you intend to sell the epub, then hire a professional, to work on it for you. For your own use or to give away, a calibre conversion is fine. No one needs to look under the boonet or admire the elegance of the code, it jsut needs to work.
stumped is offline   Reply With Quote
Old 03-29-2020, 02:15 AM   #21
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,400
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by stumped View Post
if you intend to sell the epub, then hire a professional, to work on it for you. For your own use or to give away, a calibre conversion is fine. No one needs to look under the boonet or admire the elegance of the code, it jsut needs to work.
No one may need to look under the bonnet but some of us are driven to do so. We are, IMNSHO, a relatively small group but we tend to be very vocal.

For my own use, I do tend to have a rather boring style I apply. For giving away to others? There you do have start making allowances for the differences between renderers. For example, the person who want to email your work to their Amazon device (real or virtual) since that requires mobi format with all it's quirks.
DNSB is offline   Reply With Quote
Old 03-29-2020, 08:46 AM   #22
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by Tex2002ans View Post
I accidentally responded to the wrong thread:

https://www.mobileread.com/forums/sh...5&postcount=13

(Asked mods to transfer the post here, so hopefully it appears in this topic soon.)
Now moved.
pdurrant is offline   Reply With Quote
Old 03-29-2020, 08:50 AM   #23
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by stumped View Post
in this context "good quality" simply means " well written".
No it doesn't. Well written refers to the book. Good quality refers to the formatting. The only way to have good quality is with styles.

Quote:
The OP has had enough contradictions and headaches inflicted by posters here already and does not also need god quality [sic] "advice" on how to use Word
Your the one who said to start over with a good quality Word document. I was just defining what that means.

Quote:
I am saying < to All > stop telling the OP to acquire new skills and tools.
You did start this with suggesting going back to a good quality Word document.

Quote:
Do the writing, and editing in word. When you are happy with the final product, us calibre to convert word ( docx) into epub, automatically. Calibre will not introduce epub errors.
This is, given that you don't want the OP to have to learn new skills, If styles are not used in Word, then you can end up with a document that's a real mess and it's more difficult to clean the code in the ePub then it is to use styles.

Quote:
if you intend to sell the epub, then hire a professional, to work on it for you. For your own use or to give away, a calibre conversion is fine. No one needs to look under the boonet or admire the elegance of the code, it jsut needs to work.
You do need to look under the hood if it's not just for yourself. Messy code can cause problems. In another thread someone was having problems with recently created ePub from Project Gutenberg. I managed to get the code to validate with Calibre's validater and epubcheck but the ePub caused ADE to crash. It was a 100% unneeded CSS entry that once deleted fixed the crashing. The messier the code the more chance there is that it can cause a problem. You don't know what software will be used with this ePub so you want to to work in as many cases as possible.
JSWolf is offline   Reply With Quote
Old 03-29-2020, 08:56 AM   #24
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
This war's over before it begins. Return to helping the OP solve their immediate stated problem, or don't comment. It's that simple. Help (the help they asked for, not the help you feel compelled to give), or stay out of the kitchen. I'm tired of these threads devolving into petty, personal coding/workflow-compulsion squabbles/lessons. Enough.

Last edited by DiapDealer; 03-29-2020 at 09:09 AM.
DiapDealer is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Books Made With Sigil? fncll Sigil 10 01-20-2017 07:05 AM
Wanting to convert Sigil-made EPUB to PDF Gregg Bell Sigil 10 11-16-2013 08:00 PM
Why is Sigil 0.7.1 displaying all text oblique? Abull ePub 28 04-20-2013 01:57 PM
Sigil displaying WYSIWYG oddly moz Sigil 6 12-27-2009 05:07 PM
"PK": Only text when I open in Sigil an ePub file generated with Calibre Terisa de morgan Sigil 3 12-14-2009 11:24 AM


All times are GMT -4. The time now is 01:39 AM.


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