[Tutorial] Convert straight quotes to custom quotes with AutoCorrect

Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Locked
User avatar
MrProgrammer
Moderator
Posts: 4909
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

[Tutorial] Convert straight quotes to custom quotes with AutoCorrect

Post by MrProgrammer »

Note that questions are not allowed in the Tutorials section of the forum. Ask them in the Applications → Writer section.

This tutorial discusses using the AutoCorrect feature of Writer. If there is documentation about custom quote conversion, I can't find it, so I've prepared this guide. AutoCorrect is designed for the normal quote usage of many languages; detailed editing for specific languages or special cases may be necessary and is your responsibility.
Straight and Custom.png
Straight and Custom.png (55.24 KiB) Viewed 5695 times

By default, OpenOffice will replace straight double quotes with custom quotes as you type them since features Format → AutoCorrect → While Typing and Format → AutoCorrect → AutoCorrect Options → Localized Options → Double Quotes → Replace are enabled. You could enable replacement of straight single quotes with custom quotes by enabling the corresponding option.

However sometimes the text was originally prepared in a different word processor, text editor, or other application which did not replace straight quotes with custom quotes. When the foreign document is opened with OpenOffice, the straight quotes remain. Or text with straight quotes may have been copied from the internet into Writer. To convert straight quotes which you didn't type in OpenOffice to custom quotes use these steps:
  • Ensure Format → AutoCorrect → AutoCorrect Options → Localized Options are set correctly. Set the Single Quotes → Replace and/or the Double Quotes → Replace options as desired. The default Start and End characters are the custom quotes shown above. If you've changed them, click the Default buttons. The picture below shows the settings to convert double quotes but not single quotes.
  • Ensure all other AutoCorrect options are disabled. This prevents any AutoCorrect changes except straight quote to custom quote conversions. In Localized Options, uncheck every box in the [M] column. Also, in Options, uncheck every box in the [M] column. Click OK. You may want to note which boxes were checked so you can restore those settings after quote conversion is complete.
    Uncheck.gif
    Uncheck.gif (89.38 KiB) Viewed 5695 times
  • Using the Format → Styles and Formatting dialog, set the style of the paragraphs which you want to convert to Default. Quotes in paragraphs which are set to a different style will not be converted. If you have opened a document which wasn't created by OpenOffice, say a plain text file or a simple document from another word processor, all of your paragraphs will probably already have the Default style.
  • Select the paragraphs which contain the quotes you want to convert, or select nothing to convert every paragraph with the Default style. You can use the Edit → Find & Replace to help locate specific text in your document if you don't want to perform quote conversion on every paragraph. The entire paragraph will be converted if any text in it is selected and it has the Default paragraph style. When you select any text, paragraphs without selected text are not converted.
  • Use Format → AutoCorrect → Apply.
The Apply action will convert straight quotes to custom quotes. If you don't like the result, immediately use Edit → Undo. The conversion will change the style of the converted paragraphs from Default to Text Body. You can set a different paragraph style now if you like. Here are samples of the conversion:
Autocorrect examples.png
Autocorrect examples.png (117.18 KiB) Viewed 5695 times

This tutorial only covers converting quotes with AutoCorrect. A search of the Writer forum for the terms custom quotes, curly quotes, or smart quotes will locate topics discussing ways to do the conversion with Find & Replace, with extensions, or with macros. They could offer more control of the process at the expense of being more difficult to use.

Note that questions are not allowed in the Tutorials section of the forum. Ask them in the Applications → Writer section. If questions lead to improvements to the tutorial, I will make them here.
Last edited by MrProgrammer on Sat Mar 09, 2024 6:25 pm, edited 1 time in total.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked