12-18-2020, 02:59 AM | #61 |
Guru
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> Code:
<h1 class="sgc-toc-title">Table of Contents</h1> Code:
<p class="sgc-toc-title">Table of Contents</p> 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 |
12-18-2020, 08:49 AM | #62 | |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
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 |
|
Advert | |
|
12-18-2020, 11:50 AM | #63 | |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
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, |
|
12-18-2020, 12:22 PM | #64 | |
Bookmaker & Cat Slave
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:
Isn't that best and most easily done with CSS? Rather than using features that are more like the old Book View editor? Hitch |
|
12-18-2020, 01:27 PM | #65 | |
Guru
Posts: 838
Karma: 3976266
Join Date: Jun 2012
Location: London, UK
Device: Sony PRS-505, Pocketbook TL3, TL4, TL5
|
Quote:
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! |
|
Advert | |
|
12-18-2020, 01:31 PM | #66 |
Sigil Developer
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. Last edited by KevinH; 12-18-2020 at 01:59 PM. |
12-18-2020, 01:42 PM | #67 | |
Sigil Developer
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:
|
|
12-18-2020, 01:44 PM | #68 | |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
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. |
|
12-18-2020, 03:54 PM | #69 | |
Sigil Developer
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:
|
|
12-18-2020, 06:17 PM | #70 | |
Bookmaker & Cat Slave
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:
I meant, it should be all user. Not Sigil doing WYSIWYG stuff. Sorry! I'll be clearer next time. Hitch |
|
12-19-2020, 02:52 PM | #71 |
Guru
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. |
12-19-2020, 03:03 PM | #72 |
Sigil Developer
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. |
12-19-2020, 03:10 PM | #73 | |
Sigil Developer
Posts: 7,647
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
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. |
|
12-21-2020, 04:33 PM | #74 | |
Groupie
Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
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. |
|
12-21-2020, 07:54 PM | #75 |
Hedge Wizard
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 |
|
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 |