how can I add a horizental line above my page and write above it. like that enter image description here


Here's an example that is based on here. The manual for the package fancyhdr can be found here.

% Based on https://overleaf.com/learn/latex/Headers_and_footers


\usepackage{fancyhdr} % <-- Important package!

\fancyhf{} % Clear all header and footer fields and then re-define the field, see below.
\fancyhead[RE,LO]{Guides and tutorials}

% E for even page
% O for odd page
% L for left side
% C for centered
% R for right side

\renewcommand{\headrulewidth}{10pt} % <-- Width of head line
\renewcommand{\footrulewidth}{0.1pt} % <-- Width of foot line




enter image description here

  • thank you for your answer but I'm using lyx ,so I can't write all this ,I can only insert code tex .
    – Imene Yd
    Jun 13 at 7:24
  • I do not understand your comment, sorry. Most likely because I have never used LyX. Jun 13 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.