LaTeX forum ⇒ Page LayoutMaking a large header Topic is solved

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

Making a large header

Postby larvapplatie » Wed Aug 10, 2022 2:52 pm

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 416 times

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net
LaTeX Beginner's Guide LaTeX Cookbook
larvapplatie
Posts: 3
Joined: Wed Aug 10, 2022 2:49 pm

Making a large header

Postby larvapplatie » Wed Aug 10, 2022 7:41 pm

For now, I have tried this :

\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 394 times


How can I get more upper spacing with the bar ??

Bartman
Posts: 303
Joined: Fri Jan 03, 2020 2:39 pm

Making a large header  Topic is solved

Postby Bartman » Wed Aug 10, 2022 10:09 pm

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:

\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

Postby larvapplatie » Wed Aug 10, 2022 10:43 pm

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


Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 4 guests