Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2020, 02:59 AM   #61
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Ad rename by plugins:
Ah, I finally understood – so I cancel my suggestion.

Ad Sigil in metadata:
Sure. It's just a comment on one line.

Ad TOC:
I mean a more flexible choice.
E.g:
Instead
Code:
<div class="sgc-toc-title">Table of Contents</div>
it could be:
Code:
<h1 class="sgc-toc-title">Table of Contents</h1>
or even
Code:
<p class="sgc-toc-title">Table of Contents</p>
And a structure based on <div> with simpler tables of contents could be "flattened" to simple <p> paragraphs, which would only be styled by margin-left depending on the level.

I have no idea if other users would agree and are interested in it, so I thought about transferring this option to the plugin, but here – as with renaming files – there is probably a duplication of Sigil's already existing functionality in the Python.

If you think this is too subjective suggestion – I can live with that
BeckyEbook is offline   Reply With Quote
Old 12-18-2020, 08:49 AM   #62
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by BeckyEbook View Post
Ad rename by plugins:
Ah, I finally understood – so I cancel my suggestion.

Ad Sigil in metadata:
Sure. It's just a comment on one line.

Ad TOC:
I mean a more flexible choice.
E.g:
Instead
Code:
<div class="sgc-toc-title">Table of Contents</div>
it could be:
Code:
<h1 class="sgc-toc-title">Table of Contents</h1>
or even
Code:
<p class="sgc-toc-title">Table of Contents</p>
And a structure based on <div> with simpler tables of contents could be "flattened" to simple <p> paragraphs, which would only be styled by margin-left depending on the level.

I have no idea if other users would agree and are interested in it, so I thought about transferring this option to the plugin, but here – as with renaming files – there is probably a duplication of Sigil's already existing functionality in the Python.

If you think this is too subjective suggestion – I can live with that
Please do not get me wrong, rename and move in a plugin library would be very useful but hard to do given how the plugins handle the interface at a file level.

The closest approximation would be to duplicate the target file under its new name or at its new location, then schedule the old file to be deleted. That still means the plugin code must perform all of the link detection and updates.

And if people agree to on a new format structure for html toc files, I would be happy to update it or allow its use as an option. A template of some sort with placeholders pre inserted to be replaced by html fragment approach may be doable as well. But creating a new toc structure that people could look at and agree on would be the first step. If you have a candidate in mind, please zip up a file and post it here for others to see.

Thanks
KevinH is offline   Reply With Quote
Advert
Old 12-18-2020, 11:50 AM   #63
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by Vanguard3000 View Post
Multi-Paragraph Justification Changing
It would be nice to be able to make a selection over two or more paragraphs, and use the justification buttons to change all paragraphs touched by the selection highlight. This would allow the use to quickly and easily centre an entire title page, for example, rather than having to select each paragraph individually.
Okay, I took a look at this. It would require a bit of work to parse the current selection if it contains more than one Block_Level_Tag and loop through the selection pieces one by one. This will not be an easy fix but should be doable in the longer term.

But there is a rather easy workaround using PageEdit. Assuming PageEdit is set up as your External XHTML Editor in Sigil Preferences, you can navigate to the page (or the opf if you want to handle the entire book) and hit the icon.

In PageEdit select all contiguous paragraphs at one time and hit the alignment button you wish. Then exit out of PageEdit saving your changes back into Sigil.

PageEdit is quite safe for making simpler edits like this and should not cause difficulties later.

Thanks,
KevinH is offline   Reply With Quote
Old 12-18-2020, 12:22 PM   #64
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by KevinH View Post
Okay, I took a look at this. It would require a bit of work to parse the current selection if it contains more than one Block_Level_Tag and loop through the selection pieces one by one. This will not be an easy fix but should be doable in the longer term.

But there is a rather easy workaround using PageEdit. Assuming PageEdit is set up as your External XHTML Editor in Sigil Preferences, you can navigate to the page (or the opf if you want to handle the entire book) and hit the icon.

In PageEdit select all contiguous paragraphs at one time and hit the alignment button you wish. Then exit out of PageEdit saving your changes back into Sigil.

PageEdit is quite safe for making simpler edits like this and should not cause difficulties later.

Thanks,
Stupid Question?

Isn't that best and most easily done with CSS? Rather than using features that are more like the old Book View editor?

Hitch
Hitch is offline   Reply With Quote
Old 12-18-2020, 01:27 PM   #65
MickiTee
Guru
MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.MickiTee ought to be getting tired of karma fortunes by now.
 
MickiTee's Avatar
 
Posts: 838
Karma: 3976266
Join Date: Jun 2012
Location: London, UK
Device: Sony PRS-505, Pocketbook TL3, TL4, TL5
Quote:
Originally Posted by KevinH View Post
What if we did go to a two-stage approach with a scrolling form style interface with pulldowns with just the most used and basic set of metadata on the first stage and an advanced button to load the current metadata editor, updated with any changes on the first form.

If we did that, then what information should appear on the first form (it could even be an html form that is create on the fly and loaded in a Preview-like tool).

book main title
book secondary title
book series number
book series title
primary language pulldown
secondary language pulldown
author1 with file-as
author2 with file-as
author3 with file-as
contributor1 with associated role pulldown
contributor2 with associated role pulldown
contributor3 with associated role pulldown
subject
keywords
description bigger box supporting html markup
identifier1 with pull down for identification type
identifier2 with pull down for identification type
publication date

and what else?

How about that approach?
First thanks to both you and Diapdealer for your work on Sigil over the years.

This idea sounds workable. If you decide to go with this approach, I would suggest adding the following fields: ISBN, Copyright Date, Publisher.

If you decide not to make major changes the GUI for the Metadata Editor could I request a small change. Would it be possible to position the cursor in the 'Value' column of the editor when you click on 'Add Metadata' or 'Add Property'? At the moment when you click on either of the buttons the cursor is left in the Name column!
MickiTee is offline   Reply With Quote
Advert
Old 12-18-2020, 01:31 PM   #66
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
It probably should.

But we would have to query the user for an existing class name that they created that does the justification they want.

Or, even worse, we would have to create a Sigil specific css sheet ourselves with predetermined classes and then add those classes instead of using a quick inline style on just those paragraphs. To make matters worse we would have to link that predetermined standard Sigil class sheet to every xhtml file and of course inject terrible class names with some sigil specific name to prevent class name clashes. Sound familiar?

Yes, a user could mark the few paragraphs the want (using mark text) and then use find and replace to add their own class attribute to just the marked text.

So instead, we just inject inline style tags, like we have always done as it is cleaner than any other automated method.

Not sure there really is a better fully automated approach.

That said since justification is normally a document level item, using clips to add a class based on your current stylesheets to the body tag should be very straight forward. Many people do not use the Auto adding of their class selectors to their clips bar, but it is a very nice feature.


Quote:
Originally Posted by Hitch View Post
Stupid Question?

Isn't that best and most easily done with CSS? Rather than using features that are more like the old Book View editor?

Hitch

Last edited by KevinH; 12-18-2020 at 01:59 PM.
KevinH is offline   Reply With Quote
Old 12-18-2020, 01:42 PM   #67
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
This is certainly doable as the code to accomplish this already exists in pieces in CodeViewEditor.cpp. I will add this to my future to-do list.

Quote:
Originally Posted by Thasaidon View Post
Not a request just an idea for ruminating on. If Sigil already has this feature please let me know as I am not aware of it.

When I am fixing html I often find styling which refers to a single paragraph. This may be inline but usually uses a CSS selector(s).

Normally I just delete this styling manually which means highlighting and deleting pieces of code individually.

As I believe the latest version of Sigil now detects the open and closing tags would it be easily doable to add a feature so that if the cursor is on a tag pressing a hotkey (or clicking on an icon) would remove the tag pair concerned?

This would speed up cleaning these paragraphs.
KevinH is offline   Reply With Quote
Old 12-18-2020, 01:44 PM   #68
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by MickiTee View Post
Would it be possible to position the cursor in the 'Value' column of the editor when you click on 'Add Metadata' or 'Add Property'? At the moment when you click on either of the buttons the cursor is left in the Name column!
I will look into this as-well. It should be doable.

Addendum ...
Actually, that is done so the user can quickly and easily add a number of properties to the parent tag with no mouse movements needed. This makes entering metadata for elements that have numerous properties easier.
Once all properties are added, the values can then be filled in. This is especially true with author metadata and most refines in epub3 metadata.

Last edited by KevinH; 12-18-2020 at 06:51 PM.
KevinH is offline   Reply With Quote
Old 12-18-2020, 03:54 PM   #69
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
This turned out to be a relatively easy thing to change that should not impact other things in CodeView.

I just now pushed these changes to master, For heading level changes, if no selection has been made but the cursor is in a line, that line is properly changed to that heading level.

Similarly for Bold, italic, strikethrough, underline, subscript and superscript, if nothing is selected and the cursor lies in a word, that word will be selected and the operation will be applied.

Seems to work okay under limited testing.

These changes should appear in the next release.

KevinH



Quote:
Originally Posted by elibrarian View Post
Headers (H1-H6) will always be a full line. So why not make the CTRL + 1 etc. insert <h1>-</h1> tags around the line, in which the cursor is placed, if (and only if) no text is selected?

Almost the same goes for bold, italics etc. - if no text is selected, the ctrl + b (e.g.) could surround the word where the cursor is placed.
KevinH is offline   Reply With Quote
Old 12-18-2020, 06:17 PM   #70
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by KevinH View Post
It probably should.

But we would have to query the user for an existing class name that they created that does the justification they want.

(snippage for brevity)
Oh, dear, this came across all wrong. I did not mean that somehow, YOU should make the CSS do this or that FOR the user. I meant, the user should simply use the correct CSS for his/her issue (say, title page text) and then put the correct text alignment In the CSS. Him/herself, manually.

I meant, it should be all user. Not Sigil doing WYSIWYG stuff.

Sorry! I'll be clearer next time.

Hitch
Hitch is offline   Reply With Quote
Old 12-19-2020, 02:52 PM   #71
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
I absolutely do not want to remove the existing feature to maintain backward compatibility and not to annoy users who have grown used to the layout proposed by default in Sigil over the years.

Rather, I am thinking of an additional template system (maybe a mustache?) That would give free hand to those users who want to have more influence on the layout (including class naming) of the table of contents, index, and maybe other pages in the future?

I would not like to impose my opinion, IMHO just templates would allow for a more personalized look.
BeckyEbook is offline   Reply With Quote
Old 12-19-2020, 03:03 PM   #72
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Templates would require PLACEHOLDERS so no parsing is done and each PLACEHOLDER is replaced by an xhtml fragment by regex. I would not want to add an entire library just to do that.

Last edited by KevinH; 12-19-2020 at 03:07 PM.
KevinH is offline   Reply With Quote
Old 12-19-2020, 03:10 PM   #73
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,647
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by KevinH View Post
Templates would require PLACEHOLDERS so no parsing is done and each PLACEHOLDER is replaced by an xhtml fragment by regex. I would not want to add an entire library just to do that.

If not, this is probably something better suited to an edit plugin that reads in Sigil's current standard format html toc and parses it to extract what info you want and recreate the html in whatever format you want.

So a Sigil icon push will do what you want.
KevinH is offline   Reply With Quote
Old 12-21-2020, 04:33 PM   #74
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 Doitsu View Post
That exact feature already exists. If you highlight text and select a clip with a "\1" in it, the text will be wrapped in it.
Oh jeez. I could have sworn I tried this a long time ago when setting up my clips. It does indeed, work exactly as expected. Sorry for being a big stupid dumb.

As for the other suggestions, thanks, KevinH and team, for considering them for future feature viability.

Last edited by Vanguard3000; 12-21-2020 at 04:36 PM.
Vanguard3000 is offline   Reply With Quote
Old 12-21-2020, 07:54 PM   #75
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 800
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Hi Kevin

How is your To-Do list filling up?

Just curious
Thasaidon is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch HD, Future features or dead features? ElWorm PocketBook 4 02-07-2018 11:36 AM
New Plugin Features in the upcoming Sigil 0.8.900 KevinH Plugins 6 09-14-2015 02:48 PM
FAQ>How do I use ... features of the conversion tools? chaot Library Management 2 08-28-2012 07:28 AM
Writer2ePub, Sigil, and mjBookMaker Features Ransom Writer2ePub 1 09-21-2011 09:20 AM
ePub Creation Tools: Sigil vs Oxygen twedigteam ePub 6 12-10-2010 03:41 AM


All times are GMT -4. The time now is 06:41 PM.


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