![]() |
How do I change italic <i> shortcut to use <em> instead?
Hi,
I've tried searching this sub-forum but I can't seem to find an answer. I'm using Sigil 1.2.0 and I want to modify the Ctrl + I shortcut to use <em>TEXT</em> instead of <i>TEXT</i> as <i> is not accepted by either Google Play Publish or Itunesconnect for ePub 3 submissions. Can anyone recommend how I make this change? Do I need to edit a specific file as the Edit > Preferences > Keyboard Shortcuts don't allow me to alter the HTML used by the shortcut. Many thanks! |
Quote:
https://www.mobileread.com/forums/sh...d.php?t=270639 |
I don't think there is an option for that... but, you can either use the plugin JSWolf mentioned, or a simple regex to change them all. I saved the regex as a Saved Search group and it changes several things with a single run like (<i> to <em>, <b> to <strong>, etc)
search: <i>(.*?)</i> replace: <em>\1</em> Cheers, |
Quote:
Am I using it wrong? Or is that functionality simply not possible in that plug-in? Thanks. |
Quote:
This sounds like I'd need to accept the fact that <i> is what to run with for speed, and then remember to add a post-processing task at the end to convert them all to <em> afterwards. Although, bizarrely, <b> is still accepted as valid, but <i> isn't. If you don't mind me asking, how do you go about creating the regex and running it at the end stage of the Sigil production workflow? Thanks. |
1 Attachment(s)
You can use the Saved Searches feature (Tools/Saved Searches... or Ctrl-Alt-F) to create a Group of searches.
Then when you want to run one, just highlight the title of the group - or even an individual search within the group to run that particular portion. The link above has all the details...its to the Sigil User Guide and has a section on Saved Searches. Attached is one of the groups of regex's I use: |
An "i" tag is valid html5 and therefore valid for epub3. It even has a slightly different semantic than the "em" tag. A forign word, a ship name, etc vs just "emphasis". How on earth can Google Play Publish make such a rule. It is not part of the epub3 spec. Itunes ibooks does allow the use of both the "i" tag and the "em" tag. Sounds like the "thought police" are back in action and this time are reading your mind to determine that the "i" tag is somehow inappropriate.
I would file a bug report with Google Play publish and tell them they are neither the owner of the epub3 spec nor can they read minds to determine how the author meant to use "i" vs "em". So silly. |
Quote:
Apple's own documentation points to this web page: https://www.w3.org/TR/html401/struct/text.html and it was from here I got the idea for using <em> instead (and that just works). |
Quote:
1. Right-click the toolbar and check Clip Bar, if it isn't already checked. 2. Select Tools > Clip Editor. 3. Highlight the topmost entry and click Add Entry. 4. Enter <em> in the Name field and <em>\1</em> in the Text field. 5. Click the up arrow button to move the new clip to the top. 6. Click Save. You should see an <em> button in the Clip Bar that allows you to wrap text in <em>...</em>. |
Quote:
You should be using an html5 based validator and not that old spec. It actually violates the epub3 spec in more than a few places. |
Quote:
I'd never used clips before in Sigil, so that's my TIL for today. I'm just having a poke around now so I can edit the clip keyboard shortcuts for the new <em> clip. CTRL + ALT + 2 doesn't seem to do anything. But at least I can now just click on it from the 'Clips' menu on the left-hand side. |
Quote:
Hopefully Apple will one day update their documentation links to something more beneficial. :) |
I don't know about "Google Play publish", but all my ebooks are available on Google Play, and all of them use <i> tags for italics. They are epub2.
|
Quote:
If you want more detailed discussion, see the 2017 thread "Extended <head> chapter: NOT necessary?" (especially my post #43 plus surrounding posts discussing differences between <i> vs. <em>). |
Quote:
However, my main concern is getting a workflow that "just works" across KDP, Google Play Books, and iTunesConnect. Right now, from a speed perspective at least, <em> for emphasising words and <b> for bolding words is the quickest - for me. I need to work within the currently accepted rules of whatever digital eBook store I want to sell on. And, as it currently stands, as valid as <I> is, it's not accepted in ePub 3 by every eBook retailer. Sadly. |
| All times are GMT -4. The time now is 09:29 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.