![]() |
#1 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
0.7.1 acting different than 0.6.2
I just switched from 0.6.2 to 0.7.1 and the latter is doing things I'm not accustomed to. Like for instance when I drop down a paragraph in the Book View and then bring it back up and then look at it in code it's got new markup tags. It was just a simple <p> text </p>. And then it becomes <span style= "text-indent:1.5em;"> text </span><br /<p>
I'm thinking of going back to 0.6.2 where that sort of thing (as I recall anyway) doesn't happen. I like the live preview window and all and would love to stay with 0.7.1 but I've also got two novels I'm almost done with (that I've been doing in 0.6.2) and I don't want to be messing them up. I've been experimenting with it a little. It doesn't seem to matter if the automatic pretty tidy feature is on or off. But it only happens (the<span style... addition) only when I'm moving things around in Book View, never in Code. And when I do have the pretty tidy on automatic and I say leave a bracket off the tag and go to save it, the window comes up warning me about fixing it automatically but the cursor turns to the hour glass when I hover it over "yes" or "no" not allowing me to choose. And there is the old warning from 0.6.2. about fixing it manually or automatically when you go from code to book view. So, with the automatic feature disabled you can save bad code but you can't look at it in book view. I'm sure there's good reasons for all this but right now it seems a little confusing. Any ideas? Last edited by Gregg Bell; 03-26-2013 at 12:19 AM. |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Color me gone
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
I know exactly that he means. If you delete the leading tag in pretty print, in replace in 6.2 it would knock out the end tag along with the one you searched for. In 7.1 it does not. This is to not knock out the wrong tag by accident. I never did for me, but I can't blame them from wanting to do no harm.
Now you have to include the end tag in your regex search with something like <b>(.*)</b> and use \1 in the replace line, if you were trying to get rid of the <b> tag and its end tag. I am just getting used to this myself, so I think that is right, but don't shoot me if I am wrong. This results in repeated searches for me. meme said he was going to look at this sort of thing, but it didn't seem a high priority for them. |
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Well I understand what you're saying plain enough, just not how you got there from "drop down a paragraph in the Book View and then bring it back up." How could he search for (and delete with a Replace) a leading tag in Book View?
Last edited by DiapDealer; 03-26-2013 at 08:21 AM. |
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
If you 'Join' a paragraph in BV ( at the end of the Paragraph: tap Del, Then tap <space> )this will happen in 7.x
Here is my cleanup saved REGEX search: Code:
(?sm) (<span style=".+?">)(.+?)</span> Code:
\2 |
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Just one more reason to never do anything in Book View besides look at things, I guess.
![]() |
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,903
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
BTW Warning: If you use inline Style=, Don't use 'Replace All' I made the search very general because the order of the style elements varies. |
|
![]() |
![]() |
![]() |
#8 |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
I figured it out a bit.
Thanks for the feedback everybody. It seems (all this in BookView) that when I drop some paragraphs down (by having the cursor at the indent point, of the first paragraph I want to drop down, and hitting the enter key), the Code view thinks I want line breaks and so puts <p><br /></p> there. And when I put the cursor at the indent point of where I first started from and hit delete to bring the paragraphs back up, the Code changes what was a simple <p> tag to <p><br /></p> and its corresponding closing tag </span><br /></p>. Interestingly, if I want to bring the paragraphs up and keep the cursor at the end of the last line and hit the delete key, all the paragraphs come up and the simple <p> tag is there and life is as it should be and all is well in the Universe.
|
![]() |
![]() |
![]() |
#9 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
At least in the newest version, if you hit return a few times in Book View you will end up with a few <p><br /></p>. If you then delete one of these empty lines, they get deleted completely, so no <br /> is left. It will be left if there is something else in the line.
The hourglass showing on the dialog will be fixed in the next version. With regards to your comment about style appearing when you delete, this is because the Book View editor is trying to retain the formatting you've given the paragraphs, even if this is a bit annoying. This has nothing to do with Pretty Print or Tidy. I think it's worth showing what is happening: In this particular case, say you have this: Code:
<p>Line one.</p> <p>Line two.</p> Code:
<p>Line one.Line two.</p> But if you start with this: Code:
<p>Line one.</p> <p class="test">Line two.</p> then in Book View put your cursor at the end of "Line one." and hit Delete, you will see this in Code View: Code:
<p>Line one.<span style="font-weight: bold;">Line two.</span></p> It cannot just use span class="test" because that class might not apply to a span, only to a paragraph. Although if the class "test" isn't actually defined or linked to this page then you end up with the first case where no span is added. And if both paragraphs had a class of "test" (i.e. the exact same styling), then the second would be merged without the span being added since it knows they are the same. I guess it could ignore the styling of the second paragraph when merging which I think would be simpler for most people to deal with - but that might cause other issues - and anyway we have no control over that - it's part of Qt. Working in Book View is easy to start with, but once you learn about Code View and tags and you want full control over what is going on it can be pretty annoying. If you are going to write in Book View you will have to accept what it gives you, or as pointed out above, develop a few common Save Searches to correct the parts that bother you - but use them carefully. I'm always using Book View even though I always try not to - so I end up having to search through for extra <br /> tags, style attributes, nbsp characters, etc. Sigil wasn't really designed to write books from scratch. It was meant to update formatting, etc. - which is best done in Code View, perhaps with the help of Preview. Of course, it can be used to write and correct text in Book View quite easily, but there is a trade-off for using it. |
![]() |
![]() |
![]() |
#10 | |
Gregg Bell
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,266
Karma: 3917598
Join Date: Jan 2013
Location: Itasca, Illinois
Device: Kindle Touch 7, Sony PRS300, Fire HD8 Tablet
|
thanks
Quote:
Now, my external style sheet is for text indent of 1.5em if that sheds any light on things. And how do I get around the hourglass thing? Thanks a lot for your input on this. It's very helpful. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
My kindle is acting up..... | qlob | Kindle Developer's Corner | 43 | 09-20-2012 07:21 AM |
Menu button acting up | canezila | enTourage Archive | 6 | 02-18-2011 03:53 PM |
Font's Acting Weird... | Philippe Lemay | Calibre | 0 | 09-05-2010 01:24 AM |
Highlighter acting screwy | rakista | enTourage Archive | 1 | 06-04-2010 12:48 PM |
My DX is acting up. Again. | Scott Nielsen | Amazon Kindle | 4 | 02-27-2010 02:33 PM |