Help needed with replacing dumb single quotation marks and apostrophes with smart ones

I was really pleased to discover the Autohotkey script by Jesús Prietos: www.gonduana.com/.../ for easily switching between 'smart' and 'dumb' quotation marks for different languages to help me avoid introducing inconsistency at the review stage (as track changes prevents autocorrect from working properly). The smart single quotation marks work perfectly, however I am not able to type a smart apostrophe within single quotation marks like so:

‘It’s a nice day, isn’t it?’

I've made several attempts at editing the script and also had a look at some of the other suggestions on Paul's blog (multifarious.filkin.com/.../) but I just can't seem to figure it out.
I guess one way around the problem is typing the apostrophe twice until it is around the correct way but is there a more sensible alternative?
Can anyone help?
Regards,

Daniel

Parents
  • Hi Daniel,

    Thanks for using the AutoHotkey script for smart quots.

    About your request, you can get smart apostrophes whith this line:

    hotstrings("([a-zA-Z])'([a-zA-Z])", "%$1%’%$2%")

    To do so you need the library hotstrings.ahk:

    • download it from here to your drive (or copy and paste the code to a new Hotstrings.ahk file)
    • insert the following include to the top of your actual AHK script:

    #Include Hotstrings.ahk ; this Hotstrings.ahk file in the same path!

    As you can see, this library hotstrings.ahk lets you use regex with AutoHotkey. Really powerful!

    PS 1: If you use my AHK script in Gonduana for double and single quots, you will need to deactivate it in order to test this line (they collide handling the single quots).

    PS 2: I believe the genitive saxon is still left, like Jesus’.

    Please let us know if you make any progress.

    … Jesús Prieto …

Reply
  • Hi Daniel,

    Thanks for using the AutoHotkey script for smart quots.

    About your request, you can get smart apostrophes whith this line:

    hotstrings("([a-zA-Z])'([a-zA-Z])", "%$1%’%$2%")

    To do so you need the library hotstrings.ahk:

    • download it from here to your drive (or copy and paste the code to a new Hotstrings.ahk file)
    • insert the following include to the top of your actual AHK script:

    #Include Hotstrings.ahk ; this Hotstrings.ahk file in the same path!

    As you can see, this library hotstrings.ahk lets you use regex with AutoHotkey. Really powerful!

    PS 1: If you use my AHK script in Gonduana for double and single quots, you will need to deactivate it in order to test this line (they collide handling the single quots).

    PS 2: I believe the genitive saxon is still left, like Jesus’.

    Please let us know if you make any progress.

    … Jesús Prieto …

Children