0

I am trying to write this command below but it doesnt work.

$$\triangle$^m$
Stefan Kottwitz
  • 231,401
Teja
  • 1,279
  • 3
  • 13
  • 19
  • 5
    This question got bumped due to an edit to one of the answers. Before voting it down, please read http://tex.blogoverflow.com/2012/08/maintaining-a-balance/ – Andrew Stacey Oct 04 '12 at 10:17
  • To address the OP’s apparent misconception:

    You may have been told to write $\triangle$ to get the △ shape, but that’s because you need to be in “math mode” to use the \triangle command. A single $ puts you into math mode, where you can use both the \triangle command and the superscript operator.

    – J. C. Salomon Oct 04 '12 at 12:27

2 Answers2

13

You have additional $ signs in your code snippet. The superscript ^, and subscript _ need to be in math mode.

Use $\triangle^m$ for superscript. If you want a subscript use $\triangle_m$. If you intention is to make the entire term a sub- or superscript then you'll need to enclose it with a {} group.

enter image description here

Note:

  • For the superscript version, I think it looks better if you slightly move the superscript to the left via a \kern.
  • If your intent is to use display math you should use \[ and \] instead of $$ delimiters. See Why is \[ ... \] preferable to $$ ... $$?.

Code:

\documentclass[fleqn]{article}
\usepackage{amsmath}

\begin{document} Inline math: $\triangle^m \quad \triangle_m$ % [ \text{Display math:}\quad \triangle^m \quad \triangle_m ] % If the entire term is to be super or sub script: [ \text{Display math:}\quad x_{\triangle^m} \quad x_{\triangle_m} ] \end{document}

Peter Grill
  • 223,288
1
  • If you want to produce an dollar sign followed by a triangle followed by a dollar sign followed by a superscript m, the correct syntax is $\$\triangle\$^m$.
  • If you want to produce a subscript triangle and a superscript m, the correct syntax is ${}_\triangle^m$.