View Single Post
Old 03-06-2021, 02:05 PM   #170
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 Tex2002ans View Post
Note: Notepad++'s "Find All" displays in a chronological list form, although it displays the entire line. When working with long paragraphs, many times the hit is going to display off screen:
In Notepad++, after pressing Find All:

I Right-Clicked the "Search Results" box at the bottom, and there's a setting called "Word wrap long lines".

That fixes one little issue I had. :P

Quote:
Originally Posted by Tex2002ans View Post
Wow @Tex2002ans! I'm impressed by all the information on your post.


Quote:
Originally Posted by Coleccionista View Post
Certainly I'm going to add TagMechanic to my plugins in Sigil and let's see if future versions can advance in this area.
It's an essential plugin.

The most important reason I use it is because it handles nested tags. So let's say you have a <span> inside a <span>:

Code:
<span class="italics">This is <span class="emphasis">emphasis</span> and this should still be italics.</span>
Trying to replace the outer <span>:

Search: <span class="italics">(.+?)</span>
Replace: <i>\1</i>

would lead to this:

Code:
<i>This is <span class="emphasis">emphasis</i> and this should still be italics.</span>
TagMechanic actually parses the HTML tree, so it knows what opening/closing tags belong together.

Code:
<i>This is <span class="emphasis">emphasis</span> and this should still be italics.</i>
Quote:
Originally Posted by Coleccionista View Post
One of the things I would also love is if when Sigil can't save the book from HTML errors (missing < or > or a tag, etc) it would give you more information. The popup dialog doesn't identify the wrong file and right now I have to turn live preview and check all recently modified files to get the warning error in LP with the line number (when lucky).


I know I wrote about that years ago... it's buried somewhere on MobileRead... lol.

Some of the popups tell you exact filenames, but many just say there's a "not well-formed XHTML file" but don't tell you exactly where.

For now, a workaround I do is run Doitsu's "EPUBCheck" plugin.

This points out exact filename + usually gives you a more accurate picture:

Click image for larger version

Name:	Sigil.EPUBCheck.-.File.Line.Errors.png
Views:	142
Size:	10.0 KB
ID:	185762

You can also double-click to jump to the location in the file.

Quote:
Originally Posted by KevinH View Post
Does Sigil, sometime in the future, need something like a big green "Publish" button that would:
Hmmmm... this does sound like a user-friendly enhancement.

Like an easy "press this as a final step".

Quote:
Originally Posted by KevinH View Post
Perhaps then we could add a Publish Preferences setting dialog that would allow you to indicate which of these steps you want to use, the path to the "Completed Works" folder and etc.
Agree with this.

And the optional checkboxes are key.

Maybe even in the popup window, it lists all the steps + adds:
  • = successfully completed
  • — = steps that weren't applied
  • = failed

so IF Sigil is doing something weird/unexpected during the publishing step, they'll know someplace to look.

Quote:
Originally Posted by KevinH View Post
- regenerate the Nav, and any html TOC
Many times, you'd do manual adjustments.

(Either the look of the HTML or the content.opf itself.)

Like some publishers still stupidly insist on adding front/backmatter to the TOC.

Something like this might bring more frustration. (But again, checkbox solves that! Now... to have it on or off by default... .)

Quote:
Originally Posted by KevinH View Post
- automatically run Mend and Prettify on all code
Which reminds me of another extremely minor niggle (although I haven't tested on the latest Sigil versions).

Let's say you have this XHTML. It's already nice and prettified:

Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>

<body>
  <p>This is an example.</p>
</body>
</html>
Right-Click + Link Stylesheets:

Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
<link href="../Styles/stylesheet.css" type="text/css" rel="stylesheet"/>
</head>

<body>
  <p>This is an example.</p>
</body>
</html>
Then you have to prettify all over again. :P

I think a similar thing happens with Tools > Table Of Contents > Create Table of Contents + Tools > Add Cover.

Maybe these buttons should insert nice, prettified code by default.

Last edited by Tex2002ans; 03-06-2021 at 02:09 PM.
Tex2002ans is offline   Reply With Quote