Can I insert an image into an equation?

It won't scale nicely with font size, but a simple approach is straightforward. The image should have a tight bounding box, which you can achieve with tools like pdfcrop.

\newcommand{\mysymbol}{\mathord{\includegraphics[height=1.6ex]{symbol}}}

\mathord is suitable for ordinary symbols, since you indicated that it would be used similarly as \alpha.

With the suggestions from the comments, I wrote a better solution.

\newcommand{\myfancysymbol}{
 {\mathchoice
  {\includegraphics[height=1.6ex]{symbol}}
  {\includegraphics[height=1.6ex]{symbol}}
  {\includegraphics[height=1.2ex]{symbol}}
  {\includegraphics[height=0.9ex]{symbol}}
 }
}

The symbol scales like a capital X for subscript and subsubscripts.


Mikael and Leo both gave good answers so I won't repeat that information.

If you need the image centered with respect to binary operators, fractions, and the like, then you can use \vcenter{...} to perform that vertical centering.


Yes, you can. There is nearly no difference between a image and a symbol. Just define a command for convenience. You can also use PSTricks or TikZ to draw such a symbol.

However, you may need to redefine the depth of the box, and refine the spacing using \mathbin etc.

A full example (suppose a logo.pdf exists):

\documentclass{article}
\usepackage{graphicx}
\def\xlogo#1{\includegraphics[width=#1em]{logo}}
\def\logo{{% mathord
  \mathchoice
    {\xlogo1}%
    {\xlogo1}%
    {\xlogo\defaultscriptratio}%
    {\xlogo\defaultscriptscriptratio}}}
\begin{document}
$\logo_{\logo_{\logo_\logo}}$
\end{document}