EDIT:
\documentclass[10pt]{article}
\usepackage{geometry}
\usepackage[skins]{tcolorbox}
\usepackage{fancyhdr}
\renewcommand{\footrule}{\hbox to\headwidth{\color{blue}\leaders\hrule height \footrulewidth\hfill}}
\fancypagestyle{document}{
\renewcommand{\footrulewidth}{2pt}
\rfoot{ \raisebox{\dimexpr(-\height+\ht\strutbox-\dp\strutbox)/2}{%
\begin{tcolorbox}[nobeforeafter,
width=.3\linewidth,
frame hidden,boxrule=0pt,
colback=white,
freelance,
arc=0pt,
outer arc=0pt,
boxrule=0pt,
frame code={
\draw[blue,line width=2.5pt]
([xshift=-1.25pt]frame.north west) -- ([xshift=-1.25pt]frame.south west);
}
]\hfill Naar Index~$\rightarrow$ \end{tcolorbox}}}
\lfoot{\raisebox{\dimexpr(-\height+\ht\strutbox-\dp\strutbox)/2}{%
\begin{tcolorbox}[nobeforeafter,
width=.3\linewidth,
frame hidden,boxrule=0pt,
colback=white,
freelance,
arc=0pt,
outer arc=0pt,
boxrule=0pt,
frame code={
\draw[blue,line width=2.5pt]
([xshift=1.25pt]frame.north east) -- ([xshift=1.25pt]frame.south east);
}
]$\leftarrow$~Inhoudsopgave\hfill\end{tcolorbox}}}
}
\begin{document}
\thispagestyle{document}
.
\end{document}
I still have the same problem. The code above outlines the issue: the bars don't align.
EDIT: the bars didn't align because I missed a \strut
before the actual text.
When I use a tcolorbox
with nobeforeafter
inside my footer, the rest of the footer jumps downward. How to stop this from happening?
\documentclass[10pt]{article}
\usepackage{fancyhdr}
\usepackage{tcolorbox}
\fancypagestyle{plain}{
\renewcommand{\footrulewidth}{1pt}
\rfoot{\begin{tcolorbox}[nobeforeafter,width=.3\linewidth]text\end{tcolorbox}}
\lfoot{text}
}
\begin{document}
\thispagestyle{plain}
text
\end{document}
baseline=5mm
for instance. You should first calculate the height of your box with the text.