0

I've a question regarding the placement of the header. As far as I know TeX first places the header, then the body and finally the footer. The header is therefore below the body and the footer above the text. If I want to add a structure in the body that overlaps the header and footer, only the footer is still visibile. The content of the header is behind the structure.

I've tried some things to work around this, but I had no success so far.

Is there a way to place the header above the body ?

\documentclass{article}

\usepackage{lipsum}

\usepackage[skins, breakable]{tcolorbox}

\newtcolorbox{example}[1]
{enhanced,breakable,sharp corners,colframe=white!90!red,colback=white!90!red,#1,overlay={\draw[white!90!red,line width=55pt]([yshift=-25pt]frame.south east)-- ([xshift=-25pt,yshift=-25pt]frame.south west)--([xshift=-25pt]frame.north west)--(frame.north east);} }


%Header & Footer
\usepackage[pagestyles]{titlesec}
\renewpagestyle{plain}[]{\sethead {This is the head}{partially}{visible}
\setfoot{This is the foot}{still}{visible}
} 
\pagestyle{plain}


\begin{document}
\begin{example}{}
\lipsum[1-5]
\end{example}

\end{document}

I've tried using the footer as header decreasing \footskip to a negative value but this didn't work. It only seems to have an effect, if the value is positive. Is there a way to make this work even if it's unconventional? I don't need the footers in the entire document.

  • 1
    Welcome to tex,sx. I'm unaware of a situation where the header is below and the footer above the body. Please provide a brief but compilable example that demonstrates what you describe. Start with \documentclass and end with \end{document}. Otherwise, we can only use our crystal balls, which are notoriously imprecise. – barbara beeton Apr 13 '20 at 16:18
  • I don't mean vertically. I'm talking about layers as discussed in https://tex.stackexchange.com/a/18276/212088. I will add an example asap. – GrueneSosse Apr 13 '20 at 17:46
  • Thank you for the (partial) clarification. When certain terms are used to mean so many different things, it's pretty hard to figure out what is meant without an explicit example. – barbara beeton Apr 13 '20 at 18:00
  • You might consider adding a tag "layers". I don't know much about that topic, but it seems more appropriate to this question than "headers". – barbara beeton Apr 14 '20 at 20:19

0 Answers0