Academic papers in the field of linguistics are often written folowing LSA style, which is the style used in Language, the journal of the Language Society of America. One of the aspects of style that is fairly unique to linguistics writing is the way linguistic data is presented. The following quatation is from the Language style sheet:
7. NUMBERED EXAMPLES, RULES, AND FORMULAS
a. Type each numbered item on a separate indented line with the number in parentheses; indent after the number; use lowercase letters to group sets of related items:
(2) a. Down the hill rolled the baby carriage.
b. Out of the house strolled my mother’s best friend.
b. In the text, refer to numbered items as 2, 2a, 2a,b, 2(a- c).
One of the problems I run into when writing long papers, is keeping the numbered examples synchronized with my references to them in the text of the paper. If I add an example, remove an example, or change their order, then I have to go through the whole paper and update the references.
Fortunately, Microsoft Word has a solution to that problem. If you insert a paragraph number (using the “numbered” button, right next to the bullet button) then you can insert cross-references in the text that can be automatically updated. You insert the references by clicking on ‘Insert’, ‘Reference’, ‘Cross-reference’ and then selecting the item you want to cross reference from a list box. But, there’s a potential problem. The format of the cross-reference will be the same as the format of the paragraph (example) number. If the example number has paranthesis around it, so will the cross-refernce. Here’s an example:
The suffix –tit is used to form third person plural pronouns and plural demonstrative pronouns as shown in (2).
(2) iʃ –tit man -ik or
this –3PL I -3S.Poss are
‘These are mine.’
This is fine, unless you’re using LSA format. In LSA format, the reference in the text should not have parenthesis around it.
I searched everywhere for a way to control the formating of the cross-reference in Word, but there is no way to automatically remove the parenthesis. You can delete them by hand, but as soon as you update the cross-reference, the parenthesis reappear. So, my solution was to write a macro that goes through the entire document and removes parenthesis around cross-references. It won’t remove any other parenthesis. This solution has been working quite well for me. Here is the VBA macro:
Sub DeleteParensInXRef() Dim doc As Document Dim fld As Field Set doc = ActiveDocument For Each fld In doc.Fields fld.Select If fld.Type = wdFieldRef Then fld.Result.Text = Replace(fld.Result.Text, "(", "") fld.Result.Text = Replace(fld.Result.Text, ")", "") End If Next Set fld = Nothing Set doc = Nothing End Sub
To add this macro to your document do the following:
- Select the text containing the macro in this post.
- In the ‘Tools’ menu click on ‘Macros, Visual Basic Editor’.
- In the project pane, right click on the project with the name of your doucment and select ‘Insert’, ‘Module’
- Double-click on the newly created module (probably named ‘Module 1’) and then right click in the editor pane and select ‘paste’.
- Click on the tool-bar button with the floppy disk icon to save the macro with your document.
- Close the Visual Basic editor.
To run the macro while editing your document you can click on the menu item ‘Tools’, ‘Macro’, ‘Macros…’ and then double click on ‘DeleteParensInXRef’.
November 10, 2007 Update: Once you have removed the parenthesis and are ready to print your document, you will first need to lock the cross-reference fields. If you don’t lock the fields, they will be updated when you print, and all the parenthesis will reappear. You can lock all the fields in your document by pressing CTRL-F11. You can unlock them by pressing CTRL-SHIFT-F11.
If you have any questions about how to use this macro, or suggestions for improving it, feel free to leave a comment!
- Tech Republic, 2007, Remove Field Codes from Word Documents with this Handy Macro. I modified the VBA macro in this article to create the macro for stripping parenthesis from cross-references.
- Microsoft Office Developer Center, 2007, Word Developer Reference: wdFieldTypeEnumeration. This is where I found the name of the cross-reference field type.
- Allen Wyatt, Word Tips: Controlling the Format of Cross-References. This article didn’t solve my problem, but it solves a similar one and provides a nice VBA macro to do it.
- Travis G. Bradley, 2004, Using Microsoft Word for Writing Papers in Linguistics. Bradley presents a manual (no macro required) solution to cross-referencing data citations, but his solution is a bit awkward (requires a lot of keystroks) and leaves parenthesis around the cross-reference in the text, so the result does not exactly conform to LSA style.
- Key XL: Microsoft Word 2003 Keyboard Shortcuts.
One response to “Formatting LSA Style Linguistic Data Citations in Microsoft Word”