User:Mgkrupa/Code and Symbols

Coordinates: 54°05′56″N 22°55′43″E / 54.09889°N 22.92861°E / 54.09889; 22.92861
Source: Wikipedia, the free encyclopedia.

Math LaTeX code


Common misc code

{{abbreviation|TVS|Topological Vector Space}} TVS

<ol type="a"> <ol style="list-style-type: lower-latin;">

WP:ACCESSIBILITY anTable of Binary Operatorsd MOS:MATH

Indentation:

Do NOT use a colon : to indent because it produces to broken HTML code and reduces accessibility.
  • Use {{Block indent}} for indentation of text; for indenting a single line, {{in5}} can also be used.
  • Use <math display=block>x = y</math> instead of :<math>x = y</math> to display math equations on their own line.
  • Do NOT use a colon : or <quoteblock></quoteblock> or {{blockquote}} for indentation − they are only for quotes.

Do NOT use ;Pseudoheading name for pseudoheadings (sections that don't appear in the table of contents).

  • Use '''Pseudoheading name''' instead.

"Do not use possibly unpronounceable symbols"



{{quote frame|align=|1=}}

{{quote box|width=|border=|bgcolor=|style=|qalign=|align=|1=}}


{{math theorem|name=Theorem|note=|style=|math_statement=
}}

{{math theorem|name=Lemma Proposition etc Default is "Theorem"
|note=Info In Parentheses|math_statement=
}}

Proofs: {{math proof}}

{{collapse top|title=Proof|expand=yes|left=true}}
{{collapse bottom}}

  • In non-article namespaces only: Can also use {{hidden begin}} and {{hidden end}} (does not hide anything from mobile users)

{{math proof|drop=hidden|proof=
}}

{{math proof|drop=hidden|title=Default is "Proof"|proof=
}}


Indentation

{{Block indent}}  {{in5}}

Table of contents

{{TOC limit|3}}

Common math code

Spaces and Sizes

Result LaTeX code Other info
Text text text text text

Text text text text text. Now without vertical spaces: Text text text text text.

<math display=block>
h_\bull
\begin{aligned}&\\[1.0ex]\end{aligned}
</math>
Vertical space before and/or after a single line math statement. 2.0ex is 2.0 times the height of the 'x' character.
<math>\displaystyle \sum_{i=1}^\infty</math>

<math>\textstyle \sum_{i=1}^\infty</math>
<math>\scriptstyle \sum_{i=1}^\infty</math>
<math>\scriptscriptstyle \sum_{i=1}^\infty</math>

<math>\bigl( \bigr) ~ ()</math>

<math>\bigl[ \bigr] ~ []</math>

<math>\dotsb</math> for binary operators/relations

<math>\dotsm</math> for multiplication
<math>\dotsi</math> for integrals
<math>\dotsc</math> for commas


Spacing
Result LaTeX code
<math>\begin{alignat}{8}
&M \!          M&&\quad&&\backslash!            &&\text{negative thin space (-3 mu)}\\
&MMM            &&     &&                       &&\text{no space}\\
&M \,          M&&     &&\backslash,            &&\text{thin (3 mu)}\\
&M \;          M&&     &&\backslash;            &&\text{thick (5 mu)}\\
&M \           M&&     &&\backslash\text{ }     &&\text{length of a text space character}\\
&M \text{ }    M&&     &&\backslash\text{text}\{\ \}&&\text{using } \backslash\text{text}\{\text{ }\}\\
&M \quad       M&&     &&\backslash\text{quad}  &&\text{width of } M \text{ (18 mu)}\\
&MMM            &&     &&                       &&\text{no space }\\
&M \qquad      M&&     &&\backslash\text{qquad} &&\text{double width of } M \text{ (36 mu)}\\
&M \mathbin{M} M&&     &&\backslash\text{mathbin}\{M\}\quad&&\text{spaces around binary relation } M\\
&M \mathrel{M} M&&     &&\backslash\text{mathrel}\{M\}\quad&&\text{spaces around binary operator } M\\
\end{alignat}</math>

Symbols (LaTeX)

Links to Math symbol articles
Unicode and LaTeX
LaTeX
Unicode
Conventions and guidelines
Other


From compart.com:



Symbols for Operations/Relations


Result LaTeX code Other info

\wp \O \P \S \Complex \H \N \Q \Reals \Z

Weierstrass P

\ker \Pr \hom \imath\arg \gcd \exp \sgn \dim \deg \det \imath \jmath \Bbbk \ (space)

\blacksquare \square

QED end of proof box.

\perp \bot \backslash \odot

\rightarrowtail \hookrightarrow \rightharpoonup \rightrightarrows \twoheadrightarrow \rightsquigarrow \mapsto \longmapsto

\cong \equiv \sim \simeq \approx \widehat{=} \overset{?}{=} \triangleq \doteq \shortparallel \nshortparallel

\lor \land \vee \wedge \bigvee \bigwedge \curlywedge \curlyvee

\prec \preccurlyeq \preceq \precsim \curlyeqprec \succ \succcurlyeq \succeq \succsim \curlyeqsucc \not\prec \not\preceq \not\succ \not\succeq

\lesssim \gtrsim \lessdot \gtrdot \sqsubset \sqsubseteq \sqsupset \sqsupseteq \not\sqsubseteq \not\sqsupseteq \ll \gg

\triangleleft \triangleright \vartriangleleft \ntriangleleft \vartriangleright \ntriangleright \trianglelefteq \ntrianglelefteq \trianglerighteq \ntrianglerighteq

\varnothing \empty \emptyset

\subsetneq \supsetneq \not\subseteq \not\supseteq




\mod m
\mod \,
\pmod m
\pmod \,

NOTE: <math>\mod</math> and <math>\pmod</math> without an argument are NOT allowed.

\Re \Im \mho \P \S \ln \log \lg \sinh \cosh \tanh \coth \complement

\lim \liminf \limsup \inf \sup

Words/Terminology

Useful terminology or words with special symbols

Lists of words at wiktionary:
Main Category: Category:en:Mathematics and Glossary of areas of mathematics
See also: Thesaurus:Mathematics

Non-Latex Code

Superscripts and subscripts
overbase           {{overset|over|base}}
basebelow           {{underset|below|base}}
super
subsc
          {{sup sub|super|subsc}}
- Can also use {{su}} but you'll need to write "p=" and "b=" as in: {{su|p=super|b=subsc}} which gives: super
subsc
Xtop
bot
            X{{su|p=top|b=bot}}
Xb                X{{sub|b}}
Xb                X{{sup|b}}
Alignment: {{center}}
{{left}} {{center}} {{right}} - For aligning text that comes after it
{{Center|Text goes here}}
See Help:Table#HELP:TABLECENTER for info on centering tables.
Text goes here

Font size: {{larger}} < {{big}} < {{large}} < {{huge}}, {{resize}}, {{math|big=1|}}, {{math|size=200%|}}
  • {{math|big=1|}}     for big font size (165%) OR     {{math|size=200%|}}     for custom font size.
3                 {{larger|3}}
3                 {{big|3}}
3                 {{large|3}}
3                 {{huge|3}}
3                {{resize|260%|3}}

{{math|big=1|}}      {{math|size=200%|}}

Divide text into multiple columns: <div style="column-count: 3; column-rule-style: dotted; column-rule-color: lightblue; column-rule-style: outset; column-width: 80px;">The COVID‑19 pandemic, also known as the coronavirus pandemic, is an ongoing pandemic of coronavirus disease 2019 (COVID‑19) caused by severe acute respiratory syndrome coronavirus 2 (SARS‑CoV‑2). It was first identified in December 2019 in Wuhan, China. The World Health Organization declared the outbreak a Public Health Emergency of International Concern on 30 January 2020 and a pandemic on 11 March.</div>

Spacing

{{paragraph break}}


{{space|3}} adds 3 spaces.
{{quad}} adds 4 spaces.
{{sp}}     - Standard space character - HTML: &#32;    Unicode: U+202F

{{thinsp}}    &thinsp;    {{thin space}} - To place a single thin space (unicode: U+2009)
{{thinsp|symbol}}      OR      {{thin space|symbol}} - Wraps text on the left AND right with a thin space
Ex: ({{thinsp|''x''}})      (x)      rather than:    (x)

{{thinspace}} - Separates a list of arguments by &thinsp;
EX: ({{thinspace|sin|2''θ''}})      (sin 2θ)

{{hair space}}    {{hsp}}    {{hairsp}}    - Unicode: U+200A
{{hairsp|symbol}}      OR      {{hair space|symbol}} - Wraps text on the left AND right with a hair space
Ex: ({{hairsp|''x''}})      ( x )      rather than:    (x)

{{Narrow no-break space}}    {{hsp}}    {{nnbsp}}    - HTML: &#8239;    Unicode: U+202F
{{nnbsp|symbol}}      OR      {{Narrow no-break space|symbol}} - Wraps text on the left AND right with a hair space
Ex: ({{nnbsp|''x''}})      ( x )      rather than:    (x)

{{Zero width space}}
{{0}}     - Empty string i.e. 0-width space
Name
(alias)
Instance Example code and ... Using {{spaces}} Output Output {{spaces}}
none Text<ref>...</ref>
''Text''<ref>...</ref>
Text[1]
Text[2]
Hair
(Very thin)
Text{{hair space}}<ref>...</ref>
''Text''{{hair space}}<ref>...</ref>
Text{{spaces|hair}}<ref>...</ref> Text [1]
Text[2]
Text[1]
Text[2]
2-pixel Text{{px2}}<ref>...</ref>
''Text''{{px2}}<ref>...</ref>
Text[1]
Text[2]
Narrow no-break Text{{narrow no-break space}}<ref>...</ref>
''Text''{{narrow no-break space}}<ref>...</ref>
Text [1]
Text[2]
Thin Text{{thin space}}<ref>...</ref>
''Text''{{thin space}}<ref>...</ref>
Text{{spaces|thin}}<ref>...</ref> Text[1]
Text[2]
Text[1]
Text[2]
Standard[a]   Text&nbsp;<ref>...</ref>
''Text''&nbsp;<ref>...</ref>
Text{{spaces}}<ref>...</ref> Text [1] Text [1]
Text [2]
En 1&ensp;3 1{{spaces|en}}3 1 3 13
Figure 123<br/>1{{figure space}}3 123<br/>1{{spaces|fig}}3 123
13
123
13
Em 1&emsp;3 1{{spaces|em}}3 1 3 13
  1. ^ Provided here by a non-breaking space (&nbsp;).


Equations and boxes

Boxes

For Box shadows

- See also: CSS box-shadow

Box shadows:

Result LaTeX code Other info
My text in a box!
<div style="border: 2px solid; padding: 10px; box-shadow: 5px 10px;">My text in a box!</div>
My text in a box with multile colors!
<div style="border: 2px solid; padding: 10px; box-shadow: 5px 6px 7px green, 11px 12px 13px red, 21px 22x 23px blue;">My text in a box with multile colors!</div>
My text in a box with multile colors and blur effect!
<div style="border: 2px solid; padding: 10px; box-shadow: 5px 6px 7px green, 11px 12px 13px red, 21px 22x 23px blue;">My text in a box with multile colors and blur effect!</div>
My text in a box with multile colors and blur effect! The keyword "inset" places the shadow inside the box.
<div style="border: 2px solid; padding: 10px; box-shadow: 5px 6px 7px green, 11px 12px 13px red, 21px 22x 23px blue inset;">My text in a box with multile colors and blur effect! The keyword "inset" places the shadow inside the box.</div>
Referencing and Displaying equations
Option 1:

Step (1): Wrap the equation in <div id=EquationID></div> where id's value becomes an anchor name.

Step (2): Reference the equation by its id:

Example:

<div id=EquationID><math display=block>x \mapsto f x</math></div>
where [[#EquationID|the equation above]]

Output:

where the equation above


Option 2:

Use {{EquationRef}} to create an {{anchor}}

Result LaTeX code Other info
Eq. 1 {{EquationRef|Eq. 1}} <math>x^2+x+1=0</math>
Eq. 2: {{EquationRef|2|Eq. 2:}} <math>x^2-2x+1=0</math>



Option 3:

{{NumBlk}} produces numbered blocks. The more colons : you put then the more the equation is indented.

{{NumBlk|:::|<math>y=ax+b</math>|{{EquationRef|Eq. 5}}|LnSty=1px dashed black}}

(Eq. 5)

{{NumBlk|:|<math>y=ax+b</math>|Eq. 6}}

(Eq. 6)

Option 4:

{{Equation box 1|indent= |title=|equation=|ref=|cellpadding=|border=|bordercolour=|background colour=}}

{{Equation box 1|title='''[[Complex number]]'''|indent=:|equation=<math>2=1+1</math>|cellpadding=6|border=1|border colour=black|background colour=white|ref=Eq. 90}}

Complex number

   (Eq. 90)

Use border colour=#50C878|background colour=#ECFCF4 for more colors.


Other options:

{{equation}} HTML LINK - ASSUMES THE EQUATION THAT IS IN LaTeX

{{equation|1=X(t) = 3.5|2=3.5}}

(3.5)

  • HTML Link to equation 3.5 [[#equation-3.5|HTML Link to equation 3.5]]
    • Default anchor name is: equation-# where # is the equation number used in argument |2=

Step (2) Use {{EquationNote}} to create a link

Result LaTeX code Other info
1 {{EquationNote|1}}
Equation 1 {{EquationNote|1|Equation 1}}
Custom-Text-Eq-2 {{EquationNote|2|Custom-Text-Eq-2}}
Custom-Text-Eq. 5 {{EquationNote|Eq. 5|Custom-Text-Eq. 5}}


Aligning: \begin{alignat}{4} and \begin{array}{4}

  • For additional vertical space at the end of a line, use \\[0.7ex] instead of just \\ (2.0ex is twice the height of the x character).


LaTeX: Aligning equations \begin{alignat}{4} \stackrel{a}{b}
Note: \begin{alignat}{4} does not add space between columns while \begin{align} and \begin{align*} do.
Result LaTeX code Other info
<math>\begin{alignat}{4}
(1) \;\;\; &\{q_{i,K} &&: \;K \in \mathbb{K}, \;\;&&i \in \N,   \;&&0 \leq i \leq k \} \\
(4) \;\;\; &\{s_{p,K} &&: \;K \in \mathbb{K}, \;\;&&p \in \N^n, \;&&|p| \leq k \}.
\end{alignat}</math>

The Wikipedia equivalent of the LaTeX code \substack{a\\b} is \stackrel{a}{b} (displays as ).

Result LaTeX code Other info
<math>\begin{array}{rcrcccl}
r(x,y,z) & = & x & + & y & + & z \\
g(x,y)   & = & x & + & y &   &   \\
h(y,z)   & = &   &   & y & + & z \\
\end{array}</math>
<math>\begin{array}{|l|c|r|}
\hline
00 & 00 & 00 \\
\hline
1 & 2 & 3 \\
1 & 2 & 3 \\
\hline
1 & 2 & 3 \\
\end{array}</math>
See also this chemistry table.
<math>\begin{array}{|l|c|r|}
001  & 000  & 100 \\
01   & 00   & 10  \\
1    & 1    & 1   \\
\hline
3    & 1    & 111 \\
\end{array}</math>

Result LaTeX code Other info
<math>f(x) =
\begin{cases}
x & \text{ if } x \leq 0 \\
0 & \text{ otherwise } \\
\end{cases}</math>
<math>\begin{alignat}{4}
f : \,& X && \to    \,&& Y \\
      & x && \mapsto\,&& y \\
\end{alignat}</math>
<math>\begin{array}{rccl}
f : &X& \to    \,&Y \\
    &x& \mapsto\,&y \\
\end{array}</math>

Definitions - {{dfn}}

Ex: Without alt text:

Say that {{em|{{dfn|1=new term|id=dfn-anchorname}}}} if ....<br/>this term ([[#dfn-anchorname|defined here]]), ...
Say that new term if ....
this term (defined here), ...

Ex: With alt text:

Say that {{em|{{dfn|1=new term 2|2=Alt text giving definition of term|id=dfn-anchorname2}}}} if ....<br/>this term ([[#dfn-anchorname2|defined here]]), ...
Say that new term if ....
this term (defined here), ...

Color

Result LaTeX code Other info
{\color{Red}{\bigcup}} B
A \color{Red}{\bigcup}\color{Black}{} B See below for why \color{Black}{} is needed
\color{Red}{\bigcup} B Without the \color{Black}{} it renders as:
<span style="color:red">red text</span>

<span style="color:#0000FF"">blue text</span>

For plain text.


Colors supported
Colors
CSS 1–2.0, HTML 3.2–4, and VGA color names
Name Hex
(RGB)
Red
(RGB)
Green
(RGB)
Blue
(RGB)
Hue
(HSL/HSV)
Satur.
(HSL)
Light
(HSL)
Satur.
(HSV)
Value
(HSV)
CGA number (name); alias
White #FFFFFF 100% 100% 100% 0° 0% 100% 0% 100% 15 (white)
Silver #C0C0C0 75% 75% 75% 0° 0% 75% 0% 75% 07 (light gray)
Gray #808080 50% 50% 50% 0° 0% 50% 0% 50% 08 (dark gray)
Black #000000 0% 0% 0% 0° 0% 0% 0% 0% 00 (black)
Red #FF0000 100% 0% 0% 0° 100% 50% 100% 100% 12 (high red)
Maroon #800000 50% 0% 0% 0° 100% 25% 100% 50% 04 (low red)
Yellow #FFFF00 100% 100% 0% 60° 100% 50% 100% 100% 14 (yellow)
Olive #808000 50% 50% 0% 60° 100% 25% 100% 50% 06 (brown)
Lime #00FF00 0% 100% 0% 120° 100% 50% 100% 100% 10 (high green); green
Green #008000 0% 50% 0% 120° 100% 25% 100% 50% 02 (low green)
Aqua #00FFFF 0% 100% 100% 180° 100% 50% 100% 100% 11 (high cyan); cyan
Teal #008080 0% 50% 50% 180° 100% 25% 100% 50% 03 (low cyan)
Blue #0000FF 0% 0% 100% 240° 100% 50% 100% 100% 09 (high blue)
Navy #000080 0% 0% 50% 240° 100% 25% 100% 50% 01 (low blue)
Fuchsia #FF00FF 100% 0% 100% 300° 100% 50% 100% 100% 13 (high magenta); magenta
Purple #800080 50% 0% 50% 300° 100% 25% 100% 50% 05 (low magenta)
HTML name R G B
Hex Decimal
Pink colors
MediumVioletRed C71585 199, 21, 133
DeepPink FF1493 255, 20, 147
PaleVioletRed DB7093 219, 112, 147
HotPink FF69B4 255, 105, 180
LightPink FFB6C1 255, 182, 193
Pink FFC0CB 255, 192, 203
Red colors
DarkRed 8B0000 139, 0, 0
Red FF0000 255, 0, 0
Firebrick B22222 178, 34, 34
Crimson DC143C 220, 20, 60
IndianRed CD5C5C 205, 92, 92
LightCoral F08080 240, 128, 128
Salmon FA8072 250, 128, 114
DarkSalmon E9967A 233, 150, 122
LightSalmon FFA07A 255, 160, 122
Orange colors
OrangeRed FF4500 255, 69, 0
Tomato FF6347 255, 99, 71
DarkOrange FF8C00 255, 140, 0
Coral FF7F50 255, 127, 80
Orange FFA500 255, 165, 0
Yellow colors
DarkKhaki BDB76B 189, 183, 107
Gold FFD700 255, 215, 0
Khaki F0E68C 240, 230, 140
PeachPuff FFDAB9 255, 218, 185
Yellow FFFF00 255, 255, 0
PaleGoldenrod EEE8AA 238, 232, 170
Moccasin FFE4B5 255, 228, 181
PapayaWhip FFEFD5 255, 239, 213
LightGoldenrodYellow FAFAD2 250, 250, 210
LemonChiffon FFFACD 255, 250, 205
LightYellow FFFFE0 255, 255, 224
Brown colors
Maroon 800000 128, 0, 0
Brown A52A2A 165, 42, 42
SaddleBrown 8B4513 139, 69, 19
Sienna A0522D 160, 82, 45
Chocolate D2691E 210, 105, 30
DarkGoldenrod B8860B 184, 134, 11
Peru CD853F 205, 133, 63
RosyBrown BC8F8F 188, 143, 143
Goldenrod DAA520 218, 165, 32
SandyBrown F4A460 244, 164, 96
Tan D2B48C 210, 180, 140
Burlywood DEB887 222, 184, 135
Wheat F5DEB3 245, 222, 179
NavajoWhite FFDEAD 255, 222, 173
Bisque FFE4C4 255, 228, 196
BlanchedAlmond FFEBCD 255, 235, 205
Cornsilk FFF8DC 255, 248, 220
HTML name R G B
Hex Decimal
Purple, violet, and magenta colors
Indigo 4B0082 75, 0, 130
Purple 800080 128, 0, 128
DarkMagenta 8B008B 139, 0, 139
DarkViolet 9400D3 148, 0, 211
DarkSlateBlue 483D8B 72, 61, 139
BlueViolet 8A2BE2 138, 43, 226
DarkOrchid 9932CC 153, 50, 204
Fuchsia FF00FF 255, 0, 255
Magenta FF00FF 255, 0, 255
SlateBlue 6A5ACD 106, 90, 205
MediumSlateBlue 7B68EE 123, 104, 238
MediumOrchid BA55D3 186, 85, 211
MediumPurple 9370DB 147, 112, 219
Orchid DA70D6 218, 112, 214
Violet EE82EE 238, 130, 238
Plum DDA0DD 221, 160, 221
Thistle D8BFD8 216, 191, 216
Lavender E6E6FA 230, 230, 250
Blue colors
MidnightBlue 191970 25, 25, 112
Navy 000080 0, 0, 128
DarkBlue 00008B 0, 0, 139
MediumBlue 0000CD 0, 0, 205
Blue 0000FF 0, 0, 255
RoyalBlue 4169E1 65, 105, 225
SteelBlue 4682B4 70, 130, 180
DodgerBlue 1E90FF 30, 144, 255
DeepSkyBlue 00BFFF 0, 191, 255
CornflowerBlue 6495ED 100, 149, 237
SkyBlue 87CEEB 135, 206, 235
LightSkyBlue 87CEFA 135, 206, 250
LightSteelBlue B0C4DE 176, 196, 222
LightBlue ADD8E6 173, 216, 230
PowderBlue B0E0E6 176, 224, 230
Cyan colors
Teal 008080 0, 128, 128
DarkCyan 008B8B 0, 139, 139
LightSeaGreen 20B2AA 32, 178, 170
CadetBlue 5F9EA0 95, 158, 160
DarkTurquoise 00CED1 0, 206, 209
MediumTurquoise 48D1CC 72, 209, 204
Turquoise 40E0D0 64, 224, 208
Aqua 00FFFF 0, 255, 255
Cyan 00FFFF 0, 255, 255
Aquamarine 7FFFD4 127, 255, 212
PaleTurquoise AFEEEE 175, 238, 238
LightCyan E0FFFF 224, 255, 255
HTML name R G B
Hex Decimal
Green colors
DarkGreen 006400 0, 100, 0
Green 008000 0, 128, 0
DarkOliveGreen 556B2F 85, 107, 47
ForestGreen 228B22 34, 139, 34
SeaGreen 2E8B57 46, 139, 87
Olive 808000 128, 128, 0
OliveDrab 6B8E23 107, 142, 35
MediumSeaGreen 3CB371 60, 179, 113
LimeGreen 32CD32 50, 205, 50
Lime 00FF00 0, 255, 0
SpringGreen 00FF7F 0, 255, 127
MediumSpringGreen 00FA9A 0, 250, 154
DarkSeaGreen 8FBC8F 143, 188, 143
MediumAquamarine 66CDAA 102, 205, 170
YellowGreen 9ACD32 154, 205, 50
LawnGreen 7CFC00 124, 252, 0
Chartreuse 7FFF00 127, 255, 0
LightGreen 90EE90 144, 238, 144
GreenYellow ADFF2F 173, 255, 47
PaleGreen 98FB98 152, 251, 152
White colors
MistyRose FFE4E1 255, 228, 225
AntiqueWhite FAEBD7 250, 235, 215
Linen FAF0E6 250, 240, 230
Beige F5F5DC 245, 245, 220
WhiteSmoke F5F5F5 245, 245, 245
LavenderBlush FFF0F5 255, 240, 245
OldLace FDF5E6 253, 245, 230
AliceBlue F0F8FF 240, 248, 255
Seashell FFF5EE 255, 245, 238
GhostWhite F8F8FF 248, 248, 255
Honeydew F0FFF0 240, 255, 240
FloralWhite FFFAF0 255, 250, 240
Azure F0FFFF 240, 255, 255
MintCream F5FFFA 245, 255, 250
Snow FFFAFA 255, 250, 250
Ivory FFFFF0 255, 255, 240
White FFFFFF 255, 255, 255
Gray and black colors
Black 000000 0, 0, 0
DarkSlateGray 2F4F4F 47, 79, 79
DimGray 696969 105, 105, 105
SlateGray 708090 112, 128, 144
Gray 808080 128, 128, 128
LightSlateGray 778899 119, 136, 153
DarkGray A9A9A9 169, 169, 169
Silver C0C0C0 192, 192, 192
LightGray D3D3D3 211, 211, 211
Gainsboro DCDCDC 220, 220, 220

General Wiki code

Lists

  • <li value="7">Item</li>
    • but      <li value="7a">Item</li> does not produce "7a".

<ol type="a">     or     <ol style="list-style-type:lower-latin;">     or     <ol style="list-style-type:square;">   or   circle;    {{Columns-list}}
<ol type="a">      or      <ol style="list-style-type:lower-latin;">
<ol type="A">      or      <ol style="list-style-type:upper-latin;">
<ol type="i">      or      <ol style="list-style-type:lower-roman;">
<ol type="I">      or      <ol style="list-style-type:upper-roman;">
<ol style="list-style-type:square;">
<ol style="list-style-type:circle;">      for a non-filled circle (not a closed disk, but just its boundary)
<ol style="list-style-type:disk;">      for a filled disk
<ol type="1">      or      <ol style="list-style-type:decimal;">
<ol style="list-style-type:none;">      Blank, no symbol shown.
Result LaTeX code Other info
  • Item 1
  • Item 2
{{Columns-list|colwidth=22em|
* Item 1
* Item 2
}}
{{Columns-list}} "turns a list into a list with columns. It is a wrapper for {{div col}}, except it wraps the template by allowing for the content to be in the template rather than above and below."


Blank lists (no symbol)    {{plainlist}}    {{unbulleted list}}
Result LaTeX code Other info
  1. Item 1
  2. Item 2
<ol style="list-style-type:none;">
<li>Item 1</li>
<li>Item 2</li>
</ol>
<ol style="list-style-type:none;">      Blank, no symbol shown.
  • Item 1
  • Item 2
{{plainlist|
* Item 1
* Item 2
}}
{{plainlist}}
  • Item 1
  • Item 2
{{unbulleted list
| Item 1
| Item 2
}}
{{unbulleted list}}


Horizontal/Flat lists      {{hlist|class=inline|Entry1|Entry2}}
{{hlist}}
  • {{hlist|Entry1|entry2|entry3}}      produces:
    • Entry1
    • entry2
    • entry3
  • {{hlist|class=inline|Entry1|entry2|entry3}}      produces:
    • Entry1
    • entry2
    • entry3

{{flatlist}}
{{flatlist|
* Entry 1
* Entry 2
* entry 3
}}
produces:
  • Entry 1
  • Entry 2
  • entry 3

Using {{flatlist}} improves WP:ACCESSIBILITY:

Source Rendered result
{{flatlist|
# item 1
# item 2
}}
  1. item 1
  2. item 2
{{flatlist|
* item 1
* item 2
}}
  • item 1
  • item 2


<ol style="list-style-position:inside;">

<ol style="list-style-position:inside;"> produces:

  1. An extremely long sentence with repeated words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words.
  2. Item 2.

where note that "words" appears directly underneath the "1."


The default is "outside"; that is: <ol style="list-style-position:outside;"> which produces:

  1. An extremely long sentence with repeated words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words words.
  2. Item 2.

where note that there is empty space directly underneath the "1."


Spacing/Padding      <ol style="line-height:180%;">

<ol style="line-height:250%;">

Produces:

  1. Item 1.
  2. Item 2.

The default is:

  1. Item 1.
  2. Item 2.

Tables and columns


Wikipedia: Tables

For side by side info (e.g. code next to output): (The <div> is for border + background)

<div style="background: white; border: 2px solid rgb(0, 255, 0); padding: 2px;">
{| style="border-collapse: collapse; width: ; background: ; color: ; border: ; margin: ;"
<!--- Example: {| style="width: 100%; background: yellow; color: red; border: 2px solid green;"  --->
!style="text-align:center;"|Column 1 Title
!style="text-align:center;"|Column 2 Title
|-style="vertical-align:top;"
|style="border-right:2px solid rgb(0, 255, 0); padding-top: ; padding-right:1em; padding-left:1em;"|

Left side info - e.g. Code goes here

|style="padding-top: ; padding-right:1em; padding-left:1em;"|

Right side info here
|}
</div>
Wiki source Rendered result
{| style="width: ; background: ; color: ; border: ;"
! {{diagonal split header|Bottom-Left|Top-Right}}
! Solid !! Liquid !! Gas
|-
! Solid
| Solid-solid transformation || Melting || Sublimation
|}
Top-Right
Bottom-Left
Solid Liquid Gas
Solid Solid-solid transformation Melting Sublimation

You can also use other languages for lang=""(WikiMedia partial list here).

<syntaxhighlight lang="html+handlebars"> - for WikiCode
<syntaxhighlight lang="tid">
<syntaxhighlight lang="css">
<syntaxhighlight lang="html">
(ending tag is </syntaxhighlight>) in place of the <pre><nowiki> tags.



EXAMPLES of Tables


Columns
Result LaTeX code Other info
  • 1
  • 2
  • 3
  • 4
{{div col|colwidth=8em|gap=1em|rules=yes|small=yes}}
* 1
* 2
* 3
* 4
{{div col end}}
{{div col|colwidth|rules|gap|small}} {{div col end}}
{{col-begin}}
{{col-break}}
* 1
* 2
{{col-break}}
* 3
* 4
{{col-break}}
* 5
{{col-end}}
{{col-begin}}{{col-break}} Content {{col-break}} Content2 {{col-end}}

Column 1 start:

  • 1
  • 2

Column 2 start: If there is not enough space to display 2 columns then the second column will be displayed underneth the first column. Otherwise they will be side by side.

  • 3
  • 4
  • 5
{{col-float}}
Column 1 start: 
* 1
* 2
{{col-float-break}}
Column 2 start: If there is not enough space to display 2 columns then the second column will be displayed underneth the first column. Otherwise they will be side by side.
* 3
* 4
* 5
{{col-float-end}}
{{col-float}}{{col-float-break}} Content {{col-float-break}} Content2 {{col-float-end}}

This template has between cross platform behavior.

Column 1 start:

  • 1
  • 2

Column 2 start: If there is not enough space to display 2 columns then the second column will be displayed underneth the first column. Otherwise they will be side by side.

  • 3
  • 4
  • 5

See also, Main, and other Hatnotes

Images