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 11-11-2022, 08:56 AM   #1
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 320
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
ctrl + 1 question

Ctrl + b forces you to select text first and this makes sense because sometimes you want to make bold only a word, not just the entire string between two <tag> pairs.

When putting the cursor anywhere in text enclosed by any tag pair you can convert that tag pair to <h1> and </h1>. It is not necessary to select the text between the tags first. Is there any snippet which can do the same thing? That is, without first selecting and highlighting the text?

<p>This is a sentence.</p>
converts to
<h1>This is a sentence.</h1>

The cursor can be anywhere inside of 'This is a sentence.' The entirety of the text does not have to be highlighted for the <p> to <h1> conversion when you hit Ctrl +1.

Best regards, Pop
rjwse@aol.com is offline   Reply With Quote
Old 11-11-2022, 09:27 AM   #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: 31,046
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Because a Heading is a phrase, not a single word out of one.
theducks is offline   Reply With Quote
Advert
Old 11-11-2022, 09:53 AM   #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: 45,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You are asking for a snippet to turn all text inside a tag bold?
kovidgoyal is offline   Reply With Quote
Old 11-12-2022, 06:51 AM   #4
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 320
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
Thanks for your replies. I stated the question unclearly. Ctrl + 1 converts to H1 when you put your cursor anywhere in the string; you do not first have to select all or portions of the string. This works differently than Ctrl + b which converts any selected portion of a string to bold. I would like to be able to put my cursor somewhere in a string, then convert the tags surrounding the string into tags of my choosing.

For example, if I put the cursor anywhere in 'Some string.' I can change <p> into <h1>.
<p>Some string.</p> into <h1>Some string.</h1>

In order to make some or all of 'Some string.' bold I must first select that portion before using Ctrl + b. This does not change any other tags.
<p>Some string.</p> into <p>Some <b>string</b>.</p>

I was hoping for a way to use, say, Ctrl + 4, to convert the tags surrounding a string when my cursor is anywhere within that string (without selecting text) into another pair of tags.
<p>Some string.</p> into <Tag>Some string.</Tag>

Best regards, Pop
rjwse@aol.com is offline   Reply With Quote
Old 11-12-2022, 07:35 AM   #5
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 14,007
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Ctrl 4 ought to do heading level 4.

Consider adding or editing the style="whatever" in the p tag. IMO really <b>, <i>, <strong> and <em> should only be used for a word or part of a word. A paragraph <p> or heading <hx> should have any styles, size, margin, or font defined in the CSS.

An aside. A heading shouldn't end with a period (full stop), usually either nothing, ? or ! Style guides differ on the : at the end of a heading.

Last edited by Quoth; 11-12-2022 at 07:38 AM.
Quoth is offline   Reply With Quote
Advert
Old 11-12-2022, 08:16 AM   #6
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,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Press Ctrl+alt+t and then ctrl+b the first will select the contents of the surrounding tag for you
kovidgoyal is offline   Reply With Quote
Old 11-13-2022, 06:05 AM   #7
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 320
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
Press Ctrl+alt+t and then ctrl+b the first will select the contents of the surrounding tag for you
__________________
Thanks for help, everybody. NOTE: Ctrl-Alt-t raises terminal in Linux and I was confused at this, but Ctrl-Alt-Capital-T selects everything in between tags. Could not find in 'keyboard shortcuts'.

Is there a one-shot snippet which can convert any tag to another tag of your choosing?

Thank you again for help. I learned a lot! Best regards, Pop
rjwse@aol.com is offline   Reply With Quote
Old 11-13-2022, 11:18 AM   #8
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by rjwse@aol.com View Post
but Ctrl-Alt-Capital-T selects everything in between tags. Could not find in 'keyboard shortcuts'.
How do you actually do the Ctrl-Alt-Capital-T sequence? On my Ubuntu box all I can get is the terminal. Tried Ctrl-Alt-Shift-T and it does nothing.
retiredbiker is offline   Reply With Quote
Old 11-13-2022, 11:49 AM   #9
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,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There I added ctrl+shift+t as well https://github.com/kovidgoyal/calibr...2abe40a00db3e6

or you can just disable the ctrl+alt+t global shortcut in your desktop settings.
kovidgoyal is offline   Reply With Quote
Old 11-13-2022, 01:56 PM   #10
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by kovidgoyal View Post
There I added ctrl+shift+t as well https://github.com/kovidgoyal/calibr...2abe40a00db3e6

or you can just disable the ctrl+alt+t global shortcut in your desktop settings.
Excellent, thank you!

I use ctrl+alt+t many times a day, for the terminal, so I think I'll keep that!
retiredbiker is offline   Reply With Quote
Old 11-13-2022, 09:25 PM   #11
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,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by retiredbiker View Post

I use ctrl+alt+t many times a day, for the terminal, so I think I'll keep that!
I use super+enter for that, easier to hit.
kovidgoyal is offline   Reply With Quote
Old 11-14-2022, 06:19 AM   #12
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 320
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
Thanks to all.

Is there a one-shot snippet which can convert any tag to another tag of your choosing?
rjwse@aol.com is offline   Reply With Quote
Old 11-14-2022, 07:31 AM   #13
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 320
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
How do you actually do the Ctrl-Alt-Capital-T sequence? On my Ubuntu box all I can get is the terminal. Tried Ctrl-Alt-Shift-T and it does nothing.
--------------
Yeah. It's tricky! I'm on 22.04 Ubuntu, so I can't say why that key-combo does not work for you. Hold down Ctrl-Shft-Alt-T at same time. When I do that it does not pull up terminal, but Ctrl-Alt-t does pull up terminal. Keyboard shortcuts requiring eleven or more simultaneous keypresses make me take off my shoes. But, you know, it's not bad at all to use four or five.
You may (or may not) be younger than me and you may (or may not) recall that in years past the automobile 'headlight dimmer switch' was a foot-controlled button on the floor operated with your left foot. It is now, of course, located on a stalk on the steering wheel. Many Boomers have been injured by this needless transition because out of habit of foot-usage we kept getting our left foot caught in the steering wheel. Best regards, Pop
rjwse@aol.com is offline   Reply With Quote
Old 11-14-2022, 08:03 AM   #14
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 167
Karma: 1497966
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by kovidgoyal View Post
There I added ctrl+shift+t as well
Thank you, Kovid.

Is there a place where we can find the list of those useful shortcuts (and/or actions) that are not listed in the config of the editor?
lomkiri is offline   Reply With Quote
Old 11-14-2022, 08:43 AM   #15
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,339
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://manual.calibre-ebook.com/edi...he-code-editor
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl-R not working? mbovenka Calibre 70 10-20-2020 08:34 AM
Book view ctrl+v rbruce1314 Sigil 25 05-15-2015 07:12 AM
Ctrl-7 for <p> tags phossler Editor 3 02-25-2014 05:40 PM
Librarything using Ctrl-D in GUI bwk Calibre 24 04-03-2012 11:34 AM
iLiad No 'Ctrl' on iLiad?! ericshliao iRex Developer's Corner 7 11-06-2008 06:12 PM


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


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