![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Apr 2014
Device: none
|
Feature request: new CSS class from computed style
Hi Sigil,
I figured I'd share this idea for whatever it's worth (I'm that annoying person who isn't a programmer but has ideas that make me wish I was). If Sigil had a tool where you could place the cursor at a particular point in the text, and then create a new CSS class based on the formatting of that text, that would be awesome for me. So, if the particular text was in a <p class="W" id="X">, but also in a <span id="Y" style="Z">, the tool would take the ("computed") overall style expressed by the hierarchy of W, X, Y, and Z, and make a new, single CSS class with all that styling. I suppose it would have to prompt the user to name the class, and also to specify whether it should be for a block or for an inline element. (Possibly helpful context: I routinely work on .epub files exported from InDesign, in which the layout person can create named "paragraph" and "character styles", which are directly translated to CSS classes. But the layout person can also apply "local" formatting in a haphazard manner which is not associated with their named styles. In the exported .epub, this local formatting is rendered as CSS classes called ParaOverride-15, CharOverride-107, and so forth. The result is that some text in the epub is styled by way of three or four levels of confusingly named CSS, which makes it difficult to make a change without first untangling which CSS is overriding which other CSS. Also, text A may appear exactly the same as text B--so that in the ideal world they would be coded as the same element with the same class--however A may achieve its appearance using different classes than does text B, from unrelated "local" formatting applied in InDesign.) Anyway just a thought in case it finds anyone else who feels similarly. And, if you have read this far, thank you for enduring my InDesign rant! ![]() |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 697
Karma: 150000
Join Date: Feb 2010
Device: none
|
+1 on the InDesign rant.
I solve that problem in ID before exporting, by, for example, searching for all italic character strings and applying an appropriate named character style to them. Repeat for bold, etc. as needed. Then select the entire document and "clear all overrides." Follow up with a severe lecture to whoever created the ID file in the first place, requesting that they never use local formatting overrides. They'll probably make YOU the new internal book designer. ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Reduce the whole thing to raw text, and send it back for proper formatting.
![]() |
![]() |
![]() |
![]() |
#4 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
When we establish a relationship with a print-layout house, we'll go through their first few, and make suggestions. However, there are some that come to us and we charge them as though we are making the file from PDF, rather than an INDD set, because the clean-up is just...ridiculous. As kat7 noted, once you start seeing "char-overrides" in the 60's, 70's, etc...it makes your eyes bleed. Yes, a computed-style creator WOULD Be nice. That, and someone paying off my mortgage. I figure that they have about equivalent chances of actually happening, but just in case Santa was reading this thread, I'll plus-1 this. ;-) (I must admit though: we do most of our INDD-export cleanups in Epsilon, not Sigil. Sorry, but there it is.) Hitch |
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 31
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
Feature request: new CSS class from computed style
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 250
Karma: 1702156
Join Date: Nov 2010
Device: Kindle Voyage
|
I'm pretty sure he's referring to Lugaru Epsilon, the editor for programmers.
http://www.lugaru.com/ It's not cheap at $250.00. |
![]() |
![]() |
![]() |
#7 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
![]() |
![]() |
![]() |
#9 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,136
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But there is a bug in the computer CSS style. It's using px for the font-size and that's wrong. It should be using em.
|
![]() |
![]() |
![]() |
#10 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
![]() |
![]() |
![]() |
#11 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Epsilon sounds interesting, but what speciically do you get over vim? I glanced at their comparison page but it looks like they hype a lot of things that you can do with the right vim plugins.
Of course, I imagine vim is more complex to learn (and I am a newbie ![]() |
![]() |
![]() |
![]() |
#12 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Hitch |
|
![]() |
![]() |
![]() |
#13 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,629
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I used Epsilon on a couple of projects. I (we) liked it because the scripting language is C-like, we were writing our software in C and assembler. It could also emulate Underware Brief which a lot of the programmers had used in previous jobs. As in Hitch's usage, it snuck in via a contractor - it replaced vi, emacs, and Brief.
Bit expensive for personal use though, we had a multi-seat site license. BR |
![]() |
![]() |
![]() |
#14 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,596
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#15 | ||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
The divine Terisa de morgan said: Quote:
![]() Hitch |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature request : using a custom css file | Bertrand | Writer2ePub | 8 | 12-28-2019 11:46 AM |
Combining Class IDs In CSS to Control Left-Indent | SeaCanary | Sigil | 13 | 02-24-2014 01:58 PM |
Extra CSS and class renaming | fenuks | Recipes | 4 | 01-26-2014 05:24 AM |
Feature Request - custom CSS style | gentoosiast | EPUBReader | 1 | 12-14-2012 03:26 AM |
Feature request: CSS style application | Fitz | Sigil | 4 | 07-25-2010 06:36 AM |