Page LayoutMaking a large header

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
larvapplatie
Posts: 3
Joined: Wed Aug 10, 2022 2:49 pm

Making a large header

Post by larvapplatie »

Hello everyone ! I am trying to reproduce this large header I saw on a document, and I can't quite figure how they did it (I am really new to Latex ;)) It is only on the first page.
Could somebody can help me recreate this header ?
Thanks
header.png
header.png (12.37 KiB) Viewed 3827 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
larvapplatie
Posts: 3
Joined: Wed Aug 10, 2022 2:49 pm

Making a large header

Post by larvapplatie »

For now, I have tried this :

Code: Select all

\documentclass[11pt, a4paper]{article}

\usepackage{fancyhdr}

\fancyhead[L]{\textbf{PCSI 3}\\ \small 2021/2022}
\fancyhead[C]{\Large \textbf{DS 1}\\ \normalsize 2 heures}
\fancyhead[R]{Lycée \textsc{Sainte-Geneviève}\\ \small Samedi 18 septembre 2021}

\pagestyle{fancy}

\begin{document}
	
\end{document}
which isn't quite right with the spacing:
test.png
test.png (12.25 KiB) Viewed 3805 times
How can I get more upper spacing with the bar ??
Bartman
Posts: 366
Joined: Fri Jan 03, 2020 2:39 pm

Making a large header

Post by Bartman »

Your incomplete example uses the fancyhdr package to output the header on every page instead of just the first.

A reproduction of the figure from the opening post only on the first page could look like this:

Code: Select all

\documentclass[11pt, a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[french]{babel}
\usepackage{blindtext}
\usepackage{showframe}

\begin{document}
{
  \centering
  \textbf{PCSI3}\hfill Lycée \textsc{Sainte-Geneviève}\par
  {\small 2021/2022\hfill Samedi 18 septembre 2021\par}
  {\large\textsc{DS 1}\par}
  \Large\textbf{Title}
  \par
}
\vspace{1.5\baselineskip}
\hrule
\smallskip
{
  \raggedleft
  \sffamily
  \footnotesize 
  Submission date
  \par
}

\blinddocument
\end{document}
larvapplatie
Posts: 3
Joined: Wed Aug 10, 2022 2:49 pm

Making a large header

Post by larvapplatie »

Thank you so much, that is exactly what I had in mind !!
Post Reply