12-15-2017, 05:58 PM | #1 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
questions about preferences
I've been exploring what the different functionalities are in Sigil and what's optimal for me (a novelist).
I'm assuming it's good to have the 'Mend XHtML Source code on:' on the Open and Save settings. (see attachment) And the second arrow. I should have the CSS Level 2.1 filled in? Lastly, I don't even have EPUB 3 so I guess that third setting is moot and if I ever do have it it should be on CSS Level 3. And a generic question: What is the difference between: Tools>Reformat HTML>Mend and Prettify All HTML Files and Tools>Reformat HTML>Mend all HTML Files ? As I recall one was the old Tidy and the other the Prettify. The Tidy being super powerful and systemic and best to be avoided, but I'm not sure. Thanks. |
12-15-2017, 06:30 PM | #2 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Prettify changes whitespace in an attempt to cleanly indent html code to make it more readable by humans. I typically only use this if I am starting from code that is horrible.
Mend tries to make no whitespace changes and does the absolute minimum to fix broken html. I personally use mend on open only and that is because gumbo will fix the code so that it is parseable to update links and things when an epub is first opened anyway. CSS setting is personal preference since epub2 is somewhere between those two CSS specs. Tidy is no longer part of Sigil because it often ate text. |
12-15-2017, 07:43 PM | #3 | ||
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
(And I don't think I have a lot of broken code. I'm just doing my own stuff. Stuff that I write and then turn into an epub.) You wrote: Quote:
The above is kind of over my head. What is gumbo? The way you wrote it it sounds like Mend and gumbo are both fixing the code. Is there any disadvantage to the way I have it (having Mend on Open and Save)? And I googled and CSS 3 has a bunch of new stuff. But is my CSS going to need anything more than the CSS 2.1? Spoiler:
|
||
12-15-2017, 10:08 PM | #4 | |||||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Quote:
Let's say you accidentally forgot the slash in your closing <p>: Code:
<p>This is a sentence.<p> Code:
<p>This is a sentence.</p> <p> </p> Code:
<body><p>Sentence 1.</p><p>Sentence 2.</p><p>Sentence 3.</p></body> Code:
<body> <p>Sentence 1.</p> <p>Sentence 2.</p> <p>Sentence 3.</p> </body> Quote:
Newer versions of Sigil use "Gumbo" instead. Which also checks if you have correct XHTML, but is much more robust (a lot less likely to make things disappear). Quote:
Quote:
Using new stuff in CSS3 wouldn't hurt. Devices that can understand CSS3 will show it, and devices that can't understand CSS3 would just act like it doesn't exist. Last edited by Tex2002ans; 12-15-2017 at 10:13 PM. |
|||||
12-15-2017, 10:34 PM | #5 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Gumbo is Google's robust html parser. It is the "engine" used by both Mend and Mend and Prettify. It replaced Tidy.
|
12-16-2017, 04:45 PM | #6 | |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
|
|
12-16-2017, 04:52 PM | #7 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
|
12-17-2017, 08:28 AM | #8 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
I like prettify. There was once an essay in the Wall Street Journal about the three? methods of loading a dishwasher. One was "curator," where everything is sorted by type, so the dishwasher trays look, yes!, TIDY. It was a perfect description of my dishwasher trays.
I run Flight Crew to validate, Ctrl-S to save, and then if I have done some hand-coding, I "mend and prettify" or whatever the language is. The page then looks right to me, everything as it should be. Nothing untoward has ever happened, but if it should do, I would simply then Undo. The longer I use computers (since the fall of 1982, with a CPM WordStar extension on an Olympia electronic typewriter), the more ways I find there are to use a computer, and that no one way will suit everyone. |
12-18-2017, 01:44 PM | #9 | |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
|
|
12-20-2017, 01:36 AM | #10 |
Bibliophagist
Posts: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The problem is that very seldom is there "one right way". For the most part, it's "that's the way I do it" being mistaken for that elusive one true way. Optimal for you is unlikely to be optimal for me since we seem to use Sigil for very different purposes. Your major use seems to be creating epubs while my major use is fixing the garbage formatting all too often found in commercial epubs. <rant about In Design, Vellum, etc. removed -- please, Mr. Moderator, don't ban me!>
|
12-22-2017, 11:29 AM | #11 | |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
Quote:
|
|
12-22-2017, 09:07 PM | #12 |
Well trained by Cats
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I think there is a difference between easy to use for an author and easy to maintain (the book) code.
What I have run across touching up books to 'my way', the code can be a mess and the author is no wiser. |
12-22-2017, 10:06 PM | #13 |
Gregg Bell
Posts: 2,264
Karma: 3917588
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
For sure, ducks. I have seen some epubs by some pretty big authors and the code is just an absolute mess. I'd think if they saw it they'd freak.
|
12-23-2017, 01:35 AM | #14 | |
Bibliophagist
Posts: 35,380
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Looking at Vellum's output reminds me of one contract decades back where I was to determine the feasibility of updating a budget projection program written in APL. My recommendation was two-fold. One being that it would be cheaper and easier to rewrite the code in a language that not write-only, the other being was to hire a person to ensure the the code was properly documented while it was being written. For those who are unfamiliar with APL, take a look at the wikipedia APL programming language entry. From my personal experience, the old comment about being able to write a program in one line in APL that would take a page of code in some other language is very true. To read that line of code a month later and figure out what you were doing? That was the real trick. |
|
12-23-2017, 01:51 AM | #15 |
Grand Sorcerer
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
My God! A mathematic programming language!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interface and preferences questions | tosca30 | Sigil | 26 | 11-25-2014 11:12 PM |
Preferences | Rob1706 | Calibre | 5 | 03-16-2014 04:55 PM |
Preferences ignored | jeanettsvr | Library Management | 5 | 04-06-2013 12:26 PM |
where is preferences | akakie | Library Management | 3 | 06-10-2011 01:13 PM |
Preferences & Cover Questions | Jabby | Calibre | 3 | 10-13-2010 09:04 PM |