Text FormattingReduce space above header - fancyhdr

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ringrring
Posts: 1
Joined: Thu Oct 20, 2022 3:29 pm

Reduce space above header - fancyhdr

Post by ringrring »

I am using TeXstudio to format an article in a fairly standard way. The article needs a header with three lines of reference text, so I am using the code below. I am very new to this so you may need to be patient. I want to reduce the free space above the header.

Code: Select all

Code, edit and compile here:
\documentclass[10pt, a4paper]{article}
\usepackage{fancyhdr}
\newpage
\pagestyle{fancy}
\fancyfoot[L]{from: him}
\fancyfoot[R]{\thepage}
\fancyhf{}
\renewcommand{\headrulewidth}{0.5pt}
\fancyhead[OL]{
\begin{tabular}[b]{l}
AA\\
LTH\\
Your ref:
\end{tabular}
}
\begin{document}
some text
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Reduce space above header - fancyhdr

Post by rais »

A look into your log file should help:

Code: Select all

Code, edit and compile here:
Package fancyhdr Warning: \headheight is too small (12.0pt):
(fancyhdr) Make it at least 36.0pt, for example:
(fancyhdr) \setlength{\headheight}{36.0pt}.
(fancyhdr) You might also make \topmargin smaller to compensate:
(fancyhdr) \addtolength{\topmargin}{-24.0pt}.
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
KR
Rainer
Post Reply