Difference between revisions of "Template:Equation box 1/doc"
imported>Dpleibovitz (+{{documentation subpage}}) |
imported>WOSlinker m (change source to syntaxhighlight) |
||
| Line 32: | Line 32: | ||
|background colour=white}} | |background colour=white}} | ||
| − | < | + | <syntaxhighlight lang="moin">{{Equation box 1 |
|title='''[[Complex number]]''' | |title='''[[Complex number]]''' | ||
|indent=: | |indent=: | ||
| Line 39: | Line 39: | ||
|border = 1 | |border = 1 | ||
|border colour = black | |border colour = black | ||
| − | |background colour=white}}</ | + | |background colour=white}}</syntaxhighlight> |
;Green theme | ;Green theme | ||
| Line 51: | Line 51: | ||
|background colour = #ECFCF4}} | |background colour = #ECFCF4}} | ||
| − | < | + | <syntaxhighlight lang="tex">{{Equation box 1 |
|indent=: | |indent=: | ||
|equation=<math>z=re^{i\phi}=x+iy \,\!</math> | |equation=<math>z=re^{i\phi}=x+iy \,\!</math> | ||
| Line 58: | Line 58: | ||
|border colour = #50C878 | |border colour = #50C878 | ||
|background colour = #ECFCF4}} | |background colour = #ECFCF4}} | ||
| − | }}</ | + | }}</syntaxhighlight> |
;Blue theme | ;Blue theme | ||
| Line 71: | Line 71: | ||
|background colour=#F5FFFA}} | |background colour=#F5FFFA}} | ||
| − | < | + | <syntaxhighlight lang="tex">{{Equation box 1 |
|indent =: | |indent =: | ||
|title= | |title= | ||
| Line 78: | Line 78: | ||
|border | |border | ||
|border colour = #0073CF | |border colour = #0073CF | ||
| − | |background colour=#F5FFFA}}</ | + | |background colour=#F5FFFA}}</syntaxhighlight> |
; With reference | ; With reference | ||
Latest revision as of 13:04, 7 July 2020
| This is a documentation subpage for Template:Equation box 1. It contains usage information, categories and other content that is not part of the original template page. |
Displays an equation in a box.
The full syntax is:
{{Equation box 1|indent|title|equation|ref|cellpadding|border|border colour|background colour}}
Parameters
- Indent: Type colon (:) to indent the box from the left side of the page. Leave blank for no indentation.
- Title: Title/name of equation. Leave blank for no title.
- Equation: The equation in whatever form, usually <math> equation in LaTeX ... </math>. Leave blank to get an equation showing the general form of a complex number, <math>z=re^{i\phi}=x+iy \,\!</math> (only useful for examples).
- Ref: Reference label. Calls {{EquationRef}} with provided value as the parameter. Leave blank for no reference label.
- Cellpadding: Number of pixels to be used as padding of the box around the equation (how much the box wraps around the equation, margins). Default is 5.
- Border: Thickness of the border line in pixels (do not include "px"; it will be added). Default is 2.
- Border colour: Colour code (colour name or hex triplet) for the colour of the border line of the box. Default is #50C878, a nuance of green called emerald green.
- Background colour: Colour code for the background area of the box. Default is #ECFCF4, a light grayish cyan.
See list of colours for use with the border and background colours. To use the parameters set the parameter equal to the value by using the equals sign.
Examples
- Black/white theme
<math>z=re^{i\phi}=x+iy \,\!</math>
{{Equation box 1
|title='''[[Complex number]]'''
|indent=:
|equation=<math>z=re^{i\phi}=x+iy \,\!</math>
|cellpadding = 6
|border = 1
|border colour = black
|background colour=white}}
- Green theme
<math>z=re^{i\phi}=x+iy \,\!</math>
{{Equation box 1
|indent=:
|equation=<math>z=re^{i\phi}=x+iy \,\!</math>
|cellpadding
|border
|border colour = #50C878
|background colour = #ECFCF4}}
}}
- Blue theme
<math>z=re^{i\phi}=x+iy \,\!</math>
{{Equation box 1
|indent =:
|title=
|equation = <math>z=re^{i\phi}=x+iy \,\!</math>
|cellpadding= 6
|border
|border colour = #0073CF
|background colour=#F5FFFA}}
- With reference
2 × 2 = 4 (1)
{{Equation box 1
|equation = {{math|1=2 × 2 = 4}}
|ref=1}}
TemplateData
TemplateData for Equation box 1
Displays an equation in a box.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Indent | indent | One or two colons for an indent from the left, OR a valid CSS margin value. Leave blank for no indent.
| String | optional |
| Cellpadding (margin) | cellpadding | Number of pixels to be used as padding of the box around the equation (how much the box wraps around the equation; margins). Default is 5.
| Number | optional |
| Border thickness | border | Thickness of border line in pixels. Default is 2.
| Number | optional |
| Border colour | border colour | Colour code (colour name or hex triplet in the format #RRGGBB) for the border line of the box. Default is #50C878, a nuance of green called emerald green.
| String | optional |
| Background colour | background colour | Colour code (colour name or hex triplet in the format #RRGGBB) for the background colour of the box. Default is #ECFCF4, a light grayish cyan.
| String | optional |
| Title/name | title | Title/name of equation. Can be left blank for no title.
| Line | suggested |
| Equation | equation | The equation in whatever form, usually <math>equation in LaTeX...</math>. The default equation is the general form of a complex number.
| Content | required |
| Reference label | ref | Label for the equation for later reference. Calls {{EquationRef}} with provided value as the parameter.
| String | optional |