2

In preparing an MWE it is often useful to include some kind of graphic image. In a simple case this can be done via

\begin{figure}
\centering
THIS IS AN IMAGE
\caption{An image}
\end{figure}

But sometimes a more evocative image is useful, or one that is not enclosed in an environment. There are some images generally available for such purposes, particularly provided by the mwe and various tikz... packages. Also one from pstricks. Are there others?

Here is a short example of some of these.

% images.tex  What images does ``everyone'' have?
\documentclass{article}
\usepackage{graphicx}
\usepackage{mwe}
\usepackage{tikzducks}
\usepackage{tikzmarmots}
\usepackage{tikzlings-cats}

\begin{document}
\tableofcontents
\listoffigures
\clearpage

\section{From MWE package}

\begin{figure}[hbp]
\centering
\includegraphics{example-image}
\caption{MWE example-image}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-a}
\caption{MWE example-image-a}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-b}
\caption{MWE example-image-b}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-c}
\caption{MWE example-image-c}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-16x10}
\caption{MWE example-image-16x10}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-10x16}
\caption{MWE example-image-10x16}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-16x9}
\caption{MWE example-image-16x9}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-9x16}
\caption{MWE example-image-9x16}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-golden}
\caption{MWE example-image-golden}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-golden-upright}
\caption{MWE example-image-golden-upright}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-1x1}
\caption{MWE example-image-1x1}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-plain}
\caption{MWE example-image-plain}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-image-empty}
\caption{MWE example-image-empty}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-grid-100x100bp}
\caption{MWE example-grid-100x100bp}
\end{figure}

\begin{figure}
\centering
\includegraphics{example-grid-100x100pt}
\caption{MWE example-grid-100x100tp}
\end{figure}

%\end{document}

\begin{figure}
\includegraphics{example-image-golden}
\caption{MWE example-image-golden}
\end{figure}

\begin{figure}
\includegraphics{example-image-duck}
\caption{MWE example-image-duck}
\end{figure}

\clearpage

\section{From pstricks}

\begin{figure}[hbp]
\centering
\includegraphics[width=\textwidth]{/usr/local/texlive/2019/texmf-dist/doc/generic/pstricks/images/tiger}
\caption{pstricks/images/tiger}
\end{figure}

\clearpage

\section{From tikzpicture package}

\begin{figure}[hbp]
\centering
\begin{tikzpicture}
  \duck
\end{tikzpicture}
\caption{TIKZDUCKS duck}
\end{figure}

\begin{figure}
\centering
\begin{tikzpicture}
  \duck[water=cyan!50!blue]
\end{tikzpicture}
\caption{TIKZDUCKS duck[water]}
\end{figure}

\clearpage

\section{From tikzmarmot package}

\begin{figure}[hbp]
\centering
\begin{tikzpicture}
  \marmot[3D]
\end{tikzpicture}
\caption{TIKZMARMOT marmot[3D]}
\end{figure}


\clearpage

\section{From tikzlings package}

\begin{figure}[hbp]
\centering
\begin{tikzpicture}
  \cat
\end{tikzpicture}
\caption{TIKZLINGS-CAT cat}
\end{figure}

\end{document}

At one point I felt that I had an image of a frog but it seems to have faded into the background. What have I missed out?

Peter Wilson
  • 28,066
  • You only need to include the graphicx package. – David Carlisle Apr 17 '20 at 19:40
  • You only need to load tikzlings to have \marmot and \cat available. As for the frog, maybe this was from the frogbox from p. 74 of the tcolorbox manual. –  Apr 17 '20 at 19:45

1 Answers1

2

You can include any image that's in the default input path. If you restrict to PNG files just to be definite,

$ grep '\.png'  /usr/local/texlive/2020/texmf-dist/ls-R  | wc -l
1437

which is rather too many to list here. Also some will be in the doc tree

If you restrict to the tex tree then

$ find  /usr/local/texlive/2020/texmf-dist/tex -name '*.png' | wc -l
76

or the full list

find  /usr/local/texlive/2020/texmf-dist/tex -name '*.png' | sed -e 's@.*/@@'
context-version.png
mill.png
alertmessage-error.png
alertmessage-info.png
alertmessage-success.png
alertmessage-warning.png
lNPBT_SC_linie.png
NPBT_eufom_backgound.png
NPBT_eufom_frametitlebackgound.png
NPBT_eufom_linie.png
NPBT_eufom_logo.png
NPBT_FOM_background.png
NPBT_FOM_frametitlebackground.png
NPBT_FOM_ifes_backgound.png
NPBT_FOM_ifes_frametitlebackgound.png
NPBT_FOM_ifes_logo.png
NPBT_SC_logo.png
ghsystem_acid-8.png
ghsystem_acid.png
ghsystem_aqpol.png
ghsystem_bottle-2-black.png
ghsystem_bottle-2-white.png
ghsystem_bottle.png
ghsystem_exclam.png
ghsystem_explos-1.png
ghsystem_explos-2.png
ghsystem_explos-3.png
ghsystem_explos-4.png
ghsystem_explos-5.png
ghsystem_explos-6.png
ghsystem_explos.png
ghsystem_flame-2-black.png
ghsystem_flame-2-white.png
ghsystem_flame-3-black.png
ghsystem_flame-3-white.png
ghsystem_flame-4-1.png
ghsystem_flame-4-2.png
ghsystem_flame-4-3-black.png
ghsystem_flame-4-3-white.png
ghsystem_flame-5-2-black.png
ghsystem_flame-5-2-white.png
ghsystem_flame-O-5-1.png
ghsystem_flame-O.png
ghsystem_flame.png
ghsystem_health.png
ghsystem_skull-2.png
ghsystem_skull-6.png
ghsystem_skull.png
ijsra_logo.png
dhbw-logo.png
lwarp_baseline_marker.png
example-grid-100x100bp.png
example-grid-100x100pt.png
example-image-10x16.png
example-image-16x10.png
example-image-16x9.png
example-image-1x1.png
example-image-4x3.png
example-image-9x16.png
example-image-a.png
example-image-b.png
example-image-c.png
example-image.png
hand.png
info.png
warn.png
cc-by-sa.png
cc_somerights.png
dangerous-bend.png
jacobs-logo.png
shading-l2r.png
blueshade.png
crinklepaper.png
goldshade.png
pink_marble.png
UoWlogo.png
David Carlisle
  • 757,742
  • Thank you for reminding me about some Linux facilities that I'm sure I used to know. I'm surprised that there are so many images available but unfortunately most to me seem pretty dull for generic use; mill.png being an exception. I think that, if I need to, I will stick to the mwe package offerings. It would be nice if the pstricks tiger.pdf could be generally available as it has that wow factor. – Peter Wilson Apr 19 '20 at 18:25