[Tex/LaTex] How to define a new symbol in latex (with its own image)

graphicssymbols

I'm new to LaTeX and I'm using TeX Writer for iOS and I want to insert a new command "\dotplus" (symbolically: $\dotplus$) on my .text to .pdf. All I did was:

enter image description here

And I got three errors:

enter image description here

I have also saved the symbol's picture to PDF..

Best Answer

In order to use \includegraphics you need to add \usepackage{graphicx} in your preamble (at the beginning of your document). And fix the \newcommand{} statement like this:

\documentclass{article}
\usepackage{graphicx}

\newcommand{\dotplus}{\includegraphics[width=0.2in]{/dotplus.jpg}}

\title{}
\author{}
\date{}
\begin{document}

\dotplus

\end{document}
Related Question