Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 09-14-2023, 03:01 PM   #1
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
A few small issues with Sigil's formatting controls (not just 2.x)

I've had these two small issues for a long time now, and both involve the format and align buttons.

The first is that the formatting buttons won't work if there are already some formatting tags in effect, even if they're not the same tags. For example with the following:

Code:
<p>one two three</p>
I can select "two" and use the bold and italic buttons (or shortcuts) to add those sets of tags, but, with:

Code:
<p>one <i>two</i> three</p>
If I select "<i>two</i>" (including the tags) and try to make it bold, nothing happens. I can manually type in the tags and it works just fine, but the buttons and keyboard shortcuts do nothing. Note that I'm not suggesting you be allowed to do "<b><i>two</b></i>", but "<b><i>two</i></b>".

Similarly, with the following:

Code:
<p>blah</p>
I would expect to be able to have the cursor anywhere within the <p> block and be able to use the alignment buttons to align centre, right, etc. But if it's at the very end (between the 'h' and '<') nothing happens.

Both of these issues have existed for a long time (unfortunately I can't remember how far back), but I figured now that Sigil is in a new major it might be worth bringing up. Are these the result of a best practice I'm not aware of, or is it maybe an issue others have noticed but no one had brought up yet?

In any case, thanks in advance for the help!
Vanguard3000 is offline   Reply With Quote
Old 09-14-2023, 06:41 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
I will look into these two issues, but I think they are caused by the same thing:

The last one is similar to other issues that were special cased in the past. The cursor position at the end of the line just before the start of the end tag is actually an insertion pointer AFTER the bit of text meaning that spot is inside the end tag (effectively) and running that command when the cursor is in a tag is disabled.

I am betting the first problem you talked about is the same. When you select the i tag and all of its contents, even though the cursor is immediately before the tag, that spot is AFTER the text and so is considered to be in the i tag itself and you can not bold a tag - just its contents.

If I had to do it all over again, I would remove the B, I, U, subscript, and superscript buttons completely. They are just a pain to maintain. And instead, Sigil would ship with 5 pre-added clips (with clip buttons) that would be easier for the user to determine how (what tags) it wants for b, I, U to use or instead to use an in-line style tag. Then I would add a simple button to remove the immediate parent tag first to make swapping tags easier using clips.

Clips would have been a much better way to implement such things giving the user much more control yet as simple to click on as any toolbar button.

Maybe a future version of Sigil will do just that.

Last edited by KevinH; 09-14-2023 at 06:44 PM.
KevinH is offline   Reply With Quote
Advert
Old 09-19-2023, 05:34 PM   #3
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
Thanks for letting me know. The whole pointer position thing seems like a weird off-by-one issue, but I'm sure it's more complicated than that or it would have been fixed as a matter of course.

I already have clips set up for smallcaps and the like, I may do as you suggested and make them for italics, bold, etc and override the keyboard shotcuts (ctrl+b etc) if possible. Clicking a second time to remove the tags isn't usually an issue for me as I use undo for that anyway.
Vanguard3000 is offline   Reply With Quote
Old 09-19-2023, 06:21 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Not quite an off by one, think of the old days when a block blinking cursor was used in place of the I beam style cursor... the character immediately after the I beam would be blinking as the char to be replaced.

Code:
I-beam style cursor represented by the | char:

blah|</p>

versus old style blinking block character represented by []:

blah[<]/p>
both represent the exact same position.

But the days of the block flashing cursor are gone leading to changes is how positions in strings are thought about by the user.

But I can special case it for a future release.

Last edited by KevinH; 09-19-2023 at 06:25 PM.
KevinH is offline   Reply With Quote
Old 09-25-2023, 11:27 AM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,645
Karma: 5433388
Join Date: Nov 2009
Device: many
Okay pushed a fix for the second one where you can not align paragraph if cursor just before ending tag </

But the first one is not as easy to handle and I am not sure I consider it a bug. More of a safety feature. And, if you just select the text you can do what you want.

For example, to add <b> around the blah, you just select "blah" and it will nicely do what you want with the i on the outside and the b on the inside.

You can also do the reverse. But trying to bold a tag and not just its contents is asking for trouble.

Code:
     <p>one <i>blah</i> two</p>
If that is something you want to often, you can of course just use a clip (as you have already done).

So that is not something I am going to change.

Sorry.

Last edited by KevinH; 09-25-2023 at 03:28 PM.
KevinH is offline   Reply With Quote
Advert
Old 09-26-2023, 12:35 PM   #6
Vanguard3000
Groupie
Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.Vanguard3000 ought to be getting tired of karma fortunes by now.
 
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
Quote:
Originally Posted by KevinH View Post
Okay pushed a fix for the second one where you can not align paragraph if cursor just before ending tag </
Thanks, that's great to hear!

Quote:
Originally Posted by KevinH View Post
But trying to bold a tag and not just its contents is asking for trouble.
How so, if I've selected the opening and closing tags inclusive? In the example

Code:
     <p>one <i>blah</i> two</p>
If I were to select <i>blah</i> and add a bold tag, it should give me

Code:
     <p>one <b><i>blah</i></b> two</p>
just as easily as if selecting only blah would give

Code:
     <p>one <i><b>blah</b></i> two</p>
The only issue I can see is if you didn't select the entire tag block (i.e. "<i>bl" or "ah</i>") which of course would be bad.

I'm not trying to be ornery about this, and I'm fine with it not being something you're interested in changing; I'm more just interested from a learning/best practices standpoint.

In any case, thanks for everything!
Vanguard3000 is offline   Reply With Quote
Reply

Tags
buttons, formatting, shortcut, sigil, tags


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another small Sigil bug jwes Sigil 7 08-23-2023 12:50 PM
Issues with controls bar in e-book viewer Flane Calibre 4 06-15-2016 12:00 AM
Inexplicable small cap formatting John123 Workshop 4 01-16-2013 08:33 AM
Weird formatting issues - Sigil .epub in Calibre viewer december Sigil 9 06-18-2010 04:04 PM
Lost My Very Long Post With Questions About PB 301 Controls vs PB 360 Controls Vienna01 PocketBook 6 06-04-2010 01:51 PM


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


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