Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

Wraps a math expression written in TeX code in <math>...</math> tags using the {{#tag:}} parser function extension. Intended to be used for very short expressions like variables.

Cách sử dụng sửa

{{tmath|expression}}

Các ví dụ sửa

  • {{tmath|a}} đưa ra
  • {{tmath|\pi}} đưa ra
  • {{tmath|x_0}} đưa ra

The template is intended to be used for very short LaTeX mathematical expressions like variables. It is more cumbersome to use for equations or other expressions containing special signs that have to be escaped, like the equal sign = with {{=}} and the vertical pipe | with {{!}}:

  • {{tmath|E {{=}} mc^2}} đưa ra
  • {{tmath|x {{=}} {{!}} \vec {{(}} x {{)}} {{!}}}} đưa ra

Sử dụng dấu ngoặc { và } với cẩn thận sửa

Apart from using the {{(}} and {{)}} templates to get { and }, you may use the braces { and } as long as { is not preceded or followed by another {, and } is not preceded or followed by another }, e.g.

  • {{tmath|x {{=}} {{!}} \vec{x} {{!}}}} đưa ra
  • {{tmath|\zeta(2) {{=}} \frac{\pi^2}{6}}} parses (you added that space!) to
  • {{tmath|\zeta(2) {{=}} \frac{\pi^2}{6}}} fails to parse (you forgot that space!)
  • {{tmath|\frac{1}{ x^{2n+1} }}} parses (you added all those spaces!) to
  • {{tmath|\frac{1}{x^{2n+1}}}} fails to parse (you forgot some of those spaces!)

Xem thêm sửa