Wikipedia:How to make dashes
|This page is a how-to guide, detailing processes or procedures of some aspect or aspects of Wikipedia's norms and practices. It is not one of Wikipedia's policies or guidelines.||
The hyphen-minus (keyboard dash), en dash, em dash, and mathematical minus/negative symbols are different and handled differently from each other on Wikipedia (see WP:Manual of Style/Dashes). Below is information on how to generate these characters.
- For Macs: ⌥ Opt+- (en dash) or ⌥ Opt+⇧ Shift+- (em dash), and ignore the rest of the page.
- For Linux:
- use AltGr- (en dash, '–'), or AltGr⇧ Shift- (em dash, '—'), and ignore the rest of the page.
- if you have Compose key: Compose--. (en dash) or Compose--- (em dash), and ignore the rest of the page.
- For Windows:
- Alt+0150 (en dash) or Alt+0151 (em dash), using the number pad and ignore the rest of the page.
- In Microsoft Office applications: Ctrl+- (en dash) and Ctrl+Alt+- (em dash), using the minus key from the key pad.
- For iPhones and iPads or Android devices: hold the - on screen keyboard until a pop up appears with choices including the en dash and em dash. If using an external keyboard use the Mac advice above. Ignore the rest of the page.
- Alternatively, copy and paste an en dash (–) or an em dash (—) as required.
- Or, use the CharInsert edit tool.
How to copy and paste
- Select. First, select a dash already in the text. That is, click just to the left of the dash but don't let go of the mouse button. While holding down the button, move to the right side of the dash. Now let go of the mouse button. The dash should now change color, and nothing else should change color. If not, try again.
- Copy. Next, press Ctrl+c; that is, hold down the Ctrl key, probably at the lower left corner of your keyboard. Without letting go of the Ctrl key, press the C key; then let go of both keys. This is designed to be done with two fingers of your left hand, but can, of course, be done any way you like.
- Locate insertion point. Go to where you want to add the dash. Click there.
- Insert. Press Ctrl+v; it's similar to Ctrl+c, but with a v instead of a c.
There are several ways to make en dashes and em dashes. Each has its partisans. Each has advantages and disadvantages. This table shows en dashes. Em dashes are similar, and are described below the table. If you make hundreds of dashes, invest some time learning software to make it faster. If you just want to make one dash, see the short explanation above.
|Method||How to do it||Advantages||Disadvantages|
|Copy and paste||See "Short explanation" above. You can also find dashes to copy on other pages, or on the edit screen "Insert" line described below, or put dashes on your user page.||Easiest to learn. Most Wikipedians already know how to copy and paste because they use it in word processors and other software. Especially recommended if you've never entered a dash before and don't expect to make a career out of it. After you learn this method, then maybe you will want to learn how to speed up the process by using another method.||Compared to other methods, it takes a few seconds longer to navigate to another page with a dash on it, and then come back again. That's assuming it doesn't take you hours to learn those other methods. Other methods are a little faster once you have them set up and understood, so you will want to learn one if entering dashes gets to be a habit.|
|Copy and paste from a "Character map"–type application.||Similar to above.||There is no need to navigate to another Wikipedia page. This approach becomes more advantageous when special characters other than an en dash must be entered.||The application must be started, the hand moved from the keyboard to the mouse, and the en dash selected and copied from the application and pasted into the edit window—a lot of work if only one dash is to be entered.|
||One of the easiest methods to learn. When you see it on the edit page, you can tell it isn't a hyphen or an em dash because it says "ndash", unlike – which looks the same as a hyphen on the edit page. At least one editor thinks – should be changed to
Because it uses Windows-1252 characters, the entity
|More editors think the opposite change should be made, and some of them use WP:AWB to accomplish that. So does Wikipedia:AutoEd, which says: "HTML entities like Ö will be replaced with their unicode characters like Ö.". Example. The characters
|Edit page "Insert"||On the edit page, below the Save page buttons and just above Please note:, there will be a field that might have the word "Insert" in it. However, if you have used that function before, it might say something else instead: "Wiki markup", "Symbols", "Latin", "Greek", "Cyrillic", "Hebrew", "Arabic", "IPA (English)", "IPA", or "Math and logic". If it says one of those things, click the blue arrow and change it back to "Insert". Immediately to the right of the arrow pointing down should be something that looks like an equals sign. It isn't. It's an underlined link that inserts an en dash into the edit window. The first one is a link for an en dash; the second one is a link for an em dash, which is longer.
In the edit window, go to where you want an en dash. Click there to position the insertion point; verify that the cursor appears at the desired position. Without clicking anywhere else, scroll down below the "Save page" button. Click the en dash link. Now make sure the en dash went where you want it to. If you clicked the dash link before clicking where it goes, or if you clicked anything else before clicking the en dash, you just added an en dash in the wrong place. It may look like nothing happened, so that may make you click the dash again and again, adding more and more en dashes in the wrong place. It goes the last place you clicked before clicking the en dash below, not where the mouse is pointing.
|You can easily find the dash below the edit screen when you need it, and you can easily see that it is an en dash. Once you learn how to add en dashes this way, you can use this feature to add other special characters on the "Insert" line, and on the other lines you can get to with the down arrow.||It takes considerable practice to use it correctly. If you make any of the mistakes described to the left in the "How to" column, the en dash will silently go in the wrong place. If the user mistakenly thinks nothing is happening, and therefore he tries again and again, then more and more en dashes will go in wrong places. If he still thinks nothing is happening, he may save the page with en dashes in the wrong place, creating a typo much worse than the hyphen problem he was probably trying to solve. Also, when I try this on my laptop, scrolling down to the "Insert" line makes the top of the edit screen scroll off the top, so I can't see where the dash is going, and therefore I don't know if I need to undo.|
|Your keyboard probably has two Alt keys. While holding down the left Alt key (the right Alt key does not work if the US-International keyboard is enabled), type
One user reported getting this to work on his laptop by pressing function key F11 to turn regular numbers into keypad numbers, and then press F11 again to turn them back to regular numbers. More explanation here.
|Takes two seconds once you learn how.||Learning how. Some users can't get it to work, and we don't know if it's because they didn't follow all the instructions to the left in the "How to" column. Even if you can get it to work, you still have the problem of memorizing the left Alt and the
|While holding down the left Alt key (the right Alt key does not work if the US-International keyboard is enabled), type
||Uses codes corresponding to Unicode rather than obsolescent Windows-1252 codes above. Consequently, a character such as U+2013 can be entered by simply entering the code rather than having to learn an additional numerical code.||May require editing the Windows registry, which should never be attempted by a user who isn't very familiar with the procedure (editing the registry incorrectly can make a computer unusable). As with the Alt code above, it is non-mnemonic. Some alphanumeric codes (e.g., U+00B6, "¶") may not work correctly with an application that interprets the alphabetic character as part of a command (e.g., Alt+
(Spaced en dash)
||In addition to the advantages of
||In addition to the disadvantages of
|User:GregU/dashes.js||Click the link to the left for instructions. I haven't tried it.||It apparently finds some appropriate places for those dashes, in addition to supplying those dashes.||I don't use it because my AWB software already has dash logic in my find and replaces.|
|abcTajpu||An add-on for the Firefox browser. Straightforward.||Two or three keystrokes. Customizable. Enables other symbols, selectable by language.||Requires unfamiliar software, so this is practical only if you frequently enter dashes or use it for something else.|
|Customise your keyboard with AutoHotkey||Make a script (in Notepad, or whatever) to assign actions to any number of key combinations of your choice; compile the script; load the script automatically whenever you start Windows, or load scripts and unload them ad hoc. Perhaps choose to use the Windows key in combination with a mnemonic second key, and assign type WIN-Hyphen to make an en dash. The code for this:
You can also make an exe file, and distribute to any Windows user. Also good for developing huge scripts that are full-metal applications.
|Free. Under constant improvement by zealous nerds. Versions for other operating systems also. Extensive helpfile. Worth the effort of learning. Intuitive enough once you get started. As simple or as complex as you like. Can be used to make a system for a collaborative group.||You do have to learn it, or get someone else to make a script to meet your needs.|
|Microsoft Keyboard Layout Creator||Modify an existing keyboard or create a new keyboard. Somewhat involved.||Described here||Requires unfamiliar software, so this is practical only if you frequently enter dashes or use it for something else. Not all hotkeys work on all systems, so may require tinkering.|
|Change Wikipedia's underlying software. I think "Wikimedia rendering software" is the correct term.||One proposal is: You type in two hyphens into the edit page. The system changes them into an en dash, in the same way that the system changes [[dog]] into dog.||Once the software is changed, typing two hyphens (for instance) is easier than anything else on the list, considering that the individual editor doesn't need to install any software. Therefore, he will be more likely to use dashes. Therefore, the cause of dashes is more likely to triumph throughout Wikipedia.||Are most people reading this interested in entering a dash, or in joining a crusade? If they just want to enter a dash, this proposal is just making this page longer. If they want to join a crusade, the crusade won't succeed unless most people want to actually enter the dashes. Anyway, this is a perennial proposal and nothing ever gets done. It's popular among Manual of Style regulars, and nobody else cares much. If the specific proposal is two hyphens, then what happens if you really want two hyphens, in a file name for instance? And if you need some obscure parameter to allow that to happen, then would it be easier to just enter the dashes the old-fashioned way? Also, if you take it for granted that the triumph of dashes throughout Wikipedia is an advantage, then you're much more likely to be a Manual of Style regular than a typical reader.|
The alternatives for em dashes closely resemble the alternatives for en dashes. In the table above: substitute — for –; mdash for ndash; Alt+
0151 for Alt+
0150; the longer (second) equals sign for the shorter (first) equals sign after the blue arrow; etc. An em dash can also be approximated using the typewriter convention of two hyphens:
|Method||How to do it||Advantages||Disadvantages|
||Press the hyphen key twice||It's easily input and easily understood.||It violates the WP:DASH guideline, and attracts megabytes of hostile discussion from Manual of Style partisans. It makes people think we don't know how to make dashes, which is bad for our image.|
- If using MouseKeys, the Alt method of entering character codes will not work if MouseKeys are set to be active while numlock is on. Click Start, click Help. In search window, enter: MouseKeys and press Enter. In the left column, click "Change MouseKeys options". Follow instructions to: "Use MouseKeys when NumLock is Off".