Difference between revisions of "Template:Ldelim/doc"
Jump to navigation
Jump to search
imported>Maschen (add) |
imported>Maschen |
||
| Line 9: | Line 9: | ||
The template has the code: | The template has the code: | ||
| − | <code><nowiki>{{ldelim|a|b}}</nowiki></code> | + | <code><nowiki>{{ldelim|a|b|sup=|sub=}}</nowiki></code> |
containing two parameters: | containing two parameters: | ||
| Line 19: | Line 19: | ||
**'''doublevert''' for double vertical bars || ||, | **'''doublevert''' for double vertical bars || ||, | ||
*the second parameter <code>b</code> is the number of lines for the expression, and equals one of the values '''2, 3, 4, 5'''. | *the second parameter <code>b</code> is the number of lines for the expression, and equals one of the values '''2, 3, 4, 5'''. | ||
| + | |||
| + | and two optional parameters: | ||
| + | |||
| + | *'''sup''' for superscripts outside of the delimiter, | ||
| + | *'''sub''' for subscripts outside of the delimiter. | ||
| + | |||
| + | Without the superscript and subscript parameters, the <code>< sup ></code> or <code>< sub ></code> tags alone will not position the superscripts or subscripts correctly. | ||
==Examples== | ==Examples== | ||
| Line 26: | Line 33: | ||
;[[Lorentz factor]] | ;[[Lorentz factor]] | ||
| − | :γ(''v'') = {{ldelim|square|3}}{{sfrac|1|1 − {{ldelim|round|2}}{{sfrac|''v''|''c''}}{{rdelim|round|2}} | + | :γ(''v'') = {{ldelim|square|3}}{{sfrac|1|1 − {{ldelim|round|2}}{{sfrac|''v''|''c''}}{{rdelim|round|2|sup=2}}}}{{rdelim|square|3|sup={{frac|1|2}}}} |
;[[Absolute value]] of a fraction: | ;[[Absolute value]] of a fraction: | ||
| Line 48: | Line 55: | ||
;[[Lorentz factor]] | ;[[Lorentz factor]] | ||
| − | :{{math|γ(''v'') {{=}} {{ldelim|square|3}}{{sfrac|1|1 − {{ldelim|round|2}}{{sfrac|''v''|''c''}}{{rdelim|round|2}} | + | :{{math|γ(''v'') {{=}} {{ldelim|square|3}}{{sfrac|1|1 − {{ldelim|round|2}}{{sfrac|''v''|''c''}}{{rdelim|round|2|sup=2}}}}{{rdelim|square|3|sup={{frac|1|2}}}}}} |
;[[Absolute value]] of a fraction: | ;[[Absolute value]] of a fraction: | ||
Revision as of 08:10, 26 June 2013
- "Template:Leftdelimiter" and "Template:Leftdelimiter/doc" redirect to here.
This is for producing tall left-handed delimiters for multiline expressions (usually mathematical) in HTML, together with {{rdelim}}, compatible with {{math}}, as an alternative to LaTeX. Up to 5 lines are possible. The name "ldelim" is a shorthand for "left-handed delimiter".
- This template uses {{delimiter-es}}, and is used in {{dsqbracket}} and {{drndbracket}}.
Syntax
The template has the code:
{{ldelim|a|b|sup=|sub=}}
containing two parameters:
- the first parameter
ais- square for square brackets [ ],
- round for round brackets ( ),
- vert for vertical bars | |,
- doublevert for double vertical bars || ||,
- the second parameter
bis the number of lines for the expression, and equals one of the values 2, 3, 4, 5.
and two optional parameters:
- sup for superscripts outside of the delimiter,
- sub for subscripts outside of the delimiter.
Without the superscript and subscript parameters, the < sup > or < sub > tags alone will not position the superscripts or subscripts correctly.
Examples
No template:math
- Absolute value of a fraction
- Norm of a vector with scalar fractions
- Ampère's circuital law with Maxwell's correction
- ∮
∂S B ∙ dx = ∬
S μ0J + Template:SfracTemplate:SfracTemplate:Rdelim ∙ dS
template:math
- Absolute value of a fraction
- Norm of a vector with scalar fractions
- Ampère's circuital law with Maxwell's correction
- ∮
∂S B ∙ dx = ∬
S μ0J + Template:SfracTemplate:SfracTemplate:Rdelim ∙ dS