This question led to a new package:
duckuments
There are lots of cool example pictures in LaTeX. As far as I'm aware there aren't any good example duck images ;-(
Having ducks in the example images is, of course, essential for increasing the duckness of MWEs all over Tex.SE!
Thus I'd like to know: how do I get the duck to be in the center of an example image?
\documentclass[border=5pt]{standalone}
\usepackage{tikzducks}
\usepackage{graphicx}
\begin{document}
\includegraphics{example-image-a}
\tikz\randuck;
\end{document}
might produce:
There is, however, a problem with putting the duck next to the picture: it looks like a more permanent duck, not there for an example but there for all time. While every good duckument does feature a duck or a dozen, making the reader able to distinguish permanent and example ducks seems essential!
However, currently
\documentclass[border=5pt]{standalone}
\usepackage{tikzducks}
\usepackage{graphicx}
\begin{document}
\includegraphics{example-image-duck} %or with randuck
\tikz\randuck;
\end{document}
produces, with an error message (saying there is no file for the wanted example image):
Here there is no gray border telling the reader not to expect the duck in the final version of the duckument.
Is there any way I can get the two commands:
\includegraphics{example-image-duck}
\includegraphics{example-image-randuck}
To make an image like the one in the first example, but with a duck in the place of the a?
Edit
It would be really cool, but it's probably not going to happen, to have the full tikzducks
capabilities:
\includegraphics{example-image-duck[options]}
would thus act like options.
Also Torbjørn T. Posted the command:
\newcommand\ExampleDuck{ \begin{tikzpicture} \node [inner sep=0] {\includegraphics{example-image}}; \begin{scope}[shift={(-1,-1)}] \randuck \end{scope} \end{tikzpicture}}
that just needs an empty example image to be perfect. Now the only big hurdle is feeding includegraphics the result of the command \ExampleDuck
if example-image-randuck
is being loaded.
Best Answer
Write a document example-duck:
and compile it.
Then you can use it like this:
or
Edit
as requested in the comments here a more refined example-duck (the pointy head of the witch needs a rather large background):