Template:Soft hyphen

From Second Life Wiki
(Redirected from Template:SHY)
Jump to navigation Jump to search

­

[Edit] [🔄Purge] Template-info.png Template documentation

Function

This template inserts ­, which is a Expression error: Unrecognized punctuation character "[".. A soft hyphen is an "optional" hyphen â€“ a point at which a word may be broken over the end of a line, with a visible hyphen inserted at line end. The ultimate decision as to whether a particular word will be broken is made by the browser, and depends on a combination of text-layout "Wikipedia logo"heuristics, user preferences set in the browser, and hyphenation options embedded in the page being displayed. (Different browsers apply different heuristics, and some browsers ignore soft hyphens completely.)

Adding formatting

If you want to add italic or bold (or other) formatting to the whole word contained within this template, it is recommended that you place the formatting outside of the template. Although placing the formatting inside the template does work, editors and cleanup scripts may think it is an error and "fix" it incorrectly.

Do checkY this:

''{{Soft hyphen|ital|icized}}''

instead of ☒N this:

{{Soft hyphen|''ital|icized''}}

If you want to format only a portion of a word, for emphasis or styling, wrap one of the template parameters, like this:

{{Soft hyphen|''ital''|icized}}

Examples

Individual insertions

Soft hyphens have been inserted in the following text, like this:

  • super{{shy}}califrag{{shy}}ilistic{{shy}}expiali{{shy}}docious
  • antidis{{shy}}establish{{shy}}mentarian{{shy}}ism
  • pneumono{{shy}}ultra{{shy}}micro{{shy}}scopic{{shy}}silico{{shy}}volcano{{shy}}conioses
  • wocka{{shy}}wocka{{shy}}wocka{{shy}}wocka{{shy}}

The effect will usually be visible when zooming your browser and/or adjusting the width of its window. Most browser configurations will cause this long string to be broken, using hyphens, over multiple lines:

Pac Man goes wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka­wocka.

Many or most browser configurations will break long words in the passage below using hyphens‍—‌whether and where will vary from browser to browser, and may depend on local settings and preferences:

Mary Poppins, religious officials, and epidemiologists say super­califrag­ilistic­expiali­docious antidis­establish­mentarian­ism pneumono­ultra­micro­scopic­silico­volcano­conioses super­califrag­ilistic­expiali­docious antidis­establish­mentarian­ism pneumono­ultra­micro­scopic­silico­volcano­conioses super­califrag­ilistic­expiali­docious antidis­establish­mentarian­ism pneumono­ultra­micro­scopic­silico­volcano­conioses super­califrag­ilistic­expiali­docious antidis­establish­mentarian­ism pneumono­ultra­micro­scopic­silico­volcano­conioses super­califrag­ilistic­expiali­docious antidis­establish­mentarian­ism pneumono­ultra­micro­scopic­silico­volcano­conioses.

Alternative syntax

A word or phrase is enclosed within a single "shy", with each | being a potential hyphenation point:

  • Mary Poppins sings {{shy|super|califrag|ilistic|expiali|docious}} as she dances.

Avoid enclosing longer phrases or entire sentences, as that makes text difficult to edit in the visual editor.

TemplateData

This is the "Wikipedia logo"TemplateData for this template used by TemplateWizard, "Wikipedia logo"VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Soft hyphen

{
	"description": "Insert an optional hyphen – a point at which a word may be broken over the end of a line, with a visible hyphen inserted at line end.\n\nWhen parameters are specified, they are displayed in order, separated by optional hyphens. Any number of parameters can be used.",
	"params": {
		"1": {
			"label": "Fragment 1",
			"type": "string"
		},
		"2": {
			"label": "Fragment 2",
			"type": "string"
		},
		"3": {
			"label": "Fragment 3",
			"type": "string"
		},
		"4": {
			"label": "Fragment 4",
			"type": "string"
		},
		"5": {
			"label": "Fragment 5",
			"type": "string"
		}
	},
	"format": "inline"
}

See also