tikz add tag
Tejas Shetty
I am inspired by this [duck-based page numbers](https://tex.stackexchange.com/a/428566/129388).
I wish to add this to my [thesis template](https://github.com/psunthar/iitbreport).
How do I go about it?
I get it that it may be different for different templates as they may be structured differently.
Is there a way to just wite a small package for it?
Top Answer
samcarter
Luckily your template already uses the `fancyhdr` package, so you can simply add

```
\usepackage{tikzducks}

\setlength{\headheight}{46pt}
\setlength{\footskip}{46pt}
\setlength{\textheight}{240mm}

\fancyhead[LE,RO]{%
  \shuffleducks
  \begin{tikzpicture}[scale=0.5] 
      \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
  \end{tikzpicture}
}

\makeatletter
\if@twoside
  \fancyhead[LO]{\em\nouppercase\rightmark}
  \fancyhead[RE]{\em\nouppercase\leftmark }
\else
  \fancyhead[L]{\em\nouppercase\rightmark}
\fi
\makeatother

\cfoot{}

\fancypagestyle{plain}{%
  \cfoot{%
    \shuffleducks
    \begin{tikzpicture}[scale=0.5] 
        \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
    \end{tikzpicture}
  }
  \fancyhf{} % clear all header and footer fields
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}
```

to your document. As the ducks are a bit taller than normal page numbers I also had to increase the height of the header and footer a bit and decrease the textheight to make room for the ducks.

![Screen Shot 2021-05-07 at 10.55.50.png](/image?hash=be3e95fdd48a4f897a1726f820173350b48054e06ca532a00c3a820ac4db9fc7)

Full example:

```
%%% Time-stamp: <mainrep.tex 19:57, 17 Jul 2016 by P Sunthar>
%%% $Log:$
% This document describes how to use iitbreport style
%********************************************************************

%\documentclass[11pt,a4paper,openright]{report}
\documentclass[twoside]{iitbreport}

%% Default spacing: 1.5
%% Default font size: 12pt
%% Default font: txfonts (similar to times new roman) 

%% Selectively comment out sections that you want to be left out but
%% maintaining the page numbers and other \ref
\includeonly{%
  intro/introduction,
  lit/literature,
  expt/experimental,
  rnd/results, 
  dec,abs,pub,ack
}

%%% Some commonly used packages (make sure your LaTeX installation
%%% contains these packages, if not ask your senior to help installing
%%% the packages)

\usepackage{booktabs}
\graphicspath{{expt/}}


%%% Macro definitions for Commonly used symbols
\newcommand{\Rey}{\ensuremath{\mathrm{Re}}}
\newcommand{\avg}[1]{\ensuremath{\overline{#1}}}
\newcommand{\tenpow}[1]{\ensuremath{\times 10^{#1}}}
\newcommand{\pder}[2]{\ensuremath{\frac{\partial#1}{\partial#2}}}

% Referencing macros
\newcommand{\Eqref}[1]{Equation~\eqref{#1}}
\newcommand{\Tabref}[1]{Table~\ref{#1}}
\newcommand{\Figref}[1]{Figure~\ref{#1}}
\newcommand{\Appref}[1]{Appendix~\ref{#1}}

\usepackage{tikzducks}

\setlength{\headheight}{46pt}
\setlength{\footskip}{46pt}
\setlength{\textheight}{240mm}

\fancyhead[LE,RO]{%
  \shuffleducks
  \begin{tikzpicture}[scale=0.5] 
      \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
  \end{tikzpicture}
}

\makeatletter
\if@twoside
  \fancyhead[LO]{\em\nouppercase\rightmark}
  \fancyhead[RE]{\em\nouppercase\leftmark }
\else
  \fancyhead[L]{\em\nouppercase\rightmark}
\fi
\makeatother

\cfoot{}

\fancypagestyle{plain}{%
  \cfoot{%
    \shuffleducks
    \begin{tikzpicture}[scale=0.5] 
        \duck[signpost=\scalebox{0.6}{\thepage},\randomhead]
    \end{tikzpicture}
  }
  \fancyhf{} % clear all header and footer fields
  \renewcommand{\headrulewidth}{0pt}
  \renewcommand{\footrulewidth}{0pt}
}

\begin{document}
	
%%********************************Frontmatter***********************
% In frontmatter everything comes with roman numbering	
\pagenumbering{roman}
\setcounter{page}{1}

%*******************************************************************
%                         Title Page                            
%*******************************************************************
\title{Essential \LaTeX\ Templates for Report Writing}
\author{My name}

%% Print the date. Today's date comes by default, change it here to 
%% other date format, if required:

%\date{\today}
%\date{10 Mar 2016}


%% The type of the report can be set here

\reporttype{A Seminar Report}
%\reporttype{A Thesis}
%\reporttype{A Dissertation}
%\reporttype{A Project Report}

%% Name of the degree
\degree{Doctor of Philosophy}
%\degree{Master of Technology}


%% Department/Centre Name
\dept{Department of Chemical Engineering}

%% Supervisor and cosupervisor/excosupervisor are not essential parts
%% of a report title page, as it is your report!

%% But if you **have** to put it uncomment these
%\supervisor{Supervisor name}
%\cosupervisor{Co-super name}
%\excosupervisor{External Supervisor}

%% Roll number
\rollnum{Roll No. ....}

\maketitle

%*******************************************************************
%                         Copyright Page                          
%******************************************************************* 
%\mycopyright                    

%*******************************************************************
%                         Dedication Page                         
%*******************************************************************
\dedication[Dedicated to \ldots]        
%\addintoc{Dedication}

%*******************************************************************
%                        Certificate Page                         
%*******************************************************************
%\makecertificate[change title name]{report type} 
\makecertificate{seminar report} 
%\makecertificate{thesis}
%\makecertificate{dissertation}
%\makecertificate{project report}

%\addintoc{Certificate}

%*******************************************************************
%                         Approval Sheet                         
%*******************************************************************
%\makeapproval{thesis}
%\makeapproval{dissertation}

%*******************************************************************
%                          Declaration                           
%*******************************************************************
\include{dec} 
%\addintoc{Declaration}

%******************************************************************
%                          Abstract                             
%******************************************************************  
\include{abs}                    

%******************************************************************
%                         Contents list                         
%******************************************************************
%\figurespagefalse
%\tablespagefalse
\makecontents % Creats toc, lof, and lot

%******************************************************************
%                        Notations                              
%******************************************************************
\notations[4cm]{List of Symbols}      

%%********************************Mainmatter***********************
% In mainmatter everything comes with arabic numbering	
\cleardoublepage
\setcounter{page}{1}
\pagenumbering{arabic}

%******************************************************************
%                         Chapters                           
%****************************************************************** 
\include{intro/introduction}
\include{lit/literature}
\include{expt/experimental}
\include{rnd/results}

%****************************************************************
%                         Appendices                           
%****************************************************************
%% Additional, supporting material, such as codes, derivations, etc., can be placed in the appendix
\appendix
\chapter{Supporting Material}

%******************************************************************
%                         Bibliography or References          
%******************************************************************  
\bibliography{mylit}     

%*******************************************************************
%                         List of publications               
%******************************************************************
\include{pub}            

%*******************************************************************
%                        Acknowledgements                    
%******************************************************************* 
\include{ack}           

%*******************************************************************
%                        About author                    
%*******************************************************************
\colophon % remove this command while using this file.

% GAME OVER
%*******************************************************************
\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
```


Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.