/usr/share/doc/libjs-mathjax-doc/html/_sources/tex.rst.txt is in libjs-mathjax-doc 2.7+20171212-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 | .. _TeX-support:
*****************************
MathJax TeX and LaTeX Support
*****************************
The support for :term:`TeX` and :term:`LaTeX` in MathJax consists of two
parts: the `tex2jax` preprocessor, and the `TeX` input processor. The
first of these looks for mathematics within your web page (indicated by
math delimiters like ``$$...$$``) and marks the mathematics for later
processing by MathJax. The TeX input processor is what converts the TeX
notation into MathJax's internal format, where one of MathJax's output
processors then displays it in the web page.
The `tex2jax` preprocessor can be configured to look for whatever
markers you want to use for your math delimiters. See the
:ref:`tex2jax configuration options <configure-tex2jax>` section for
details on how to customize the action of `tex2jax`.
The TeX input processor handles conversion of your mathematical
notation into MathJax's internal format (which is essentially MathML),
and so acts as a TeX to MathML converter. The TeX input processor has
few configuration options (see the :ref:`TeX options
<configure-TeX>` section for details), but it can also be customized
through the use of extensions that define additional functionality
(see the :ref:`TeX and LaTeX extensions <tex-extensions>` below).
Differences
===========
Since MathJax renders for the web and TeX is a print layout
engine, there are natural limitations of which parts of TeX can be
supported in a reasonable way. Accordingly, there are several
differences between "real" TeX/LaTeX systems and MathJax's TeX Input.
First and foremost, the TeX input processor implements **only** the math-mode
macros of TeX and LaTeX, not the text-mode macros. MathJax expects
that you will use standard HTML tags to handle formatting the text of
your page; it only handles the mathematics. So, for example, MathJax
does not implement ``\emph`` or
``\begin{enumerate}...\end{enumerate}`` or other text-mode macros or
environments. You must use HTML to handle such formatting tasks. If
you need a LaTeX-to-HTML converter, you should consider `other options
<http://www.google.com/search?q=latex+to+html+converter>`_.
There are two exception to this rule. First, MathJax supports the `\ref`
macro outside of math-mode. Second, MathJax supports some macros that
add text within math-mode (such as `\text{}`) as well as `$...$`
within such macros (to switch back into math-mode) and`\$` to escape.
Second, some features in MathJax might be necessarily limited.
For example, MathJax only implements a limited subset of the ``array``
environment's preamble, i.e., only the ``l``, ``r``, ``c``, and
``|`` characters alongside ``:`` for dashed lines; everything else
is ignored.
.. note::
If you are not familiar with :term:`TeX`/:term:`LaTeX`, a good
starting point is the `LaTeX Wiki book
<http://en.wikibooks.org/wiki/LaTeX>`__.
TeX and LaTeX math delimiters
=============================
By default, the `tex2jax` preprocessor defines the LaTeX math delimiters,
which are ``\(...\)`` for in-line math, and ``\[...\]`` for displayed
equations. It also defines the TeX delimiters ``$$...$$`` for displayed
equations, but it does **not** define ``$...$`` as in-line math
delimiters. That is because dollar signs appear too often in
non-mathematical settings, which could cause some text to be treated
as mathematics unexpectedly. For example, with single-dollar
delimiters, "... the cost is $2.50 for the first one, and $2.00 for
each additional one ..." would cause the phrase "2.50 for the first
one, and" to be treated as mathematics since it falls between dollar
signs. For this reason, if you want to use single-dollars for in-line
math mode, you must enable that explicitly in your configuration:
.. code-block:: javascript
MathJax.Hub.Config({
tex2jax: {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
Note that if you do this, you may want to also set ``processEscapes`` to
``true``, as in the example above, so that you can use ``\$`` to prevent a
dollar sign from being treated as a math delimiter within the text of your
web page. (Note that within TeX mathematics, ``\$`` always has this
meaning; ``processEscapes`` only affects the treatment of the *opening*
math delimiter.)
Note that, as opposed to true LaTeX, MathJax processes all environments
when wrapped inside math delimiters. By defaut, MathJax will
also render all environments outside of delimiters; this can be controlled
via the ``processEnvironments`` option in the :ref:`tex2jax configuration
options <configure-tex2jax>`.
See the ``config/default.js`` file, or the :ref:`tex2jax configuration
options <configure-tex2jax>` page, for additional configuration
parameters that you can specify for the `tex2jax` preprocessor,
which is the component of MathJax that identifies TeX notation within
the page.
TeX and LaTeX in HTML documents
===============================
Keep in mind that your mathematics is part of an HTML document, so you
need to be aware of the special characters used by HTML as part of its
markup. There cannot be HTML tags within the math delimiters (other
than ``<br>``) as TeX-formatted math does not include HTML tags.
Also, since the mathematics is initially given as text on the page,
you need to be careful that your mathematics doesn't look like HTML
tags to the browser (which parses the page before MathJax gets to see
it). In particular, that means that you have to be careful about
things like less-than and greater-than signs (``<`` and ``>``), and
ampersands (``&``), which have special meaning to the browsers. For
example,
.. code-block:: latex
... when $x<y$ we have ...
will cause a problem, because the browser will think ``<y`` is the
beginning of a tag named ``y`` (even though there is no such tag in
HTML). When this happens, the browser will think the tag continues up
to the next ``>`` in the document (typically the end of the next
actual tag in the HTML file), and you may notice that you are missing
part of the text of the document. In the example above, the "``we
have ...``" will not be displayed because the browser thinks it is
part of the tag starting at ``<y``. This is one indication you can
use to spot this problem; it is a common error and should be avoided.
Usually, it is sufficient to simply put spaces around these symbols to
cause the browser to avoid them, so
.. code-block:: latex
... when $x < y$ we have ...
should work. Alternatively, you can use the HTML entities ``<``,
``>`` and ``&`` to encode these characters so that the browser
will not interpret them, but MathJax will. E.g.,
.. code-block:: latex
... when $x < y$ we have ...
Finally, there are ``\lt`` and ``\gt`` macros defined to make it
easier to enter ``<`` and ``>`` using TeX-like syntax:
.. code-block:: latex
... when $x \lt y$ we have ...
Keep in mind that the browser interprets your text before MathJax
does.
Another source of difficulty is when MathJax is used in content
management systems that have their own document processing commands
that are interpreted before the HTML page is created. For example,
many blogs and wikis use formats like :term:`Markdown` to allow you to
create the content of you pages. In Markdown, the underscore is used
to indicate italics, and this usage will conflict with MathJax's use
of the underscore to indicate a subscript. Since Markdown is applied
to the page first, it will convert your subscripts markers into
italics (inserting ``<i>`` tags into your mathematics, which will
cause MathJax to ignore the math).
Such systems need to be told not to modify the mathematics that
appears between math delimiters. That usually involves modifying the
content-management system itself, which is beyond the means of most
page authors. If you are lucky, someone else will already have done
this for you, and you can find a MathJax plugin for your system on the
:ref:`MathJax-In-Use <mathjax-in-use>` page.
If there is no plugin for your system, or if it doesn't handle the
subtleties of isolating the mathematics from the other markup that it
supports, then you may have to "trick" it into leaving your
mathematics untouched. Most content-management systems provide some
means of indicating text that should not be modified ("verbatim"
text), often for giving code snippets for computer languages.
You may be use that to enclose your mathematics so that the system
leaves it unchanged and MathJax can process it. For example, in
Markdown, the back-tick (`````) is used to mark verbatim text, so
.. code-block:: latex
... we have `\(x_1 = 132\)` and `\(x_2 = 370\)` and so ...
may be able to protect the underscores from being processed by
Markdown.
Some content-management systems use the backslash (``\``) as a special
character for "escaping" other characters, but TeX uses this character
to indicate a macro name. In such systems, you may have to double the
backslashes in order to obtain a single backslash in your HTML page.
For example, you may have to do
.. code-block:: latex
\\begin{array}{cc}
a & b \\\\
c & c
\\end{array}
to get an array with the four entries *a*, *b*, *c*, and *d*. Note in
particular that if you want ``\\`` you will have to double *both*
backslashes, giving ``\\\\``.
Finally, if you have enabled single dollar-signs as math delimiters,
and you want to include a literal dollar sign in your web page (one
that doesn't represent a math delimiter), you will need to prevent
MathJax from using it as a math delimiter. If you also enable the
``processEscapes`` configuration parameter, then you can use ``\$`` in
the text of your page to get a dollar sign (without the backslash) in
the end. Alternatively, you use something like
``<span>$</span>`` to isolate the dollar sign so that
MathJax will not use it as a delimiter.
.. _tex-macros:
Defining TeX macros
===================
You can use the ``\def``, ``\newcommand``, ``\renewcommand``,
``\newenvironment``, ``\renewenvironment``, and ``\let`` commands to
create your own macros and environments. Unlike actual TeX, however,
in order for MathJax to process such definitions, they must be
enclosed in math delimiters (since MathJax only processes macros in
math-mode). For example
.. code-block:: latex
\(
\def\RR{\bf R}
\def\bold#1{\bf #1}
\)
would define ``\RR`` to produce a bold-faced "R", and ``\bold{...}``
to put its argument into bold face. Both definitions would be
available throughout the rest of the page.
You can include macro definitions in the `Macros` section of the `TeX`
blocks of your configuration, but they must be represented as
JavaScript objects. For example, the two macros above can be
pre-defined in the configuration by
.. code-block:: javascript
MathJax.Hub.Config({
TeX: {
Macros: {
RR: "{\\bf R}",
bold: ["{\\bf #1}",1],
Abs: ['\\left\\lvert #2 \\right\\rvert_{\\text{#1}}', 2, ""]
}
}
});
Here you give the macro as a `name:value` pair, where the `name`
is the name of the control sequence (without the backslash) that you
are defining, and `value` is either the replacement string for the
macro (when there are no arguments) or an array consisting of the
replacement string followed by the number of arguments for the macro
and, optionally, default values for optional arguments.
Note that the replacement string is given as a JavaScript string
literal, and the backslash has special meaning in JavaScript strings.
So to get an actual backslash in the string you must double it, as in the examples above.
If you have many such definitions that you want to use on more than
one page, you could put them into a configuration file that you can
load along with the main configuration file. For example, you could
create a file in ``MathJax/config/local`` called ``local.js`` that
contains your macro definitions:
.. code-block:: javascript
MathJax.Hub.Config({
TeX: {
Macros: {
RR: "{\\bf R}",
bold: ["{\\bf #1}",1]
}
}
});
MathJax.Ajax.loadComplete("[MathJax]/config/local/local.js");
and then load it along with your main configuration file on the script
that loads ``MathJax.js``:
.. code-block:: html
<script src="/MathJax/MathJax.js?config=TeX-AMS_HTML,local/local.js"></script>
If you are using the CDN, you can make a local configuration file on
your own server, and load MathJax itself from the CDN and your
configuration file from your server. See :ref:`Using a Local
Configuration File with the CDN <local-config-files>` for details.
.. _tex-eq-numbers:
Automatic Equation Numbering
============================
New in MathJax v2.0 is the ability to have equations be numbered
automatically. This functionality is turned off by default, so
that pages don't change
when you update from v1.1 to v2.0, but it is easy to configure MathJax
to produce automatic equation numbers by adding:
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
</script>
to your page just before the ``<script>`` tag that loads
``MathJax.js`` itself.
Equations can be numbered in two ways: either number the AMSmath
environments as LaTeX would, or number all displayed equations (the
example above uses AMS-style numbering). Set ``autoNumber`` to
``"all"`` if you want every displayed equation to be numbered.
You can use ``\notag`` or ``\nonumber`` to prevent
individual equations from being numbered, and ``\tag{}`` can be used
to override the usual equation number with your own symbol instead.
Note that the AMS environments come in two forms: starred and
unstarred. The unstarred versions produce equation numbers (when
``autoNumber`` is set to ``"AMS"``) and the starred ones don't. For
example
.. code-block:: latex
\begin{equation}
E = mc^2
\end{equation}
will be numbered, while
.. code-block:: latex
\begin{equation*}
e^{\pi i} + 1 = 0
\end{equation*}
won't be numbered (when ``autoNumber`` is ``"AMS"``).
You can use ``\label`` to give an equation an identifier that you can
use to refer to it later, and then use ``\ref`` or ``\eqref`` within
your document to insert the actual equation number at that location,
as a reference. For example,
.. code-block:: latex
In equation \eqref{eq:sample}, we find the value of an
interesting integral:
\begin{equation}
\int_0^\infty \frac{x^3}{e^x-1}\,dx = \frac{\pi^4}{15}
\label{eq:sample}
\end{equation}
includes a labeled equation and a reference to that equation. Note
that references can come before the corresponding formula as well as
after them. See the equation numbering pages in the `MathJax examples at <https://github.com/mathjax/MathJax/blob/master/test/>`_ for
more examples.
You can configure the way that numbers are displayed and how the
references to them are made using parameters in the ``equationNumbers``
block of your ``TeX`` configuration. See the :ref:`TeX configuration
options <configure-TeX>` page for more details.
If you are using automatic equation numbering and modifying the page dynamically, you can run into problems due to duplicate labels. See :ref:`Reset Automatic Equation Numbering <reset-equation-numbers>` for how to address this.
.. _tex-extensions:
TeX and LaTeX extensions
========================
While MathJax includes nearly all of the Plain TeX math macros, and
many of the LaTeX macros and environments, not everything is
implemented in the core TeX input processor. Some less-used commands
are defined in extensions to the TeX processor. MathJax will load
some extensions automatically when you first use the commands they
implement (for example, the ``\def`` and ``\newcommand`` macros are
implemented in the ``newcommand.js`` extension, but MathJax loads
this extension itself when you use those macros). Not all extensions
are set up to load automatically, however, so you may need to request
some extensions explicitly yourself.
To enable any of the TeX extensions, simply add the appropriate string
(e.g., ``"AMSmath.js"``) to the `extensions` array in the ``TeX`` block
of your configuration. If you use one of the combined configuration files,
like ``TeX-AMS_HTML``, this will already include several of the extensions
automatically, but you can include others using a mathjax configuration
script prior to loading MathJax. For example
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ TeX: { extensions: ["autobold.js"] }});
</script>
<script type="text/javascript"
src="https://example.com/MathJax.js?config=TeX-AMS_HTML">
</script>
will load the `autobold` TeX extension in addition to those already
included in the ``TeX-AMS_HTML`` configuration file.
You can also load these extensions from within a math expression using
the non-standard ``\require{extension}`` macro. For example
.. code-block:: latex
\(\require{color}\)
would load the `color` extension into the page. This way you you can
load extensions into pages that didn't load them in their
configurations (and prevents you from having to load all the
extensions into all pages even if they aren't used).
It is also possible to create a macro that will autoload an extension
when it is first used (under the assumption that the extension will
redefine it to perform its true function). For example
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
MathJax.Hub.Insert(MathJax.InputJax.TeX.Definitions.macros,{
cancel: ["Extension","cancel"],
bcancel: ["Extension","cancel"],
xcancel: ["Extension","cancel"],
cancelto: ["Extension","cancel"]
});
});
</script>
would declare the ``\cancel``, ``\bcancel``, ``\xcancel``, and
``\cancelto`` macros to load the `cancel` extension (where they are
actually defined). Whichever is used first will cause the extension
to be loaded, redefining all four to their proper values. Note that
this may be better than loading the extension explicitly, since it
avoids loading the extra file on pages where these macros are *not*
used. The `sample autoloading macros
<https://github.com/mathjax/MathJax/blob/master/test/sample-autoload.html>`_
example page shows this in action. The `autoload-all` extension below
defines such macros for *all* the extensions so that if you include
it, MathJax will have access to all the macros it knows about.
The main extensions are described below.
.. note::
Additional third-party extensions are available through the
:ref:`Third Party Extensions repository <ThirdParty>`.
Action
------
The `action` extension gives you access to the MathML ``<maction>``
element. It defines three new non-standard macros:
.. describe:: \\mathtip{math}{tip}
Use ``tip`` (in math mode) as tooltip for ``math``.
.. describe:: \\texttip{math}{tip}
Use ``tip`` (in text mode) as tooltip for ``math``.
.. describe:: \\toggle{math1}{math2}...\\endtoggle
Show ``math1``, and when clicked, show ``math2``, and so on.
When the last one is clicked, go back to math1.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["action.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
AMSmath and AMSsymbols
----------------------
The `AMSmath` extension implements AMS math environments and macros, and
the `AMSsymbols` extension implements macros for accessing the AMS symbol
fonts. These are already included in the combined configuration files that
load the TeX input processor. To use these extensions in your own
configurations, add them to the `extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["AMSmath.js", "AMSsymbols.js", ...]
}
See the list of control sequences at the end of this document for details
about what commands are implemented in these extensions.
If you are not using one of the combined configuration files, the `AMSmath`
extension will be loaded automatically when you first use one of the math
environments it defines, but you will have to load it explicitly if you
want to use the other macros that it defines. The `AMSsymbols` extension
is not loaded automatically, so you must include it explicitly if you want
to use the macros it defines.
Both extensions are included in all the combined configuration files
that load the TeX input processor.
AMScd
-----
The `AMScd` extensions implements the `CD` environment for commutative
diagrams. See the `AMScd guide
<http://www.jmilne.org/not/Mamscd.pdf>`_ for more information on how
to use the `CD` environment.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["AMScd.js"]
}
Alternatively, if the extension hasn't been loaded in the
configuration, you can use ``\require{AMScd}`` to load it from within a
TeX expression. Note that you only need to include this once on the
page, not every time the `CD` environment is used.
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Autobold
--------
The `autobold` extension adds ``\boldsymbol{...}`` around mathematics that
appears in a section of an HTML page that is in bold.
.. code-block:: javascript
TeX: {
extensions: ["autobold.js"]
}
This extension is **not** loaded by the combined configuration files.
BBox
----
The `bbox` extension defines a new macro for adding background colors,
borders, and padding to your math expressions.
.. describe:: \\bbox[options]{math}
puts a bounding box around ``math`` using the provided ``options``.
The options can be one of the following:
1. A color name used for the background color.
2. A dimension (e.g., ``2px``) to be used as a padding around the
mathematics (on all sides).
3. Style attributes to be applied to the mathematics (e.g.,
``border:1px solid red``).
4. A combination of these separated by commas.
Here are some examples:
.. code-block:: latex
\bbox[red]{x+y} % a red box behind x+y
\bbox[2pt]{x+1} % an invisible box around x+y with 2pt of extra space
\bbox[red,2pt]{x+1} % a red box around x+y with 2pt of extra space
\bbox[5px,border:2px solid red]
% a 2px red border around the math 5px away
This extension is **not** included in any of the combined configurations,
but it will be loaded automatically, so you do not need to include it
in your `extensions` array.
Begingroup
----------
The `begingroup` extension implements commands that provide a
mechanism for localizing macro defintions so that they are not
permanent. This is useful if you have a blog site, for example, and
want to isolate changes that your readers make in their comments so
that they don't affect later comments.
It defines two new non-standard macros, ``\begingroup`` and
``\endgroup``, that are used to start and stop a local namespace for
macros. Any macros that are defined between the ``\begingroup`` and
``\endgroup`` will be removed after the ``\endgroup`` is executed.
For example, if you put ``\(\begingroup\)`` at the top of each reader's
comments and ``\(\endgroup\)`` at the end, then any macros they define
within their response will be removed after it is processed.
In addition to these two macros, the `begingroup` extension defines
the standard ``\global`` and ``\gdef`` control sequences from TeX.
(The ``\let``, ``\def``, ``\newcommand``, and ``\newenvironment``
control sequences are already defined in the core TeX input jax.)
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["begingroup.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Cancel
------
The `cancel` extension defines the following macros:
.. describe:: \\cancel{math}
Strikeout ``math`` from lower left to upper right.
.. describe:: \\bcancel{math}
Strikeout ``math`` from upper left to lower right.
.. describe:: \\xcancel{math}
Strikeout ``math`` with an "X".
.. describe:: \\cancelto{value}{math}
Strikeout ``math`` with an arrow going to ``value``.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["cancel.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Color
-----
The ``\color`` command in the core TeX input jax is not standard in
that it takes the mathematics to be colored as one of its parameters,
whereas the LaTeX ``\color`` command is a switch that changes the
color of everything that follows it.
The `color` extension changes the ``\color`` command to be compatible
with the LaTeX implementation, and also defines ``\colorbox``,
``\fcolorbox``, and ``\definecolor``, as in the LaTeX color package.
It defines the standard set of colors (Apricot, Aquamarine,
Bittersweet, and so on), and provides the RGB and grey-scale color
spaces in addition to named colors.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["color.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands,
and have ``\color`` be compatible with LaTeX usage.
Enclose
-------
The `enclose` extension gives you access to the MathML ``<menclose>``
element for adding boxes, ovals, strikethroughs, and other marks over
your mathematics. It defines the following non-standard macro:
.. describe:: \\enclose{notation}[attributes]{math}
Where ``notation`` is a comma-separated list of MathML
``<menclose>`` notations (e.g., ``circle``, ``left``,
``updiagonalstrike``, ``longdiv``, etc.), ``attributes`` are
MathML attribute values allowed on the ``<menclose>`` element
(e.g., ``mathcolor="red"``, ``mathbackground="yellow"``), and
``math`` is the mathematics to be enclosed. See the `MathML 3
specification <http://www.w3.org/TR/MathML/chapter3.html#presm.menclose>`_
for more details on ``<menclose>``.
For example
.. code-block:: latex
\enclose{circle}[mathcolor="red"]{x}
\enclose{circle}[mathcolor="red"]{\color{black}{x}}
\enclose{circle,box}{x}
\enclose{circle}{\enclose{box}{x}}
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["enclose.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Extpfeil
--------
The `extpfeil` extension adds more macros for producing extensible
arrows, including ``\xtwoheadrightarrow``, ``\xtwoheadleftarrow``,
``\xmapsto``, ``\xlongequal``, ``\xtofrom``, and a non-standard
``\Newextarrow`` for creating your own extensible arrows. The latter
has the form
.. describe:: \\Newextarrow{\\cs}{lspace,rspace}{unicode-char}
where ``\cs`` is the new control sequence name to be defined,
``lspace`` and ``rspace`` are integers representing the amount of
space (in suitably small units) to use at the left and right of
text that is placed above or below the arrow, and ``unicode-char``
is a number representing a unicode character position in either
decimal or hexadecimal notation.
For example
.. code-block:: latex
\Newextarrow{\xrightharpoonup}{5,10}{0x21C0}
defines an extensible right harpoon with barb up. Note that MathJax
knows how to stretch only a limited number of characters, so you may
not actually get a stretchy character this way.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["extpfeil.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
HTML
----
The `HTML` extension gives you access to some HTML features like
styles, classes, element ID's and clickable links. It defines the
following non-standard macros:
.. describe:: \\href{url}{math}
Makes ``math`` be a link to the page given by ``url``.
.. describe:: \\class{name}{math}
Attaches the CSS class ``name`` to the output associated with
``math`` when it is included in the HTML page. This allows your
CSS to style the element.
.. describe:: \\cssId{id}{math}
Attaches an id attribute with value ``id`` to the output
associated with ``math`` when it is included in the HTML page.
This allows your CSS to style the element, or your javascript to
locate it on the page.
.. describe:: \\style{css}{math}
Adds the give ``css`` declarations to the element associated with
``math``.
For example:
.. code-block:: latex
x \href{why-equal.html}{=} y^2 + 1
(x+1)^2 = \class{hidden}{(x+1)(x+1)}
(x+1)^2 = \cssId{step1}{\style{visibility:hidden}{(x+1)(x+1)}}
This extension is **not** included in any of the combined configurations,
but it will be loaded automatically when any of these macros is used,
so you do not need to include it explicitly in your configuration.
mhchem
------
The `mhchem` extensions implements the ``\ce``, ``\cf``, and ``\cee``
chemical equation macros of the LaTeX `mhchem` package. See the
`mhchem CTAN page <http://www.ctan.org/pkg/mhchem>`_ for more
information and a link to the documentation for `mhchem`.
For example
.. code-block:: latex
\ce{C6H5-CHO}
\ce{$A$ ->[\ce{+H2O}] $B$}
\ce{SO4^2- + Ba^2+ -> BaSO4 v}
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["mhchem.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Beginning with v2.7, the extension provides a configuration option
to switch to `mhchem v3 <https://mhchem.github.io/MathJax-mhchem/>`_,
a complete refactor of mhchem contributed by
the author of the original LaTeX package.
You can control this behavior using the ``legacy`` value which defaults
to ``true``.
.. code-block:: javascript
TeX: {
mhchem: { legacy: true }
}
noErrors
--------
The `noErrors` extension prevents TeX error messages from being
displayed and shows the original TeX code instead. You can configure
whether the dollar signs are shown or not for in-line math, and
whether to put all the TeX on one line or use multiple lines (if the
original text contained line breaks).
This extension is loaded by all the combined configuration files that
include the TeX input processor. To enable the `noErrors` extension in
your own configuration, or to modify its parameters, add something like the
following to your :meth:`MathJax.Hub.Config()` call:
.. code-block:: javascript
TeX: {
extensions: ["noErrors.js"],
noErrors: {
inlineDelimiters: ["",""], // or ["$","$"] or ["\\(","\\)"]
multiLine: true, // false for TeX on all one line
style: {
"font-size": "90%",
"text-align": "left",
"color": "black",
"padding": "1px 3px",
"border": "1px solid"
// add any additional CSS styles that you want
// (be sure there is no extra comma at the end of the last item)
}
}
}
Display-style math is always shown in multi-line format, and without
delimiters, as it will already be set off in its own centered
paragraph, like standard display mathematics.
The default settings place the invalid TeX in a multi-line box with a
black border. If you want it to look as though the TeX is just part of
the paragraph, use
.. code-block:: javascript
TeX: {
noErrors: {
inlineDelimiters: ["$","$"], // or ["",""] or ["\\(","\\)"]
multiLine: false,
style: {
"font-size": "normal",
"border": ""
}
}
}
You may also wish to set the font family or other CSS values here.
If you are using a combined configuration file that loads the TeX
input processor, it will also load the `noErrors` extension
automatically. If you want to disable the `noErrors` extension so
that you receive the normal TeX error messages, use the following
configuration:
.. code-block:: javascript
TeX: { noErrors: { disabled: true } }
Any math that includes errors will be replaced by an error message
indicating what went wrong.
noUndefined
-----------
The `noUndefined` extension causes undefined control sequences to be
shown as their macro names rather than generating error messages. So
``$X_{\xxx}$`` would display as an "X" with a subscript consisting of the
text ``\xxx`` in red.
This extension is loaded by all the combined configuration files that
include the TeX input processor. To enable the `noUndefined` extension
in your own configuration, or to modify its parameters, add something like
the following to your :meth:`MathJax.Hub.Config()` call:
.. code-block:: javascript
TeX: {
extensions: ["noUndefined.js"],
noUndefined: {
attributes: {
mathcolor: "red",
mathbackground: "#FFEEEE",
mathsize: "90%"
}
}
}
The ``attributes`` setting specifies attributes to apply to the
``mtext`` element that encodes the name of the undefined macro. The
default values set ``mathcolor`` to ``"red"``, but do not set any
other attributes. This example sets the background to a light pink,
and reduces the font size slightly.
If you are using a combined configuration file that loads the TeX
input processor, it will also load the `noUndefined` extension
automatically. If you want to disable the `noUndefined` extension so
that you receive the normal TeX error messages for undefined macros,
use the following configuration:
.. code-block:: javascript
TeX: { noUndefined: { disabled: true } }
Any math that includes an undefined control sequence name will be
replaced by an error message indicating what name was undefined.
Unicode support
---------------
The `unicode` extension implements a ``\unicode{}`` extension to TeX
that allows arbitrary unicode code points to be entered in your
mathematics. You can specify the height and depth of the character
(the width is determined by the browser), and the default font from
which to take the character.
Examples:
.. code-block:: latex
\unicode{65} % the character 'A'
\unicode{x41} % the character 'A'
\unicode[.55,0.05]{x22D6} % less-than with dot, with height .55em and depth 0.05em
\unicode[.55,0.05][Geramond]{x22D6} % same taken from Geramond font
\unicode[Garamond]{x22D6} % same, but with default height, depth of .8em,.2em
Once a size and font are provided for a given unicode point, they need
not be specified again in subsequent ``\unicode{}`` calls for that
character.
The result of ``\unicode{...}`` will have TeX class `ORD` (i.e., it
will act like a variable). Use ``\mathbin{...}``, ``\mathrel{...}``,
etc., to specify a different class.
Note that a font list can be given in the ``\unicode{}`` macro, but
Internet Explorer has a buggy implementation of the ``font-family``
CSS attribute where it only looks in the first font in the list that
is actually installed on the system, and if the required glyph is not
in that font, it does not look at later fonts, but goes directly to
the default font as set in the `Internet-Options/Font` panel. For
this reason, the default font list for the ``\unicode{}`` macro is
``STIXGeneral, 'Arial Unicode MS'``, so if the user has :term:`STIX`
fonts, the symbol will be taken from that (almost all the symbols are
in `STIXGeneral`), otherwise MathJax tries `Arial Unicode MS`.
The `unicode` extension is loaded automatically when you first use the
``\unicode{}`` macro, so you do not need to add it to the `extensions`
array. You can configure the extension as follows:
.. code-block:: javascript
TeX: {
unicode: {
fonts: "STIXGeneral, 'Arial Unicode MS'"
}
}
Autoload-all
------------
The `autoload-all` extension predefines all the macros from the
extensions above so that they autoload the extensions when first
used. A number of macros already do this, e.g., ``\unicode``, but
this extension defines the others to do the same. That way MathJax
will have access to all the macros that it knows about.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["autoload-all.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
Note that `autoload-all` redefines ``\color`` to be the one from the
`color` extension (the LaTeX-compatible one rather than the
non-standard MathJax version). This is because ``\colorbox`` and
``\fcolorbox`` autoload the `color` extension, which will cause
``\color`` to be redefined, and so for consistency, ``\color`` is
redefined immediately.
If you wish to retain the original definition of ``\color``, then use
the following
.. code-block:: html
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { extensions: ["autoload-all.js"] }
});
MathJax.Hub.Register.StartupHook("TeX autoload-all Ready", function () {
var MACROS = MathJax.InputJax.TeX.Definitions.macros;
MACROS.color = "Color";
delete MACROS.colorbox;
delete MACROS.fcolorbox;
});
</script>
mediawiki-texvc
---------------
The `mediawiki-texvc` extension predefines macros that match
the behavior of the `MediaWiki Math Extension
<https://www.mediawiki.org/wiki/Extension:Math>`__.
To use this extension in your own configurations, add it to the
`extensions` array in the TeX block.
.. code-block:: javascript
TeX: {
extensions: ["mediawiki-texvc.js"]
}
This extension is **not** included in any of the combined configurations,
and will not be loaded automatically, so you must include it
explicitly in your configuration if you wish to use these commands.
.. _tex-commands:
Supported LaTeX commands
========================
This is a long list of the TeX macros supported by MathJax. If the
macro is defined in an extension, the name of the extension follows
the macro name. If the extension is in brackets, the extension will
be loaded automatically when the macro or environment is first used.
More complete details about how to use these macros, with examples and
explanations, is available at Carol Fisher's `TeX Commands Available
in MathJax
<http://www.onemathematicalcat.org/MathJaxDocumentation/TeXSyntax.htm>`_ page.
Symbols
-------
.. code-block:: latex
#
%
&
^
_
{
}
~
'
\ (backslash-space)
\!
\#
\$
\%
\&
\,
\:
\;
\>
\\
\_
\{
\|
\}
A
-
.. code-block:: latex
\AA mediawiki-texvc
\above
\abovewithdelims
\acute
\alef mediawiki-texvc
\aleph
\alpha
\Alpha mediawiki-texvc
\amalg
\And
\and mediawiki-texvc
\ang mediawiki-texvc
\angle
\approx
\approxeq AMSsymbols
\arccos
\arcsin
\arctan
\arg
\array
\Arrowvert
\arrowvert
\ast
\asymp
\atop
\atopwithdelims
B
-
.. code-block:: latex
\Bbb mediawiki-texvc
\backepsilon AMSsymbols
\backprime AMSsymbols
\backsim AMSsymbols
\backsimeq AMSsymbols
\backslash
\backslash
\bar
\barwedge AMSsymbols
\Bbb
\Bbbk AMSsymbols
\bbox [bbox]
\bcancel cancel
\because AMSsymbols
\begin
\begingroup begingroup non-standard
\beta
\Beta mediawiki-texvc
\beth AMSsymbols
\between AMSsymbols
\bf
\Big
\big
\bigcap
\bigcirc
\bigcup
\Bigg
\bigg
\Biggl
\biggl
\Biggm
\biggm
\Biggr
\biggr
\Bigl
\bigl
\Bigm
\bigm
\bigodot
\bigoplus
\bigotimes
\Bigr
\bigr
\bigsqcup
\bigstar AMSsymbols
\bigtriangledown
\bigtriangleup
\biguplus
\bigvee
\bigwedge
\binom AMSmath
\blacklozenge AMSsymbols
\blacksquare AMSsymbols
\blacktriangle AMSsymbols
\blacktriangledown AMSsymbols
\blacktriangleleft AMSsymbols
\blacktriangleright AMSsymbols
\bmod
\bold mediawiki-texvc
\boldsymbol [boldsymbol]
\bot
\bowtie
\Box AMSsymbols
\boxdot AMSsymbols
\boxed AMSmath
\boxminus AMSsymbols
\boxplus AMSsymbols
\boxtimes AMSsymbols
\brace
\bracevert
\brack
\breve
\buildrel
\bul mediawiki-texvc
\bullet
\Bumpeq AMSsymbols
\bumpeq AMSsymbols
C
-
.. code-block:: latex
\C mediawiki-texvc
\cal
\cancel cancel
\cancelto cancel
\cap
\Cap AMSsymbols
\cases
\cdot
\cdotp
\cdots
\ce mhchem
\cee mhchem
\centerdot AMSsymbols
\cf mhchem
\cfrac AMSmath
\check
\checkmark AMSsymbols
\chi
\Chi mediawiki-texvc
\choose
\circ
\circeq AMSsymbols
\circlearrowleft AMSsymbols
\circlearrowright AMSsymbols
\circledast AMSsymbols
\circledcirc AMSsymbols
\circleddash AMSsymbols
\circledR AMSsymbols
\circledS AMSsymbols
\class [HTML] non-standard
\clubs mediawiki-texvc
\clubsuit
\cnums mediawiki-texvc
\colon
\color color
\colorbox color
\complement AMSsymbols
\Complex mediawiki-texvc
\cong
\coppa mediawiki-texvc
\Coppa mediawiki-texvc
\coprod
\cos
\cosh
\cot
\coth
\cr
\csc
\cssId [HTML] non-standard
\cup
\Cup AMSsymbols
\curlyeqprec AMSsymbols
\curlyeqsucc AMSsymbols
\curlyvee AMSsymbols
\curlywedge AMSsymbols
\curvearrowleft AMSsymbols
\curvearrowright AMSsymbols
D
-
.. code-block:: latex
\dagger
\Dagger mediawiki-texvc
\daleth AMSsymbols
\Darr mediawiki-texvc
\dashleftarrow AMSsymbols
\dashrightarrow AMSsymbols
\dashv
\dbinom AMSmath
\ddagger
\ddddot AMSmath
\dddot AMSmath
\ddot
\ddots
\DeclareMathOperator AMSmath
\definecolor color
\def [newcommand]
\deg
\Delta
\delta
\det
\dfrac AMSmath
\diagdown AMSsymbols
\diagup AMSsymbols
\diamond
\Diamond AMSsymbols
\diamonds mediawiki-texvc
\diamondsuit
\digamma AMSsymbols
\Digamma mediawiki-texvc
\dim
\displaylines
\displaystyle
\div
\divideontimes AMSsymbols
\dot
\doteq
\Doteq AMSsymbols
\doteqdot AMSsymbols
\dotplus AMSsymbols
\dots
\dotsb
\dotsc
\dotsi
\dotsm
\dotso
\doublebarwedge AMSsymbols
\doublecap AMSsymbols
\doublecup AMSsymbols
\Downarrow
\downarrow
\downdownarrows AMSsymbols
\downharpoonleft AMSsymbols
\downharpoonright AMSsymbols
E
-
.. code-block:: latex
\ell
\empty mediawiki-texvc
\emptyset
\enclose enclose non-standard
\end
\endgroup begingroup non-standard
\enspace
\epsilon
\Epsilon mediawiki-texvc
\eqalign
\eqalignno
\eqcirc AMSsymbols
\eqref [AMSmath]
\eqsim AMSsymbols
\eqslantgtr AMSsymbols
\eqslantless AMSsymbols
\equiv
\eta
\Eta mediawiki-texvc
\eth AMSsymbols
\euro mediawiki-texvc
\exist mediawiki-texvc
\exists
\exp
F
-
.. code-block:: latex
\fallingdotseq AMSsymbols
\fbox
\fcolorbox color
\Finv AMSsymbols
\flat
\forall
\frac
\frac AMSmath
\frak
\frown
G
-
.. code-block:: latex
\Game AMSsymbols
\Gamma
\gamma
\gcd
\gdef begingroup
\ge
\geneuro mediawiki-texvc
\geneuronarrow mediawiki-texvc
\geneurowide mediawiki-texvc
\genfrac AMSmath
\geq
\geqq AMSsymbols
\geqslant AMSsymbols
\gets
\gg
\ggg AMSsymbols
\gggtr AMSsymbols
\gimel AMSsymbols
\global begingroup
\gnapprox AMSsymbols
\gneq AMSsymbols
\gneqq AMSsymbols
\gnsim AMSsymbols
\grave
\gt
\gt
\gtrapprox AMSsymbols
\gtrdot AMSsymbols
\gtreqless AMSsymbols
\gtreqqless AMSsymbols
\gtrless AMSsymbols
\gtrsim AMSsymbols
\gvertneqq AMSsymbols
H
-
.. code-block:: latex
\H mediawiki-texvc
\hAar mediawiki-texvc
\harr mediawiki-texvc
\Harr mediawiki-texvc
\hat
\hbar
\hbox
\hdashline
\hearts mediawiki-texvc
\heartsuit
\hline
\hom
\hookleftarrow
\hookrightarrow
\hphantom
\href [HTML]
\hskip
\hslash AMSsymbols
\hspace
\Huge
\huge
\idotsint AMSmath
I
-
.. code-block:: latex
\iff
\iiiint AMSmath
\iiint
\iint
\Im
\image mediawiki-texvc
\imath
\impliedby AMSsymbols
\implies AMSsymbols
\in
\inf
\infin mediawiki-texvc
\infty
\injlim AMSmath
\int
\intercal AMSsymbols
\intop
\isin mediawiki-texvc
\iota
\Iota mediawiki-texvc
\it
J
-
.. code-block:: latex
\jmath
\Join AMSsymbols
K
-
.. code-block:: latex
\kappa
\Kappa mediawiki-texvc
\ker
\kern
\koppa mediawiki-texvc
\Koppa mediawiki-texvc
L
-
.. code-block:: latex
\label [AMSmath]
\Lambda
\lambda
\land
\lang mediawiki-texvc
\langle
\LARGE
\Large
\large
\larr mediawiki-texvc
\Larr mediawiki-texvc
\lArr mediawiki-texvc
\LaTeX
\lbrace
\lbrack
\lceil
\ldotp
\ldots
\le
\leadsto AMSsymbols
\left
\Leftarrow
\leftarrow
\leftarrowtail AMSsymbols
\leftharpoondown
\leftharpoonup
\leftleftarrows AMSsymbols
\Leftrightarrow
\leftrightarrow
\leftrightarrows AMSsymbols
\leftrightharpoons AMSsymbols
\leftrightsquigarrow AMSsymbols
\leftroot
\leftthreetimes AMSsymbols
\leq
\leqalignno
\leqq AMSsymbols
\leqslant AMSsymbols
\lessapprox AMSsymbols
\lessdot AMSsymbols
\lesseqgtr AMSsymbols
\lesseqqgtr AMSsymbols
\lessgtr AMSsymbols
\lesssim AMSsymbols
\let [newcommand]
\lfloor
\lg
\lgroup
\lhd AMSsymbols
\lim
\liminf
\limits
\limsup
\ll
\llap
\llcorner AMSsymbols
\Lleftarrow AMSsymbols
\lll AMSsymbols
\llless AMSsymbols
\lmoustache
\ln
\lnapprox AMSsymbols
\lneq AMSsymbols
\lneqq AMSsymbols
\lnot
\lnsim AMSsymbols
\log
\Longleftarrow
\longleftarrow
\Longleftrightarrow
\longleftrightarrow
\longmapsto
\Longrightarrow
\longrightarrow
\looparrowleft AMSsymbols
\looparrowright AMSsymbols
\lor
\lower
\lozenge AMSsymbols
\lrarr mediawiki-texvc
\Lrarr mediawiki-texvc
\lrArr mediawiki-texvc
\lrcorner AMSsymbols
\Lsh AMSsymbols
\lt
\lt
\ltimes AMSsymbols
\lVert AMSmath
\lvert AMSmath
\lvertneqq AMSsymbols
M
-
.. code-block:: latex
\maltese AMSsymbols
\mapsto
\mathbb
\mathbf
\mathbin
\mathcal
\mathchoice [mathchoice]
\mathclose
\mathfrak
\mathinner
\mathit
\mathop
\mathopen
\mathord
\mathpunct
\mathrel
\mathring AMSmath
\mathrm
\mathscr
\mathsf
\mathstrut
\mathtip action non-standard
\mathtt
\matrix
\max
\mbox
\measuredangle AMSsymbols
\mho AMSsymbols
\mid
\middle
\min
\mit
\mkern
\mmlToken non-standard
\mod
\models
\moveleft
\moveright
\mp
\mskip
\mspace
\mu
\Mu mediawiki-texvc
\multimap AMSsymbols
N
-
.. code-block:: latex
\N mediawiki-texvc
\nabla
\natural
\natnums mediawiki-texvc
\ncong AMSsymbols
\ne
\nearrow
\neg
\negmedspace AMSmath
\negthickspace AMSmath
\negthinspace
\neq
\newcommand [newcommand]
\newenvironment [newcommand]
\Newextarrow extpfeil
\newline
\nexists AMSsymbols
\ngeq AMSsymbols
\ngeqq AMSsymbols
\ngeqslant AMSsymbols
\ngtr AMSsymbols
\ni
\nLeftarrow AMSsymbols
\nleftarrow AMSsymbols
\nLeftrightarrow AMSsymbols
\nleftrightarrow AMSsymbols
\nleq AMSsymbols
\nleqq AMSsymbols
\nleqslant AMSsymbols
\nless AMSsymbols
\nmid AMSsymbols
\nobreakspace AMSmath
\nolimits
\normalsize
\not
\notag [AMSmath]
\notin
\nparallel AMSsymbols
\nprec AMSsymbols
\npreceq AMSsymbols
\nRightarrow AMSsymbols
\nrightarrow AMSsymbols
\nshortmid AMSsymbols
\nshortparallel AMSsymbols
\nsim AMSsymbols
\nsubseteq AMSsymbols
\nsubseteqq AMSsymbols
\nsucc AMSsymbols
\nsucceq AMSsymbols
\nsupseteq AMSsymbols
\nsupseteqq AMSsymbols
\ntriangleleft AMSsymbols
\ntrianglelefteq AMSsymbols
\ntriangleright AMSsymbols
\ntrianglerighteq AMSsymbols
\nu
\Nu mediawiki-texvc
\nVDash AMSsymbols
\nVdash AMSsymbols
\nvDash AMSsymbols
\nvdash AMSsymbols
\nwarrow
O
-
.. code-block:: latex
\O mediawiki-texvc
\odot
\officialeuro mediawiki-texvc
\oint
\oldstyle
\Omega
\omega
\omicron
\Omicron mediawiki-texvc
\ominus
\operatorname AMSmath
\oplus
\or mediawiki-texvc
\oslash
\otimes
\over
\overbrace
\overleftarrow
\overleftrightarrow
\overline
\overrightarrow
\overset
\overwithdelims
\owns
P
-
.. code-block:: latex
\P mediawiki-texvc
\pagecolor mediawiki-texvc
\parallel
\part mediawiki-texvc
\partial
\perp
\phantom
\Phi
\phi
\Pi
\pi
\pitchfork AMSsymbols
\plusmn mediawiki-texvc
\pm
\pmatrix
\pmb
\pmod
\pod
\Pr
\prec
\precapprox AMSsymbols
\preccurlyeq AMSsymbols
\preceq
\precnapprox AMSsymbols
\precneqq AMSsymbols
\precnsim AMSsymbols
\precsim AMSsymbols
\prime
\prod
\projlim AMSmath
\propto
\Psi
\psi
Q
-
.. code-block:: latex
\Q mediawiki-texvc
\qquad
\quad
R
-
.. code-block:: latex
\R mediawiki-texvc
\raise
\rang mediawiki-texvc
\rangle
\rarr mediawiki-texvc
\Rarr mediawiki-texvc
\rArr mediawiki-texvc
\rbrace
\rbrack
\rceil
\Re
\real mediawiki-texvc
\reals mediawiki-texvc
\Reals mediawiki-texvc
\ref [AMSmath]
\renewcommand [newcommand]
\renewenvironment [newcommand]
\require non-standard
\restriction AMSsymbols
\rfloor
\rgroup
\rhd AMSsymbols
\rho
\Rho mediawiki-texvc
\right
\Rightarrow
\rightarrow
\rightarrowtail AMSsymbols
\rightharpoondown
\rightharpoonup
\rightleftarrows AMSsymbols
\rightleftharpoons
\rightleftharpoons AMSsymbols
\rightrightarrows AMSsymbols
\rightsquigarrow AMSsymbols
\rightthreetimes AMSsymbols
\risingdotseq AMSsymbols
\rlap
\rm
\rmoustache
\root
\Rrightarrow AMSsymbols
\Rsh AMSsymbols
\rtimes AMSsymbols
\Rule non-standard
\rVert AMSmath
\rvert AMSmath
S
-
.. code-block:: latex
\S
\sampi mediawiki-texvc
\Sampi mediawiki-texvc
\scr
\scriptscriptstyle
\scriptsize
\scriptstyle
\sdot mediawiki-texvc
\searrow
\sect mediawiki-texvc
\sec
\setminus
\sf
\sharp
\shortmid AMSsymbols
\shortparallel AMSsymbols
\shoveleft AMSmath
\shoveright AMSmath
\sideset AMSmath
\Sigma
\sigma
\sim
\simeq
\sin
\sinh
\skew
\small
\smallfrown AMSsymbols
\smallint
\smallsetminus AMSsymbols
\smallsmile AMSsymbols
\smash
\smile
\spades mediawiki-texvc
\Space
\space
\spadesuit
\sphericalangle AMSsymbols
\sqcap
\sqcup
\sqrt
\sqsubset AMSsymbols
\sqsubseteq
\sqsupset AMSsymbols
\sqsupseteq
\square AMSsymbols
\stackrel
\star
\stigma mediawiki-texvc
\Stigma mediawiki-texvc
\strut
\style [HTML] non-stanard
\sub mediawiki-texvc
\sube mediawiki-texvc
\subset
\Subset AMSsymbols
\subseteq
\subseteqq AMSsymbols
\subsetneq AMSsymbols
\subsetneqq AMSsymbols
\substack AMSmath
\succ
\succapprox AMSsymbols
\succcurlyeq AMSsymbols
\succeq
\succnapprox AMSsymbols
\succneqq AMSsymbols
\succnsim AMSsymbols
\succsim AMSsymbols
\sum
\sup
\supe mediawiki-texvc
\supset
\Supset AMSsymbols
\supseteq
\supseteqq AMSsymbols
\supsetneq AMSsymbols
\supsetneqq AMSsymbols
\surd
\swarrow
T
-
.. code-block:: latex
\tag [AMSmath]
\tan
\tanh
\tau
\Tau mediawiki-texvc
\tbinom AMSmath
\TeX
\text
\textbf
\textit
\textrm
\textsf
\textstyle
\texttt
\texttip action non-standard
\textvisiblespace mediawiki-texvc
\tfrac AMSmath
\therefore AMSsymbols
\Theta
\theta
\thetasym mediawiki-texvc
\thickapprox AMSsymbols
\thicksim AMSsymbols
\thinspace
\tilde
\times
\tiny
\Tiny non-standard
\to
\toggle action non-standard
\top
\triangle
\triangledown AMSsymbols
\triangleleft
\trianglelefteq AMSsymbols
\triangleq AMSsymbols
\triangleright
\trianglerighteq AMSsymbols
\tt
\twoheadleftarrow AMSsymbols
\twoheadrightarrow AMSsymbols
U
-
.. code-block:: latex
\uarr mediawiki-texvc
\uArr mediawiki-texvc
\Uarr mediawiki-texvc
\ulcorner AMSsymbols
\underbrace
\underleftarrow
\underleftrightarrow
\underline
\underrightarrow
\underset
\unicode [unicode] non-standard
\unlhd AMSsymbols
\unrhd AMSsymbols
\Uparrow
\uparrow
\Updownarrow
\updownarrow
\upharpoonleft AMSsymbols
\upharpoonright AMSsymbols
\uplus
\uproot
\Upsilon
\upsilon
\upuparrows AMSsymbols
\urcorner AMSsymbols
V
-
.. code-block:: latex
\varcoppa mediawiki-texvc
\varDelta AMSsymbols
\varepsilon
\varGamma AMSsymbols
\varinjlim AMSmath
\varkappa AMSsymbols
\varLambda AMSsymbols
\varliminf AMSmath
\varlimsup AMSmath
\varnothing AMSsymbols
\varOmega AMSsymbols
\varphi
\varPhi AMSsymbols
\varpi
\varPi AMSsymbols
\varprojlim AMSmath
\varpropto AMSsymbols
\varPsi AMSsymbols
\varrho
\varsigma
\varSigma AMSsymbols
\varstigma mediawiki-texvc
\varsubsetneq AMSsymbols
\varsubsetneqq AMSsymbols
\varsupsetneq AMSsymbols
\varsupsetneqq AMSsymbols
\vartheta
\varTheta AMSsymbols
\vartriangle AMSsymbols
\vartriangleleft AMSsymbols
\vartriangleright AMSsymbols
\varUpsilon AMSsymbols
\varXi AMSsymbols
\vcenter
\vdash
\Vdash AMSsymbols
\vDash AMSsymbols
\vdots
\vec
\vee
\veebar AMSsymbols
\verb [verb]
\Vert
\vert
\vline mediawiki-texvc
\vphantom
\Vvdash AMSsymbols
W
-
.. code-block:: latex
\wedge
\weierp mediawiki-texvc
\widehat
\widetilde
\wp
\wr
X
-
.. code-block:: latex
\Xi
\xi
\xcancel cancel
\xleftarrow AMSmath
\xlongequal extpfeil
\xmapsto extpfeil
\xrightarrow AMSmath
\xtofrom extpfeil
\xtwoheadleftarrow extpfeil
\xtwoheadrightarrow extpfeil
Y
-
.. code-block:: latex
\yen AMSsymbols
Z
-
.. code-block:: latex
\Z mediawiki-texvc
\zeta
\Zeta mediawiki-texvc
Environments
------------
LaTeX environments of the form ``\begin{XXX} ... \end{XXX}`` are
provided where ``XXX`` is one of the following:
.. code-block:: latex
align [AMSmath]
align* [AMSmath]
alignat [AMSmath]
alignat* [AMSmath]
aligned [AMSmath]
alignedat [AMSmath]
array
Bmatrix
bmatrix
cases
CD AMSmath
eqnarray
eqnarray*
equation
equation*
gather [AMSmath]
gather* [AMSmath]
gathered [AMSmath]
matrix
multline [AMSmath]
multline* [AMSmath]
pmatrix
smallmatrix AMSmath
split [AMSmath]
subarray AMSmath
Vmatrix
vmatrix
|