Replace "pasted" quotation marks

Writer 7.3.6.2 (x64), Windows 10

I paste a lot of text that begins as some particular form of rich text - pdf, html – and I use a plain text pasteboard app that helps eliminate a lot of formatting work for my notes, but the downside for my needs are the quotes:

I end up with straight single and double quotes when I paste the text into my LO .odt docs, and I am annoyed by those straight doubles.

I’ve worked the options and autocorrect for years, but nothing seems to auto-correct these quote marks when I paste plain text.

Yes, I imagine that is a default design, but I would dearly like to avoid having to correct all the quotes in my pasted text, as I have for many years.

Please advise.

As requested:
User Interface: Ul render: default; VCL: win
Locale: en-US (en_US); Ul: en-US

Sample:
as “anxiety” is

Also:
Yes, my pasteboard app changes all quotes to straight up quotes.
AFAIK these are the U+0022 quotes, second character after the exclamation mark.

I work with so much text that – without fully assimilating the scheme yet – working with changing pgh styles would amount to the same kind of chore – maybe not, I don’t know, I just have so much work and I’m in a phase where I’m trying to “clean things up a bit.”

Thank you LeroyG and EarnestAl for your considerations.

LeroyG,
I thought about your Tools > Autocorrect > Apply and then I actually looked at it! :upside_down_face:

My Autocorrect > While Typing has been checked for years, so I just clicked on Apply (thinking that would result in it being checked…but clicking it does not “check” it) But lo and behold, clicking it “Autocorrected” all of those straight double quotes on my odt’s pages into their proper cousins!

So, the logic of that design does not emerge into anything “intuitive” in my land of software intuition, but then our software is all so complex and whose to decide, especially this far down the OO/LO road.

What is intuitive to me is why would we want our “Autocorrect” to apply auto “While Typing,” but not when pasting?

Perhaps the “Apply” could be coded to hold a check as a user option, but perhaps there is logic for it to stay as an option only on selection of the menu item itself.

Regardless, I’m a lot further down the road with this annoyance mostly solved now, so thanks again.

Menu Tools - AutoCorrect - Apply works for me. Version 7.4.7.2 (x64), Windows 10.0.
Share a reduced anonymized sample file to test.
Or edit your question and share the unicode value of these quotes (put the cursor to the right of the quotes and press Alt+X). U+0022 is for the (neutral) quotation mark; U+0027 for the apostrophe.
Could be useful to share the user interface and locale languages (take it from menu Help - About LibreOffice).

Does your pasteboard app change typographic quotes to plain ones? Or is that typographic are not normally used in HTML?

I think Tools > AutoCorrect > Apply only works on Default Paragraph Style. You could incorporate it into your workflow by pasting into a Default paragraph Style, applying the changes and then changing the pasted text to a suitable paragraph style like Text Body.

Also, see this comment using Find & Replace interesting, How do I convert straight quotes to typographic quotes? - #7 by dajare

1 Like

Hey @IfItsXorI,

LibreOffice 7.6 has a fix by Baole Fang:

After you press:

  • Tools > AutoCorrect > Apply and Edit

LibreOffice will then flip all those:

  • '' + "" = dumb/straight quotes or apostrophe

into:

  • ‘’ + “” = smart/curly quotes

Before 7.6, LibreOffice would:

  • Only apply the quotation marks rule to SOME text in the document.

After 7.6, it will:

  • Apply it to ALL text in the document.

LibreOffice 7.6 is due to release in a few weeks! (August 2023!)


Side Note: And I also gave more “dumb quotes” → “smart quotes” information in:

That user asked almost your same exact question a few months ago! :slight_smile:

There, I also linked to two more of my in-depth step-by-step tutorials in these 2 Reddit topics:

where:

  • 1st described the AutoCorrect options + steps to correct your quotation marks.
  • 2nd described how to manually Find & Replace ONLY ' + " (straight apostrophes/quotation marks).

Side Note #2: On @LeroyG’s comment:

[…] share the unicode value of these quotes (put the cursor to the right of the quotes and press Alt+X). U+0022 is for the (neutral) quotation mark; U+0027 for the apostrophe.

I also wrote a tutorial on how to use Find & Replace to:

  • Manually find + fix all your ' + " (straight apostrophes/quotation marks) too!

See the step-by-step tutorial I mentioned above:

  • Apostrophe format changed mid-document?

If you try the normal Find:

  • LibreOffice will match both the dumb/curly quotes.

but using that “regular expression” method:

  • You can find/replace ONLY the straight-up-and-down ones. :slight_smile:

Consider using LibreOffice Edit > Paste Special > Paste as unformatted text, it retains typographic quotes but strips away other junk. It is one of the very few changes I make to the Standard toolbar: adding the icon for for Paste as unformatted text.

1 Like

Al,
I use Paste as unformatted text almost always.

The problem is that I have to copy or capture the text first in order for it to arrive at the app I use as my “Pasteboard,” an app that only uses monospace font and plain text.

Otherwise, if I copy and paste from the initial source, there will be a variety of potential anomalies.

For instance, with pdf files, you never know what strange character might arrive from a heading or sub-heading instead of the “d” or whatever you expect.

That is not often, but too often – and other anomalies – for me, so I’ve just surrendered to using the pasteboard app I do use, NoteTab Light.

If you have another pasteboard app you’d recommend, then please and thank you, but I think that any rich text pasteboard will pick up those anomalies that arise from the original software’s text.

Thank you, Tex2002ans.

It’s good to know that my most serious “problem” has been recognized by the world’s authorities with a deep solution :slightly_smiling_face:

Now that I know about Apply, I’m fairly well set, but I might need more in the future.

I try to limit my risk-taking in various ways: I’ll wait for a few other versions to evolve before I expose my docs, one of which is 1200 pages (A5) long. As another programmer, I know that deep in my heart that there are no programs without (insects).

1 Like

Tools>AutoCorrect>AutoCorrect Options, Options tab has two columns of settings: [M] and [T]. M is for modifying and T is for typing. This allows for different behaviour in the two main phases of text review. Pasting is considered modification; therefore [M] settings apply. However I have not tested if Paste as Unformatted has a higher override precedence over “modification” (so that it pastes really unmodified data).

Since you may change settings in a way it could impact your formatting, Tools>AutoCorrect>Apply is offered to force the effect of settings even when you don’t modify your document (provided the [M] box is ticked). This also work around any potential precedence issue.

1 Like