05-12-2020, 09:56 AM | #106 |
Grand Sorcerer
Posts: 27,961
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Your suggestion of '\d\d[^0-9'] is not a bad one. There might be some things that fall through the cracks when the British style of single-quotes is employed, but they were going to be wrongly interpreted under the old rule too.
Give this beta version a workout. There's only three lines changed from version 0.3.3 of the plugin (lines 631-633 of newsmartypants.py), and two of those are comments. Last edited by DiapDealer; 05-12-2020 at 10:27 AM. |
05-12-2020, 10:47 AM | #107 |
Zealot
Posts: 131
Karma: 10
Join Date: Jan 2015
Location: Buenos Aires
Device: Android
|
Folks, just one more question.
I know this plugin works best in English books. As i am mostly working with German Books is there an adapted plugin as some signs are very different. Or is it language independent. Thanks and sorry for the noop question Thomas |
Advert | |
|
05-12-2020, 11:51 AM | #108 |
Grand Sorcerer
Posts: 27,961
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
To be honest, this plugin is basically just a wrapper around someone else's work: the SmartyPants Python smartening algorithm (which was nowhere near perfect--or even complete--in the first place). I've just tweaked it where I can. I would say that SmartyPants is definitely English-centric.
There may be some language specific (or agnostic) smartening algorithms out there, but I've not run into them. |
05-13-2020, 09:13 AM | #109 |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Yep, that works.
<p>Month '1' in '84 was a good year. He had a '317' average and solved the '3 body problem'.</p> to <p>Month ‘1’ in ’84 was a good year. He had a ‘317’ average and solved the ‘3 body problem’. </p> I see the previous version checked for '80s and '90s, etc. But not particular years. There are some cases that fail: A '12-gauge shotgun'. But 'NN years are much more common. When you update it, you could include the plugin.png icon. If you don't have one, here's the one I use, found in another thread a while ago. Last edited by AlanHK; 05-14-2020 at 01:31 PM. |
05-26-2020, 12:18 PM | #110 |
Member
Posts: 11
Karma: 10
Join Date: Dec 2014
Device: laptop & tablet
|
Odd change
Greetings,
I use this in Sigil to 'correct' files downloaded form ... everywhere. Recently, I noticed a perceived problem. The file in question had this, " -- " or {[space][hyphen][hyphen][space]} and changed it to "—" or (EM DASH}. The writer meant to have a space before and after the punctuation mark, why was it changed the way it was? The proper change, in my view, would be to " – " or {[space]EN DASH][space]} as this makes the epub a better read. Thank You |
Advert | |
|
05-26-2020, 01:59 PM | #111 |
Grand Sorcerer
Posts: 27,961
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Every style guide I know of (with the exception of the Associated Press style guide) states that there should be no spaces between an em dash and the adjacent words.
You can easily turn off dash smartening altogether in the plugin's config section if you want to handle your own non-standard manual conversion of the double-dashes. But I'm not changing the default behavior of the plugin's dash smartening to something non-standard. Last edited by DiapDealer; 05-26-2020 at 02:02 PM. |
05-27-2020, 03:07 AM | #112 | |
Guru
Posts: 674
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
UK style is a spaced en-dash – like this (except in number ranges: pages 80–81). Some publishers do use spaced em dashes though, not that common. I do dashes manually by S&R, as there is often a mix of hyphens and various dashes, spaced or unspaced. And then spend a while fixing ellipses, since I prefer spaced periods. Last edited by AlanHK; 05-27-2020 at 03:12 AM. |
|
05-31-2020, 04:14 AM | #113 | ||||
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
'--' = em dash (no en dash support) I tested on this: Code:
<p>This is a -- sample.</p> Code:
<p>This is a — sample.</p> Search: — then replace with (SPACE + EN DASH + SPACE): Replace: – You could setup a Sigil Saved Search if you find you're doing this correction often. Then you could just run SmartenPunctuation, then the Saved Search right after. Quote:
But maybe how you have that "(no en dash support)", you can have the opposite: ' -- ' = spaced en dash (no em dash support) Note: Just tested in LibreOffice / Word, their AutoCorrect by default changes: "--" -> en dash " -- " -> spaced en dash "sample-- " (two hyphens + space) -> unspaced em dash Quote:
https://en.wikipedia.org/wiki/Dash#P...sentence_level And I agree with AlanHK. From what I've read over the years: The spaced EN DASH seems to be used more in British publications (and newspapers). The EM DASH tends to be used more in American. Spacing Side Note: On spacing around em dashes... there's "open-set" and "close-set": Open-set = Both sides use hair or thin space (or, disgustingly, normal spaces) Close-set = No space on either side See Robert Bringhurst, "Elements of Typographic Style", Chapter 5: Quote:
Last edited by Tex2002ans; 05-31-2020 at 04:20 AM. |
||||
06-23-2020, 05:37 PM | #114 |
Techno-geek
Posts: 225
Karma: 1116651
Join Date: Nov 2006
Location: Mississippi, USA
Device: PRS-T1 (Black), PRS-T3S (Black), Kobo Aura ONE
|
I haven't used PunctuationSmarten for awhile but used it successfully in the past. I tried to use it today several times and each time it logged me out of my user and went to the multi-user login screen.
I am running Sigil version 0.9.18 on MacOSX 10.14.6 (Mojave). The plugin version is 0.3.3 and I just removed and re-downloaded it fro MR and re-installed. Same results. I have been having crashes (memory issues?) with Sigil for a while but only when I close it after a heavy editing session not during use. Any help or suggestion would be appreciated - even upgrading to v.1.2.0. I have not upgraded because 0.9.18 works for me and I am not sure waht advantage 1.2.0 would give me. Maybe I could install v.1.2.0 and try it. --MH |
06-23-2020, 06:04 PM | #115 |
Techno-geek
Posts: 225
Karma: 1116651
Join Date: Nov 2006
Location: Mississippi, USA
Device: PRS-T1 (Black), PRS-T3S (Black), Kobo Aura ONE
|
I have downloaded ver. 1.2.0 and tried the plugin with the same results.
--MH |
06-23-2020, 06:10 PM | #116 |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
If you check out the release announcements, we explain all of the new features and bugs fixed included with each release.
|
06-23-2020, 06:54 PM | #117 |
Grand Sorcerer
Posts: 27,961
Karma: 198500000
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I have no idea how a python plugin could crash Sigil hard enough that it would end the current user session of the OS. Something else has to be in play, here. When does it happen? After selecting the parameters for the run, or as soon as you launch the plugin?
Last edited by DiapDealer; 06-23-2020 at 07:04 PM. |
06-23-2020, 07:42 PM | #118 |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Could you be using a shortcut key sequence assigned to fast user login switching?
Please disable fast user login in Apple preferences and then try again and let us know what happens? If Sigil 1.2.0 actually crashes it should generate a crash report. Please post is here or pm KevinH here with a link. |
06-23-2020, 10:41 PM | #119 |
Techno-geek
Posts: 225
Karma: 1116651
Join Date: Nov 2006
Location: Mississippi, USA
Device: PRS-T1 (Black), PRS-T3S (Black), Kobo Aura ONE
|
The plugin crashes as soon as it starts to run. When I restart, the python launcher is in my recent dock items. Since I have done Sigil upgrades since using the plugin is there some parameters that got saved or could there be corruption in the exceptions file?
I will empty or delete the exceptions file and try again. --MH Last edited by dynabook; 06-23-2020 at 10:41 PM. Reason: typo |
06-23-2020, 10:51 PM | #120 |
Sigil Developer
Posts: 8,109
Karma: 5450184
Join Date: Nov 2009
Device: many
|
What exactly do you mean by the plugin "crashing" and needing to "restart"? Getting the user login sounds like something else is going on. No plugin should not be able crash the Finder or the macOS kernel.. If it do see an actual crash, please enable the macOS Crash Report and post it. Do all other plugins work?
Does this plugin have a gui? Have you updated your Tk/Tcl version as recommended in the release notes for Sigil on macOS? |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
epubcheck plugin for Sigil | Doitsu | Plugins | 524 | 10-06-2024 06:18 PM |
[Plugin] ePub3-itizer - epub3 output plugin for Sigil | KevinH | Plugins | 435 | 01-19-2023 09:46 PM |
[Plugin] KindleImport Sigil plugin | DiapDealer | Plugins | 187 | 07-04-2022 10:11 AM |
icarus Sigil plugin | AlPe | Plugins | 26 | 12-05-2017 10:03 AM |
smoothRemove_v010 plugin for Sigil | kbanelas | Plugins | 15 | 01-27-2017 05:51 PM |