17

I want to use a "thumb up" symbol, to flag a "good practice" tips in my document. Table 244 in the Comprehensive LaTeX Symbol list shows that the dingbat package provides the following:

enter image description here

However, the symbol is bitmapped and doesn't render well when zoomed in on, which I dislike:

enter image description here

Do you know of a similar, non-bitmapped symbol? Otherwise Feel free to suggest an alternative symbol that conveys the same meaning.

jub0bs
  • 58,916
  • Go to FB! :P Ok, joke aside, you could create or get a vector graphic and use the picture as a symbol, see here: http://tex.stackexchange.com/questions/22487 or here: http://tex.stackexchange.com/questions/31490 – Count Zero Jun 15 '13 at 11:19
  • Obligatory Unicode suggestion: U+1F44D: (naturally needs a font which includes the glyph) – morbusg Jun 15 '13 at 11:46
  • 1
    You are very well capable of writing up the 8-10 lines in tikz for that. Rounded corners for the fingers :P – percusse Jun 15 '13 at 12:03
  • Perhaps you could use the package niceframe-type1, it has the type1 dingbat font, but unfortunately the package don’t have any practical documentation, so I cannot write an answer with this package (it’s actually a font, not a package, but in CTAN, it’s listed as package). – quark67 May 19 '19 at 04:47

3 Answers3

19

A free SVG version can be found on Wikimedia: Symbol thumbs up. The file Symbols_thumbs_up.svg can be converted with Inkscape to PDF like in this answer:

inkscape --export-pdf=Symbol_thumbs_up.pdf Symbol_thumbs_up.svg

The white margins can be removed by pdfcrop:

pdfcrop Symbol_thumbs_up.pdf

The result is Symbols_thumbs_up-crop.pdf.

In LaTeX it can be included, mirrored and resized by package graphicx with a driver that supports PDF. Otherwise it can be converted to EPS via pdftops of xpdf or poppler:

pdftops -eps Symbols_thumbs_up-crop.pdf Symbols_thumbs_up.eps

LaTeX example that defines \LeftThumbsUp and \RightThumbsUp:

\documentclass{article}
\usepackage{graphicx}

\newcommand*{\RightThumbsUpAux}[1]{%
  \begingroup
    \sbox0{Ag}%
    \raisebox{-\dp0}{%
      \includegraphics[{%
        height=\dimexpr\dp0+\ht0\relax,
        #1%
      }]{Symbol_thumbs_up-crop.pdf}%
    }%
  \endgroup
}
\newcommand*{\RightThumbsUp}{%
  \RightThumbsUpAux{}%
}
\newcommand*{\RightThumbsDown}{%
  \RightThumbsUpAux{origin=c,angle=180}%
}
\newcommand*{\LeftThumbsUp}{%
  \scalebox{-1}[1]{\RightThumbsUp}%
}
\newcommand*{\LeftThumbsDown}{%
  \scalebox{-1}[1]{\RightThumbsDown}%
}

\begin{document}
\begin{tabular}{ll}
  \LeftThumbsUp    & \verb|\LeftThumbsUp|\\
  \RightThumbsUp   & \verb|\RightThumbsUp|\\
  \LeftThumbsDown  & \verb|\LeftThumbsDown|\\
  \RightThumbsDown & \verb|\RightThumbsDown|
\end{tabular}
\end{document}

Result

David Carlisle
  • 757,742
Heiko Oberdiek
  • 271,626
  • 5
    Just to be picky: The thumb symbols are normally displayed from the agent's perspective, so the thumbs down symbols should have their palms hidden. – Sverre Jun 15 '13 at 13:39
  • @Sverre My impression from a quick web search was: Most images show the fingers, some shows the front view (front of the thumb), and images with the fingers hidden are quite rare. – Heiko Oberdiek Jun 15 '13 at 13:55
  • 2
    When doing a google images search for "thumbs down", my impression is that the split is about 50-50. I personally prefer the thumbs down symbols where the palm is hidden, since this would be consistent with the visible palm in the thumbs up symbols (= they are all seen from the agent's perspective). But this is a minor point - I just wanted to call your attention to it in case you (or someone else) cared. – Sverre Jun 16 '13 at 12:15
14

The fontawesome package is a good go-to for things like this:

\documentclass{article}

\usepackage{fontawesome}

\begin{document}\Huge

\faThumbsDown

\faThumbsODown

\faThumbsOUp

\faThumbsUp

\end{document}

It does not appear to pixelate even at 400% zoom level in my PDF viewer:

rendered LaTeX

Kazark
  • 779
6

Create a new character.

\documentclass{article}

\usepackage[]{graphicx}
\usepackage{scalerel}
\def\thumbsup{\scalerel*{\includegraphics{up.png}}{O}}
\def\thumbsdown{\scalerel*{\includegraphics{down.png}}{g}}

\begin{document}
thumbs up \thumbsup

thumbs down \thumbsdown
\end{document}

0 and g refers to the character used as reference of size and vertical position. For those I tested, the best combination is as it is. Figures up.png and down.png must be attached to your folder.

Of course, if you prefer another thumbsup/down picture, you can change it.

down

up

pdf

Vitor Abella
  • 1,158