0

I have copied this code and can't seem to get it work. Is the Stack exchange editor not compatible with this code?

I have actual QM questions to ask, but am unable to format that currently.

Any help would be appreciated. If this should be posted in the Latex Stack Exchange, please let me know.

I am new to Latex and am trying to use it to get physics help.

This is what I have pasted:

\documentclass{article} 
\usepackage{mathtools}

\DeclarePairedDelimiter{\bra}{\langle}{\rvert} \DeclarePairedDelimiter{\ket}{\lvert}{\rangle}

Unknown environment 'document'

Mico
  • 506,678
  • Welcome to TeX.SE. – Mico Nov 13 '22 at 01:18
  • 1
    On TeX.StackExchange, the MathJax renderer which works, say, on Math.StackExchange, is disabled intentionally as almost all people who freqent this site are more interested in seeing, critiquing, and improving the underlying TeX and LaTeX code than in its visual rendering. – Mico Nov 13 '22 at 01:21
  • See, for example, https://tex.meta.stackexchange.com/questions/1272/why-doesnt-maths-render-as-maths. The other important thing to know is that questions asking about how to typeset something in a website are usually using MathJax, which is usually off topic on this site. – Teepeemm Nov 13 '22 at 01:25
  • Does this mean the MathJax renderer is also disabled on other sites, such as the Physics stack exchange?

    My main use for Latex is to post on Physics AND Math stackexchange.

    – Eigenlumen Nov 13 '22 at 01:53
  • No, it doesn't mean that. But MathJax is not LaTeX, it is a completely different system for rendering math that supports a subset of the syntax available via LaTeX and packages. You can write math expressions, but there is no preamble with documentclass and package loading. Here is a list of the stuff MathJax supports: https://docs.mathjax.org/en/latest/input/tex/macros/index.html – Torbjørn T. Nov 13 '22 at 08:38

0 Answers0