सामग्री पर जाएँ

साँचा:Math/विव

विकिपुस्तक से

Formats HTML - or wikimarkup generated - mathematical formulas in the same manner as HTML based TeX formulas, which uses a serif-based font. Use this template for non-complex formulas as an alternative to using the math tags.

साँचे के पैरामीटर्स[साँचा डेटा सम्पादित करें]

इस साँचे के लिए पैरामीटरों के इनलाइन प्रारूपण को प्राथमिकता दी जाती है।

पैरामीटरविवरणप्रकारस्थिति
Bigbig

Request if the font in a bigger (165%) size. by adding 1

उदाहरण
1, unused
बूलियनवैकल्पिक
Font Sizesize

Used to specify your own font size.

उदाहरण
11px, 1.2em, 120%
संख्यावैकल्पिक
Equation1

The HTML text to display. Note that equal signs must be inputted as {{=}} and absolute value bars as {{!}}

उदाहरण
f(x) = x<sup>2</sup> + 2x + 1
सामग्रीसुझावित

Rationale for This Template

[सम्पादन]

The Math template formats HTML- or wikimarkup generated mathematical formulas in the same manner as HTML based TeX formulas, which uses a serif-based font. The generated formula is displayed using the same-size font as the adjoining text. The template will prevent line-wrapping.

Use this template for non-complex formulas as an alternative to using the "math" tags: <math>...</math>.

Use this template to wrap an inline formula in wikitext. For example,

What's Written What's Displayed Notes
{{math|''x''<sup>2</sup> + ''y''<sup>2</sup> {{=}} ''r''<sup>2</sup>}} x2 + y2 = r2
{{math|{{mapply|sin <i>π</i>}} {{=}} 0}} sin π = 0. The coding "<i>" puts italic font, same as "<var>"
'''{{math|{{frac|1|2}} − {{frac|1|3}} {{=}} {{frac|1|6}}}}''' 1213 = 16 The triple-apostrophes was interpreted by the wiki; boldface was set.
{{math|1 + 2 {{=}} 3|big=1}} 1 + 2 = 3

Because of this template's simplicity, there are some bugs that arise due to the fact that the template is handled through the wiki. This means that keywords and symbols may be inadvertently processed.

If a single equals-sign ("=") is used, some bugs may occur because the wiki interprets the equal sign as a parameter assignment. It may show up as "{{{1}}}" or as undefined behavior if this template was used inside another template. For example, you should not write

{{math|1 + 2 = 3}}
This renders whatever is shown after the colon and before the comma: , which is not what you would want.

To resolve this, either:

(a) Start the formula with "1=" {{math|1=1 + 2 = 3}} 1 + 2 = 3, which displays it since you have manually defined the unnamed parameter.
(b) Include the equals-sign in double-braces "{{=}}" {{math|1 + 2 {{=}} 3}} 1 + 2 = 3, which displays it because the wiki interprets {{=}} as an equal sign in the template.
(c) Use the HTML entity name for the equal sign &#61; {{math|1 + 2 &#61; 3}} 1 + 2 = 3, which displays it because your browser interprets &#61; as an equal sign when displaying this page.

Absolute Signs

[सम्पादन]

If the bar ("|") is used, some bugs may occur because the wiki interprets the bar as a new parameter or as a table component. For example, you should not write

{{math||1 + 2| {{=}} 3}}
This renders whatever is shown after the colon and before the comma: 1 + 2, which is not what you would want.

To resolve this, either:

(a) Write "{{!}}" instead {{math|{{!}}1 + 2{{!}} {{=}} 3}} 1 + 2| = 3, which displays it because the wiki interprets {{!}} as a bar in the template.
(b) Use the HTML entity name for the equal sign &#124; {{math||1 + 2| = 3}} ") when displaying this page.