[Tex/LaTex] How to create a symbol for LMB (left mouse clicking) or RMB (right mouse clicking) in LaTeX

diagrams

I'm searching now since 2 weeks for a LMB (left mouse click) or
RMB (right mouse click) symbol in LaTeX. I saw it once
in a manual, but I couldn't find it any more…

Now I want to write a manual and for easier understanding how to
use the software it would be great to integrate such easy symbols!

I already designed the symbol in illustrator. but now I don't know
how to import it into LaTeX or how to design with "special" packages
the symbols?!?

Picture is missing cause I'm new and I am not allowed to upload pictures.

It should look like an oval. In the oval on the top there is a reversed T.
if it should be the "left mouse click" the left side is black. If it should
be the "right mouse click" then the right side is black.

Hope the description is sufficient. If not, post and I'll send you the image.

Best Answer

Since you have already created these images, you just need to include them in your document. Make sure that the bounding box around the images are tight, otherwise you'll end up with too much white space around them.

To include the image, use

\usepackage{graphicx}% http://ctan.org/pkg/graphicx

in your document preamble, together with commands like

\newcommand{\LMB}{\includegraphics[height=.8\baselineskip]{LMB}}% Left Mouse Button
\newcommand{\RMB}{\includegraphics[height=.8\baselineskip]{RMB}}% Right Mouse Button

where your buttons are exported from Adobe Illustrator as LMB.pdf and RMB.pdf (if you're using PDFLaTeX.

The above commands allow you to use \LMB and \RMB in your text, and prints the images at 80% of the baseline height. Depending on your usage, you may want to also include the xspace package and insert \xspace after each command. That would ease your use of \LMB/\RMB without having to always add a control space \ after it.