Template:From-To/doc

This template inserts the  symbol ("&minus;") to separate ranges of From&minus;To items (or to insert a (by default) non&minus;breaking hyphen into a word&minus;group); optionally adding a (by default) non&minus;breaking space before and after the dash.

Usage
where  Before After   →   yields   →   Before&minus;After   (Non-breaking) or where parameter can be one of four different (case-insensitive) sets of values: "Break" or "Wrap"; or      "SoftBreak" or "Soft"; or        (nothing)  or " " (any whitespace), 0, or "No" (same as if  |  is omitted in the format above) ; or       1, "Yes", or anything else.

The  character varies from the standard hyphen "-", the , and the   both in visual appearance and the fact that the browser does not wrap the line after the   unless another line-breaking character (like a normal space, lf, cr, tab, etc) precedes or follows the dash.

The vertical positioning within the line also varies with the  closer to the middle of the line, as the following example of the four symbols , hyphen,  , and   shows: &minus; - – &mdash;

&dagger; Break or Wrap add spaces before and after the dash and, if appropriate, will allow line-wrapping after the dash.

&Dagger; SoftBreak or Soft will allow the line to wrap after the dash (as appropriate). No spaces are added before or after the dash.

If "No" spaces are added around the dash (i.e. the default format), lines wrap only at the space (or other line-breaking character) before the word preceding or after the word following the dash. The dash appears tight to the preceding/following words and will not wrap.

If there are no spaces (or other line-breaking characters) in the line of text, the information will continue off the screen and the horizontal scroll bar is displayed to allow the user to scroll to see the remainder of the line. Larger font sizes, or pages including pictures, etc, may appear strangely if numerous long words, or several groups of ranges separated by the non-breaking  dash appear without spaces or other line-breaking characters to separate the text. To prevent this, especially when listing sequential groups of ranges, separate each by a comma (or other symbol) followed by a normal space; this will ensure browser is able to breakup the line for easy readability. To allow wrapping to occur after the dash, specify the Break or Wrap option (if spaces are being added around the dash), or use the SoftBreak or Soft option (to allow line wrapping after the dash without adding extra spaces around the dash).

Except were used to separate short numeric ranges (e.g. 15), displayed text may look unusual if spaces are added (with the 1 or Yes option) but wrapping is not permitted (by using the Break or Wrap option instead). For best looking results, it is recommended that the Break or Wrap option be used to separate word groups of more than 810 characters.

It appears extremely strange if a long line of text, which has spaces added (by using the Yes or 1 options), does not wrap and disappears off the screen. It looks obvious that something is wrong, and the question then starts to become how can that happen?. Use the Break&thinsp;/&thinsp;Wrap or SoftBreak&thinsp;/&thinsp;Soft options to avoid this while still controlling spacing and line-wrapping position. Remember to test various text sizes, browser zoom levels and resize the window to test how text wrapping is affected.

Specifying the Break or Wrap options will allow the browser to wrap the text after the dash if needed; use of this option is recommended when separating groups of words that are generally more than 810 characters long.

Use of the Break or Wrap options is especially recommended if the non-breaking space is being used elsewhere to prevent wrapping.

The SoftBreak or Soft option should be used to allow wrapping when no additional visual spacing is desired around the dash. Use the Break or Wrap options to display spaces before and after the dash (similar to the Yes option), but to allow the browser to wrap the line after the dash. When Soft is used, the  dash functions identically to a normal hyphen in terms of allowing the line to wrap immediately after the dash; but it still looks like the slightly larger, slightly verticallyelevated dash.