Non-bitmapped "thumb up" symbol for flagging "good practice" tips
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}
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:
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.