1

How can I write a computer/pc symbol computer/pc symbol and a save symbol in LaTeX? I looked in the Comprehensive LaTeX symbol list but don't find them.

  • 1
    Have you had a look at fontawesome? – ArTourter Oct 8 '15 at 10:43
  • Why does \usepackage{fontawesome} not work? It returns "Error: file 'fontawesome.sty' not found. – Karlo Oct 8 '15 at 10:51
  • 1
    Probably because it is not installed. Which distribution do you use? – Bernard Oct 8 '15 at 11:03
  • I use TeXShop 2.47 or is this not the distribution. (I'm not used to working with fonts.) – Karlo Oct 8 '15 at 11:07
  • 1
    Here I show how to do it with other available icons that are available as graphical images, in a way that automatically scales with font size. You can literally substitute your icon file name in its place. tex.stackexchange.com/questions/270351/a-ruler-symbol-in-latex/… – Steven B. Segletes Oct 8 '15 at 14:09
2

If you have trouble finding the symbols you are looking for in a font, or if you are unable to install the right font package, you can use the image files that you used in your question. You can specify the size of the image using the height attribute of \includegraphics. You can define a macro to save some typing if you use this icon multiple times (see \asav below). With a little more effort you can get the current font size and display the icon using this size, scaling it proportional to the text (see \bsav below). Examples:

\documentclass[11pt]{article}
\usepackage{graphicx}

\newlength{\mytextsize}

\newcommand{\asav}[0]{\includegraphics[height=20pt]{save-icon.png}}
\makeatletter
\newcommand{\bsav}[0]{\setlength{\mytextsize}{\f@size pt}\includegraphics[height=\mytextsize]{save-icon.png} }
\makeatother

\begin{document}
\begin{enumerate}
\item Press the \includegraphics{save-icon.png} button to save
\item Press the \includegraphics[height=20pt]{save-icon.png} button to save
\item Press the \asav button to save
\item Press the \bsav button to save
\item \tiny Press the \bsav button to save
\item \normalsize Press the \bsav button to save
\item \huge Press the \bsav button to save
\end{enumerate}
\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.