Jump to content
You must now use your email address to sign in [click for more info] ×

Straight quotes to smart quotes


Recommended Posts

Hi,

In Affinity Publisher I've imported the text of a Word doc, and all single and double quotes are straight, not smart. When I go to find and replace, the search cannot distinguish between opening and closing quotes - so FaR will replace everything with left (or right), but not both. Is there a way around this?

Thanks,

Gareth.

Link to comment
Share on other sites

If you search for a space then " and you should find all opening quotes. Search for " and then a space and you should find all closing quotes.

Find:

\s"   is for space then ".

"\s   is for " then space.

Mac Pro (Late 2013) Mac OS 12.7.2 
Affinity Designer 2.3.1 | Affinity Photo 2.3.1 | Affinity Publisher 2.3.1 | Beta versions as they appear.

I have never mastered color management, period, so I cannot help with that.

Link to comment
Share on other sites

2 minutes ago, Woodpig said:

Is there a way around this?

Only by careful construction of the Find strings, and multiple operations, and then careful inspection/review and manual fixup of errors at the end.

So, for example:

  • x'y where x and y are letters means the ' should be an apostrophe.
  • x.' followed by a space usually means the ' is an ending single quote (and similarly for x." and similarly for ? or !)
  • space followed by " is usually an opening quote mark and " followed by space is usually a closing quote (as mentioned by @Old Bruce)
  • etc.  (I may have a more complete list somewhere that I can try to find)

It is error-prone, especially if the input text has any errors. But it can sometimes be fine-tuned based on intended and known usage patterns within the input text.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.3

Link to comment
Share on other sites

In Word (PC, at least), find/replace for both single and double quotes will replace both types of straight quotes with the appropriate smart/curly quotes. (Assuming the spacing before/after each is correct.) If I remember correctly InDesign find/replace does the exact same thing.

Would be extremely helpful if all Affinity apps would do the same.

As often comes from my Department of Redundancy Department soapbox, it’s all about the workflow: Professional apps must understand the professional’s workflow and streamline it as much as possible. Every point of friction reduces user satisfaction, which of course hurts sales and industry adoption.

Link to comment
Share on other sites

Pretty straightforward, using regex ;-)
"(?=(?:(?:[^"]*"){2})*[^"]*"[^"]*$)
will find leading straight quotes so put that in the find box
Make a dummy word like "dummy" with smart quotes, copy the opening quote into the Replace box and click replace all

Now put a straight quote into the find box, copy the closing quote from dummy" into the Replace box and click replace all 


I wish I'd thought of this but it's here
https://stackoverflow.com/questions/71029975/regex-to-replace-regular-quotes-with-curly-quotes

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.