Editing Template:Mbox

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. Read the Privacy Policy to learn what information we collect about you and how we use it.

If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{#invoke:Message box|mbox}}<noinclude>
<span style="white-space: nowrap;">{{{|{{{1}}}}}}</span><noinclude>
{{documentation}}
----
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
This template prevents line breaks during HTML mathematics.  It is a practical alternative to excessive use of [[non-breaking space]]s (&#38;nbsp;).
 
==Use==
In a math article, included math such as
<pre>''f'': ''X'' × ''Y'' → [0, 1]</pre>
may end up broken between lines.  This can be fixed using nonbreaking spaces:
<pre>''f'':&#38;nbsp;''X''&#38;nbsp;×&#38;nbsp;''Y''&#38;nbsp;→&#38;nbsp;[0,&#38;nbsp;1]</pre>
However, this results in cumbersome source code which can be difficult to edit.  Using this template, the same result can be achieved with:
<pre>{{mbox| ''f'': ''X'' × ''Y'' → [0, 1]}}</pre>
 
===Dealing with equations===
Because of Wikipedia limitations on templates, mbox doesn't function as stated above if the math contains an equals sign.  In this case, the following syntax should be used:
<pre>{{mbox|= 2''x'' + 3''y'' + 5''z'' = 7}}</pre>
Using |= instead of | also works for non-equations.
[[Category:Mathematics templates|{{PAGENAME}}]]
</noinclude>
</noinclude>
Please note that all contributions to Nonbinary Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see Nonbinary Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)