Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
TeX
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Mathematical example=== {{Anchor|math mode|mathematics mode|mathematical mode}} TeX provides a different text syntax specifically for mathematical formulas. For example, the [[quadratic formula]] (which is the solution of the [[quadratic equation]]) appears as: {| ! Source code !! Renders as |- |<syntaxhighlight lang="latex"> The quadratic formula is $-b \pm \sqrt{b^2 - 4ac} \over 2a$ \bye </syntaxhighlight> |<math>\hbox{The quadratic formula is } \textstyle{-b \pm \sqrt{b^2 - 4ac} \over 2a}</math> |} The formula is printed in a way a person would write by hand, or typeset the equation. In a document, entering ''mathematics mode'' is done by starting with a $ symbol, then entering a formula in TeX syntax, and closing again with another of the same symbol. Knuth explained in jest that he chose the dollar sign to indicate the beginning and end of mathematical mode in plain TeX because typesetting mathematics was traditionally supposed to be expensive.{{Sfn | Knuth | 1984 | loc = Ch. 16: Typing Math Formulas | p = 127}} ''Display mathematics'' (mathematics presented centred on a new line) is similar but uses $$ instead of a single $ symbol. For example, the above with the quadratic formula in display math: {| ! Source code !! Renders as |- |<syntaxhighlight lang="latex"> The quadratic formula is $$-b \pm \sqrt{b^2 - 4ac} \over 2a$$ \bye </syntaxhighlight> |<math>\begin{matrix} \text{The quadratic formula is} \\ \displaystyle{\frac{-b \pm \sqrt{b^2 - 4ac}}{2a}} \end{matrix}</math> |} (The examples here are not actually rendered with TeX; spacing, character sizes, and all else may differ.)
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)