How can I incorporate good-looking mathematical exposition into my question/answer?
codegolf.SE does not use MathJax, because its load time is too high (see discussion). But although there is not built-in support for LaTeX, you can visualize mathematical formulae in various ways
You can include mathematical formulae as images. There a basically three ways how to get such an image:
- Use the preview of math.SE to create your formula, make a screenshot and crop it to the right size.
- Create a LaTeX document on your computer, make a screenshot and crop it to the right size.
- Use command line tools (see this question)
- Use MathURL to create an image of the equation (fastest option for images)
Many math symbols are also available as plain text. You can create your formula by using copy-and-paste:
The most basic symbols that you might need are:
- Arrows: ← ↓ → ↑ ↔ ↵ ⇐ ⇓ ⇒ ⇑ ⇔
- Sets: ∈ ∉ ∅ ⊆ ⊂ ⊄ ∪ ∩
- Relations: ≠ ≤ ≥ ≈
- Logic: ¬ ∧ ∨ ∃ ∀
- More: ∫ ∞ ε Δ ⋅
Note that most platforms offer some kind of extended character input palette which makes this input method easier. (e.g. Character Viewer in OSX, Character Map in Windows)
While this is the least elegant-looking option, it produces results intelligible to anyone who understands the corresponding mathematical symbols. Handy if you want to put equations in your source code comments.
- asciiTeX - Binary for Windows only, but it is available on Homebrew for OSX and should build for Linux.