سانچہ:NumBlk/دستاویز

testwiki سے
Jump to navigation خانۂ تلاش میں جائیں

سانچہ:Documentation subpage

سانچہ:وضع سانچہ زیر استعمال سانچہ:لوا This template creates a numbered block which is usually used to number mathematical and chemical formulae. This template can be used together with سانچہ:سا and سانچہ:سا to produce formatted numbered equations if a back reference to an equation is wanted. Alternatively, سانچہ:سا can also be used directly—a template that combines the main functionalities of both سانچہ:سا and سانچہ:سا.

سانچہ:Visible anchor

Usage

سانچہ:Tlx

Parameters

Parameters سانچہ:پیرا, سانچہ:پیرا, and سانچہ:پیرا of this template are required. In addition, there are five optional parameters سانچہ:پیرا, سانچہ:پیرا, سانچہ:پیرا, سانچہ:پیرا and سانچہ:پیرا.

  • سانچہ:پیرا
    Specify indentation. The more colons : you put, the further indented the block will be, up to a limit of 20. This parameter can be empty if no indentation is needed.
  • سانچہ:پیرا: The body or content of the block.
  • سانچہ:پیرا: Specify the block number.
  • سانچہ:پیرا
    If a non-empty non-whitespace value, no extra formatting will be applied to the block number.
  • سانچہ:پیرا: Specify the line style.
  • سانچہ:پیرا: If set, put a box around the equation. (Experimental.)
  • سانچہ:پیرا
    The value of this parameter will be added to the class attribute of the outermost element of the template. Therefore, this parameter must conform to the syntax of the class attribute, which is a space-separated list of classes.
  • سانچہ:پیرا
    Specify the attributes of the outermost element of the template. Default is style="margin-left: {{#expr:1.6 * indentation_level}}em;" where indentation_level is derived from سانچہ:پیرا. Thus, this parameter determines the indentation of the template by default. When specifying the attributes of the outermost element of the template through this parameter, it is recommended to assign an appropriate value to this parameter to replace the original role of the default value and obtain the expected indentation effect. Besides, since the class attribute is already used internally by the template, specifying the class attribute directly in this parameter may cause problems. The class attribute should be set by assigning a value to سانچہ:پیرا instead. (for wrapper templates)

Examples

Formulae may render HTML

{{Numbered block|:|<math>y=ax+b</math>|Eq. 3}}

سانچہ:Numbered block

{{Numbered block|:|<math>ax^2+bx+c=0</math>|Eq. 3}}

سانچہ:Numbered block

{{Numbered block|:|<math>\Psi(x_1,x_2)=U(x_1)V(x_2)</math>|1}}

سانچہ:Numbered block

{{Numbered block|:|Fe<sup>3+</sup> + H<sub>2</sub>O<sub>2</sub> → Fe<sup>2+</sup> + HOO<sup></sup> + H<sup>+</sup>|2}}

سانچہ:Numbered block

{{Numbered block|:|<chem>H+ + CO3^2- -> HCO3^-</chem>|3}}

سانچہ:Numbered block

Indentation

{{Numbered block||<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3.5}}

سانچہ:Numbered block

{{Numbered block|:|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1}}

سانچہ:Numbered block

{{Numbered block|::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|13.7}}

سانچہ:Numbered block

{{Numbered block|:::|<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|1.2}}

سانچہ:Numbered block

Formatting of equation number

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=3.5|RawN=.}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<3.5>|RawN=.}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=[3.5]|RawN=.}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3='''[3.5]'''|RawN=.}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<math>(3.5)</math>|RawN=.}}

سانچہ:Numbered block

Line style

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=1px dashed red}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''(3.5)'''</Big>|RawN=.|LnSty=3px dashed #0a7392}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px solid green}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px dotted blue}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=0px solid green}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=5px none green}}

سانچہ:Numbered block

{{Numbered block|1=:|2=<math>\mathbf{a}(t)=\frac{d}{dt}\mathbf{v}(t)</math>|3=<Big>'''[3.5]'''</Big>|RawN=.|LnSty=3px double green}}

سانچہ:Numbered block

Indentation other than using parameter سانچہ:پیرا

The following equations
:<math>3x+2y-z=1</math>
::<math>2x-2y+4z=-2</math>
:::<math>-2x+y-2z=0</math>
form a system of three equations.

The following equations

3x+2yz=1
2x2y+4z=2
2x+y2z=0

form a system of three equations.

The following equations
:{{Numbered block||<math>3x+2y-z=1</math>|1}}
::{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
:::{{Numbered block||<math>-2x+y-2z=0</math>|3}}
form a system of three equations.

سانچہ:Box

The following equations
<dl><dd>
{{Numbered block||<math>3x+2y-z=1</math>|1}}
<dl><dd>
{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
<dl><dd>
{{Numbered block||<math>-2x+y-2z=0</math>|3}}
</dd></dl>
</dd></dl>
</dd></dl>
form a system of three equations.

The following equations

سانچہ:Numbered block
سانچہ:Numbered block
سانچہ:Numbered block

form a system of three equations.

The following equations
<div style="margin-left: 1.6em;">
{{Numbered block||<math>3x+2y-z=1</math>|1}}
<div style="margin-left: 1.6em;">
{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
<div style="margin-left: 1.6em;">
{{Numbered block||<math>-2x+y-2z=0</math>|3}}
</div>
</div>
</div>
form a system of three equations.

The following equations

form a system of three equations.

The following equations
<div style="margin-left: calc(1.6em * 1);">
{{Numbered block||<math>3x+2y-z=1</math>|1}}
</div>
<div style="margin-left: calc(1.6em * 2);">
{{Numbered block||<math>2x-2y+4z=-2</math>|2}}
</div>
<div style="margin-left: calc(1.6em * 3);">
{{Numbered block||<math>-2x+y-2z=0</math>|3}}
</div>
form a system of three equations.

The following equations

form a system of three equations.

Unordered list

* <math>3x+2y-z=1</math>
* <math>2x-2y+4z=-2</math>
* <math>-2x+y-2z=0</math>
  • 3x+2yz=1
  • 2x2y+4z=2
  • 2x+y2z=0
* {{Numbered block||<math>3x+2y-z=1</math>|1}}
* {{Numbered block||<math>2x-2y+4z=-2</math>|2}}
* {{Numbered block||<math>-2x+y-2z=0</math>|3}}

سانچہ:Box

{{Bulleted list
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}

سانچہ:Bulleted list

{{Bulleted list
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}

سانچہ:Bulleted list

Ordered list

# <math>3x+2y-z=1</math>
# <math>2x-2y+4z=-2</math>
# <math>-2x+y-2z=0</math>
  1. 3x+2yz=1
  2. 2x2y+4z=2
  3. 2x+y2z=0
# {{Numbered block||<math>3x+2y-z=1</math>|1}}
# {{Numbered block||<math>2x-2y+4z=-2</math>|2}}
# {{Numbered block||<math>-2x+y-2z=0</math>|3}}

سانچہ:Box

{{Ordered list
|1=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-block; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}

سانچہ:Ordered list

{{Ordered list
|1=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>3x+2y-z=1</math>|Eq. 1}}</div>
|2=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>2x-2y+4z=-2</math>|Eq. 2}}</div>
|3=<div style="display: inline-table; width: 100%; vertical-align: middle;">{{Numbered block||<math>-2x+y-2z=0</math>|Eq. 3}}</div>
}}

سانچہ:Ordered list

Border

<!-- LnSty is not specified. -->
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|Border=1}}

سانچہ:Numbered block

<!-- LnSty is specified. -->
{{Numbered block|:|<math>y=ax+b</math>|Eq. 3|LnSty=0.7em solid #e500e5|Border=1}}

سانچہ:Numbered block

When content of the blocks and block numbers are far apart

Markup
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}}
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}}
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}}
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}}
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}}
Renders as

سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block

Markup
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}}
Renders as

سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block

Markup
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2|LnSty=0.37ex none Gainsboro}}
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3|LnSty=0.37ex dotted Gainsboro}}
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4|LnSty=0.37ex none Gainsboro}}
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5|LnSty=0.37ex dotted Gainsboro}}
Renders as

سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block

Markup
<div style="background-color: Beige;">
{{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}}
</div> <div style="background-color: none;">
{{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}}
</div> <div style="background-color: Beige;">
{{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}}
</div> <div style="background-color: none;">
{{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}}
</div> <div style="background-color: Beige;">
{{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}}
</div>
Renders as
Markup
(mouse over the row you want to highlight)
{{row hover highlight}}
{| class="hover-highlight" style="width: 100%; border-collapse: collapse; margin: 0; padding: 0;"
|-
| {{Numbered block|1=:|2=<math>a^2 + b^2 = (a + b i) (a - b i)</math>|3=1}}
|-
| {{Numbered block|1=:|2=<math>a^2 - b^2 = (a + b) (a - b)</math>|3=2}}
|-
| {{Numbered block|1=:|2=<math>e^{i x} = \cos x + i \sin x</math>|3=3}}
|-
| {{Numbered block|1=:|2=<math>\sin^2 \theta + \cos^2 \theta = 1</math>|3=4}}
|-
| {{Numbered block|1=:|2=<math>\sin(2 \theta) = 2 \sin \theta \cos \theta</math>|3=5}}
|}
Renders as

(mouse over the row you want to highlight) سانچہ:Row hover highlight

سانچہ:Numbered block
سانچہ:Numbered block
سانچہ:Numbered block
سانچہ:Numbered block
سانچہ:Numbered block

Positioning relative to surrounding images

Numbered blocks should be able to be placed around images that take up space on the left or right side of the screen. To ensure numbered block has access to the entire line, consider using a سانچہ:سا-like template.

To illustrate, consider the example: سانچہ:Markupv سانچہ:صاف If it is desirable for the numbered block to span the entire line, a سانچہ:سا should be placed before it. سانچہ:Markupv

Table caveat

Because {{Numbered block}} is implemented as a table, putting {{Numbered block}} within a table yields a nested table. Due to a bug in میڈیاویکی's handling of nested tables, سانچہ:سا must be used carefully in this case. In particular, when indentation for the outer table is desired, use explicit سانچہ:Tag tags for indentation instead of a leading colon (:).

For example, سانچہ:Markupv which shows how the outer سانچہ:Tag tags give the same indentation as a single colon (:) preceding the table should.

For another example,

Markup
<dl><dd>
<dl><dd>
{|
|-
|The first parameter for indentation still works when used inside table.
{{Numbered block|::::|<math>ax^2+bx+c=0</math>|Level 4}}
{{Numbered block|:::|<math>ax^2+bx+c=0</math>|Level 3}}
{{Numbered block|::|<math>ax^2+bx+c=0</math>|Level 2}}
{{Numbered block|:|<math>ax^2+bx+c=0</math>|Level 1}}
{{Numbered block||<math>ax^2+bx+c=0</math>|Level 0}}
|-
|}
</dd></dl>
</dd></dl>
Renders as
The first parameter for indentation still works when used inside table.

سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block سانچہ:Numbered block

which uses two sets of explicit tags to give the same indentation as two colons (::).