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 01-26-2014, 06:08 PM   #1
embryo
Fanatic
embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.
 
embryo's Avatar
 
Posts: 529
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
Feature Request: Headings buttons

Just to add one feature to your miles-long "To do" list.
Something I use continuously in Sigil.
The "H1 H2 H3 H4 H5 p" buttons.
Just select something and change the heading type with one click.
After that, auto create TOC and auto split the HTML files.
The only thing that keeps me still using Sigil.

Thanks for your work anyway :o)
embryo is offline   Reply With Quote
Old 01-27-2014, 12:58 AM   #2
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It's not clear to me how such a feature would work robustly. Consider the following example:

Code:
<div>
  <div>
      <span class="heading">cursor</span>
  </div>
</div>
And you select the word cursor and trigger the h1 button. Which tag should be changed to h1? The first div, the second div or the span?

The best that can be done is to change the immediately surrounding tag, which means if you want to change the first div you need to put your cursor between the first and second divs, for the second div, between the second div and the span and so on.
kovidgoyal is offline   Reply With Quote
Advert
Old 01-27-2014, 01:21 AM   #3
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: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I think perhaps embryo means do as Sigil does -- wrap the currently selected text with the tags, and rely on the user knowing what he is doing.

Sigil way:
For the alignment toolbar, the first surrounding tag that accepts text-align is the one that gets the attribute, but the heading/formatting toolbars (h1-6, p, strike, sub, sup, b, u, i) will only apply to the actual text selected.

Book view will allow you to change strictly between p, h1-6 applying to the entire p/h1-6 around the currently selected text. But we don't want any Book view anyway.

I agree with embryo, it would be nice to be able to have the most commonly used tags in a toolbar that just follows the idea of regex replace: <$tag>\1</$tag>
eschwartz is offline   Reply With Quote
Old 01-27-2014, 10:45 AM   #4
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: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
My 2cents:
Working in CV change the first (from the inside): P, Div, H to the designated H# or P. Leave the class intact.
You noticed I included H so the level could be changed H2 > H3

In Sigil, I setup '(wrap with)-Clips for P, Div, H3 complete with any class I wanted to assign (these do not remove any existing tags, only wrap the selection in a tag)

Type some words. Select them. Hit the Clips (toolbar) Menu item
My most used clips are on the clips toolbar
theducks is offline   Reply With Quote
Old 02-04-2014, 02:54 PM   #5
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
My 1.5 cents --

Specific example: If I click the new [H1] toolbar button in a <p> ... </p>, then just change the p's to h1's

Generally, add [H1] ... [H6], [P] (maybe more) and if the cursor is in a H# or p block then just change the tags and strip the classes.

If I shift-click, then replace the tags, but leave the classes

If there aren't any h# or p tags, then add the choice to the inner-most text based on container

If the cursor is on 'cursor', then [H1] would ...

Code:
<div>
  <div>
      <span class="heading">cursor</span>
  </div>
</div>

make

Code:
<div>
  <div>
      <h1>cursor</h1>
  </div>
</div>
Shift click [H1] would leave the class

Code:
      <h1 class="heading">cursor</h1>
Just some thoughts
phossler is offline   Reply With Quote
Advert
Old 02-08-2014, 01:19 PM   #6
embryo
Fanatic
embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.
 
embryo's Avatar
 
Posts: 529
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
Well, its here!

The only thing is that it seems to be working only in the editor part of the program. If I select a word or a paragraph in the preview, and hit the H1, the text in the editor gets bold and ... nothing changes.
I'm almost sure that there is something there that I miss, but...
It would be nice if it worked the same way in both views, but this is better than not at all.
embryo is offline   Reply With Quote
Old 02-08-2014, 05:10 PM   #7
BobC
Guru
BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.BobC ought to be getting tired of karma fortunes by now.
 
Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
I think you will find that when you click on a word in the preview the cursor in the editor will move to a point before the "current" paragraph. When you hit H1 it wraps everything in H1 tags - in the case I tried the entire body.

The editor window is for editing, not the preview - watch where the cursor goes in there before trying to change anything.

BobC
BobC is offline   Reply With Quote
Old 02-08-2014, 11:43 PM   #8
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,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by embryo View Post
The only thing is that it seems to be working only in the editor part of the program. If I select a word or a paragraph in the preview, and hit the H1, the text in the editor gets bold and ... nothing changes.
As BobC stated all editing is done via the edit window. I believe the preview pane is only actively used for reviewing book, placing the cursor in the editing window and placing pagebreaks.

Here are the release notes for this new feature.

Quote:
Release: 1.23 [07 Feb, 2014]

New Features
  • Edit Book: Add a tool to easily change the current paragraph (the paragraph containing the cursor) to a heading. Simply click the button with 'H1' on it and choose the heading level you want the current paragraph changed to.
DoctorOhh is online now   Reply With Quote
Old 02-09-2014, 07:06 AM   #9
embryo
Fanatic
embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.embryo calls his or her ebook reader Vera.
 
embryo's Avatar
 
Posts: 529
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
Quote:
Originally Posted by DoctorOhh View Post
As BobC stated all editing is done via the edit window. I believe the preview pane is only actively used for reviewing book, placing the cursor in the editing window and placing pagebreaks.
Yes, I understand now.
You see, I'm used to work with Sigil, and I find its way of editing easier. Its much better for me, to highlight a word of (preview) text and make it Bold, Header or whatever and at the same time see how it looks, than to work in the editor and all the time "ping-pong" between that pane and the preview one.

Of course, this is a matter of preference.
The editor is really good as is already.
embryo is offline   Reply With Quote
Old 02-09-2014, 02:34 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: 85400180
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 embryo View Post
Yes, I understand now.
You see, I'm used to work with Sigil, and I find its way of editing easier. Its much better for me, to highlight a word of (preview) text and make it Bold, Header or whatever and at the same time see how it looks, than to work in the editor and all the time "ping-pong" between that pane and the preview one.

Of course, this is a matter of preference.
The editor is really good as is already.
That was Book view, not preview. calibre has no Book view.

On the other hand, in both Sigil and calibre the preview will open at the same time as the code view, so you can see your changes updating live.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Enhancement Request]Calibre Navigation Buttons way too big elementz Calibre 19 02-07-2014 07:25 AM
Possible Feature Request BookJunkieLI Calibre 12 08-08-2012 10:34 AM
feature request antonin.chadima Sigil 5 07-14-2012 06:48 AM
feature request pyatachoks EPUBReader 1 06-27-2011 10:49 AM
Feature Request: Hot-keying Navigation-buttons Arjun EPUBReader 3 04-14-2010 08:05 AM


All times are GMT -4. The time now is 02:14 AM.


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