Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 03-17-2014, 08:20 PM   #1
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Two requests

Hi Kovid

I'm using Editor more often now, and use the TOC tool all the time - so useful being able to add Covers, Jackets etc. without having to muck about.

If the tasks below are already possible (with buttons) I apologise, and somebody please point!

Firstly: No button for text alignment - which is pretty standard everywhere and I miss it! Other related codes -- indent, bullets etc. I can live without but those, too, would be nice in the future. I don't doubt you have them in the pipeline. Just looking up at the forum formatting options - most of those on the left hand half of the toolbar would be good in time.

Second: TOC tool -- it would be very, very useful to be able to use "bulk"selections in the nesting screen. It's quite frustrating having to individually indent chapters if a book has 80!!

Thanks so much for all your hard work.
Hoods7070 is offline   Reply With Quote
Old 03-17-2014, 09:29 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,847
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
There is no alignment (or other styling) button because this is a code editor not a WYSIWYG editor

When a 'clips' tool gets implemented, you can make all the 'clips' you want to insert your class="foo" to the tag . foo being the most perfect of styles
theducks is offline   Reply With Quote
Advert
Old 03-17-2014, 11:03 PM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,910
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And if you want to indent multiple entries in the ToC Editor, simply select them all and drag and drop them onto their parent entry.
kovidgoyal is offline   Reply With Quote
Old 03-18-2014, 07:34 AM   #4
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by theducks View Post
There is no alignment (or other styling) button because this is a code editor not a WYSIWYG editor

When a 'clips' tool gets implemented, you can make all the 'clips' you want to insert your class="foo" to the tag . foo being the most perfect of styles
Thanks, but if that's the case, why are there buttons for text enhancements ... bold, italic, color etc? I'd like to be able to insert styling CODE around selected text to align headings etc.

When a clips tool is available, I prefer to limit my clips to Regex stuff that's a pain to type.
Hoods7070 is offline   Reply With Quote
Old 03-18-2014, 07:35 AM   #5
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by kovidgoyal View Post
And if you want to indent multiple entries in the ToC Editor, simply select them all and drag and drop them onto their parent entry.
Thanks, Kovid - nice.

And for the reverse? i.e. de-nesting to primary level?
Hoods7070 is offline   Reply With Quote
Advert
Old 03-18-2014, 07:44 AM   #6
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,863
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Hoods7070 View Post
Thanks, but if that's the case, why are there buttons for text enhancements ... bold, italic, color etc? I'd like to be able to insert styling CODE around selected text to align headings etc.
I'm very inexperienced, but aren't bold, color italics etc.. all standalone code that lends itself to in-line wrapping of text? Where, at least for html5, the align attribute of <p> is not supported and all aligns should be done in CSS. Even in-line align is not its own tag, just an attribute.

What kind of challenges that creates for a code editor I have no idea. Just pointing out the obvious difference.

Last edited by DoctorOhh; 03-18-2014 at 07:46 AM.
DoctorOhh is offline   Reply With Quote
Old 03-18-2014, 07:45 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,910
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Hoods7070 View Post
Thanks, Kovid - nice.

And for the reverse? i.e. de-nesting to primary level?
Same thing, just drop onto the root (i.e. drop between two elements at the higher level).
kovidgoyal is offline   Reply With Quote
Old 03-18-2014, 06:04 PM   #8
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by DoctorOhh View Post
I'm very inexperienced, but aren't bold, color italics etc.. all standalone code that lends itself to in-line wrapping of text? Where, at least for html5, the align attribute of <p> is not supported and all aligns should be done in CSS. Even in-line align is not its own tag, just an attribute.

What kind of challenges that creates for a code editor I have no idea. Just pointing out the obvious difference.
I too am relatively inexperienced, which is why I asked the question. theducks differentiates between all the other buttons presently on the Editor toolbar (code) and text alignment (apparently wysiwyg, not code) and I find that confusing. I am completely self-taught, so such purist distinctions are currently way above my head.

I DO code text alignment into major styles (such as "H" class headings) and have a class defined for centering in my CSS which I can easily add to coding as needed. However, until and even if, a clip feature is added to Editor, having a button for text alignment (span style coding) seems like an obvious thing...to this little black duck, anyway. I am happy to be enlightened!
Hoods7070 is offline   Reply With Quote
Old 03-18-2014, 06:06 PM   #9
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by kovidgoyal View Post
Same thing, just drop onto the root (i.e. drop between two elements at the higher level).
OK, thanks - I did try that before, but it didn't appear to work. I have persevered and I see now it does - seems a little fiddlier, for some reason.
Hoods7070 is offline   Reply With Quote
Old 03-18-2014, 07:25 PM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by Hoods7070 View Post
I too am relatively inexperienced, which is why I asked the question. theducks differentiates between all the other buttons presently on the Editor toolbar (code) and text alignment (apparently wysiwyg, not code) and I find that confusing. I am completely self-taught, so such purist distinctions are currently way above my head.

I DO code text alignment into major styles (such as "H" class headings) and have a class defined for centering in my CSS which I can easily add to coding as needed. However, until and even if, a clip feature is added to Editor, having a button for text alignment (span style coding) seems like an obvious thing...to this little black duck, anyway. I am happy to be enlightened!
It sounds like this might be the underlying problem: bold/italics/color and stuff like that can be wrapped around a single word, if need be in a span tag, but text-align and stuff like that must be used on a div/p/blockquote section and cannot be applied specifically to a certain word. And that means calibre would have to hunt down the parent tag, then analyze it to strip out any alignment code currently there, then apply new alignment code on that parent element.

So anything that can be wrapped with a span tag around selected words can get a button, but if it cannot fit in a span tag I don't think it will get done. Or at least it will be a low priority, only for when Kovid gets bored with everything else he has to do.
eschwartz is offline   Reply With Quote
Old 03-19-2014, 02:47 AM   #11
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
Quote:
Originally Posted by eschwartz View Post
It sounds like this might be the underlying problem: bold/italics/color and stuff like that can be wrapped around a single word, if need be in a span tag, but text-align and stuff like that must be used on a div/p/blockquote section and cannot be applied specifically to a certain word. And that means calibre would have to hunt down the parent tag, then analyze it to strip out any alignment code currently there, then apply new alignment code on that parent element.

So anything that can be wrapped with a span tag around selected words can get a button, but if it cannot fit in a span tag I don't think it will get done. Or at least it will be a low priority, only for when Kovid gets bored with everything else he has to do.
Irrational Optimist - can I borrow that?

OK - in terms of using a button to apply a code, what's the difference between inserting italics:

Code:
<p>The cat sat on the <i>fluffy</i> mat.</p>
and centering a line:

Code:
 <p class="calibre1" style="text-align: center;">The cat sat on the fluffy mat.</p>
Either way you select the text then apply the codes. And an alignment style code goes in the same place every time, so you'd (well, I'd) think implementing that with a button would be straightforward at every level. But then again I am probably being completely obtuse here. If it's just a question of coding semantics, I concede.

Maybe Kovid can consider it if and when he's ever bored enough ... does that ever happen??
Hoods7070 is offline   Reply With Quote
Old 03-19-2014, 05:39 AM   #12
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,863
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by Hoods7070 View Post
and centering a line:
Code:
 <p class="calibre1" style="text-align: center;">The cat sat on the fluffy mat.</p>
Either way you select the text then apply the codes. And an alignment style code goes in the same place every time, so you'd (well, I'd) think implementing that with a button would be straightforward at every level. But then again I am probably being completely obtuse here. If it's just a question of coding semantics, I concede.
I don't believe it is a question of "coding semantics." In your example the align should be added to the calibre1 section of the CSS not in-line. What happens if calibre1 says text-align: left and you place a text-align: center attribute in the same paragraph? Which one rules? Calibre1 could cover half the book... If you select four words in the middle of a paragraph you can't just throw any random span with the align attribute and not take into account the rest of the document.

Without question it could be done with enough analysis in the program, but it is definitely far more complicated then the assumptions in your example.

Again, the challenges this creates from a coding point of view I can't even begin to guess, but it is obviously not the same as bold, italic, strike-thru etc...

This editor is most likely never going to be a what you see is what you get editor. So if you want to change calibre1 to text-align: center, for the foreseeable future you'll have to insert the line into the proper class in the CSS.

Quote:
Originally Posted by Hoods7070 View Post
Maybe Kovid can consider it if and when he's ever bored enough ... does that ever happen??
It happens, one example (from 2009) many folks were wanting a lrf to epub conversion capability. It wasn't at the top of his list, but he had a long layover in an airport and was "bored of fixing bugs" ... the next thing you know the lrf to epub conversion feature was added to calibre.

Last edited by DoctorOhh; 03-19-2014 at 05:46 AM.
DoctorOhh is offline   Reply With Quote
Old 03-19-2014, 11:05 AM   #13
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,910
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The problem with justification, is as has been pointed out that it is a block level property, not an inline one, and while it is certainly possible to detect the nearest surrounding block and slap the style="text-align: whatever" on it, this is not generally a good way to structure your code. You really should setup alignment at a global level with CSS and apply it to all blocks, with a few specific exceptions.
kovidgoyal is offline   Reply With Quote
Old 03-19-2014, 11:37 AM   #14
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,847
Karma: 54837878
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Why encourage sloppy coding by providing a tool that creates a potential inline mess
I realize there are occasional valid uses, but those few can/should be hand coded.

IMHO block level styling should be done via the CSS
theducks is offline   Reply With Quote
Old 03-20-2014, 03:57 AM   #15
Hoods7070
Groupie
Hoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notesHoods7070 can name that song in three notes
 
Posts: 159
Karma: 24430
Join Date: Mar 2012
Location: Australia
Device: Nexus 7"
I don't think I have been making myself clear. I certainly would never advocate or use buttons to change alignment in "bulk" (multiple paragraphs) in body text and clearly I use CSS for 99.995% of all alignment. However, it is occasionally very handy to use a button to, for example, quickly center (or otherwise) something like a headline, or a company name, whatever, sitting in between paragraphs in a novel. If you have an existing class that has all the characteristics you want OTHER than the alignment, it saves defining a new class or typing in the style:align coding. (Sigil's buttons override the class alignment, if any.) The insertion point is pretty straightforward, surely, as you would only be using a button to align an entire selected line/block of text. I can't see how that's sloppy or how it encourages sloppy coding, personally.

Anyway, thanks everyone. I have learned to differentiate between simple inline and other codes -- something I hadn't thought of before since I define characteristics for italics etc. in my CSS.
Hoods7070 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enhancement requests (or Does it already do that?) atuszynski Calibre 2 04-04-2011 11:02 PM
Two questions/requests MildBill Conversion 13 01-31-2011 03:47 AM
Feature Requests quietone Calibre 6 03-07-2010 01:56 AM
Change requests mikelv EPUBReader 0 11-30-2009 01:19 PM


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


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