Archive for February, 2014

h1

Capitalizing common names of species

February 17, 2014

From a Writing Tip I wrote recently for my team.

NOTE: The advice in this post refers to Australian authorities — check your country’s authorities for advice on whether common names of species are capitalized.

***************

Paul asked: Should we use capital letters [caps] when referring to the common name of an animal? i.e. scientific name – Lates calcarifer; common name – ‘Barramundi’ or ‘barramundi’? I know you have previously advised to use initial caps but is this a nomenclature standard across all taxa (animals and fish)?

barramundi

Photo of a Barramundi from: http://www.ntfishing.com.au/881/barramundi-run-off-fishing-shady-camp/img_0121/ (Barramundi tastes REAL good too!)

My response:

When you’re referring to a specific common name, yes, you use initial caps for each word (e.g. Banded Lizardfish, Barramundi [one word common name only], Flatback Turtle). EXCEPTION: Only cap the first word of a compound/hyphenated word and keep the second word in lowercase (e.g. White-winged Fairy-wren, Tail-light Lanternfish, Northern Freetail-bat). However, if you’re referring to a generic group, you use lower case (e.g. lizardfish, turtles, bats, mangroves). This general rule applies to all taxa – flora and fauna.

This guidance is documented in [our] Editorial Guide, and follows the conventions used by the Western Australian Museum.

For examples of the Western Australian Museum’s use of capitals (and the use of caps for common names by other Australian institutions) see:

NOTE: If you’re writing about fish species, there’s a definitive guide to naming Australian fish (including complete species lists) here: http://www.cmar.csiro.au/e-print/open/yearsleygk_2006a.pdf (see #9 on page 7, and the list of all fish species in Appendix A). Unlike mammals, birds etc. the fish people at the various institutions in Australia got together and decided not to use hyphenated words, where possible, so you end up with common names such as ‘Manyspot Flyingfish’. The introductory pages prior to the list of species makes for interesting reading on how they arrived at these naming conventions.

************

See also: https://cybertext.wordpress.com/2012/01/26/to-cap-or-not-to-cap-that-is-the-question/

[Links last checked February 2014]

h1

Word: Resize all images in a document to the same width

February 7, 2014

Note:

  1. This post is an adaptation of an article by Helen Bradley in Australian Personal Computer magazine (January 2014 issue, p99). Full credit and kudos should go to Helen and APC for this information — I only tweaked it and expanded upon it to suit my purposes, and added full steps and screen shots.
  2. You should be familiar with writing macros using the VBA code editor in Word. This post will not take you step-by-step through that process.
  3. Read the warning notice below.

BEWARE! This macro WILL resize ALL images in your Word document to the same width — that includes any cover art, logos, images on landscape pages, etc. This may NOT be what you want and you may decide that this macro isn’t for you. As with any such global change, test it on a COPY of your original document before using it on your original. You have been warned.

What you will do:

  1. Create a form that any user can complete when they run the macro that lets them specify the width (in centimetres) they want for all images and inline shapes.
  2. Add the code to the form.
  3. Test the macro on a COPY of an existing document.

Step 1: Create the form

  1. Open the Visual Basic editor in Word.
  2. Select Normal in the Project Explorer.
  3. Select Insert > UserForm from the menu.
  4. Add these elements to the form — TWO command buttons, ONE spin button, TWO labels, and ONE text box. You’ll arrange them later (Step 12).
  5. Open the properties of the spin control and set these values: Max: 160 (this will allow a maximum width of 16 cm; sorry — I don’t know how to set this for inches); Min: 20 (minimum width of 2 cm); Small change: 5 (increments of 0.5 cm); Value: 50. Adjust these values to suit your circumstances (e.g. if you have a 2-column document and only want small widths for the images, set the Max to 75 [i.e. 7.5 cm] or similar).
  6. Open the properties of the text box and set the Value to 5 (this means the default displayed in the text box will be 5 cm; change it to suit your circumstances). If you only want your users to use the spin control to set the value and don’t want to let them change it in the text box, set the Locked property to True.
  7. Open the properties of one of the labels, delete the text in the Caption field and add some explanatory text there — see the screen shot below for my example.
  8. Open the properties of the other label and change the Caption text to cm (for centimetres).
  9. Open the properties for CommandButton1 and change the Caption text to Resize Images.
  10. Open the properties for CommandButton2 and change the Caption text to Exit.
  11. Open the properties for UserForm1 and change the Caption to Resize all images.
  12. Arrange all elements on the form to follow familiar GUI principles (e.g. explanatory text at the top, ‘cm’ label to the right of the text box and spin control to the right of that, command buttons at the bottom of the form etc.).

reszie_all_01

Step 2: Add the code

Now that you have your form, you can add the code that sits behind the various elements.

Spin Control code:

Double-click the spin control and add this line between the Sub and End Sub lines: TextBox1.Value = SpinButton1.Value / 10

You should end up with this:

reszie_all_02

Exit button code:

Double-click the Exit button and add this line between the Sub and End Sub lines: Unload me

You should end up with this:

reszie_all_03

Resize Images button code:

Double-click the Resize Images button and add these lines between the Sub and End Sub lines — make sure you use the exact case and punctuation as listed here (Note: Some lines shown below will wrap in WordPress — check the screen shot to see where the lines break; I’ve left these lines in as text so you can copy/paste them):

Dim insertedPicture As InlineShape
Dim insertedShape As Shape
Dim imgMult As Single
imgMult = TextBox1.Value * 28.34

For Each insertedPicture In ActiveDocument.InlineShapes
insertedPicture.Select
insertedPictureHeight = insertedPictureHeight * imgMult / insertedPicture.Width
insertedPicture.Width = imgMult
Next

For Each insertedShape In ActiveDocument.Shapes
insertedShape.Select
insertedShape.Height = insertedShape.Height * imgMult / insertedShape.Width
insertedShape.Width = imgMult

Next

Unload Me

You should end up with this:

reszie_all_04

Notes:

  • I’m not sure what the multiplication factor of 28.34 means, but I suspect it’s something to do with converting the underlying measurement units (twips? points?) in Word to centimetres.
  • The aspect ratio of the image is kept; when the macro resizes the width, it keeps the proportions for the height.

Code to open the form:

Under the Normal > Modules folder in Project Explorer, add this code to NewMacros:

Sub resizeImages()

UserForm1.Show

End Sub

It should look like this:

reszie_all_05

Step 3: Test

As I mentioned at the beginning of this post, you’ll need to test this macro to see if it suits your purposes. If you have images in your document that SHOULDN’T be resized, then either consider not using this macro at all, or using it for everything, then manually sizing those few images back to their original dimensions.

  1. Run the resizeImages macro on a COPY of your document.
  2. Check ALL images in your document to see if any changed that you didn’t want to change (look for such things as logos, cover page art elements, images in landscape orientation that are now much narrower than you wanted, etc.).
  3. You can undo the changes the macro made by clicking the Undo button as many times as necessary to undo the changes to all images.

***************

Finally, I again wish to acknowledge Helen Bradley‘s work in creating the original version of this macro and APC for publishing it. Please give thanks to her, not me.

h1

Word: Replace short date formats with months

February 5, 2014

Short date formats are the bane of the devil, in my opinion! If your audience is global, then does ‘3/4/2014’ mean 3 April 2014 or 4 March 2014?

Actually, both are correct — it all depends on where your audience is located and where it was educated. And I’m only talking about English-speaking audiences here — no doubt short date formats are just as problematic in other languages.

In the example above, Australians and others would read that date as 3 April, whereas those in the US would read it as 4 March. No big deal, you might think? Well, it IS a big deal. In terms of legal documents, development contracts, etc. it could be a HUGE deal.

If you’re writing for an audience that spans multiple locations, then the safest thing to do is to write out dates in such a way that they can be immediately and correctly interpreted, no matter who is reading them. And to do that you need to write out months either in their short or long form so that it’s absolutely clear which date you mean. While you could use the ISO format for dates, the reality is that these aren’t easily readable, so if you go the more informal route, then take the burden off your readers by being clear as to what the date is and not leave it to their (possibly incorrect) interpretation.

If you’re editing a Word document peppered with short date formats, you need an efficient way to change them to a longer format. The steps below show how to use Word’s find/replace wildcard function to change a numerical month surrounded by slashes to a written format separated by spaces.

If you want to do this for ALL months, you’ll have to run this find/replace 12 times — one for each month, making sure you change the position three value in the Find field, and the name of the corresponding month in the replace field. I haven’t figured out to change all date formats written like this for all months at once… if anyone knows how to do that (perhaps using a macro?), please share in the comments below. While the method I describe below is better than doing it manually, it’s still fairly tedious to do all months one at a time.

Change dd/mm/yyyy to dd MMM YYYY

In this first example, I’ll use the Australian short date format of dd/mm/yyyy and change the ‘/6/’ (representing June) to ‘Jun’, and will also add a non-breaking space between the day and the month:

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click More to show the check boxes.
  3. Select the Use wildcards check box.
  4. In the Find What field, type this (NO spaces): ([0-9])(/)(6)(/)([0-9])
    (In this string, you’re finding a single numeral from 0-9 [position 1], followed by a slash [position 2], followed by a 6 [position three], followed by another slash [position 4], followed by another single number from 0-9 [position 5].)
  5. In the Replace with field, type this (NOTE: There’s a single space after ‘Jun’): \1^sJun \5
    (In this string, you’re replacing position 1 with itself [i.e. no change], adding a non-breaking space [^s], followed by the short form of the month’s name, followed by a space, then followed by whatever was at position 5 in the find string [i.e. no change].)
  6. Click Find Next — if you’re satisfied that the correct information will be changed, click Replace. If you’re confident that the only instances of ‘/6/’ in your document are months, then click Replace All.

find_replace_months01

Change mm/dd/yyyy to MMM dd, YYYY

In this next example, I’ll use the US short date format of mm/dd/yyyy and change the ‘6/’ (representing June) to ‘Jun’, add a non-breaking space between it and the day, and add a comma after the day, then a space before the year:

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click More to show the check boxes.
  3. Select the Use wildcards check box.
  4. In the Find What field, type this (NO spaces): (6)(/)([0-9{1,2}])(/)([0-9])
    (In this string, you’re finding a 6 [position 1], followed by a slash [position 2], followed by one or two numbers from 0-9 [position three], followed by another slash [position 4], followed by another single number from 0-9 [position 5].)
  5. In the Replace with field, type this (NOTE: There’s a single space after the comma): Jun^s\3, \5
    (In this string, you’re replacing position 1 with the letters of the short form of the month, adding a non-breaking space [^s], followed by one or two numbers of the day [position 3; i.e. no change], followed by a comma, then a space, then whatever was at position 5 in the find string [i.e. no change].)
  6. Click Find Next — if you’re satisfied that the correct information will be changed, click Replace. If you’re confident that the only instances of ‘6/’ in your document are months, then click Replace All.

find_replace_months02

See also: https://cybertext.wordpress.com/2010/07/29/dating/

 

[Links last checked February 2014]

h1

Word: True title case

February 4, 2014

In Word 2003 and earlier, one of the case options was ‘title case’ where all main words were capitalized (capped), but minor words (e.g. the, a, and, etc.) weren’t. But since Word 2007, the only case options when changing case automatically are:

  • sentence case (only the first letter of the first word in the sentence is capped)
  • all upper or all lower case
  • toggle case (who uses that?)
  • capitalize each word (which means exactly what it says, so all the ‘little’ words get capped too!).

There’s no true title case anymore. However, the good folks over at WordTips have provided a macro that works around the problem by specifying that certain words in a selected piece of text are NOT to be capitalized.

You can get the details here:

I tested the macro and it works well. I also added my own words to the list and it still worked well ;-) Just make sure you separate each word you add with a space. I also added my additional words in alphabetical order, just in case that made any difference.

And if this macro is something you’ll use a lot, add a Quick Access Toolbar icon for it.

NOTE: The macro doesn’t change the capitalization of first word of the selected text — the wrd = 2 part of the macro tells the macro to start at the second letter of the selected text, thus ignoring first words in sentences like ‘The’ that should legitimately be capitalized. If you want the macro to include ALL words in the selection — even the first word in a sentence — then change that part of the macro to wrd = 1.

[Links last checked February 2014]

h1

Word: Assign a macro to an icon on the QAT

February 3, 2014

I thought I’d written about how to do this ages ago, but it seems not.

You can add an icon to the Quick Access Toolbar (QAT) for any macro you use regularly. Here’s how:

  1. Click the drop-down arrow at the far right of your QAT.
    qat_macro01
  2. Select More Commands from the drop-down menu.
  3. On the Customize the Quick Access Toolbar screen, select Macros from the Choose commands from list.
    qat_macro02
  4. Select the name of the macro you want to add from the list on the left — it will have an odd name and likely have all sorts of weird naming stuff in front of the actual macro’s name.
  5. Click Add. The name of the macro is added to the list on the right.qat_macro03
  6. Optional: Use the arrow icons on the far right of the list to move the macro where you want it on your QAT.
  7. I suggest you change the weirdly named macro, so click Modify (below the list on the right).
  8. On the Modify Button window, change the Display name to a name that you’ll recognize.

    qat_macro04

  9. Optional: Select an image for your new QAT icon.
  10. Click OK to close the Modify Button window.
  11. Click OK again to close the Word Options window.
  12. Your new icon for your macro is added to your QAT — if you hover over the icon, the tooltip will show the new name you gave it in step 8.