This site is supported by donations to The OEIS Foundation.
Template:End/doc
From OeisWiki
The {{begin}} and {{end}} mathematical formatting templates are used to simulate LaTeX environments.
Usage
{{begin|''environment''|''format''}} first line {{\\}} second line {{\\}} ... {{\\}} second last line {{\\}} last line {{end|''environment''|''format''}}
where environment
is from
-
align
: calls {{align|end|format}}, -
cases
: will calls {{cases|end|format}}, -
gather
: will call (NOT YET IMPLEMENTED!) {{gather|begin|format}}, - (...);
and where format
is from
-
htm
: HTML+CSS (default); -
tex
: LaTeX.
Examples
Decimal point alignment
The code
{{indent}}{{math| {{begin|align}} 123{{&.}}45678 {{\\}} 1{{&.}}2345678 {{\\}} 123456{{&.}}78 {{end|align}} |&&}}
yields the display style HTML+CSS
|
The code
{{indent}}{{math| {{begin|align|tex}} 123{{&.|tex}}45678 {{\\|tex}} 1{{&.|tex}}2345678 {{\\|tex}} 123456{{&.|tex}}78 {{end|align|tex}} |$$}}
yields the display style LaTeX
Cases
The code:
The iterated function of the [[3x+1 problem|{{mathfont|3{{sp|1}}''x'' + 1}} problem]] is : {{math|''f''{{sp|2}}(''n'') {{=}} {{begin|cases}} ''n''{{sp|1}}{{op|/}}2{{&}}{{sp|quad}}if ''n'' {{rel|equiv}} 0 {{pmod|2}}, {{\\}} 3{{sp|1}}''n'' + 1{{&}}{{sp|quad}}if ''n'' {{rel|equiv}} 1 {{pmod|2}}. {{end|cases}} |tex = f(n) = \begin{cases} n / 2 & \text{if } n \equiv 0 \pmod{2}, \\ 3n + 1 & \text{if } n \equiv 1 \pmod{2}. \end{cases} |&&}}
yields the HTML+CSS (with the &&
option):
The iterated function of the 3 x + 1 problem is
-
f (n) = ⎧ ⎨ ⎩ n / 2 if n ≡ 0 (mod 2), 3 n + 1 if n ≡ 1 (mod 2). or yields the LaTeX (with the
$$
option):The iterated function of the 3 x + 1 problem is