Template:Zero width joiner/doc: Difference between revisions

From Guild of Archivists
m (1 revision imported)
 
No edit summary
 
Line 3: Line 3:
{{Template shortcut|zwj}}
{{Template shortcut|zwj}}


The template {{tl|zwj}} inserts the code {{code|‍}}, producing a {{unichar|200D|Zero-width joiner|nlink=Zero-width joiner|html=‍|decimal=8205}} in the rendered wiki-page. This invisibly 'sews together' two words as if they were a single word, preventing their separation at line breaks. It acts as a {{tlg|nbsp|alttext=no-break space}} {{code| }} except is immaterial and does not display on the page.
The template {{tl|zwj}} inserts the code {{code|‍}}, producing a {{unichar|200D|Zero-width joiner|nlink=w:Zero-width joiner|html=‍|decimal=8205}} in the rendered wiki-page. This invisibly 'sews together' two words as if they were a single word, preventing their separation at line breaks. It acts as a {{tlg|nbsp|alttext=no-break space}} {{code| }} except is immaterial and does not display on the page.


== Usage ==
== Usage ==
Line 13: Line 13:


:''something that needs a citation''‍{{fake citation needed}}
:''something that needs a citation''‍{{fake citation needed}}
== History ==
This template used to employ code of the older "[[Zero-width non-breaking space]]" that is now outdated, as of Unicode 3.2. Though Unicode suggests a {{smallcaps|[[Word Joiner]]}} instead, zero-width joiner does practically the same thing and better matches the already-existing {{tl|zwnj}}. An alternative is to simply use the HTML code {{code|‍}} in wikimarkup.


== See also ==
== See also ==
Line 23: Line 20:
* {{tl|Nbhyph}} (no-break hyphen)
* {{tl|Nbhyph}} (no-break hyphen)
* {{tl|Shy}} (soft hyphen)
* {{tl|Shy}} (soft hyphen)
{{Inline spacing templates}}
{{Inline spacing templates}}
<includeonly>
<includeonly>

Latest revision as of 00:26, 21 January 2018

The template {{zwj}} inserts the code , producing a U+200D zero-width joiner (HTML: &#8205; &zwj;) in the rendered wiki-page. This invisibly 'sews together' two words as if they were a single word, preventing their separation at line breaks. It acts as a {{no-break space}}   except is immaterial and does not display on the page.

Usage[edit]

This template can be used, for example, to prevent text to wrap as in:

something that needs a citation
[citation needed]

Inserting {{zwj}} between the text and the tag produces instead:

something that needs a citation[citation needed]

See also[edit]

  • {{Zwnj}} (zero-width non-joiner, allows two pieces of text to wrap when they otherwise wouldn't)
  • {{Spaces}} (no-break spaces)
  • {{Nnbsp}} (narrow no-break space)
  • {{Nbhyph}} (no-break hyphen)
  • {{Shy}} (soft hyphen)