Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:M3/doc: Difference between revisions

Template page
Update doc.
Proton One (talk | contribs)
Some redundant documentation; sample usage is sufficient.
 
Line 1: Line 1:
; Description
; Description
: This template creates the cubic meter symbol ({{m3|ns}}) by default preceded with a non-breaking space. It avoids a line-break between the{{m3}} and the value or preceding text (Keeping them together on one line).
: This template creates the cubic meter symbol, by default preceded by a non-breaking space ("{{m3}}"). It avoids a line-break between the{{m3}} and the value of preceding text, keeping them together on one line.


; Syntax
; Syntax
Line 8: Line 8:


; Sample
; Sample
: {{Code|<nowiki>100{{m3}}</nowiki> gives...}}
{|
: 100{{m3}}
| {{Code|<nowiki>100{{m3}}</nowiki>}}
: {{Code|<nowiki>This value is in{{m3}}</nowiki> gives...}}
| 100{{m3}}
: This value is in{{m3}}
|-
 
| {{Code|<nowiki>This value is in{{m3}}</nowiki>}}
 
| This value is in{{m3}}
: Example of {{notthis|incorrect}} use
|-
: {{Code|<nowiki>This value is in {{m3}}.</nowiki> gives...}} This value is in {{m3}}.
| {{Code|<nowiki>({{m3|ns}})</nowiki>}}
: It is hard to see, but this results in 2 spaces between in and{{m3}} and as one is a normal space when an automatic line-break occurs between in and the{{m3}} they will be split over two lines.
| ({{m3|ns}})
 
|}
 
: Example where suppression of the non-breaking space is needed
: {{Code|<nowiki>({{m3|ns}})</nowiki> gives...}}
: ({{m3|ns}})
: Not suppressing the non-breaking space here would lead to the strange looking ({{m3}}).


; Example of incorrect use
{|
| {{Code|<nowiki>This value is in {{m3}}</nowiki>}}
| This value is in {{m3}}
|-
| {{Code|<nowiki>({{m3}})</nowiki>}}
| ({{m3}})
|}


<includeonly>[[Category:Formatting templates]]</includeonly>
<includeonly>[[Category:Formatting templates]]</includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>