I am trying to modify the footer of my article
document using Tikz but I don't know where to start. My idea is to enclose the page number in a circle
and between lines at the footer:
-------------------------------- ( Number ) ---------------------------
I tried to use scrlayer
but I keep getting the cannot define \newpagestyle
error. Another way I think, would be to use titlesec
but I haven't found a good example so far, for footers. I also thought on using fancyhdr
but I saw that it is not very easy to edit.
EDIT:
Using the first answer I modified it to get this:
which is what I wanted, using this:
\documentclass{article}
\usepackage{tikz}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[top=3cm, bottom=3cm, left=4cm, right=3cm]{geometry}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[C]{%
\noindent%
\tikz[baseline]{\draw[color=back, line width=2pt] (-0.5, 0) -- (6, 0);}%
\protect\circled{\thepage}%
\tikz[baseline]{\draw[color=back, line width=2pt] (8, 0) -- (15, 0);}%
}
\newcommand*\circled[1]{%
\tikz[baseline]{\node[color=back, shape=circle,%
draw, inner sep=4pt, line width=2pt] (char) {#1};}}
\begin{document}
\section{Section name}
\lipsum
\end{document}
I wanted this to match my Sections:
So, if someone has a better idea, I would appreciate it 🙂 But the current answer is great so far
Best Answer
What about the following code with fancyhdr package and tikz