Como faço cabeçalhos sólidos?

Como faço cabeçalhos sólidos?

Estou tentando replicar a formatação de um determinado teste padronizado. Parece um pouco assim:

Este é o formulário.

Vou tentar memoirum tikzpouco hoje, mas queria saber se existe uma maneira fácil de fazer isso.

Responder1

Uma opção usando TikZ e otikzpagenodespacote (ajuste as configurações de acordo com suas necessidades). Segundo comentários, a primeira página de cada capítulo também deverá ter o novo estilo de página, então

\aliaspagestyle{chapter}{solid}

foi usado:

insira a descrição da imagem aqui

O código:

\documentclass{memoir}
\usepackage[hmargin=3cm]{geometry}
\usepackage{xcolor}
\usepackage{lmodern}
\usepackage{tikzpagenodes}
\usepackage{lipsum}
\usetikzlibrary{calc,shapes.arrows}

\newlength\GrayBarHt
\newlength\BlackBarWd
\setlength\GrayBarHt{1.5cm}
\setlength\BlackBarWd{10pt}
\newcommand\ChapterNumberFont{\fontsize{30}{36}\selectfont\bfseries\sffamily}

\newcommand\SolidHeader{%
  \begin{tikzpicture}[remember picture,overlay]
  \path
    node[fill=gray!20,inner sep=0pt,text width=\textwidth,anchor=south west,minimum height=\GrayBarHt]
    at (current page header area.west)
    (box)
    {}
    node[fill=black,inner sep=0pt,minimum height=\GrayBarHt,text width=\BlackBarWd,anchor=west]
    at (box.west)
    (bboxl)
    {}
    node[fill=black,inner sep=0pt,minimum height=\GrayBarHt,text width=\BlackBarWd,anchor=east]
    at (box.east)
    (bboxr)
    {}
    node[font=\ChapterNumberFont,anchor=west]
    at (bboxl.east)
    {\thechapter}
    node[font=\ChapterNumberFont,anchor=east]
    at (bboxr.west)
    {\thechapter};
  \end{tikzpicture}%
}
\newcommand\SolidFooter{%
  \begin{tikzpicture}[remember picture,overlay]
  \path
  node[anchor=north west,align=left,font=\sffamily\bfseries]
    at (current page footer area.west)
    {Unathorized copying or reuse of any part of this page is illegal\\[5ex]\thepage}
  node[fill=black,single arrow,text=white,anchor=north west]
    at (current page footer area.east)
    {\enspace CONTINUE\enspace};
  \end{tikzpicture}%
}

\makepagestyle{solid}
\makeevenhead{solid}{\SolidHeader}{}{}
\makeoddhead{solid}{\SolidHeader}{}{}
\makeevenfoot{solid}{\SolidFooter}{}{}
\makeoddfoot{solid}{\SolidFooter}{}{}

% First page of chapters will also have the style
\aliaspagestyle{chapter}{solid}

\pagestyle{solid}

\begin{document}

\chapter{A test chapter}
\lipsum[1-20]

\end{document}

Como nenhuma informação foi fornecida na pergunta para fontes em páginas ímpares, usei o mesmo que para páginas pares, mas você pode alterar isso facilmente.

informação relacionada