Macro of the Month – September 2022 – ItalicQuoteToggle
Swaps formatting by italicizing words set in quotation marks or placing italicized words in quotation marks
Have you ever worked on a document rife with words in quotation marks that need to be italicized instead? This month’s macro will take care of this tedious task for you including reference lists.
Also, a warm welcome to all the new subscribers who attended the macros session Paul Beverley and I did at last week’s virtual ACES Accelerate conference. Remember: You will have access to the recording for 30 days if you want to use it to guide you through installing your first macro.
ItalicQuoteToggle
Authors aren’t always consistent when styling titles or terms, or they may use quotation marks when they should be using italics or vice versa. ItalicQuoteToggle will apply the correct style. It even works with references.
How it works: When you come across a word or series of words set in quotation marks that need to be italicized, place the cursor anywhere inside the quote marks and run ItalicQuoteToggle. It will remove both quotation marks and apply italics. It’s as simple as that. If your style guidelines require quotation marks instead, place the cursor inside any of the italicized words and run ItalicQuoteToggle. Here are some examples:
Note: It is set to use single quote marks. Read on to learn how to modify the code for double quote marks.
original: McAlester, Virginia Savage. ‘A Field Guide to American Houses: The Definitive Guide to Identifying and Understanding America's Domestic Architecture.’ 2nd ed. New York: Alfred A. Knopf, 2015.
after running ItalicQuoteToggle: McAlester, Virginia Savage. A Field Guide to American Houses: The Definitive Guide to Identifying and Understanding America's Domestic Architecture. 2nd ed. New York: Alfred A. Knopf, 2015.
original: The students were required to read Shakespeare’s Romeo and Juliet over the summer.
after running ItalicQuoteToggle: The students were required to read Shakespeare’s ‘Romeo and Juliet’ over the summer.
How to customize ItalicQuoteToggle: By default, ItalicQuoteToggle is set to use single quotes. If the material you are working with uses double quotes, you will need to change a setting in the macro code. In the fourth line of the code — useSingle = True — change True to False.
When to use it: Run ItalicQuoteToggle while you are editing whenever you run across a word or series of words inside quotation marks that need to be italicized or vice versa.
Why it is useful: Manually italicizing a series of words and removing the surrounding quotation marks requires at least six steps: select each quote mark and delete them in turn (four steps), select the words with your mouse, and apply italics. ItalicQuoteToggle not only speeds up this edit; in condensing all these steps, it also reduces the strain on your hands and wrists.
Download the code: www.wordmacrotools.com/macros/I/ItalicQuoteToggle.txt
Related Resource – A demo of editing with macros
During the live Q&A for our macros session at last week’s ACES conference, Paul demonstrated how to edit a few paragraphs using a bunch of different macros. For those who were unable to attend live, you can watch a similar video from his YouTube channel.
If you are new to macros or are unsure how they are of benefit or quite how to use them in your work, watch Paul as he launches a different macro each time he comes upon a mistake or inconsistency that needs correcting.
What is your current favorite macro? Reply to this email and let me know.
Regards,
Jennifer