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.

Karlo
  • 3,257
  • 1
    Have you had a look at fontawesome? – ArTourter Oct 08 '15 at 10:43
  • Why does \usepackage{fontawesome} not work? It returns "Error: file 'fontawesome.sty' not found. – Karlo Oct 08 '15 at 10:51
  • 1
    Probably because it is not installed. Which distribution do you use? – Bernard Oct 08 '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 08 '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. http://tex.stackexchange.com/questions/270351/a-ruler-symbol-in-latex/270352#270352 – Steven B. Segletes Oct 08 '15 at 14:09
  • @StevenB.Segletes Your comment is what I was looking for. Could you repeat is as an answer, so I can accept it? – Karlo Aug 04 '17 at 10:30
  • I would love to, but cannot link to your PC symbol nor save symbol. Might they look something like http://cdn.vectorstock.com/i/composite/78,08/computer-icon-vector-107808.jpg and http://icons.iconarchive.com/icons/icons8/windows-8/512/Programming-Save-icon.png? Better still, why don't you include them in your question as actual images rather than links? – Steven B. Segletes Aug 04 '17 at 10:45

1 Answers1

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}
Marijn
  • 37,699