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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
m (Record Macros and Assign Them to Shortcut Keys)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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 [http://en.wikipedia.org/wiki/Dash when to use en or em dashes].
+
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 [https://en.wikipedia.org/wiki/Dash when to use en or em dashes].
  
 
==Using AutoCorrect==
 
==Using AutoCorrect==
{{OOo}} 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.
+
{{AOo}} provides a convenient way to enter en and em dashes when you are typing. This method uses the ''Replace dashes'' option under {{menu|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.
 
In the following table, the A and B represent text consisting of letters A to z or digits 0 to 9.
Line 30: Line 30:
  
 
==Using the Special Characters Dialog==
 
==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.
+
Another means of inserting en or em dashes is through the {{menu|Insert|Special Characters}} menu. Select the '''U+2013''' or '''U+2014''' character, respectively.
  
 
==Using Keyboard Shortcuts==
 
==Using Keyboard Shortcuts==
Line 41: Line 41:
 
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 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.
  
{{Documentation/Tip| On a keyboard with no numeric keypad, use a ''Fn'' (''Function'') key combination to type the numbers. (The ''Fn'' key is usually to the right of the left-hand ''Ctrl'' key on the keyboard.)  
+
{{Tip| On a keyboard with no numeric keypad, use a ''Fn'' (''Function'') key combination to type the numbers. (The ''Fn'' key is usually to the right of the left-hand ''Ctrl'' key on the keyboard.)  
  
 
For example, on a US keyboard layout, the combination for an en dash should be ''Alt+Fn+mjim'' and for an em dash it should be ''Alt+Fn+mjij''.}}
 
For example, on a US keyboard layout, the combination for an en dash should be ''Alt+Fn+mjim'' and for an em dash it should be ''Alt+Fn+mjij''.}}
  
{{Documentation/Tip|You might prefer to install a small, free, open source program for Windows called ''AllChars'', which [http://allchars.zwolnet.com/ you can get here].}}
+
{{Tip|You might prefer to install a small, free, open source program for Windows called ''AllChars'', which [https://allchars.zwolnet.com/ you can get here].}}
  
 
'''Linux'''
 
'''Linux'''
  
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.
+
Press and release the ''Compose'' key, then type two hyphens and a period for an en dash, or three hyphens for an em dash. The dash appears when you release the last key.
  
{{Documentation/Tip| The key that operates as a ''Compose'' key varies with the Linux distribution. It is usually one of the ''Alt'' or ''Win'' keys, but may be another key, and should be user-configurable.}}
+
{{Tip| The key that operates as a ''Compose'' key varies with the Linux distribution. It is usually {{key|Shift|AltGr}}, but may be another key (e.g. the Windows key), and should be user-configurable.}}
 +
 
 +
On Linux distributions based on the Gnome/GTK+ desktop environment, you can also input Unicode characters by pressing {{key|Ctrl|Shift|U}}, followed by the hexadecimal value of the Unicode character (2013 for an en dash, 2014 for an em dash). To end the input sequence, press either the {{key|Return}} key or release the ''Ctrl/Shift'' keys.
  
 
'''Mac OS X'''
 
'''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''.
+
Hold down the ''Option'' (''Alt'') key and type a hyphen for an en dash. For an em dash, the combination is {{key|Shift|Option|Hyphen}}.
  
 
==Record Macros and Assign Them to Shortcut Keys==
 
==Record Macros and Assign Them to Shortcut Keys==
Line 63: Line 65:
  
 
<ol>
 
<ol>
<li>Use '''Tools > Macros > Record Macro''' to start recording a macro.
+
<li>Use {{menu|Tools|Macros|Record Macro}} to start recording a macro.
  
A small window is displayed so you know that OpenOffice.org is recording.
+
A small window is displayed so you know that {{AOo}} is recording.
 
[[Image:StopRecording3.png]]
 
[[Image:StopRecording3.png]]
<li>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'''.
+
<li>Use {{menu|Insert|Special Characters}} to open the Special Characters dialog. Scroll down until you find the en dash (U+2013) character. Select it and click {{button|OK}}.
  
 
[[Image:WG3-17-9.png|thumb|none|500px|''Find and choose the en dash.'']]
 
[[Image:WG3-17-9.png|thumb|none|500px|''Find and choose the en dash.'']]
  
<li>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.
+
<li>Click the {{button|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.
  
 
[[Image:WG3-17-10.png|thumb|none|500px|''Naming the new macro and storing it.'']]
 
[[Image:WG3-17-10.png|thumb|none|500px|''Naming the new macro and storing it.'']]
  
<li>Be sure to open the library container named ''My Macros''. Find the library named ''Standard'' under My Macros. Select Module1 and click '''Save'''.
+
<li>Be sure to open the library container named ''My Macros''. Find the library named ''Standard'' under My Macros. Select Module1 and click {{button|Save}}.
 
<li>Repeat steps 1–4 to create another macro, to insert an em dash (U+2014 in the special characters table).
 
<li>Repeat steps 1–4 to create another macro, to insert an em dash (U+2014 in the special characters table).
 
</ol>
 
</ol>
Line 82: Line 84:
  
 
<ol>
 
<ol>
<li>Use '''Tools > Customize''' > ''Keyboard'' tab.</li>
+
<li>Use {{menu|Tools|Customize}} > ''Keyboard'' tab.</li>
<li>In the ''Shortcut keys'' list, pick an unused combination (for example, ''Ctrl+Shift+N'' for an en dash).  
+
<li>In the ''Shortcut keys'' list, pick an unused combination (for example, {{key|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 ''Category'' list, scroll down to OpenOffice 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.  
 
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.</li>
+
The selected key combination now appears in the Keys list on the lower right, and Endash appears next to {{key|Ctrl|Shift|N}} in the Shortcut keys list.</li>
<li>Repeat for the em-dash , then click '''OK'''.
+
<li>Repeat for the em-dash, then click {{button|OK}}.
 
</ol>
 
</ol>
  
 
[[Image:WG3-17-11.png|thumb|none|500px|''Defining keyboard shortcuts for running macros.'']]
 
[[Image:WG3-17-11.png|thumb|none|500px|''Defining keyboard shortcuts for running macros.'']]
  
{{Documentation/Tip| For inserting en- and em-dashes, and other special characters, you may find extensions such as Compose Special Characters useful. See [[Documentation/OOo3_User_Guides/Writer Guide/Using extensions|Adding functionality with extensions]] in the ''Writer Guide''.}}
+
{{Tip| For inserting en- and em-dashes, and other special characters, you may find extensions such as Compose Special Characters useful. See [[Documentation/OOo3_User_Guides/Writer Guide/Using extensions|Adding functionality with extensions]] in the ''Writer Guide''.}}
  
 
{{PDL1}}
 
{{PDL1}}
  
 
[[Category:Documentation/How Tos/Writer]]
 
[[Category:Documentation/How Tos/Writer]]
 +
[[nl:NL/Documentation/How_Tos/Inserting_En_and_Em_Dashes]]

Latest revision as of 09:41, 27 August 2022

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.

Windows

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.

Tip.png On a keyboard with no numeric keypad, use a Fn (Function) key combination to type the numbers. (The Fn key is usually to the right of the left-hand Ctrl key on the keyboard.)

For example, on a US keyboard layout, the combination for an en dash should be Alt+Fn+mjim and for an em dash it should be Alt+Fn+mjij.


Tip.png You might prefer to install a small, free, open source program for Windows called AllChars, which you can get here.


Linux

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

Tip.png The key that operates as a Compose key varies with the Linux distribution. It is usually  ⇧ Shift  +  AltGr , but may be another key (e.g. the Windows key), and should be user-configurable.


On Linux distributions based on the Gnome/GTK+ desktop environment, you can also input Unicode characters by pressing  Ctrl  +  ⇧ Shift  +  U , followed by the hexadecimal value of the Unicode character (2013 for an en dash, 2014 for an em dash). To end the input sequence, press either the  Return  key or release the Ctrl/Shift keys.

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  +  ⌥ Opt  +  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 Apache OpenOffice 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 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.
Tip.png For inserting en- and em-dashes, and other special characters, you may find extensions such as Compose Special Characters useful. See Adding functionality with extensions in the Writer Guide.


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