07-16-2016, 04:40 AM | #1 |
Member
Posts: 10
Karma: 10
Join Date: May 2014
Device: kindle
|
Creating curly quote clips
Hi, could somebody remind me how to make "ctrl+n" and "ctrl+m" shortcuts for open curly quotes and close curly quotes. I set it up before but have since re-installed sigil on a new laptop and IU can't remember how I did it. It might have been via the clip editor but I've been playing around with it and can't work it out now. Thanks in advance.
|
07-16-2016, 08:11 AM | #2 |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I decided to move this to its own thread, rather than be tacked onto our older, typographic debate concerning punctuation smartening practices. Hope you don't mind.
Last edited by DiapDealer; 07-16-2016 at 08:38 AM. |
Advert | |
|
07-16-2016, 08:37 AM | #3 |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Very briefly, I would:
1) from the main menu, use "Insert-->Special Character" to insert both an opening and closing curly quote into a dummy document template (the point is, it's temporary. Don't mess up a real epub). 2) highlight the opening quote in Code View/Book View and right click on it. Then select "Add to Clips" from the context menu. Give the clip a descriptive name in the clip editor that opens and save/close the dialog. Repeat step 2 for the closing quote. 3) Open the Clip Editor ("Tools-->Clip Editor"), if it's not already open, and note the position of your newly created clips. For the purpose of this exercise, I'm going to assume that the "Opening Quote" clip is in the first position and the "Closing Quote" clip is in the second position. You can drag the clips to whatever position/order you want. Just note what positions your two clips are in before you go to assign keyboard shortcuts. Close (Saving if necessary) the Clip Editor. 4) Open the Keyboard Shortcuts preference widget ("Edit-->Preferences; then Keyboard Shortcuts from the resulting dialog). Scroll to the Clip entry number that corresponds to the opening quote clip (If the clip was first, it's "Clip 1"; second is Clip 2, etc...) and highlight it. In the "Shortcut" text box at the bottom of the dialog, remove any shortcut that is currently there and use the keyboard to assign the keystroke combination you desire. Then hit the "Assign" button. Repeat step 4 for the closing quote. **Note: Your desired shortcuts conflict with the default keyboard shortcuts for "File->New" and the "Merge" feature (a message appears below the Shortcut text field when you try to assign shortcuts that are already assigned). You'll need to either choose shortcuts that aren't already taken, or you'll need to change the existing "File->New" and "Merge" keyboard shortcuts to something else first. Hope that helps/jogs your memory! Last edited by DiapDealer; 07-16-2016 at 02:13 PM. |
09-11-2016, 08:35 AM | #4 |
mostly an observer
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Thank you for the tutorial! Just what I needed this morning.
|
08-28-2017, 10:03 AM | #5 |
Member
Posts: 10
Karma: 10
Join Date: May 2014
Device: kindle
|
I have another question related to this, so I'm sticking it here. Hope that's OK.
I recently tried setting the single apostrophe key on my keybaord to give a curly apostrophe in sigil because I never use a straight apostrophe and it was annoying having to always pull down the "insert special character" menu or find and replace straights with curlies after finishing a book (especially as find and replace had to be done one-by-one as sometimes the apostrophes would end up the wrong way around). I followed the same steps for curly quotes as above. Clip 6 (in my sigil) is now a curly apostrophe, and I made the keyboard shortcut simply the apostrophe key. It worked for a minute or two, then reverted to straight apostrophe. I tried it several times, but it stayed as a straight apostrophe. So I even uninstalled and updated to the latest version of sigil, and tried again. Once more it worked for a little while, giving me curly apostrophe whenever I hit the apostrophe key, but then it reverted to straight apostrophe, and once again it won't go back to curly. I'm wondering if this is some kind of bug ...? |
Advert | |
|
08-28-2017, 12:21 PM | #6 |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I honestly don't know if using a single key for a shortcut is even supported. It will probably only work until another program restores the key's normal function. At which point you'd probably have to close all running programs and relaunch Sigil to achieve the effect you want. It's not a bug, but rather, it's something that's just not feasible. You'd probably need to look for some sort of low-level keyboard-mapping software to pull something like that off.
It's another reason why entering text via Sigil is just not the way to go. Most word-processing programs already have the ability to convert straight-quotes to curly ones "on the fly." |
08-28-2017, 11:31 PM | #7 | |
Member
Posts: 10
Karma: 10
Join Date: May 2014
Device: kindle
|
Quote:
Also, as I say, it does work (to assign a single key - in this case the apostrophe key) but then it seems to fail after a few minutes, whereas the other assigned keys remain assigned. If it's not a bug, it certainly acts buggy. I like to type into sigil because I write fiction which is simply blocks of text with indented new paragraphs. Using a word processor is completely uneccessary for such simple formatting that fiction requires, but of course curly quotes is the norm in fiction and I prefer the look. |
|
08-29-2017, 06:32 AM | #8 |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've never seen any program on any platform that allowed a user to assign any sort of macro function to a single character keystroke. It's always a combination of keys - alt+something, shift+ctrl+something. You can't assign the 'v' character to the 'u' key, for instance. The fact that it might work "for a little bit" is irrelevant. The relevant fact is that the OS "takes back" its property.
|
08-29-2017, 10:28 AM | #9 |
Imperfect Perfectionist
Posts: 451
Karma: 672038
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: none
|
Actually you can, but not the way the OP does it.
You can use some sort of "text-expander" software (I use Fastkeys, which is a shell around AutoHotkey). Some of these programs even allows you to restrict the function to a single program. So if you set, say, every time you press apostrophe, then it should send a y, and trigger immediately, then - well, that's what it does.(Its a bit difficult to explain, but it's easy enough to set up, once you've got the hang of it). Regards, Kim |
08-29-2017, 11:04 AM | #10 | |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Last edited by DiapDealer; 08-29-2017 at 11:09 AM. |
|
08-30-2017, 04:29 AM | #11 | ||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Just type using dumb quotes + dumb apostrophes, and then run the completed book through a Smarten Punctuation. DiapDealer created plugins for both Sigil and Calibre: Sigil: PunctuationSmarten Plugin Calibre: Diap's Editing Toolbag (I suggest this over the default Calibre Smarten Punctuation, because it handles more nuanced situations [disabling ... -> ellipsis, etc. etc.]) After you run either of those plugins, all you have to do is search for and replace the handful of exceptions. For example, I use this Regular Expression: Search: ‘(Em|em|Til|til|Tis|tis|Twas|twas) Replace: ’\1 That would take an incorrect sentence like "Go Get ‘Em Tiger", and correctly flip the LEFT single quote to a RIGHT single quote. There are other odd situations you have to look out for that the algorithms might botch, like around italics or em dashes, but the algorithms get it correct for the most part. From there, there are a few other tools that check if you have any mismatching quotation marks such as: Quote:
https://www.mobileread.com/forums/sh...d.php?t=213372 Another program is LanguageTool: https://www.languagetool.org Last edited by Tex2002ans; 08-30-2017 at 04:37 AM. |
||
08-30-2017, 07:13 AM | #12 |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Remember that my plugins (for both Sigil and calibre) allow you to define an exceptions file. You can use that to define all your commonly used 'twas-es and 'causes 'ems and the like so that the plugin will handle them correctly. Not to say that the exceptions file will eliminate the need for all regex cleanup tweaks altogether, but it can greatly reduce the need.
|
08-30-2017, 10:16 PM | #13 |
Member
Posts: 10
Karma: 10
Join Date: May 2014
Device: kindle
|
Thanks everyone for your helpful replies.
|
08-31-2017, 12:42 AM | #14 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
|
|
08-31-2017, 03:01 AM | #15 |
Member
Posts: 10
Karma: 10
Join Date: May 2014
Device: kindle
|
In case anyone else is interested in solving this problem, I just downloaded and set up "phraseexpress" to use the apostrophe key to type a curly apostrophe (and only do so within sigil) and so far it's working great.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to search/replace double quote with left/right double quote ? | Alt68er | Sigil | 4 | 01-24-2014 11:57 AM |
Kindle Literature Quiz Game - Quote for Quote | glowingeyegames | Self-Promotions by Authors and Publishers | 0 | 07-16-2012 12:50 PM |
Single-quote/Double-quote | Rand Brittain | ePub | 9 | 09-01-2011 11:34 AM |
curly quote not in calibre viewer | cybmole | Calibre | 11 | 02-18-2011 11:54 AM |
curly quotes | DaleDe | Sigil | 6 | 06-26-2010 10:33 PM |