5

How can I have duck-based page numbers, as in the tikzducks manual itself? They are adorable, and I would like to have random ducks holding my page numbers.

The manual tells us how to make a signpost duck and obtain a random duck, but how does one create (1) random signpost/pagenumber-holding ducks (2) in the footer?

enter image description here

  • We love you, even if you didn't add an MWE :):):) – CarLaTeX Apr 25 '18 at 19:19
  • I figured I could get away with it this one time. – AML Apr 25 '18 at 19:20
11

At the end of chapter 3, the "duckumentation" describes how to create a random head decoration or a random accessories without using the \randuck:

enter image description here

(please notice that \shuffleducks has to be called each time a new duck shall be created. This is not necessary for the \randuck, because there this is done automatically)

The same concept can be used for the page numbers:

\documentclass{scrartcl}
\usepackage{scrlayer-scrpage} 

\usepackage{tikzducks}
\usepackage{duckuments}% To create a dummy duckument

\setlength{\footheight}{45pt}
\cfoot{%
    \shuffleducks
    \begin{tikzpicture}[scale=0.5] 
        \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
    \end{tikzpicture}
} 
\pagestyle{scrheadings}

\begin{document}

\duckument

\end{document}

Tip: the source code of the "duckumentation" is available from http://mirrors.ctan.org/graphics/pgf/contrib/tikzducks/tikzducks-doc.tex or https://github.com/samcarter/tikzducks/blob/master/tikzducks-doc.tex in case you'd like to know how do any of the other content.

  • You made my day :D – AML Apr 25 '18 at 19:15
  • @AML Glad to be of service! – user36296 Apr 25 '18 at 19:17
  • 1
    Here a duck, there a duck, everywhere a duck-duck. Ol' Sam Carter had a farm, EIEIO. – Steven B. Segletes Oct 4 '18 at 11:56
  • 1
    @StevenB.Segletes :) but you forgot to mention the marmots – user36296 Oct 4 '18 at 11:56
  • 1
    ...and on this farm, she had some marmots, EIEIO – Steven B. Segletes Oct 4 '18 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.