Difference between revisions of "Documentation/How Tos/Inserting En and Em Dashes"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 100: Line 100:
[[Category:Documentation/How Tos/Writer]]
[[Category:Documentation/How Tos/Writer]]

Revision as of 18:29, 10 January 2010

Dashes are longer than hyphens. The two main types of dash are the en dash (roughly the width of the letter n) and the em dash (roughly the width of the letter m). Wikipedia has lots of information about when to use en or em dashes.

Using AutoCorrect

Apache OpenOffice provides a convenient way to enter en and em dashes when you are typing. This method uses the Replace dashes option under Tools > AutoCorrect > Options to replace one or two hyphens, under certain conditions, with the corresponding dash.

In the following table, the A and B represent text consisting of letters A to z or digits 0 to 9.

Text that you type: Result
A - B (A, space, minus, space, B) A – B (A, space, en-dash, space, B)
A -- B (A, space, minus, minus, space, B) A – B (A, space, en-dash, space, B)
A--B (A, minus, minus, B) A—B (A, em-dash, B)
A-B (A, minus, B) A-B (unchanged)
A -B (A, space, minus, B) A -B (unchanged)
A --B (A, space, minus, minus, B) A –B (A, space, en-dash, B)

Using the Special Characters Dialog

Another means of inserting en or em dashes is through the Insert > Special Characters menu. Select the U+2013 or U+2014 character, respectively.

Using Keyboard Shortcuts

Many people like to use keyboard shortcuts, especially when editing existing material that includes incorrectly-done dashes.

The shortcuts vary depending on your operating system.


Hold down one of the Alt keys and type on the numeric keypad: 0150 for an en dash or 0151 for an em dash. The dash appears when you release the Alt key.




Hold down the Compose key and type two hyphens and a period for an en dash, or three hyphens for an em dash. The dash appears when you release the Compose key.


Mac OS X

Hold down the Option (Alt) key and type a hyphen for an en dash. For an em dash, the combination is Shift+Option+Hyphen.

Record Macros and Assign Them to Shortcut Keys

You can also record macros for inserting dashes and assign those macros to key combinations.

Step 1: Record macros for inserting en and em dashes.

  1. Use Tools > Macros > Record Macro to start recording a macro. A small window is displayed so you know that OpenOffice.org is recording. StopRecording3.png
  2. Use Insert > Special Characters to open the Special Characters dialog. Scroll down until you find the en dash (U+2013) character. Select it and click OK.
    Find and choose the en dash.
  3. Click the Stop Recording button to stop recording, save the macro, and display the OpenOffice.org Basic Macros dialog. Type a descriptive name for the new macro in the Macro name box on the upper left. For this example, we have used Endash and Emdash for the names of the macros.
    Naming the new macro and storing it.
  4. Be sure to open the library container named My Macros. Find the library named Standard under My Macros. Select Module1 and click Save.
  5. Repeat steps 1–4 to create another macro, to insert an em dash (U+2014 in the special characters table).

Step 2: Assign the macros to key combinations

  1. Use Tools > Customize > Keyboard tab.
  2. In the Shortcut keys list, pick an unused combination (for example, Ctrl+Shift+N for an en dash). In the Category list, scroll down to OpenOffice.org Macros, click the + sign, then click the + next to the Standard library and choose Module1. In the Function list, choose Endash and click the Modify button on the upper right. The selected key combination now appears in the Keys list on the lower right, and Endash appears next to Ctrl+Shift+N in the Shortcut keys list.
  3. Repeat for the em-dash , then click OK.
Defining keyboard shortcuts for running macros.


Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages